Commanders v. 0.1

Since, I am doing a modmod of Orbis,

If I remember right, Orbis was also a modmod for FfH2. If the 3K mod's hero system belonged anywhere else, it would here. The heroes for FfH2 should have been more involved that just as one-unit wonders.

As for Orbis, I hope you do well with it. The AI seemed way too easy to beat and seemed to declare war even when they didnt have the units to really wage it. Think had to do with the combined power of all their armies, but hundreds of strength 3 archers wont do much against an SoD of str 8 items with siege equipment and spells.

I'll keep an eye out for it and good luck!
 
Kill,

Have you had a chance to check it out and see if you can work something similar?

i havent checked it yet
but i have to say i wont work on modding anything in the near future
too busy with other things :(
 
OK, I need a little help. I'm trying to figure out where the code is for the control range ability. Any ideas?

You are referring to the distance which commanders can influence units? If so, it is Line 9832 in CvUnit.cpp in the modcomp.

Code:
if (pCommander->controlPointsLeft() <= 0 || iDistance > pCommander->commandRange())

The second half of that OR statement checks the command range.
 
Thanks Afforress. I'll take a look at the code again. I found that distance code, but I'm really wondering where the trigger function is for affecting surrounding units so I can just merge that code.

That's not how it works, you won't find it because that doesn't exist.

What happens is when a unit checks its first strikes, combat strength, etc, it is interrupted and calls getCommander(). If there is a commander nearby, the nearest commanders additional first strikes, or combat strength, or whatever, is added to the units own, then the value is returned.

I imagine Great Commanders was written that way to be fully compatible with Better AI or any mod that changes how combat might work. It doesn't have to rewrite the combat code this way.
 
Top Bottom