ProjectileUpdate.xsd 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="uri:ea.com:eala:asset" xmlns:at="uri:ea.com:eala:asset:type" xmlns:xas="uri:ea.com:eala:asset:schema" targetNamespace="uri:ea.com:eala:asset" elementFormDefault="qualified" xmlns:XmlEdit="http://tempuri.org/XmlEdit.xsd">
  3. <!-- Generic Projectile that behaves according to the specified state machine.
  4. Each state machine requires the corresponding "Move" structure listed below, otherwise
  5. a runtime error will be thrown, or really strange bad things will happen. -->
  6. <xs:simpleType name="ProjectileStateMachineType">
  7. <xs:restriction base="xs:string">
  8. <xs:enumeration value="BombProjectile" /> <!-- Dumb bomb that just falls straight to ground -->
  9. <xs:enumeration value="StraightLineProjectile" /> <!-- Tank shell style that just flies straight to target -->
  10. <xs:enumeration value="BalloonProjectile" /> <!-- Dumb bomb that just falls straight to ground, but follows player's move orders somewhat -->
  11. <xs:enumeration value="BezierSplineProjectile" /> <!-- Spline projectile that uses the Projectile Paths-->
  12. </xs:restriction>
  13. </xs:simpleType>
  14. <!-- Base struct for state data -->
  15. <xs:complexType name="ProjectileMoveBase" xas:isPolymorphic="true">
  16. <xs:sequence></xs:sequence>
  17. </xs:complexType>
  18. <!-- Required for BombProjectile -->
  19. <xs:complexType name="ProjectileMoveToGroundData">
  20. <xs:complexContent>
  21. <xs:extension base="ProjectileMoveBase">
  22. <xs:attribute name="InitialSpeed" type="SageReal" default="0" />
  23. <xs:attribute name="Acceleration" type="SageReal" />
  24. <xs:attribute name="TerminalVelocity" type="SageReal" />
  25. <xs:attribute name="RotationSpeedPerSecond" type="Angle" default="0d" />
  26. <xs:attribute name="TerminalRotation" type="Angle" default="90d" />
  27. <xs:attribute name="ForwardVelocityDamping" type="Percentage" default="100%" />
  28. </xs:extension>
  29. </xs:complexContent>
  30. </xs:complexType>
  31. <!-- Required for the StraightLineProjectile -->
  32. <xs:complexType name="ProjectileMoveInStraightLineData">
  33. <xs:complexContent>
  34. <xs:extension base="ProjectileMoveBase">
  35. <xs:attribute name="MuzzleVelocity" type="SageReal" />
  36. <xs:attribute name="Acceleration" type="SageReal" />
  37. <xs:attribute name="TerminalVelocity" type="SageReal" />
  38. </xs:extension>
  39. </xs:complexContent>
  40. </xs:complexType>
  41. <!-- Required for BalloonProjectile -->
  42. <xs:complexType name="BalloonProjectileMoveToGroundData">
  43. <xs:complexContent>
  44. <xs:extension base="ProjectileMoveBase">
  45. </xs:extension>
  46. </xs:complexContent>
  47. </xs:complexType>
  48. <!-- Required for BezierSplineProjectile -->
  49. <xs:complexType name="BezierSplineProjectileData">
  50. <xs:complexContent>
  51. <xs:extension base="ProjectileMoveBase">
  52. <xs:sequence>
  53. <!-- The path actually followed is randomly selected from this list. -->
  54. <xs:element name="Path" type="ProjectilePathRef" minOccurs="1" maxOccurs="unbounded"/>
  55. </xs:sequence>
  56. <xs:attribute name="Velocity" type="SageReal" use="required"/>
  57. <!-- The projectile will detonate if it gets to this distance away from its launch pos -->
  58. <xs:attribute name="Range" type="SageReal" use="required"/>
  59. <!-- This isn't "true" gravity physics, just a fudge factor -->
  60. <xs:attribute name="Gravity" type="SageReal" default="1.0"/>
  61. <!-- The maximum distance change from original target location to compensate for
  62. when tracking a target, for the projectile's entire lifetime. -->
  63. <xs:attribute name="FlightPathAdjustMaxDistancePerFrame" type="SageReal" default="0.0"/>
  64. </xs:extension>
  65. </xs:complexContent>
  66. </xs:complexType>
  67. <xs:complexType name="ProjectileMoveData">
  68. <xs:choice minOccurs="1" maxOccurs="1">
  69. <xs:element name="MoveToGround" type="ProjectileMoveToGroundData"/>
  70. <xs:element name="MoveInStraightLine" type="ProjectileMoveInStraightLineData"/>
  71. <xs:element name="BalloonMoveToGround" type="BalloonProjectileMoveToGroundData"/>
  72. <xs:element name="BezierSpline" type="BezierSplineProjectileData"/>
  73. </xs:choice>
  74. </xs:complexType>
  75. <xs:simpleType name="ProjectileUpdateOptions" >
  76. <xs:restriction base="xs:string">
  77. <xs:enumeration value="LAUNCH_AT_TARGET_POS" /> <!-- Reorients (but does not reposition) projectile from launch bone position to face directly at target position -->
  78. <xs:enumeration value="TRACK_TARGET" /> <!-- Only for use with BezierSpline projectiles in conjunction with FlightPathAdjustMaxDistance. -->
  79. </xs:restriction>
  80. </xs:simpleType>
  81. <xs:simpleType name="ProjectileUpdateOptionsBitFlags">
  82. <xs:list itemType="ProjectileUpdateOptions" />
  83. </xs:simpleType>
  84. <xs:complexType name="ProjectileUpdateModuleData">
  85. <xs:complexContent>
  86. <xs:extension base="UpdateModuleData">
  87. <xs:sequence>
  88. <xs:element name="Movement" type="ProjectileMoveData" minOccurs="1" maxOccurs="1"/>
  89. </xs:sequence>
  90. <xs:attribute name="StateMachine" type="ProjectileStateMachineType" />
  91. <xs:attribute name="MinDetonationHeight" type="SageReal" />
  92. <xs:attribute name="MinTargetDistance" type="SageReal" />
  93. <xs:attribute name="Flags" type="ProjectileUpdateOptionsBitFlags" />
  94. </xs:extension>
  95. </xs:complexContent>
  96. </xs:complexType>
  97. </xs:schema>