Modding

From Surviving Mars Wiki
Jump to navigation Jump to search

Note: Mods are reloaded each time a map is restarted, allowing for quick testing of changes.

There are multiple ways to engage in modding Surviving Mars.

  1. Assets may be imported as .blend files, created within Blender.
  2. LUA scripting is supported and documentation is included within the Mod Editor in-game
  3. The Mod Editor itself is a proprietary system, accessed from the main menu


Documentation[edit]

Above and beyond the in-game modding system, the HTML document that is automatically opened when you click on the Mod Editor is not the only source of documentation. The documentation that accompanies Surviving Mars is extensive. It can be found in the following folder: "...\steamapps\common\Surviving Mars\ModTools". Within this folder you will find two folders of interest: Docs, and Samples.

  • Inside Docs is a series of HTML documents that spells out most functions and classes in the game, with verbose descriptions of how to utilize each and what they affect.
  • Inside the Samples folder you'll encounter two more folders entitled "Assets," and "Mods".

Surviving Mars Reference LUA: https://github.com/HaemimontGames/SurvivingMars

Pre-Made Mod Samples[edit]

Each of the mods that are present there were created by Haemimont and are also available for you to download from Steam. What you find in each sample's folder is each of the assets and all of the code that went into their creation, including notation about each function and method.

  1. Cemetary: an example of the OnMsg functions, and object interaction.
  2. TimeCapsule: an example of reading previous saves, building states, and map manipulation.
  3. ShadowedSolarPanels: an example of overriding an existing method to alter logic.
  4. SyntheticMeat: an example of adding a new crop.
  5. MedicalResearcher: an example of adding a new commander.

Mod Editor[edit]

Mod Editor and cheats menu
  • The Mod Editor can be launched from the Main Menu and will load a small but completely self-sufficient colony.
  • The Mod Editor allows for relatively easy creation of new mods. It also includes a cheat menu that can be used on new maps or existing saves.

The Mod Editor is not available on the Linux and Mac versions of the game.

List of Messages[edit]

See Messages

Technology IDs[edit]

DISCLAIMER: This section should be its own page. These names are the ones I've got from contacting the support.

See Technology IDs

Meta Data[edit]

The following is not a complete list, as more information is available it will be updated/corrected.

Locator Spots (Empties)[edit]

Item Meta Data Name
Life Support -LifeSupportGrid
Top -Top
Tube -Tube
WorkDrone -WorkDrone
WorkRover -WorkRover
Light -L

Mesh Spots[edit]

Item Meta Data Name
Collision Mesh Collision
Selection Mesh Selection
Grid Spot Reserve Mesh hex_shape
Terrain Occlusion terrain_hole

Textures and UV Maps[edit]

> BaseColor (RGB)

> Normal (RGB)

> RoughnessMetallic (RGB) 
    RG channels for Roughness ( 0 = Polished Surface | 1 = Rough Surface)
    B channel for Metalness (0 = Dielectric | 1 = Metal )

> Ambient Occlusion or AO (Grayscale)

> Dust (Grayscale)
    1 = Full dust
    0 = No Dust

> Emissive (Grayscale)
    1.0 = Full Illumination
    0 = No illumination
Color Space Texture Map Texture Name
RGB Diffuse Map BaseColor
RGB Normal Map Normal
RGB Roughness Map RoughnessMetallic
Grayscale Ambient Occlusion Map AO
Grayscale Dust Map Dust
Grayscale Emissive Map Emissive

UV Maps[edit]

UVChannel_1[edit]

BaseColor
Normal
RoughnessMetallic 
AO

UVChannel_2[edit]

Dust 
Emissive

See also[edit]


Game concepts