SUNRISE STUDIO

Edit perk behavior

A perk program is a list of conditions and effects. The game’s code runs each operation. The graph sets each operation’s inputs, phase and order.

Edit an installed perk

  1. Open your installation. Open a project when you want to save changes.
  2. Choose Assets > Edit perk behavior…, search by the perk’s name or description, and press Open node editor. Or open the perk program in the Perks list and press Edit in the viewer toolbar.
  3. Select a node to edit its supported inputs.
  4. Press Compile and save. Its tip says the change may not work in game. For an installed perk it also says the change reaches every item with this perk.

The change is saved as a byte delta in the project. Edit > Undo restores the earlier bytes. If another edit changes the same asset while a draft is open, saving stops. Reload source drops the draft and reads the current project bytes.

Editing an installed perk may not work in game.

Some perks have no behavior program of their own. The picker says so and opens nothing. A node with inputs Studio cannot decode stays visible and keeps its data.

Create a behavior

  1. Open the Perks list. Press New in its header, or Clone to copy a program.
  2. Under Start from, choose Blank graph or Pick existing. Enter a name.
  3. Choose Activation, then Add node to add the starting condition.
  4. Choose Effects, then add the operation the perk performs.
  5. Add a Deactivation condition if the effect should end.
  6. Read the checks and press Compile and create.

Pick existing opens an installed or project program in the editor. Clone in a perk’s viewer starts with that program, also for a perk the project added. Create writes the copy as a new entry. The source program is not changed. A program Studio cannot read is refused with “Uses operations that cannot be compiled yet.” Package ID sits under Advanced > Package settings.

No item uses the new program yet, and it may not work in game.

New in the Weapons list creates an exotic weapon. It creates two graphs and connects them to their perk items, sockets and sandbox entries. See Create an exotic weapon.

The exotic workflow can also create a third graph for the catalyst’s bonus perk. The bonus has its own name and sandbox identity. Choose New graph on Catalyst bonus perk to author it with the same node editor.

Work with nodes

Select a node to see its inputs. Drag a node to change the layout. Earlier and Later change its order within a phase. Undo and Redo restore graph edits. Frame all fits the graph into view. Arrange resets its layout.

A link shows which phase owns a node. It is not an execution path. The program stores the conditions and effects as ordered lists.

Conditions

A phase passes when any one of its conditions passes. Every condition has a Probability.

These conditions react to the perk itself, combat and the weapon:

conditionwhat passes itinputs
When activatedthe perk enters the phaseprobability
After a delaythe phase timer runs outduration
On killthe owner kills a targetonly this weapon, weapon slot mask, minimum damage share
On kill credita kill is credited to a listed playerminimum and maximum damage share
On damage dealtthe owner damages a targetonly this weapon, weapon slot mask, minimum damage share, damage above zero
On owner damagedthe owner takes damagedamage share, attacker distance, damage types, slot and part masks
On shot resolveda shot hits or missesonly this weapon, slot mask, result
On reloadthe active weapon reloadsonly this weapon, flag tests, slot mask, recent kill window
On ammo picked upammo is picked upweapon slot mask, ammo type mask
On aim changeaiming down sights starts or stopsaiming, not airborne, only this weapon
On finisher phasea finisher reaches a phasephase
On object picked upthe player picks up an objectpickup definition, two value ranges
On player spawnedthe player spawnsspawn reason mask

These react to items and abilities:

conditionwhat passes itinputs
On item readiedan item becomes active, for example a drawn weapononly this item, slot mask
On item equippedan item is equippedonly this item, slot mask
On item unequippedan item is unequippedonly this item, slot mask
On item stowedan item leaves its active or equipped stateonly this item, slot mask
On item eventan item event per slot; “fired” is a guessonly this item, slot mask
On weapon counter ticka weapon counter risesonly this item, slot mask
On weapon event 41a weapon event of unknown meaningslot mask
On ability usedan ability in the mask is usedability mask
On ability event 7 and 9other ability messagesability mask
On ability gained, On ability lostthe owner gains or loses an ability definitionability definition

These react to named events and flags:

