Finding things in game
Use the in-game tools to find the slot, squad, line or goal you need.
A mission module lists thousands of slots. This page shows how to find the one you need: which squad stands on that ledge, which trigger sits at that door, which cue says that line. The in-game tools come from src/server/ui/activity_host/ and src/core/ui/hud/ in the Sunrise source.
The tools at a glance
tool
where
what it tells you
World window
Activity Host page, tick World
every SDK page below, with world markers
Current Status overlay
HUD page
the bubble and slice set you are in, and the closest spawn
Mission Script overlay
HUD page
each script’s status, phase and last error
Logs page
Core group
the log, with a filter
The mission module
Sunrise/sdk/lua/missions/*.lua
every key, with names, types and text
Open the World window
- Press Insert.
- Open the Activity Host page.
- In Instance, pick your activity. When it can, the page picks an active, linked instance for you.
- Under Windows, tick World.
The World window has a page list on the left. Each page shows a one-line summary at the top.
page
use it to
Squads
find and test-place squads; see their spawn points
Idles
find NPC idle sensors and their states
Combatants
find actors; bind them, edit channels, try their animation sequences
Devices
find doors, lifts and switches; move them
Triggers
find trigger volumes and draw their shapes
Objects
find any slot; fire a trigger; see positions
Scenes
find scenes in the current state; start one and fire its inputs
Dialogue
find voice lines in the current state; play one
Directives
find goals; show or hide one
Objectives
reset objectives; advance tasks
Cinematics
play sequences and cinematics
Engagement
send an engagement body
Public event
watch one player against a public event area
Occupancy
set an occupancy condition
Lifetime
set the lifetime state
States
list states and regions; move to one
Mission state
read your variables and timers
Positions
list package positions nobody’s slot claims
Behaviors
list compiled behavior roots; read only
Script
your script’s file, attach result, status, error, and Reload script
A button on these pages sends the same kind of request a script would. Use them to test an idea before you write it.
Draw things in the world
The Squads, Objects, Devices, Triggers and Positions pages can draw markers in the world.
- Tick Draw in world.
- Pick what to draw in Show:
- Ticked rows: only rows whose Draw box you ticked
- All rows: every row on the page
- Within radius: rows near the camera
- Open Render settings to change the glyph, size and colors, and tick Always label to name every marker.
- Without Always label, a marker shows its label when you look straight at it.
- Tick listed ticks every row the current filter shows. Untick all clears them.
- A squad marker label reads
<name> point N | 0xLIST[ordinal]. - A trigger marker label is its name, or
trigger XXXXXXXX.
Walk or fly to a spot, set Show to Within radius, and read the labels around you.
Find a squad
- Open Squads.
- Tick Current state only to see only the squads of the state you are in.
- Type part of a name in Search. The search also matches ids, tags and point coordinates.
- Tick Draw on a row and Draw in world to see its spawn points.
- Select the row. Place this squad lists each point as
point N 0xLIST[ord] (x, y, z). - Press Place squad to test it.
The name column is the slot name. The Lua key is that name in upper case:
column shows
Lua key
sq_cath_boss
mission.Squad.SQ_CATH_BOSS and mission.Slot.SQ_CATH_BOSS
If the name is used by more than one object, the key has the object tag at the end, for example O_CIV_0_80B4A6CB. Search the module for the name to find the exact key.
The squad’s members are type-2 slots named after it: SQ_CATH_BOSS_BOSS.
Find a trigger
Player triggers (type 31) point at trigger volumes (type 60).
- Open Triggers. It lists the volumes, with a status per row.
- Hover a row to see its key, index, shape, and its bounds.
- Tick Draw and Draw in world to see the shape.
- To test the trigger itself, open Objects, search for the name, select the type-31 row, and press Fire trigger under Actions.
Trigger slot names often start with pt_. The volume often has the same name. mission.TriggerVolume.<NAME> holds the volume row with its box corners.
Find a door or lift
- Open Devices. It is the Objects list limited to type 23.
- Select a row. Under Actions, pick a Channel, move Normalized value, and press Set channel. Tick Snap immediately to jump to the value with no motion.
- Watch which thing moves.
Device names often start with d_. The Lua key is mission.Slot.D_....
Find an object and its position
- Open Objects.
- Type in Search. Tick Has a place to hide rows with no position.
- The Kind column shows the slot type. The Position and Shape columns show what the row is linked to.
- Select a row. The Position section shows
x, y, z, and whether the object is live. - Technical details shows the object and slot rows, key, name hash and tags.
The Reload button next to the package name re-reads the world data. It does not reload your script.
Find a voice line
- Open Dialogue. It lists the dialogue sensors of the current state.
- Open a sensor. Each cue shows
Cue N, its definition hash and its line texts. - Press Play cue to hear it.
In Lua:
local sensor = mission.Slot.M_DIALOG_SENSOR_80B9AF4B
local cues = mission.DialogueCue.M_DIALOG_SENSOR_80B9AF4B
context:slot(sensor):play_dialogue_cue{cue = cues.CUE_14}
You can also search the text in the module. mission.DialogueCueVariants.<sensor>[N] lists the lines of cue N.
Find a goal
- Open Directives. Each entry shows its title, description, hash, element and slot.
- Press Show to see it on the HUD, and Hide to clear it.
In the module, mission.Directive keys come from the title. A repeated title gets the name hash: RENDEZVOUS_WITH_HAWTHORNE_1DD5B5F6. Match the hash from the page to the key. The sensor of the entry is its directive sensor’s mission.Slot value. Search the module for that value to find the sensor’s key, which usually starts with M_DIRECTIVE_SENSOR_.
Find a scene
- Open Scenes. It lists only the current state.
- The scene column shows the slot name and object. linked squad shows the squad it uses.
- Press Advance to start it.
- Press Inputs under Advance. The popup has a button for each trigger the scene waits on. Press one to fire it in the running scene. Below the buttons it lists what the scene reports.
The Lua key is mission.Scene.<NAME>, the same key as its slot.
A scene that waits on an input stays idle after Advance until you fire that input. Inputs is greyed out when the scene has none. The availability column shows last: and the result of the last press, for example queued.
In a script, the same triggers are in the mission module under the scene’s key:
table
lists
mission.SceneInput.<NAME>
the triggers it waits on; send them with send_event
mission.SceneOutput.<NAME>
the triggers it reports; they raise on_event_scene_output
A scene missing from mission.SceneInput plays on its own once started.
Find an NPC idle
- Open Idles. Search by name, object or slot.
- Pick a State from the list and press Start.
The state list shows hex names. In Lua the entry is mission.PerformanceState.<SENSOR>.STATE_<HEX>.
Find an actor animation
- Open Combatants. Select an actor.
- Under Animation sequence, pick a Sequence. The list shows
symbol [0xKEY, kind N]. - Press Play sequence.
In Lua, actor:sequences().<SYMBOL> or actor:sequences().KEY_<8 hex>.
Find where you are
Turn on the Current Status overlay on the HUD page. It shows:
line
meaning
Activity
the package name of the loaded destination
Bubble
index 0xHASH name [host region]
Slice set
region state N
Closest spawn
the spawn set of the spawn point nearest to you: its name hash, its name, and the distance
The region number is what event.region_index reports. Match it on the States page, which lists every state with its region. There, Select moves you to a state. Picking a state the client does not hold arms a teleport.
The Closest spawn hash is a spawn set name hash. That is the value restart_checkpoint takes as spawn_set_hash. Stand where the party should restart and read it.
Read your variables
Open Mission state. It shows the revision, the phase, every variable with its value, and every timer with its deadline and sequence. It is read only.
A script cannot print. Write what you want to see into a variable instead:
context:set_variable("debug.last_trigger", event.slot and event.slot.name or "none")
Search the module text
The mission module is plain text. Search it with your editor, or from PowerShell:
Select-String -Path "Sunrise\sdk\lua\missions\mission_deadzone_*.lua" -Pattern "PT_MINE"
Useful searches:
search for
finds
type = 31
every player trigger row in mission.slots
type = 23
every device
M_DIRECTIVE_SENSOR
the goal sensors
M_DIALOG_SENSOR
the dialogue sensors
a line of dialogue
the cue that says it, in DialogueCueVariants
a goal title
its key in mission.Directive
STATE_
the states and their region_index
Always check the type field of the row you pick. The methods refuse a slot of the wrong type.
Look things up from a script
When the tools are not enough, walk the live SDK from a script and store the answer. See The live SDK views.
on_start = function(context, state)
local slots = context.sdk.slots
local triggers = 0
for row = 1, slots.count do
if slots:at(row).slot_type == 31 then triggers = triggers + 1 end
end
context:set_variable("debug.trigger_count", triggers)
end,
What the tools cannot do
- There is no copy button for ids or Lua keys. Type the key, or search the module.
- There is no readout of your own coordinates. Use Closest spawn, and Within radius from the camera.
- There is no “you are inside this volume” indicator. Arm the trigger and watch
on_event_player_trigger. - There is no teleport to a marker. States > Select moves you to a whole state.
