Changes

Jump to navigation Jump to search
1,730 bytes added ,  18:30, 13 April 2016
no edit summary
Line 488: Line 488:  
</Incompatibilities>
 
</Incompatibilities>
 
</PersonalityGraph></pre>
 
</PersonalityGraph></pre>
 +
 +
== Modding with DLLs ==
 +
As of Alpha 8.10, Software Inc. supports loading assemblies at runtime.
 +
 +
A good grasp of Unity3D programming is needed.
 +
 +
To create your own mod, start a .NET project targeted at the .NET 3.5 profile. Note that you might want to compile your mod with the mono compiler, to enable cross platform support.
 +
Add a reference to the following libraries:
 +
Software Inc_Data\Managed\UnityEngine.UI.dll
 +
Software Inc_Data\Managed\UnityEngine.dll
 +
Software Inc_Data\Managed\Assembly-CSharp.dll
 +
 +
Start by creating a class that implements the ModMeta interface, then implement as many classes that inherit from ModBehaviour as you want. Each ModBehaviour implementation will be instantiated once the mod is loaded.
 +
 +
When you're done, compile your mod and place it in the game's folder, in a subfolder called "DLLMods".
 +
 +
Here's an example of a mod that let's you change how many floors you can build on, complete with comments:
 +
[http://swinc.net/FloorMod.zip Floor Mod]
 +
 +
Here's a list of important entry points you can have a look at:
 +
{|class="wikitable"
 +
|GameSettings.Instance
 +
|This class contains most of the objects that manage the game
 +
|-
 +
|GameSettings.Instance.MyCompany
 +
|The player's company
 +
|-
 +
|GameSettings.Instance.simulation
 +
|Manages all companies and products
 +
|-
 +
|GameSettings.Instance.sRoomManager
 +
|Manages rooms, furniture and room segments
 +
|-
 +
|GameSettings.Instance.sActorManager
 +
|Manages employees and teams
 +
|-
 +
|SelectorController.Instance
 +
|Manages selection
 +
|-
 +
|TimeOfDay.Instance
 +
|Manages time
 +
|-
 +
|HUD.Instance
 +
|Manages the main HUD and windows
 +
|-
 +
|HUD.Instance.ObjDB
 +
|Contains all furniture and room segments
 +
|-
 +
|WindowManager
 +
|Controls windows and has functions to create windows and GUI elements
 +
|-
 +
|}

Navigation menu