Changes

Jump to navigation Jump to search
1,597 bytes removed ,  23:13, 9 October 2018
no edit summary
Line 4: Line 4:  
{|class="wikitable"
 
{|class="wikitable"
 
|style="font-size:125%" | [[Material Modding]] is a separate page
 
|style="font-size:125%" | [[Material Modding]] is a separate page
 +
|}
 +
{|class="wikitable"
 +
|style="font-size:125%" | [[Code Modding]] is a separate page
 
|}
 
|}
 
Modding in Software Inc. is completely data driven. Software Inc. loads XML files found in the "Mods" folder of the root of the game when it launches.
 
Modding in Software Inc. is completely data driven. Software Inc. loads XML files found in the "Mods" folder of the root of the game when it launches.
Line 524: Line 527:  
</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 required.
  −
  −
To create your own mod start a .NET project targeted at the .NET 3.5 profile.
  −
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 abstract class, 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] (Updated to work with Alpha 10.7+)
  −
  −
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
  −
|-
  −
|ObjectDatabase.Instance
  −
|Contains all furniture and room segments
  −
|-
  −
|WindowManager
  −
|Controls windows and has functions to create windows and GUI elements
  −
|-
  −
|}
 

Navigation menu