MegaGlest Forum
Archives (read only) => Glest Advanced Engine => General discussion => Topic started by: wciow on 19 August 2013, 21:49:59
-
So in my recent re-exploration of GAE I have tried to make a unit which creates pets.
AFAIK the only tag needed to create pets in the master units XML file is <pet value="true" max="2"/> in the produce skill (i also tried in the command as well).
It doesn't seem to be working :(
-
It doesn't seem to be working
Can you elaborate on that? It certainly worked in past versions of GAE.
The only noticeable thing the pets feature does is the production restriction. It also assigns pets and masters, which can be used as the target for effects and emanations (which is the real useful part of pets).
-
Oh, I assumed that the pets code made the pets auto follow the master. Probably working correctly then.
Is there any way this is possible? I know about the guard mode but I want it to happen automatically without having to click.
-
I was aware the limit is not enforced, and will get that fixed soon, as to what else it is meant to do (master/pet behaviours) I was never really aware of what was implemented, if anything.
Certainly the behaviour you suggest seems reasonable. Maybe best to implement as instead of a default stop command (when it has no other commands) the pet gets a guard command (on the master) instead of stop (or a follow, or a move, whatever is available). Will have to think on this one a bit more.
-
When I was implementing the code for my Majesty-like project I needed behaviors where units could detect units attacking them or their owners. Its actually really similar to the pet system in a sense.
Orders own their members so the member will know if its Motherhouse or Chapterhouse is being attacked and run to defend it. This behavior is functioning. Since Orderhouses aren't mobile there is no follow behavior but that would be trivial to implement. The hierarchy code already implements group orders. A slight modification because you don't need a concrete formation would allow that to add following behavior to the defending one. In fact adventuring parties pretty much function exactly like pets, especially if they are following the sovereign on a mission.
If you still haven't implemented anything in a week or so and I've managed to keep focus I will post basically how my implementation works. I can't do a direct patch since Mandate is already far too divergent from GAE. According to the contributors tab on github I have added 120000 and removed 70000 lines of code. A lot of that is just reworks of mandate specific code though I think. I'm not really sure how Git calculates that.
The profiler hasn't displayed any problems with what I've done so hopefully it is sufficiently performant.