Author Topic: Extending unit tags to carriers, and inter-faction carrying  (Read 2250 times)

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
I feel like this is probably already planned, but I want to put this out there anyway.  Basically, I'd like to remove this big list of units:
Code: [Select]
<command>
<type value="load"/>
<name value="load"/>
<image path="../dun/images/moon_load.bmp"/>
<unit-requirements/>
<upgrade-requirements/>
<load-skill value="load_skill"/>
<units-carried>
<unit value="serf"/>
<unit value="kern"/>
<unit value="savage"/>
<unit value="squire"/>
<unit value="gallowglass"/>
<unit value="fay"/>
<unit value="hag"/>
<unit value="shaman"/>
</units-carried>
<load-capacity value="12"/>
<allow-projectiles value="true">
<horizontal-offset value="0"/>
<vertical-offset value="3.75"/>
</allow-projectiles>
</command>

... and replace it with something much cleaner and easier to maintain.  I'm looking for something like this:
Code: [Select]
<command>
<type value="load"/>
<name value="load"/>
<image path="../dun/images/moon_load.bmp"/>
<unit-requirements/>
<upgrade-requirements/>
<load-skill value="load_skill"/>
<units-carried>
<tag value="humanoid"/>
</units-carried>
<load-capacity value="12"/>
<allow-projectiles value="true">
<horizontal-offset value="0"/>
<vertical-offset value="3.75"/>
</allow-projectiles>
</command>

And of course that would also be necessary to do this in order to allow inter-faction garrisoning, so that an allied faction's humanoid-tagged units could hide in my building.

ChupaReaper

  • Guest
Re: Extending unit tags to carriers, and inter-faction carrying
« Reply #1 on: 24 February 2012, 13:21:08 »
This would be a much nicer way of doing this, tags should be implemented into anything really. Such as what workers can build, instead of listing every building, use tags, same for what they repair, maybe even limit what units can attack or cast spells on making that inter-faction too.

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Extending unit tags to carriers, and inter-faction carrying
« Reply #2 on: 24 February 2012, 21:53:32 »
I don't know about building, since that might have some unintended inter-faction consequences, but I'd definitely like to see it for repairs.

ChupaReaper

  • Guest
Re: Extending unit tags to carriers, and inter-faction carrying
« Reply #3 on: 29 February 2012, 14:08:34 »
I don't know about building, since that might have some unintended inter-faction consequences, but I'd definitely like to see it for repairs.
For building, morphing, etc inter-faction would be disabled, but could be optional for repairs, etc. With one of my future factions being based around healing, this would be incredibly useful. The best part is, it would make things more automatic, like if I had a worker unit that can build any kind of storage building using <tag="storage"> then whenever I add a new storage building into the game all I need to do is tag it rather than going through all my workers and adding that individual building into a big list.