conditionwhat passes itinputs
On gameplay eventthe perk receives an event hashevent hash, from the hashes installed perks use
On gameplay event (second stream)the same, on a second messageevent hash, from installed hashes
On incidenta world incident of a typeincident type and role, from installed values
On hashed messagea message with a hashmessage hash, or Any
On tracked entry timer, On tracked object gonean entry stored by Register a tracked targettracked name, distance
On owner messagean owner message; “death” is a guessnone
On another player killedanother player is killed; raised for every other playerdamage types, only with no other living teammate
On crouch change, On action state change, On flag 25 change, On flag 36 changea flag changes to the chosen valuestate

And these combine or watch state:

conditionwhat passes itinputs
While a state holdsa property of the weapon is in range, tested on every updateproperty, minimum, maximum, hold time, invert, only while this weapon is active
… while a state holdsthe inner condition passes while the state test holdsthe state inputs and the inner condition’s inputs
Counter reaches a thresholdthe perk counter reaches the thresholdthreshold, reset level, minimum, maximum, and its rows
All groups passevery group passesits groups

A slot mask has one bit per slot. 0 accepts any slot.

While a state holds offers the property names Studio can read from installed perks: super_active, is_thermal, is_arc, is_void, reloading, nearby_enemy_count, melee_energy, equipped_item_magazine_fraction, is_guarding_with_sword and melee_overcharge_state. None skips the range test.

Add node lists four state-gated conditions in the main list. The rest are under While a state holds: one for every condition that reacts to a single event.

A counter is a list of rows. Each row is a condition plus three inputs: what it does to the counter when it passes (add, set or multiply), the value, and a window in seconds. Select a new counter and use Add row. A row can be any condition that reacts to a single event, plain or state-gated.

All groups pass holds groups. A group passes when any of its conditions passes, or passed within its window. Select a new All groups pass node and use Add group, then select the group and use Add condition. Groups with a window must come before groups without one. The checks say so if they do not.

The rows and groups of an installed node keep their layout. You can still edit their values.

Effects

These change the weapon or the owner while the perk is active:

effectwhat it doesinputs
Change object propertywrites a named propertytarget, property, value, arithmetic operation and restoration
Damage multipliermultiplies damage by one plus the bonusbonus, bonus against players, element mask, any element, only this weapon
Owner damage multipliermultiplies the owner’s damage; “damage taken” is a guessmultiplier, distance, damage types
Add labels to damageadds a label to damage recordslabel, damage types
Add labels to item eventsadds a label to item event recordslabel
Add ability modifier keyadds or removes a key on one abilityability, modifier key, remove
Override projectilewrites an object definition into the weaponobject definition
Set weapon mode tagsets a tag that while-state tests can readtag hash
Add a named flag to itemsadds a flag that properties can readthis item, other slots, flag hash
Set a channel hashsets a hash on a component channeltarget, channel, hash, owner too
Set radar values, Raise the radar counter, Set radar bytechange the radarvalues
Add to a team statadds to the owner’s team statstat name, amount
Set three weapon values, Set two weapon bytes, Set slot weapon byte, Push a weapon override byte, Set weapon element choice, Raise a weapon flag countset weapon values of unknown meaningvalues
Enable sword guard, Set owner flag, Set slot flagturn on a behaviornone
Adjust ammo dropschanges drop chancesprimary, special and heavy interval, chance and repeat modifiers
Extend timers on eventa passing condition adds seconds to running timersseconds, cap, and its conditions

These act once, when the perk activates:

effectwhat it doesinputs
Spawn an objectcreates an object, removed when the perk endstarget, object definition, keep on removal, removal message, counter parameter
Spawn an object driven by a valuecreates an object and pushes a value into ittarget, object definition, expression, constant, input, divide by magazine size
Spawn an object oncecreates an object that outlives the perksnap, face, position, object definition
Create orbscreates pickups for the player and alliesposition, count, value, definition
Create an ammo dropcreates an ammo dropposition, who gets it, attached object, per-category amounts and weights
Add ammo (rounds), Add ammo (fraction)adds ammo to weapon slotsmagazine or reserves, flags, per-weapon and per-ammo-type amounts
Refill magazine from reservesmoves reserves into the magazineflags, input, five fractions
Grant ability energyadds part of a full charge to one abilityability, gate, amount, cap, expression, constant, input
Set perk countersets or adds to the perk countermode, value
Run a behavior scriptruns an installed scriptthree targets, script
Scale component valueschanges named component values by an expression of an inputcomponent name, cap, mode, input and target objects, expression
Movement modeputs the owner into a movement mode; “hover” is a guesstwo sets of speed limits and other mode values
Apply a component configapplies an installed config to a targettarget, config
Post a sim objectposts a sim object for a player ownerdefinition hash
Register a tracked targetstores a target under a nametarget, tracked name
Transmat or Ghost effectpicks the player’s transmat or Ghost effecteffect key, from the installed effect table

