Space Engineers

Space Engineers

467 ratings
Definition Extension API
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Script, Other
File Size
Posted
Updated
186.766 KB
17 Feb, 2022 @ 11:04pm
28 Jan @ 2:38pm
19 Change Notes ( view )

Subscribe to download
Definition Extension API

Description
API mod to add a custom <ModExtensions> Tag to any SBC file. Definitions can then be loaded by any mod using DefinitionExtensionsAPI.cs (included in this mod) and adding this mod as a dependency.

Block mods do not need to add this mod as a dependency, just have a text file named DefinitionExtensions.txt in the root of the Data directory listing every sbc or xml file that contains definition extensions.

Supported definitions:
CubeBlock
Components
PhysicalItems
PlanetGeneratorDefinitions
EnvironmentDefinition

Example tag and tag types below: Multiple tags of the same type are supported, tags with the same "Name" and type will override each other, mods can mod other mod's tags, mod load order determines what is precedent.
<ModExtensions> <Group Name="TestGroup"> <Text Name="sTest" Value="Test String" /> <!-- strings --> <Integer Name="Test" Value="10" /> <!-- integer values (whole numbers) Max value 9223372036854775807--> <Boolean Name="bTest" Value="false" /> <!-- true or false --> <Decimal Name="dTest" Value="1" /> <!-- any decimal number ex. 0.14333333 --> <Vector2I Name="v2iTest" X="1" Y="1" /> <!-- Integer valued 2 axis vector --> <Vector2D Name="v2dTest" X="1" Y="1" /> <!-- Decimal valued 2 axis vector --> <Vector3I Name="v3iTest" X="1" Y="1" Z="1" /><!-- Integer valued 3 axis vector --> <Vector3D Name="v3dTest" X="1" Y="1" Z="1" /> <!-- Decimal valued 3 axis vector --> <Color Name="cTest" R="255" G="0" B="0" A="255" /><!-- Color in R G B A, values can be between 0 and 255--> </Group> </ModExtensions>

Mod now also supports custom gamelogic loading. This still is in the experimental stage, so please report any issues on my discord. Format is below. Mods can register a gamelogic component to the name and it will be loaded for any block that includes the SBC tag with the same name.
<ModExtensions> <ModComponents> <GameLogicComponent Name="TestComponent" Enabled="true" /> <!-- Enabled is by default true, but can be set to false to disable a custom gamelogic component--> </ModComponents> <Group Name="TestGroup"> <Text Name="sTest" Value="Test String" /> <!-- strings --> <!-- etc --> </Group> </ModExtensions>

API also provides an easy method for deploying terminal controls with your MyTSSCommon script! See the API files for details or ask on my discord or in the Keen discord in #modding-programming.

Guide and Examples:
SEMREF: https://semref.atlassian.net/wiki/spaces/tools/pages/28999735/ModExtensions

Mods looking to implement this mod and read the assigned values via script can copy Steam\steamapps\workshop\content\244850\2756894170\Data\Scripts\DefinitionExtensions\DefinitionExtensionsAPI.cs into their mod.

Questions? Help? Discord link is below.
Discord
Discord[discord.gg]
22 Comments
DraygoKorvan  [author] 16 Apr @ 3:22pm 
No. Mod isn't compatible for crossplay anyway.
TheBlackside {GER} 15 Apr @ 12:30pm 
Hi, I wanted to ask if it would be okay to upload your mod to mod.io?
Since we want to start a private crossplay server and would like to continue using your mod.
Gluttony 26 Feb, 2023 @ 2:58pm 
ty
DraygoKorvan  [author] 26 Feb, 2023 @ 6:59am 
Right click and copy page URL, it is after id=
Gluttony 26 Feb, 2023 @ 6:45am 
Whats the WorkshopID?
DraygoKorvan  [author] 22 Jan, 2023 @ 12:24pm 
This is an API and is not outdated.
Mia_ghoster 22 Jan, 2023 @ 12:20pm 
hi i am using the water mod. and this API is outdated. could we get an update please? thank you!!
FallenShadow 18 Oct, 2022 @ 4:44pm 
Strange, ill do a bit more testing. I said it was this mod because when i removed it, the turrets started working again. However, someone else recommend i check download order, and it is most likely that that's causing it. I apologize for reporting something thats not your fault, please have a nice day.
DraygoKorvan  [author] 18 Oct, 2022 @ 4:27pm 
Hi, this mod does not do anything on its own. It needs other mods to implement its function.

It is unlikely this mod will be causing this effect.
FallenShadow 16 Oct, 2022 @ 10:35am 
In multiplayer, when a player is in the turret, none of the other players can build blocks. This breaks multiplayer games, please fix it.