Difference between revisions of "Starward Rogue:XML - Modifier Definitions"

From Arcen Wiki
Jump to navigation Jump to search
m (Protected "Starward Rogue:XML - Modifier Definitions" (‎[edit=legal] (indefinite) ‎[move=legal] (indefinite)))
Line 1: Line 1:
 +
 +
== Overview ==
 +
 +
Tons of stuff in the game can have modifiers that apply either to itself or to shots spawned by it or to its parent entity, etc. In XML, these are always sub-nodes and never top-level nodes on their own right, or in attributes.
 +
 +
=== An example of a modifier===
 +
 +
<pre><system name="GoldenBatBlueTriple"
 +
category="Weapon"
 +
shot_type="BulletPointedYellow"
 +
damage_type="Ballistic"
 +
attack_power="2" fire_rate=".2"
 +
range_actual="2000"
 +
shots_per_salvo="1" shot_speed="2"
 +
targeting_logic="Direct" firing_timing="AllTheTime"
 +
image_name="GoldenBatTurret" special_bullet_patterns="BlueTriple"
 +
>
 +
<modifier target="MyShots" type="RicochetsOffTerrain"/>
 +
</system></pre>
 +
 +
Specifically, this line:
 +
 +
<pre><modifier target="MyShots" type="RicochetsOffTerrain"/></pre>
 +
 +
Says "apply the 'RicochetsOffTerrain' modifier to shots fired from the GoldenBatBlueTriple system".
 +
 +
===Another example===
 +
 +
<pre><entity name="SmallEnemy"
 +
category="Ship"
 +
display_name="Small Test Enemy"
 +
behavior="Attacker"
 +
speed="100"
 +
max_health="100"
 +
>
 +
<system type="TestWeapon" offset="20,10" />
 +
<hitbox radius="32" />
 +
<periodic_movement_mode type="Reposition" related_point="10,5">
 +
<modifier type="MovementSpeed" math="Set" magnitude="1000" />
 +
</periodic_movement_mode>
 +
</entity></pre>
 +
 +
Specifically, this line:
 +
 +
<pre><modifier type="MovementSpeed" math="Set" magnitude="1000" /></pre>
 +
 +
Says "when SmallEnemy switches to its Reposition mode, its movement speed is set to 1000 for the duration of that mode".
 +
 +
===Attributes of the modifier Node===
 +
 +
*type (EntityModifierType)
 +
**The hardcoded effect to use. See EntityModifierType in the Enum Reference section
 +
*target (string)
 +
**Most contexts where you can put a modifier tag have more than one possible target for the modifiers, and target is how you specify which. The valid values of this vary from context to context, detailed later.
 +
*duration (float or special string, optional)
 +
**If left blank or set to zero or a negative number, the effect lasts forever (in the case of the player entity, the effect is removed when they leave the dungeon; no persisting effects between runs)
 +
**If set to a positive number, the effect lasts for that many seconds and then disappears
 +
**this may not mean much for some contexts, where the modifier is on a concept rather than on a specific entity or whatever; if you find that an effect is not elapsing when you want it to, let us know and we'll try to work out what's going on
 +
**If set to "room", lasts until the player leaves the room. If set on a non-player this acts like infinite duration.
 +
**If set to "floor", lasts until the player leaves the floor. If set on a non-player this acts like infinite duration.
 +
**If set to "UntilWoken", lasts until the entity is hit by something or until the player gets within wake_range AND is in line of sight
 +
**math (MathType, required for some types, required to not be present for others)
 +
***Some EntityModifierType's require a number, and math tells the game how to use that number. Here are the valid values:
 +
***Add
 +
****Just adds to whatever base value is there.
 +
***Multiply
 +
****Multiplies the result. Note: all multiply modifiers are applied AFTER all add modifiers.
 +
***Set
 +
****Sets the result to this value, completely ignoring the base value and any add or multiply modifiers.
 +
****If there's more than one Set modifier for a particular modifier type applying at once, the one with the lowest (non-negative) value takes precedence
 +
*****this allows for capping MaxHealth, where the thing that can override the cap is a lower cap
 +
