Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

Cyberboy2000

[MOD] Sim Constructor

Recommended Posts

Cyberboy2000    549

Sim Constructor is an utility mod, allowing mod makers a wide range of functions while maintaining compability.

If a mod uses Sim Constructor everyone who uses that mod needs to have Sim Constructor installed as well.

Spoiler

21/12-15

Initial release

22/12-15

Now includes Sequential Mod Loader by Lemonhead(Lemonymous on the forum)

31/12-15

Added generation option customization

18/4-16

Compatible with Library version of Sequential mod loader

12/8-16

Added early, late and unload modules
Removed Sim construction
Added Add Banter functionality

13/8-16

Fixed an issue with language packs

25/1-17

Hopefully fixed some of the disappearing items bugs
Fixed possible issue with non steam versions
Fixed banter not resetting when mod is turned off

simdefs.CUSTOM_OPTIONS is now keyed, meaning you have to use simdefs.CUSTOM_OPTTIONS[name] instead of table.insert, where name is the on-screen name of the option
Use simdefs.CUSTOM_OPTIONS_ORDER to order things you add to CUSTOM_OPTIONS
Generation options can now have masks. Masks mean that certain options are hidden unless the mask requirements are met
Generation options can have the noUpdate trait to make toggling that setting not put you into custom difficulty
Generation options can now nest other options. This is only useful for vanilla options, since simdefs.CUSTOM_OPTIONS is now keyed
You can now define custom apply and retrieve functions for generation options

Constants local to procgen_context are now defined in simdefs 
earlyInit and lateInit functions can now be defined

23/2-17

Added ability to easily change hud elements (comes with room for up to 12 Incognita slots)

17/3-17

Fixed crash when loading old saves with new mods installed.

19/3-17

Fixed error with hud customization

4/4-17

Custom hud objects now reload each time they load.

6/5-17

Mod load order is now consistent.
Safe loot table are now reset automatically.
Generation options can now be set to default to different values on different difficulties.
Campaign params and Campaign difficulty can be passed to custom apply and retrieve functions.

1/6-17

The raw generation options are now passed to all load and unload functions. Useful for figuring out if a certain mod is enabled or not.

2/6-17

An agent can now override certain values of an item they can carry. For example they can be configured to automatically install a certain augment.
Fixed a potential memory leak cause by cross banter.

20/8-17

Added support for banter with a different number of agents than 2.
Custom stores can now define what type of overlay they have (fixes issues with Auxillary Server Terminals from Programs Extended)

23/8-17

Fixed ui changes not working because of the last update

24/9-17

Fixed mods not unloading for old saves.
Added worldmap modifying features.

28/9-17

Fixed incorrect looking doors when using custom wall textures

30/9-17

Made the addWorldPrefabt function work with existing corporations as well as other mods

3/10-17

Fixed another crash

7/10-17

No more errors if you try to add banter to an agent that is not enabled.
Added the ability to add arbitrary functions to be called whenever campaign time changes.

5/12-17

Fixed a few compability issues with language packs.
Fix for no starting mission when travel times are set too high.

14/2-18

Moved some variables that used to be local for state-generation-options to simdefs
Made it so that you can make programs that target any unit, also allows you to customize graphics and tooltips for programs that work like Lightning

Steam Workshop Version

Feel free to discuss the mod on our Discord: https://discordapp.com/invite/aQrXEse

 

 

 

workshop-580661011.zip

Share this post


Link to post
Share on other sites
Cyberboy2000    549

Added ability to easily change hud elements.

As an example I have added room for up to 12 Incognita slots (it does not actually add new slots, but it allows other mods to do so)

Share this post


Link to post
Share on other sites
Cyberboy2000    549

Mod load order is now consistent (could cause some issues with existing saves, but I think it's better than having it the way it used to be).
Safe loot table is now reset automatically.
Generation options can now be set to default to different values on different difficulties.
Campaign params and Campaign difficulty can be passed to custom apply and retrieve functions.

Share this post


Link to post
Share on other sites
Cyberboy2000    549

The raw generation options are now passed to all load and unload functions. Useful for figuring out if a certain mod is enabled or not.

Share this post


Link to post
Share on other sites
Cyberboy2000    549

An agent can now override certain values of an item they can carry. For example they can be configured to automatically install a certain augment.
Fixed a potential memory leak cause by cross banter.

Share this post


Link to post
Share on other sites
dataflux    0

Hi Cyberboy,

Sorry if this is a dumb question, but is there a way to change the loading order of mods with Sim Constructor?

For example, the "API Example" mod (which probably doesn't use Sim Constructur?) changes Decker's starting augment, but then "New Items and Augments" loads later and overwrites it with a different one again. I can currently only get the augment from the API Example mod by completely disabling the New Items and Augments mod.

Is there a way to fix this with Sim Constructor's mod load order?

 

Thanks.

Share this post


Link to post
Share on other sites
wodzu_93    23

Yes, but you need to edit mod files directly, there is no GUI to dynamically change that order in-game. Editing can be a bit tricky if You don't know how it works.

 

Share this post


Link to post
Share on other sites
dataflux    0

I don't mean to be too demanding, but in this specific case, what would I need to change?

A line in the code for the "New Items and Augments", which already uses Sim Constructor I presume? Or would I have to add a dependency to the API Example mod on Sim Constructor?

I don't mean to ask to much of you, I have some coding experience, but got rather confused the last time I tried to mod II, so a few pointers would be very much appreciated!

Share this post


Link to post
Share on other sites
Cyberboy2000    549
On 7/17/2017 at 11:08 AM, dataflux said:

Hi Cyberboy,

Sorry if this is a dumb question, but is there a way to change the loading order of mods with Sim Constructor?

For example, the "API Example" mod (which probably doesn't use Sim Constructur?) changes Decker's starting augment, but then "New Items and Augments" loads later and overwrites it with a different one again. I can currently only get the augment from the API Example mod by completely disabling the New Items and Augments mod.

Is there a way to fix this with Sim Constructor's mod load order?

 

Thanks.

Just get Agent Mods Combo by Shirsh. It has an agent (Ghuff) which does the same thing.

Share this post


Link to post
Share on other sites
dataflux    0
16 hours ago, Cyberboy2000 said:

Just get Agent Mods Combo by Shirsh. It has an agent (Ghuff) which does the same thing.

Actually, Ghuff does the same as the agent included in the Example API mod, but that also replaces Decker's augment with a tagging one.

Share this post


Link to post
Share on other sites
Cyberboy2000    549

Added support for banter with a different number of agents than 2.
Custom stores can now define what type of overlay they have (fixes issues with Auxillary Server Terminals from Programs Extended)

Share this post


Link to post
Share on other sites
Cyberboy2000    549

No more errors if you try to add banter to an agent that is not enabled.
Added the ability to add arbitrary functions to be called whenever campaign time changes.

Share this post


Link to post
Share on other sites
Cyberboy2000    549

Moved some variables that used to be local for state-generation-options to simdefs
Made it so that you can make programs that target any unit, also allows you to customize graphics and tooltips for programs that work like Lightning

Share this post


Link to post
Share on other sites