Code for general unit

madboy77

Chieftain
Joined
Jan 1, 2019
Messages
60
@ Dertuek/Pie: here's a situation: a strong general unit is inside a stack. The AI oftentimes sends a cheap unit to snipe the general and often succeeds, which is stupid (imo).

Can you code a formation for the general unit to e.g. be removed from stack calculation/moved to stack end or something similar so that the general is protected by the stack and not sniped at?
 
I'm not sure you can do that without modifying the dll. And I think I remember PIE doesn't want to modify it. (on my side, i already used a modified dll :o)
 
Can you code a formation for the general unit to e.g. be removed from stack calculation/moved to stack end or something similar so that the general is protected by the stack and not sniped at?
Exactly this will come with the next patch!

A formation for the General:
-> Stength -99% (so he will only defend as the last unit on a plot)
-> Chance of retreat 99% (when he defends he will retreat but stay on the same plot with full strength again)
-> +1 Sight bonus

In German it will be called "Feldherrnposition" which means "position of the comander". Not sure how Pie will name it in English...
 
"Strength -99%" ... hum interesting!
But I don't understand the "retreat 99%". If he is the last unit in the plot, he's invincible? (or he can't use this formation if he's alone in a plot?)
 
"Strength -99%" ... hum interesting!
But I don't understand the "retreat 99%". If he is the last unit in the plot, he's invincible? (or he can't use this formation if he's alone in a plot?)
He will retreat 99% and then immediately spawn again with 100% strenght (w/o the formation).
So if you attack him then it's a normal fight...

Pie did it this way becaus no SDK.


Good idea not letting him use it when alone on a plot!
 
Last edited:
I will do 100% brett, because I am 100% sure, that everybody will reload when he dies with 99%.

It will work like this: The general can have a formation with 100% flight and -99% strength, so that this unit is not the defender in a stack anymore.
if the general gets attacked, he flees and loses the formation. So, he will now have his normal strenght. It will be more difficult to fight against a general unit now, because you will need more than one unit a turn to attack with. I hope generals get more attractive then.

Good idea not letting him use it when alone on a plot!
why not? first he flees then he must face the fight.
 
I use a completely different solution to this problem. I simply always appoint generals to command weak archery units. I get the benefit of the experience points distributed to other units in the stack, and unless my melee units have been obliterated the archers in the stack never have to defend. If I've lost all my melee units then I should be retreating anyway, and if I'm too stubborn to do so, then I kind of deserve to lose a general!
 
:goodjob: that's true.

the solution can be so simple. but not every gamer thinks like that (me too)... :cool:
 
Top Bottom