NoMansSky:Tutorials/Spawning-Testing Objects-Scenes
From Step Mods | Change The Game
< NoMansSky:Tutorials(Redirected from NoMansSky:Tutorials/Spawning and Testing Objects Scenes)
Spawning Objects
There are several ways of making your scenes (essentially objects) appear in game:
- As new Basebuilding item
- Entity related: Using GcObjectSpawnerComponentData
- (see MODELS/PLANETS/BIOMES/COMMON/BUILDINGS/PARTS/BUILDABLEPARTS/TECH/OBJECTSPAWNER/ENTITIES/OBJECTSPAWNER.ENTITY.MBIN)
- By adding the scene/object into a spawn table (LevelOneObjects), likewise one that is always valid on every planet/biome: METADATA/SIMULATION/SOLARSYSTEM/BIOMES/OBJECTS/LEVELONEOBJECTS/FULL.MBIN METADATA/SIMULATION/SOLARSYSTEM/BIOMES/OBJECTS/RARE/ALWAYSPRESENT.MBIN
- Entity related: Using GcSpawnAction that gets triggered by e.g. a player interaction. (This doesn't seem to work anymore and was only used in pre release code used for the E3 Demo)
- Entity related: TkReferenceComponentData and referencing the scene file path ("Reference" value)
- Entity related: GcNodeActivationAction with filled entry SceneToAdd
- Attachment to an existing scene. You can use all existing game objects to attach another scene or entity to it. You can also change the relative position, rotation and scale. Best is adding it to the children section of a scene. You can use this template:
<Property value="TkSceneNodeData.xml"> <Property name="Name" value="MODELS/CUSTOM/CUSTOMSCENE1" /> <Property name="NameHash" value="0" /> <Property name="Type" value="REFERENCE" /> <Property name="Transform" value="TkTransformData.xml"> <Property name="TransX" value="0" /> <Property name="TransY" value="0" /> <Property name="TransZ" value="0" /> <Property name="RotX" value="0" /> <Property name="RotY" value="0" /> <Property name="RotZ" value="0" /> <Property name="ScaleX" value="1" /> <Property name="ScaleY" value="1" /> <Property name="ScaleZ" value="1" /> </Property> <Property name="Attributes"> <Property value="TkSceneNodeAttributeData.xml"> <Property name="Name" value="SCENEGRAPH" /> <Property name="AltID" value="" /> <Property name="Value" value="MODELS/PLANETS/BIOMES/COMMON/BUILDINGS/PARTS/BUILDABLEPARTS/TECH/PARTS/OBJECTSPAWNER/BALL.SCENE.MBIN" /> </Property> </Property> <Property name="Children" /> </Property>
Spawning a scene and forcing the procedural generation to use a specific seed
- Spawn tables have a seed value you can force the game to use. See in METADATA/SIMULATION/SOLARSYSTEM/BIOMES/OBJECTS/.
- Scene references in scene have a ALTID value where you can add the SCENE part names of the main procedural SCENE.
- If you want to get a ship with a specific seed you can either create yourself a custom reward with a seed value defined in the reward table entry or use savegame editor to alter the seed.