The object definition decides what a spawn does. The picker lists every installed definition. Definitions an installed perk uses come first. Studio cannot author a new definition.

An expression is either Constant or Pass input through. With Constant, the value is the constant. With Pass input through, the value is the input, for example the perk counter. Installed nodes with longer expressions show Other (read-only).

A label comes from the installed label table. Picking one writes both the label row and its bit.

A property operation needs a property the target exposes. Any other hash does nothing to damage, fire rate or heat. Ammo-drop modifiers change how drops are generated. They do not refill a magazine or reserves.

Owner damage multiplier stores the perk’s own tag. Create writes the new entry’s tag.

Label filters

Many conditions and effects test the labels of an item, a weapon, a victim or a damage source. The inspector shows each label filter as four lists:

listpasses when the tested thing has
Any ofat least one of the labels
All ofevery one of the labels
None ofnone of the labels
Not all ofat least one of the labels missing

An empty list does not test anything, so a filter with four empty lists passes everything.

Add label offers the installed label table: 306 single labels and 22 label groups. A group stands for several labels at once. Names show where Studio can resolve them. The rest show as hex. Studio refuses a label that is not in the table. On save, Studio writes the label rows and rebuilds the game’s compiled form of the filter. Every installed filter rebuilds to the same bytes the game ships.

A filter in a form Studio does not write is kept as installed and shown read-only. No installed perk has one.

Pickers

Some inputs take only values installed perks already use: event hashes, incident types and roles, tracked names, message hashes, modifier keys, sim objects, stat names and channel hashes. Their meaning is not known, so a new value would have no known effect. The picker fills once Studio has read the installed perks.

Read-only parts

Installed nodes can hold settings Studio does not write for new nodes. Examples are relation filters, range rows and longer expressions. The inspector lists them as read-only lines, such as Other native settings (kept as is). Studio saves them unchanged.

Every installed node kind can be written fresh. Some installed nodes still hold parts Studio only keeps, such as the longer expressions of Scale component values and movement blocks of other classes.

What works in game

A working exotic weapon uses When activated, After a delay and Adjust ammo drops. These work in game. Every other condition and effect may not work in game.

  • Damage multiplier is partly unverified. It is not known whether it scales the owner’s damage or the damage the owner takes. The element mask values (2 Solar, 4 Arc, 8 Void) are assumed.
  • Many names above are guesses from perk names: death, fired, crouch, airborne, orbs, sword guard, projectile, damage taken, element choice, drop magazine.
  • The event, incident, message and channel hashes have no known names.
  • The ability slots (grenade, super, melee, class ability) and the gate values are assumed from perk names.
  • Input meanings other than the perk counter are assumed.
  • What a driven spawn does with its value is not known.
  • The weapon slot mask meanings and the counter row window are assumed.
  • New On kill, On damage dealt and On item stowed nodes start with empty label filters. Most installed ones have one, so add the labels a new node should test.
  • What most labels and label groups mean is not known beyond their names.

Show the perk in the HUD

A perk is invisible in game unless it adds an entry to the HUD buff tray. With no node selected, the inspector shows HUD buff:

  • Show while active adds a tray entry while the perk is active.
  • The label list holds labels the game already has icons and text for. Ammo Finder is the first.
  • Show deactivation timer shows the countdown of the graph’s deactivation timer. It needs an After a delay node in Deactivation.

An installed perk that already has HUD feedback keeps it. The graph cannot add a second entry.

HUD buff may not work in game.

Limits

  • HUD feedback, cooldown branches and stack branches are kept, but the graph cannot edit them.
  • Adding a condition to a perk with stack branches is refused. Every condition needs an index no other condition uses, and Studio cannot read the stack branches to check.
  • A copy must name its own entry. Copying a program whose stack branches name the program itself is refused, because Studio cannot rewrite those branches.
  • Relation filters and expressions other than a constant or a pass-through stay as installed. Studio cannot author them yet.
  • New graphs and edited programs pass the package round-trip checks. In game, only the three kinds in What works in game are tested.