NoMansSky:Reference Guides/Actions and Triggers: Difference between revisions

From Step Mods | Change The Game
Line 48: Line 48:
| style="font-weight:bold;text-align:left;border-top:solid 1px;padding-right:30px;"|GcWarpAction|| style="border-top:solid 1px;"|If you are in your ship this will warp you as if you had flown into a black hole.
| style="font-weight:bold;text-align:left;border-top:solid 1px;padding-right:30px;"|GcWarpAction|| style="border-top:solid 1px;"|If you are in your ship this will warp you as if you had flown into a black hole.
|- style="background-color:#3c3f46;"
|- style="background-color:#3c3f46;"
| style="font-weight:bold;text-align:left;border-top:solid 1px;padding-right:30px;"|GcRewardAction|| style="border-top:solid 1px;"|The value of Reward is given to the player. The value must exist in the REWARDTABLE.mbin file. Triggering rewards extends the ammount of available actions immensly. See here.
| style="font-weight:bold;text-align:left;border-top:solid 1px;padding-right:30px;"|GcRewardAction|| style="border-top:solid 1px;"|The value of Reward is given to the player. The value must exist in the REWARDTABLE.mbin file. Triggering rewards extends the ammount of available actions immensly. [[NMS:Reference_Guides/Reward_Types|See here]].
|-  
|-  
| style="font-weight:bold;text-align:left;border-top:solid 1px;padding-right:30px;"|GcSpawnAction|| style="border-top:solid 1px;"|Untested, but should able to spawn other entities. Not sure at the moment where the Event value has to be. Is there a list of entities, or maybe something in the parent ~.SCENE.mbin?<br>If you look in the /MODELS/COMMON/DEMOS/E32015/ files you can see this used. However, after extensive testing it seems this is extremely limited in functionality and GcNodeActivationAction is probably a better fit.
| style="font-weight:bold;text-align:left;border-top:solid 1px;padding-right:30px;"|GcSpawnAction|| style="border-top:solid 1px;"|Untested, but should able to spawn other entities. Not sure at the moment where the Event value has to be. Is there a list of entities, or maybe something in the parent ~.SCENE.mbin?<br>If you look in the /MODELS/COMMON/DEMOS/E32015/ files you can see this used. However, after extensive testing it seems this is extremely limited in functionality and GcNodeActivationAction is probably a better fit.

Revision as of 04:53, July 29, 2020

Template:TOC right

TriggerAction[edit | edit source]

<Data template="GcTriggerActionComponentData">

Inside this environment we can have Actions and Triggers. If this environment has an ID, the TriggerAction can be called from a SimpleInteraction as well as a normal Interaction.

If you want the set of ActionTriggers to only be called upon interaction, the game has a reserved ID that is loaded when the object in created. This ID is BOOT. If you create an ActionTrigger with the ID BOOT it will be run when the object is created, but it will also block other actions from happening. Once you interact, the ActionTrigger specified will be run, and you can chain/branch ActionTriggers from there.

For example usages see this list.

Triggers[edit | edit source]

Trigger Description
GcStateTimeEvent Triggered after the specified number of seconds has passed. Use this with a time of 0s as a default trigger if the actual trigger is the StateID only.
GcBeenShotEvent Damage threshold can be set, and you can set whether the trigger occurs when the entity is shot by the ShotBy Types "Player" or "Anything".
GcPlayerNearbyEvent Triggered when the player is nearby. This has a number of different options. You can define trigger conditions as well: "None", "Fire", "InShip", "OnFoot", "OnFootOutside", "Upload". Has an inverse option so it can trigger when a player is not near and leaves.
GcCreatureNearbyEvent Triggered when a creature is nearby where the ENTITY is located. Can have a table with GcCreatureAlertData. Has an inverse option so it can trigger when a creature is not near or leaves.
GcAnimFrameEvent Triggered when a certain frame is reached in an Anim (TkAnimationData object)
GcStormEvent Triggered when a storm appears during game where the entity is located.

Actions[edit | edit source]

