Page 1 of 1

Spring unit classes

Posted: 12 May 2005, 19:38
by Xon
Currently Spring forces units into a number of classes. The classes listed are in order of importance. Unit class #1 will always trump unit class #2, a unit can only belong to a single unit class.

<class type>; <what the class does>, <triggers which cause the unit to be assigned to the class>
  • Metal extracter: pulls metal out of the ground; fbi tag "ExtractsMetal"
  • Transport: Can transport units; "attach" & "drop" in unit script work, non-zero fbi tag "transportcapacity"
  • Builder: makes buildings (and other units?); not zero "WorkerTime", true "Builder"
  • Factory: makes units; not zero "WorkerTime", true "Builder", "PLANT" "TEDClass"
  • Bomber: Flying unit which uses bomber logic; true "canfly", 1st weapon is a "AircraftBomb" or "TorpedoLauncher"
  • Fighter: Flying unit which uses fighter logic; true "canfly"
  • Ground unit: moves on sea or ground; true "canmove"
  • Biulding: doesnt move, everything else.
This list will probably change, but its the current limitations of the Spring engine.

Posted: 12 May 2005, 20:54
by Sean Mirrsen
You forgot gunships.

Posted: 13 May 2005, 10:37
by Xon
Sean Mirrsen wrote:You forgot gunships.
A gunship is just a fighter which moves a little differently.

Those classes are actually hardcoded limitations in the unitloader.

Posted: 13 May 2005, 16:05
by Sean Mirrsen
A gunship always tries to maintain its altitude when moving or attacking.
A gunship will always attempt to align itself horizontally, unless it is avoiding collision.
A gunship will never pitch to aim up or down.
A gunship can never be 'shot down' - it is always destroyed.
Gunships never seem to understand that the user controls them, and fold in when flying.

That's enough difference to make it a separate class, I think.

Posted: 15 May 2005, 06:47
by Doomweaver
thats not the point he is making, he is saying which classes are hardcoded.