Starward Rogue:XML - EntitySystem Definitions

From Arcen Wiki
Jump to navigation Jump to search

Overview

These are not ships -- they're just guns or whatever. They're how a ship actually does something like shoot or trigger an ability, generally.

An example

<system name="PlayerDirected_Minigun"
	category="PlayerDirectedWeapon"
	is_player_main_weapon="true"
	shot_type="BulletPointedBlue"
	damage_type="Ballistic"
	attack_power="14"
	fire_rate="0.4"
	range_actual="500"
	shots_per_salvo="1"
	shot_speed="1200"
	flagship_ability_type="DirectFireWeapon"
	targeting_logic="Direct"
	image_name="MantaGun"
	quality_tier="0"
>
</system>

Attributes

Most Important General

  • category (EntitySystemCategory)
  • image_name (string)
    • Normally the name of the entity is what is used to find the image for the entity. This lets you override that logic.
    • When you set this, they will use RuntimeData/Images/Systems/image_name
    • Use Invisible to have the system not visibly show on the entity (often a good idea).
  • image_folder (string)
    • This can be used with or without image_name. Often it is used without image_name.
    • For organizational purposes, it’s nice to be able to put graphics into arbitrary subfolders. So for instance, we have an Player subfolder inside the Systems folder.
    • To make sure that our system looks for an image in there, we just set image_folder=”Player” and that’s it.
    • You can do folders-in-folders if you want, too, and then have a forward slash (/) separating those out.
    • Make sure to always use forward slashes when referencing filenames. If you’re working on windows it will work with a backslash, but then someone running this on osx or linux will have it fail.

General Player-Only Stuff

  • is_toggleable (bool, optional), defaults_toggle_off (bool, optional, defaults true)
    • only for player energy-use systems, really; pressing the related only_fires_on_keybind (or release) keybind toggles the system on and off (if toggled off, the modifiers it applies to the parent entity, if any, no longer have effect)
  • display_name (string, optional)
    • what the player sees when the game tries to tell them the name of this system
  • description (string, optional)
    • similar to display_name, not necessarily used in all contexts that display_name is

