Ploeperpengel
academic precarity
To not further spam the pythonthread please dicuss Animosity here.
It would be cool to have animosity as a boolean tag in the promotions xml. With another tag there to set the percentage chance for it to take effect. And a third to define single units(unit_goblinarcher and unit_goblinspearman etc.) that could provoke animosity for the unit which has that promotion.
Promotions info because: I can define a lot of changes on unit combats, firststrikes there etc.
The game should check each turn onunitmove if one of the units defined are in an adjacted square. If yes the percentage chance should be checked and if the result is true the promotion should get active(only there all of the boni/mali defined in the promtionxml should apply) and the unit affected by animosity does the following by chance:
1.)1-80% stand immobile this turn(a message in the log about the internal squabble should pop up)
2.)81-90% the unit attacks the friendly unit that caused animosity.(Get'em!)
3.)91-100% the unit immediatly attacks the nearest enemy unit(or just rushed towards it if cannot reach) receiving an additional +1Movement during this process.(We'll show 'em!)
This chances could be modified to:
1.)1-80%(Squabbling)
2.)81-100%(Get'em!)
if the civ is at peace with everyone.
We'll show 'em charge attack should be limited to 2 tiles distance imo.
A promotion that quells animosity would be a good idea. I'm thinking here this should be a promotion that quells animosity for all units in the same tile simulating strong fearstriking Leaders that can make the squabbling stop by their mere presence. (For Black Orcs and Heros- I vote against prereqs and giving this promotion to other ordinary orcs as well)
I support the idea of having a building in a city that reduces the chance for animosity to take effect.
It would be cool to have animosity as a boolean tag in the promotions xml. With another tag there to set the percentage chance for it to take effect. And a third to define single units(unit_goblinarcher and unit_goblinspearman etc.) that could provoke animosity for the unit which has that promotion.
Promotions info because: I can define a lot of changes on unit combats, firststrikes there etc.
The game should check each turn onunitmove if one of the units defined are in an adjacted square. If yes the percentage chance should be checked and if the result is true the promotion should get active(only there all of the boni/mali defined in the promtionxml should apply) and the unit affected by animosity does the following by chance:
1.)1-80% stand immobile this turn(a message in the log about the internal squabble should pop up)
2.)81-90% the unit attacks the friendly unit that caused animosity.(Get'em!)
3.)91-100% the unit immediatly attacks the nearest enemy unit(or just rushed towards it if cannot reach) receiving an additional +1Movement during this process.(We'll show 'em!)
This chances could be modified to:
1.)1-80%(Squabbling)
2.)81-100%(Get'em!)
if the civ is at peace with everyone.
E.L.M. I think you're doing nice no critics for how you code here. About the diplo thing I didn't think yet since we only have one orc civ yet but as soon we also have gobbos as civ that seriously is a problem. I think units that get affected by animosity shouldn't start a war even if they attack units of another civ(which they in fact should do!) since orc and goblin civ should be able to cooperate but this shouldn't disable animosity at all.Results so far: I've got Squabbling working fine. Get'em works OK, but I've got a couple of issues when 2 stacks of 2 units or more are near each other, as after the First Get'Em, another unit trys to attack where the old unit was. Doesn't crash but in a debug popup you get an unknown C++ exception. Show'Em hasn't been started because I wanted some more info. All animosity actions force a finishmoves() on a unit
Questions:
Show'em - Should there be a limit of how far away a unit is for Animosity unit to charge it? Say, max moves + animosity bonus move + 1?
If that unit is in a neutral territory, do we attack and declare war against the neutral?
Notes:
I set the Animosity trigger to be based off Promotion rather than unit class, or else an Orc would only be affected by that exact same type of orc (Axemen would ignore non Axmen)
Also, I don't trigger Animosity for units in the same plot as attacking the square you are in is a problem at the moment
I'm triggering the animosity check for everyunit on every turn (made a custom event on CvUnit::doTurn), as a unit that is not moving should still have to "roll" for animosity no? Also trigggering at onUnitMove (unless someone can tell me) gives me problems finding out where the unit came from to send back on a Squabble action.
This took a bit longer than I wanted (wanted to finish it today) but I'm trying to get most of it in Python and I ran into quite a few beginer errors in my First Every Python Script. Especially finding out onBeginPlayerTurn is in fact at the end of the last turn
Anyway, any feedback will be highly appreciated. I'll post an upload once I have the kinks out of the Get'em Effect if everyones happy. The Show'em can come later.
We'll show 'em charge attack should be limited to 2 tiles distance imo.
A promotion that quells animosity would be a good idea. I'm thinking here this should be a promotion that quells animosity for all units in the same tile simulating strong fearstriking Leaders that can make the squabbling stop by their mere presence. (For Black Orcs and Heros- I vote against prereqs and giving this promotion to other ordinary orcs as well)
I support the idea of having a building in a city that reduces the chance for animosity to take effect.