While I eagerly await 0.6 and com.fs.starfarer.api.ModPlugin, I've been checking out the current API.
And if we are to support dynamic mod attaching with other mods, there are some methods that will be critical.
For starters, I cannot dynamically set the relationship of my faction with other modded factions:
SectorAPI
- List<FactionAPI> getAllFactions(); // or more javalesque: getFactions()
With that, I could iterate them and set the relation ship stats.
Also, I would like to create a dynamic faction, that can change their ship designs.
I haven't seen any API so far that allows that.
Would I have to save every every design with a new random name, or does the engine support running a nameless design?
For example, the player can have the "Custom" design, but does that behind the scenes create a temporary design for each custom design?
Something else that would really help, would be some parameters for the StarfarerLauncher's main method.
I've been launching the game from Eclipse so I can debug stuff, and if there was a way to skip the launcher, or even the title screen, it would be great.
I suggest the following params:
- -skipLauncher (does what it says)
- -nosound / -sound (I think that using devMode in settings.json disables sound by default to speed up the loading, but since we are skipping the launcher)
- -fullscreen / -window (same as above)
- -campaign <save name / save id> (loads the game directly into that campaign save)
- -newCampaign <class name that implements CharacterCreationPlugin interface> (that way we can just return null at getPrompt(), and provide a quick way to directly boot into the game in campaign mode with a new player)
- -mission <mission id> (I haven't ever played a mission so far, and don't really know if it can have any parameters asked at start, but I added this for the sake of completeness)
Resolution parameters aren't really required since you can just use resolutionOverride in settings.json.
I tried peeking to implement these myself, but obfuscation was just too annoying to dig through.
I wasn't really sure if you are passing an ActionListener to StarfarerLauncherUI, or if it's bootstraping the game itself.