Author Topic: Attack specific unit ? And capturing unit...  (Read 3108 times)

ProfEclipse

  • Summoner
  • **
  • Posts: 49
    • View Profile
Attack specific unit ? And capturing unit...
« on: 18 September 2012, 07:39:54 »
Many and many different units can have different type of attacks. However, almost of types can't attack buildings or some of other armored units.
Ex : Infantries can't shoot down buildings or any armored vehicle (such as tank, apc,...) ;
Archers or sword units can't attack stone buildings (castle) but can capture buildings after a time interval ... (While no moveable units are available)


Attack specific surfaces ? Not enough. My idea is...

Use tags to limit unit-attacking !

Normally, all unit types are allowed to attack any other unit (On specific surface). But my fun question : "Only an archer can collapse the castle !" (:wicked:) Right ?
In attack skill, add something which can tell the unit shouldn't attack the unit which can't be attacked. In bad situations (:dead:), the unit can attack cause very-very low damage.  (;D ;D ;D)
Ex : If this label name "tag-exceptions".
Quote
[...]
<tag-exceptions>
        <tag value="strong_building" />
        <tag value="[...]" />
        [...]
</tag-exceptions>
[...]
Capturing : When no moveable unit are available at enemy base, the capture buildings process will be performed in background.
Higher units will higher chance to win. When any enemy come in, the process will be paused.
The units can still stand together until the enemy base to be captured and waiting for strangers... (Sorry... favorite enemies :P).
Or use catapults, airships ,behemoths... to quickly destroy buildings.

"Capture" information includes speed and range (optional). (My default are 100.00 and 5 (range))
And "tags" can still be used for capture-info, too.

What do you think ?
« Last Edit: 28 September 2012, 21:09:56 by ProfEclipse »

ProfEclipse

  • Summoner
  • **
  • Posts: 49
    • View Profile
Re: Attack specific unit ? And capturing unit...
« Reply #1 on: 28 September 2012, 21:15:02 »
Too hard ? Capture units : Never, but I think the tag-exceptions can be done in furture.
No comments ? No opinions ?

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: Attack specific unit ? And capturing unit...
« Reply #2 on: 28 September 2012, 22:09:28 »
Too hard ? Capture units : Never, but I think the tag-exceptions can be done in furture.
No comments ? No opinions ?

Capturing is available in Mandate, but I doubt it will be used in other engines. It's quite complex to handle with all sorts of places for error.

After I got better with the code I saw a way that might be easier than what my current implementation is which is effectively killing the unit and replacing it with a same type unit in the other faction. Which of course poses issues for factions without similar units. In fact that's one of the many built in anti capture issues of Glest derivatives afaik including factions being pointers among other things.

Obviously a real GAE dev can correct me if I am wrong.

Unit categories will be supported in the beta of Mandate but its based partly on the new resistance and magic damage type system that does not exist in GAE so it would be difficult to port over.

GAE actually has a tag system already as well as a property one, but I don't think it does a whole lot in the code.