****doesn't work with negative values (that support can be added if necessary, but it didn't fit the framework naturally)
 +
*magnitude (float, required for some types, required to not be present for others)
 +
**Some EntityModiferType's require a number, and this is that number.
 +
related_item (InventoryItemType, optional)
 +
**Right now only used for InventoryChangePerSecond, to specify which inventory item to affect. Current values are:
 +
***Energy
 +
***Keycard
 +
***Missile
 +
***Credit
 +
*requires_difficulty_at_least (DifficultyType, optional)
 +
**If the difficulty is set lower than the specified one, this modifier has no impact on the game.
 +
*requires_difficulty_at_most (DifficultyType, optional)
 +
**If the difficulty is set higher than the specified one, this modifier has no impact on the game
 +
*chance_out_of_100_to_copy (int, optional)
 +
**when copying this to an entity (for instance, when shots that apply a debuff to the things they hit), and this is > 0 and <= 100, there's only an X% chance that the modifier will actually be copied
 +
*damage_type (DamageType, required by things that require it)
 +
**only required by DamagePerSecond, for now
 +
*particle (particle_pattern, optional)
 +
**for modifiers actually on the entity's Modifiers list (so it was actually copied to it, not just applying due to some other rule), these are played during EmitOnMovementParticleEffects
 +
**this logic cannot result in the same NonSimEffectSpawningProfile playing more than once for that entity that frame from modifiers
 +
*do_not_stack (bool, optional)
 +
**only causes it to not-stack with other modifiers with the do_not_stack flag
 +
**if an effect is being copied to an entity, and that entity has another modifier of the same type (and related damage type, etc), and with this flag, then if this modifier has >= the duration and >= the magnitude it will replace the other modifier, otherwise it won't copy over
 +
*probation_type (EntityModifierProbationType)
 +
**if this is a modifier that has been copied to the player or a player system, and the probation type is violated, this modifier is immediately removed
 +
**if you have any probationary buffs, they're listed below the top HUD numbers
 +
**see EntityModifierProbationType in the Enum Reference section
 +
*probation_ends_at_room_change (bool), probation_ends_at_floor_change (bool)
 +
**if this is a modifier that has been copied to the player or a player system, and the end condition (leave room or leave floor) is met, this modifier's probation_type is removed, rendering it permanent (unless you set duration, which will work normally)
 +
 +
 