Action Description
GcPlayAudioAction Plays an audio file. Need to figure out whether it is just the name or what.
GcPlayAnimAction Plays an animation that is defined within the ~.ENTITY.mbin
GcGoToStateAction This seems to jump to another ActionTrigger by activating the defined StateID, so you can chain and activate multiple ActionTriggers from one. You can broadcast the StateID to other entities which are also part of the scene even as children of another node. Broadcast level can be "Scene", "LocalModel" or "Local".
You can also create action loops if you trigger a state that retriggers the primary trigger again. A GcRewardTrigger in the REWaRDTABLE can also trigger a StateID.
GcCameraShakeAction Shakes the camera. Has a couple of options.
GcPainAction Does damage to the player (not only). The value of Damage needs to be in the METADATA/REALITY/TABLES/DAMAGETABLE.mbin
You can also use damage types that only have a push effect and no damage like "JUSTPUSH".
GcNodeActivationAction You can use this to deactivate or activate components (nodes) of the object. The Name is the name of a TkSceneNodeData child in the entities parent ~.SCENE.mbin. You might be able to do lots of cool stuff with this by allowing triggered events to toggle components of the entity, which can also have attached .ENTITY.mbin’s.
Options for NodeActiveState: "Activate", "Deactivate", "Toggle", "Add", "Remove", "RemoveChildren"
By using "Activate", "Deactivate" and "Toggle" state options you can enable a ENTITY and it's components on demand. That implies a lot of usage possibilities.
GcWarpAction If you are in your ship this will warp you as if you had flown into a black hole.
GcRewardAction The value of Reward is given to the player. The value must exist in the REWARDTABLE.mbin file. Triggering rewards extends the ammount of available actions immensly. See here.
GcSpawnAction Untested, but should able to spawn other entities. Not sure at the moment where the Event value has to be. Is there a list of entities, or maybe something in the parent ~.SCENE.mbin?
If you look in the /MODELS/COMMON/DEMOS/E32015/ files you can see this used. However, after extensive testing it seems this is extremely limited in functionality and GcNodeActivationAction is probably a better fit.
GcDestroyAction Untested. Only has one option, with a Boolean DestroyAll. I don’t know what all entails. Will need to be tested.
*This seems to only be used in the ALARM.ENTITY file currently... Not sure what it does but that's where it's used.
GcParticleAction Used to create particles effects.
GcDisplayText Used to create a text overlays. Display types: Full, Compact, EyeLevel, Prompt, Tooltip
GcScareCreaturesAction Scares creatures near the entity.
GcPowerStateAction Options related to base electricity.
GcHazardAction Produces a choosen hazard effect around. (TOXIC, RADIOACTIVE, ....)
GcFrigateInteractionAction "Repair", "UpdateDamagedComponents" or "CargoPhoneCall"
GcBaseBuildingSettingsAction Options: UseCorePartsOnlyEnum, TkGraphicsDetailTypes
GcFireSimpleInteractionAction Trigger a simple interaction that exists in the same entity file. No parameters to set. This action extends the ammount of actions considerably. See here.
GcResetSimpleInteractionAction Reset a simple interaction that exists in the same entity file to it's default state. No parameters to set.
GcFiendCrimeAction Produces a fiend crime action with a FiendCrimeType ("None", "RockTransform" or "UnderwaterPropCollected") and a FiendCrimeModifier value.

Reserved ID’s[edit | edit source]

There seems to be a number of reserved ID’s by the game that are probably only called when certain things happen. The ID’s are as follows:

ID Description
BOOT Called when the object is created and is used to block other ActionTriggers from being triggered.
INTERACTSTART Called when the interaction begins (eg, think the interaction with the terminals in the game).
INTERACTEND Same as above but when the interaction finishes.
INTERACTDISMISS Assumedly called when the interaction is dismissed.
INTERACTOPTION Assumedly called when an option is picked (not any specific one, just any option)
INACTIVE Possibly an ActionTrigger ID you can call in the interaction that causes the scene to become inactive once all the other ActionTrigger stuff has played out?
NOTCONON1 Triggered when a power connection is cut.
CONON1 Triggered when connected to a power supply is established.

Template:NMSPageClose