Invisible, Inc.

Invisible, Inc.

63 ratings
Sim Constructor + Sequential Mod Loader
File Size
0.038 MB
Dec 21, 2015 @ 10:20am
Feb 14 @ 11:34am
25 Change Notes ( view )

Subscribe to download
Sim Constructor + Sequential Mod Loader

The Sim Constructor is a tool that gives mod makers more freedom while maintaining compability.

These are the current modules:
1) Early, late, and unload options for mod loading
2) Modding existing generation options and customizing new options(more than one value, default to false etc)
3) Defining required mods. These mods will always be loaded before your. (I did not make this module. Credit goes to Lemonhead)
4) Adding Agent banter
5) Customizing hud elements

If you are using a mod that is made using the Sim Constructor, you need to have the Sim Constructor to run it.

How to use it (for mod makers)
--Change an existing generation option --Defined by option name, not simdef name --Reference can be found in client\states\state-generation-options rawset(simdefs.CUSTOM_OPTIONS,anyname,{ name, tip, check, strings, values, apply, retrieve }) --Customized generation option --If enabled=false this ption will start unchecked(ignored if Values is defined) --Values is a table that holds different alternatives --Strings contains names that match values(optional) --Value is default value(optional) modApi:addGenerationOption(optionName, name , tip, {enabled,values,strings,value} ) --Modify a hud file --The files that can be modified are all files located in gui.kwad/gui (you need to use kwad extractor to see these files) --data is deepmerged, so you only need to include the info that you are changing simdefs.SCREEN_CUSTOMS = util.extend(simdefs.SCREEN_CUSTOMS) { [filename] = { data } } --Set a game param directly --This feature has not been fully tested, use at your own risk --This code needs to be called in the load function instead of the init function modApi.mod_manager.genOptions[option] = options[option] --Loading mod content before or after other mods, or if the mod is disabled local function earlyLoad( modApi, options ) end local function earlyUnload( modApi, options ) end local function unload( modApi, options ) end local function lateLoad( modApi, options ) end local function lateUnload( modApi, options ) end --Add agent banter (use in load function after adding guard to agentdef, not in the init function) modApi:addBanter( { agents = {id,id},--The agents that are talking dialogue = { {id,string},--Id is the talking agent, string is what they say {id,string}, }, } ) --Set required mods modApi.requirements = { mods }

Here's an example mod that uses the Sim Constructor:

Feel free to discuss the mod on our Discord:
< >
piseesc64 May 24 @ 1:31pm 
piseesc64 May 24 @ 1:28pm 
I'm not talking about campaign generation options, as cool as they may be. I'm talking about campaign generation presets.
cyberboy2000  [author] May 24 @ 10:41am 
To add a generation option you use the mod api. However sim constructor adds more functionality to the api, for exampe letting you add options with multiple values to choose from instead of a simple checkbox.
piseesc64 May 23 @ 5:03pm 
I don't think this mod does what I thought it does. Is there a mod that allows you to add a Campaign generation preset?
piseesc64 May 23 @ 4:55pm 
Oh, thanks.
cyberboy2000  [author] May 23 @ 1:40am 
I'm not entirely sure what you're looking for, but the folder for client scripts is inside
piseesc64 May 22 @ 9:45pm 
where is this "client" folder you speak of? is it even a folder?
cyberboy2000  [author] Feb 14 @ 11:38am 
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
cyberboy2000  [author] Dec 5, 2017 @ 4:21am 

Fixed a few compability issues with language packs.
Fix for no starting mission when travel times are set too high.
cyberboy2000  [author] Dec 3, 2017 @ 7:08am 
Thanks for the report. It will be fixed next update.