Most Important Weapon Stuff

  • attack_power (float)
    • how much damage this system's shots do
  • fire_rate (float)
    • how many seconds it takes the system to reload after firing a salvo before it can fire again
    • NOTE! If you want this to go really fast, then for enemies you also need to set the cue_time lower.
  • cue_time (float, optional, default 0.5)
    • the number of seconds this system (or the entity, if this is the only cue-time system on it) puts out a little yellow pulse "cue" before it actually fires.
    • only applies to enemies, and this effectively reduces the firing rate.
  • range_actual (int, required unless there's a BulletPattern)
    • how far this system's shots can fly until they disappear.
    • Note: completely ignored if 1+ special_bullet_patterns are defined.
  • range_to_live_mult (float, optional)
    • this system's shots live this much longer or shorter than its range implies. Only current usage is making the mine's self destruct "system" shots not go anywhere, via mult=0
  • time_to_live (float, optional, default 10)
    • this system's shots expire after this long regardless of range or whatever. Does not apply to BulletPattern stuff
  • shot_speed (int, optional, default 350)
    • how fast this system's shots go
  • shot_type (GameEntity name)
  • the name of the GameEntity data that should be used for the system's actual shots
  • special_bullet_patterns (comma-delimited list of bullet_pattern names, optional)
  • the names of the BulletPattern(s) this system can generate; if there's more than one a pattern is picked randomly from the list each time it needs one
  • sounds_on_shot_fired (comma-delimited strings list)
    • If this system fires a shot, or a shot pattern, then one of the sounds in the list will be played at random. Default "Shot_QuietTwoPart1,Shot_QuietTwoPart2".
  • min_ms_between_shot_fired_sounds (int, optional)
    • Some systems fire salvos of shots rather frequently, and so normally a 50ms delay between invocations of their sound effects is imposed. For some shots you may want a larger delay, though (seriously that’s a rapid-fire shot, then), or in other cases you may wish for silence, in which case you can put -1 (since sounds_on_shot_fired has a default value). Default 50.

Player-Only Weapon Stuff

  • flagship_ability_type (PlayerFlagshipAbilityType, optional)
    • basically this should either be DirectFireWeapon for player guns/abilities or left out
  • salvo_spread_responds_to_player_direction (bool, optional)
    • this system's shots fan out like the old TLF "spreadfire" weapon; targeting the angle to the cursor and fanning out more or less depending on range to the cursor
  • fires_one_shot_from_each_other_player_directed_system (bool, optional)
    • when this system fires, it actually fires one salvo per each of the player's main guns. This is used for the player's missile ability.
  • charge_per_second, charge_cap, and charge_add_to_multiply_per_point (all float, optional)
    • only works in conjunction with only_fires_on_keybind (not the on_release version, since this is inherently on-release)
    • only works in conjunction with requires_item_type, as that tells it what resource to pull it from (presumably energy, but you could use missiles or credits if you wanted)
    • as you hold down the key, the system charges by that amount per second, up to the cap or how much you've got (whichever is less)
    • when you release the key, if the total charge < 1, it just doesn't fire or cost you any of the resource
    • when you release the key, if the total charge >= 1, it fires normally but with the attack power of all the shots will be multiplied by 1f + (charge * charge_add_to_multiply_per_point)

Most Important Player-Item Stuff

  • related_item (string, optional)
    • This is required on any systems that can be dropped by the player (ammo items and consumables, basically). This tells what icon to show in the bottom of the screen, as well as what system to actually drop.
  • only_fires_on_keybind_release (KeyBind, optional)
    • the system only fires when the player presses and then releases this key; there's a ton of KeyBind values but the only one intended for this currently is ***HoldAndReleaseToFireMissile
  • only_fires_on_keybind (KeyBind, optional)
    • the system only fires when the player presses this key (doesn't wait for release); the only KeyBind values intended for this currently are:
      • UseEnergyBasedSystem
      • UseConsumableSystem
  • requires_item_type (InventoryItemType, optional)
    • the system cannot fire unless the player has a certain amount (requires_item_amount) of this item type (Missile, etc)
  • requires_item_amount (float, optional)
    • the amount required by the previous flag's logic
    • you'll generally want to use int costs, but sometimes partial is necessary
  • is_player_main_weapon (bool, optional)
    • use this if this is a "the player's two main guns" weapon; like the starting miniguns (or whatever) or ones that the player can pick up along the way. This is so the game can properly swap them in and out on pickup.

Other Weapon Stuff

  • ammo (int, optional)
    • how many shots until the system cannot fire anymore. Right now only used for consumables, with a max ammo of 1.
  • shots_per_salvo (int)
    • how many shots the system fires at once. If used with a BulletPattern, generates that pattern that many times.
  • one_shot_per_target (bool, optional)
    • if true, and shots_per_salvo > 1, will spread out its shots (not firing more than one at any target)
  • forced_angle_offsets (comma-delimited list of floats, optional)
    • the angles each shot in the salvo will travel at, relative to the angle to the target; useful for bursts without resorting to an all-up BulletPattern
    • you can use this with single-shot salvos, but if the angle is more than a degree or so that's basically "a gun that always misses"
  • hits_all_intersecting_targets (bool, optional)
    • beam-weapon only (that is, the shot type has the insta_fire flag). Makes this system's shots apply their full damage to everything on the line.
  • shot_destroys_other_shots (bool, optional)
    • this system's shots destroy enemy shots they touch during flight, but the system will not specifically try to target enemy shots
  • intercepts_other_shots (bool, optional)
    • similar to shot_destroys_other_shots, but the system will intentionally target enemy shots
  • shot_sticks_after_intercepting_another_shot (bool), shot_dies_after_intercepting_another_shot (bool)
    • normally intercepting a shot leaves the interceptor intact unless the other shot also destroys shots
    • with (sticks) the interceptor will remain, but will cease all normal movement
    • with (dies) the interceptor instantly dies, along with the thing it intercepted
  • damage_type (DamageType)
  • fires_salvos_sequentially (bool, optional)
    • this system will fire each shot in its salvo a short delay after the previous shot. Useful for strings of bullets without resorting to an all-up BulletPattern
  • shot_area_of_effect (int, optional)
    • this system's shots will damage everything (for full normal damage) within this distance of them when they're removed from the game
  • aoe_hits_friendly_targets (bool, optional, defaults TRUE)
    • this system's shots will damage even friendly targets with aoe
  • shot_is_not_stopped_by_hitting (bool, optional)
    • this shot passes through enemy ships, damaging them only once (even if they encounter them again later somehow), but able to damage more than one ship overall
  • shots_are_homing (bool, optional)
    • this system's shots will curve around to fly towards the target point/ship
  • shot_proximity_detonation_range (int, optional)
    • makes the ship die when a ship it could gets within X of a normal collision (so basically it's a collision check with X as an extra added into the range checks)
    • does not necessarily do on-hit logic to the thing triggering it; but it will check for aoe and only_fires_on_death systems
  • system_to_attach_to_shot (system, optional)
    • whenever this system emits a shot, that shot spawns with one of the specified systems (allowing shots that fire other shots, or have on-death explosions that create bullet patterns, or whatever)
  • shots_do_friendly_fire_after_time (float, optional)
    • so after one of its shots have been alive for X seconds, it can hit friendly stuff, and its aoe can hit friendly stuff (even if it doesn't have the friendly-fire aoe flag)
  • shot_damage_per_second_from_touching (float, optional)
    • creates an implicit melee-range system that is added to any shots systems of that type fire
    • copies the EntitiesMyShotsHit modifiers (if any) from this system-type to that implicit melee system-type
  • shots_rubber_band_to_starting_point (bool, optional)
    • now when the shot reaches the end of its range-to-live it doesn't scale out, it sets its destination point back to where it came from. When it reaches that point it then scales out
  • shots_rubber_band_to_firing_system (bool, optional)
    • similar, but rubber-bands back to the current location of the firing system (even as that system moves)

AI-Only Weapon Stuff

  • targeting_logic (TargetingLogic)
  • firing_timing (FiringTiming, required if Category == Weapon)
  • range_do_not_fire_until (int, optional)
    • how close the system has to be to consider firing on a target
  • range_chases_until_within (int, optional)
    • how close the AI of the system's parent entity will try to get (generally it only checks the first system for this)
  • fires_from_any_range (bool, optional)
    • this system will consider targets out of range, and even fire at them
  • destroys_firing_entity (bool, optional)
    • makes the entity that fired it go boom
  • only_targets_damaged_ships (bool, optional)
    • only targets entities that have already been damaged
  • only_targets_nearest_ship (bool, optional)
    • only targets the nearest eligible target; probably only meaningful for a player familiar
  • only_fires_on_death (bool, optional)
    • used for self-destruct explosion "systems" like on the mines
  • requires_line_of_sight_of_player_to_fire (bool, optional)
    • this system has to be able to see the player (not going through obstacles) to be able to fire
  • line_of_sight_recalculation_interval (float, optional, default 0.2)
    • the most often (in seconds) this system will recompute l-o-s for the previous flag's logic

Sub-Nodes

drone

specifies the entities that can spawn from this system; see drones_are_finite and drones_are_guards

Attributes:

  • type (entity)
    • the type of entity to spawn
  • count (int)
    • if drones are finite, this is the number of this type of entity that can be spawned from this system. Otherwise this is just the relative frequency at which this type of entity will be spawned from this system.

Starward Rogue XML Documentation Main