Starward Rogue:XML - BulletPattern Definitions

From Arcen Wiki
Jump to navigation Jump to search

Overview

Unlike the other things being read in (GameEntity, EntitySystem, etc) this is more of a programming language than a chunk of data. That is, it's imperative as much as it is descriptive.

It's also different in that it relies heavily on template "variables" to avoid duplicating a lot of xml when you want your bullets to do the same or similar thing a lot.

Here's an example usage:

In a file in Configuration/EntitySystem/ :

<system name="TestWeapon"
	category="Weapon"
	shot_type="BulletPointedYellow"
	damage_type="Ballistic"
	attack_power="40"
	fire_rate="3"
	range_actual="500"
	shots_per_salvo="1"
	targeting_logic="Lead"
	firing_timing="AllTheTime"
	special_bullet_patterns="TestVariablePattern"
	>
</system>

And in a file in Configuration/BulletPattern/ :

<bullet_pattern name="TestVariablePattern">
	$TestOuterVar SPEED=500
</bullet_pattern>

And in a file in Configuration/BulletPatternVariables/ :

<var name="TestOuterVar">
  <bullet angle="0" speed="0">
    <loop iterations="5">
      <spawn>
        <bullet_pattern>
          $TestInnerVar A1=45 A2=-45
          $TestInnerVar A1=-45 A2=45
        </bullet_pattern>
      </spawn>
      <wait time="0.1" />
    </loop>
    <die />
  </bullet>
</var>

<var name="TestInnerVar">
  <bullet angle="[A1]" speed="[SPEED]" shot_type="BulletBentEnergyRed">
    <wait time="0.5" />
    <loop iterations="5">
      <change angle="[A2]" time="0.0001" />
      <wait time="1" />
      <change angle="[A1]" time="0.0001" />
      <wait time="1" />
    </loop>
    <die />
  </bullet>
</var>

Massively more confusing than the examples of the data-chunk files, right? Well, welcome to the neighborhood, it's at least as bad as it sounds.

Starward Rogue XML Documentation Main