Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: [0.97a] NiteLib v1.1.0 (03/21/2024)  (Read 857 times)

NITEGHXST

  • Ensign
  • *
  • Posts: 25
  • General of The Nite Brotherhood
    • View Profile
[0.97a] NiteLib v1.1.0 (03/21/2024)
« on: March 20, 2024, 09:51:54 PM »


For user: This utility / library mod is used in my mods and therefor required to be installed along with them.
Note: Currently there are no mods released yet that use this.
For modders: On the modding side of things, this mod has as use rather two simple goals, logical variables & fixing consistency.


All text below is aimed at modders and people interested in how this mod works.
For regular users, you only need to click the download button.


Explanation

The reason for making this was a personal need for consistency, and since I use it in my
own upcoming mod(s) I thought why not upload this one already as it so far won't receive
any updates soon unless I suddenly think of something new to add or someone else has
any suggestions of what I could add in the realm of data retrieval of string id's or other
variables that otherwise need to be manually put it.

Functions
This library adds 5 utility classes for mods & modders to use:

NebulaeTypes:
Contains the 3 nebula types, very straight forward.

PlanetTypes:
Seasoned modders may know that the game's own API also contains this class
in the form of "Planets.java". Same goes for "StarTypes". The reason for revamping
this class is due to for some reason nebulae and other things being present where
you wouldn't expect them. This basically fixes the illogical placement.

SpecialSystemEntityTypes:
This class contains "special stations" such as stellar mirrors & -shades, derelicts, and more.

StarTypes:
As mentioned before, same story as for the planets. However here for some reason
gas giants were put in with the star types. (You may notice yes getting used to
these illogical placements can also fix the issue, for me this just felt better.)

StationTypes:
This class contains all the regular station types, from defensive stations to the
other types such as mining stations, research stations, pirate stations etc.

Credits:

Fractal Softworks - For the original code and id's of the different entities to choose from.

                 
Requirements
Absolutely nothing, it's a lonesome utility mod :P





How To Use (Modders)

Wherever your code requires an identifying string
regarding Campaign Entities, you can use this library to quickly
insert the wanted string for the wanted station/entity.

Code Example:
PlanetAPI planet= system.addPlanet(
                "planetId",
                whatToSurround,
                "planetName",
                PlanetTypes.GAS_GIANT, // < This mod
                angle,
                radius,
                orbitRadius,
                orbitDays
);
[close]


NiteLib is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Any derivative work must also comply with Starsector's EULA
« Last Edit: March 21, 2024, 09:33:12 AM by NITEGHXST »
Logged
"We are brothers and sisters, all the same, all as one. This Brotherhood stands on group effort.
The more you bring to the table, the more you will be rewarded for your efforts.
Having said that, WHO'S READY TO RID THIS SECTOR OF THE HEGEMONY?!"

~ Rug'ger, TNB General

NITEGHXST

  • Ensign
  • *
  • Posts: 25
  • General of The Nite Brotherhood
    • View Profile
Re: [0.97a] NiteLib v1.1.0 (03/21/2024)
« Reply #1 on: March 21, 2024, 11:07:33 AM »

Reserved
Logged
"We are brothers and sisters, all the same, all as one. This Brotherhood stands on group effort.
The more you bring to the table, the more you will be rewarded for your efforts.
Having said that, WHO'S READY TO RID THIS SECTOR OF THE HEGEMONY?!"

~ Rug'ger, TNB General