[[Starward_Rogue:Main#XML_Documentation|Starward Rogue XML Documentation Main]]
 
[[Starward_Rogue:Main#XML_Documentation|Starward Rogue XML Documentation Main]]
  
 
[[Category:Starward Rogue]]
 
[[Category:Starward Rogue]]

Revision as of 18:29, 21 November 2015

Overview

Tons of stuff in the game can have modifiers that apply either to itself or to shots spawned by it or to its parent entity, etc. In XML, these are always sub-nodes and never top-level nodes on their own right, or in attributes.

An example of a modifier

<system name="GoldenBatBlueTriple"
	category="Weapon"
	shot_type="BulletPointedYellow"
	damage_type="Ballistic"
	attack_power="2" fire_rate=".2"
	range_actual="2000"
	shots_per_salvo="1" shot_speed="2"
	targeting_logic="Direct" firing_timing="AllTheTime"
	image_name="GoldenBatTurret" special_bullet_patterns="BlueTriple"
>
	<modifier target="MyShots" type="RicochetsOffTerrain"/>
</system>

Specifically, this line:

<modifier target="MyShots" type="RicochetsOffTerrain"/>

Says "apply the 'RicochetsOffTerrain' modifier to shots fired from the GoldenBatBlueTriple system".

Another example

<entity name="SmallEnemy"
	category="Ship"
	display_name="Small Test Enemy"
	behavior="Attacker"
	speed="100"
	max_health="100"
>
	<system type="TestWeapon" offset="20,10" />
	<hitbox radius="32" />
	<periodic_movement_mode type="Reposition" related_point="10,5">
		<modifier type="MovementSpeed" math="Set" magnitude="1000" />
	</periodic_movement_mode>
</entity>

Specifically, this line:

<modifier type="MovementSpeed" math="Set" magnitude="1000" />

Says "when SmallEnemy switches to its Reposition mode, its movement speed is set to 1000 for the duration of that mode".

Attributes of the modifier Node

  • type (EntityModifierType)
    • The hardcoded effect to use. See EntityModifierType in the Enum Reference section
  • target (string)
    • Most contexts where you can put a modifier tag have more than one possible target for the modifiers, and target is how you specify which. The valid values of this vary from context to context, detailed later.
  • duration (float or special string, optional)
    • If left blank or set to zero or a negative number, the effect lasts forever (in the case of the player entity, the effect is removed when they leave the dungeon; no persisting effects between runs)
    • If set to a positive number, the effect lasts for that many seconds and then disappears
    • this may not mean much for some contexts, where the modifier is on a concept rather than on a specific entity or whatever; if you find that an effect is not elapsing when you want it to, let us know and we'll try to work out what's going on
    • If set to "room", lasts until the player leaves the room. If set on a non-player this acts like infinite duration.
    • If set to "floor", lasts until the player leaves the floor. If set on a non-player this acts like infinite duration.
    • If set to "UntilWoken", lasts until the entity is hit by something or until the player gets within wake_range AND is in line of sight
    • math (MathType, required for some types, required to not be present for others)
      • Some EntityModifierType's require a number, and math tells the game how to use that number. Here are the valid values:
      • Add
        • Just adds to whatever base value is there.
      • Multiply
        • Multiplies the result. Note: all multiply modifiers are applied AFTER all add modifiers.
      • Set
        • Sets the result to this value, completely ignoring the base value and any add or multiply modifiers.
        • If there's more than one Set modifier for a particular modifier type applying at once, the one with the lowest (non-negative) value takes precedence
          • this allows for capping MaxHealth, where the thing that can override the cap is a lower cap
        • doesn't work with negative values (that support can be added if necessary, but it didn't fit the framework naturally)
  • magnitude (float, required for some types, required to not be present for others)
    • Some EntityModiferType's require a number, and this is that number.

related_item (InventoryItemType, optional)

    • Right now only used for InventoryChangePerSecond, to specify which inventory item to affect. Current values are:
      • Energy
      • Keycard
      • Missile
      • Credit
  • requires_difficulty_at_least (DifficultyType, optional)
    • If the difficulty is set lower than the specified one, this modifier has no impact on the game.
  • requires_difficulty_at_most (DifficultyType, optional)
    • If the difficulty is set higher than the specified one, this modifier has no impact on the game
  • chance_out_of_100_to_copy (int, optional)
    • when copying this to an entity (for instance, when shots that apply a debuff to the things they hit), and this is > 0 and <= 100, there's only an X% chance that the modifier will actually be copied
  • damage_type (DamageType, required by things that require it)
    • only required by DamagePerSecond, for now
  • particle (particle_pattern, optional)
    • for modifiers actually on the entity's Modifiers list (so it was actually copied to it, not just applying due to some other rule), these are played during EmitOnMovementParticleEffects
    • this logic cannot result in the same NonSimEffectSpawningProfile playing more than once for that entity that frame from modifiers
  • do_not_stack (bool, optional)
    • only causes it to not-stack with other modifiers with the do_not_stack flag
    • if an effect is being copied to an entity, and that entity has another modifier of the same type (and related damage type, etc), and with this flag, then if this modifier has >= the duration and >= the magnitude it will replace the other modifier, otherwise it won't copy over
  • probation_type (EntityModifierProbationType)
    • if this is a modifier that has been copied to the player or a player system, and the probation type is violated, this modifier is immediately removed
    • if you have any probationary buffs, they're listed below the top HUD numbers
    • see EntityModifierProbationType in the Enum Reference section
  • probation_ends_at_room_change (bool), probation_ends_at_floor_change (bool)
    • if this is a modifier that has been copied to the player or a player system, and the end condition (leave room or leave floor) is met, this modifier's probation_type is removed, rendering it permanent (unless you set duration, which will work normally)


Starward Rogue XML Documentation Main