[DOTO] Dawn Of The OverLords

in a city siege, if there is defense % lasting, the ranged attack don't work (tile in grey).
true -> unless if the unit has ignore building defense.
future plan is to have city defense reduce hit/damage instead depending on the %.

ranged attack miss more than 50% of the time, it is far too much, and the retaliate seem always work lol. The ranged strike is not so powerfull so, as I assume, there is no need to add a possible miss.
i see, ill adjust it from the xml modifier.
the retaliate -> i dont remember its damage calc -> reasnobale to add a random to it.

bombardment and ranged attack always act as separate action, bormbardment don't cause collateral damage while ranged attack don't reduce city defense.
true -> i separated both so the ai would bombard and ranged as he likes. original idea was to use 1 for all. range that reduces city defense -> as stated above - > damage/hit depends on city %def
what do you think should be?

the combat limit must be at 100% with ranged attack, because without it the game is struck between artillery fire which last forever.
really? you think removing the cap total? how about - make the combat limit - random - meaning, some attacks will be limited by the limit, and some will be un restrained?
the idea was to avoid exploit of ranged by human or ai, which will make it worth while only to range attack, not having to engage in combat and have the units walk out with 100% strength without fighting, just ranged destruction of the enemy.
maybe randomize it can be something in between?
and why forever? should other units attack and kill the ranged?

for now, galleon and privateer/frigate chases them without sinking each other, and it is the caravels, without ranged attack, which kill them when they are wounded. This argue for making boat able to do both ranged strike and point blank strike.
having both attack styles is something i would like. i only fear what the ai would do, not sure though.
maybe - range attack up to a limit, than, ranged becomes invalid and only than, regular attack can be committed?
force the unit first to ranged, only after limit has been reached -. open the regular attack?
or...just have 100% damage vs sea units and limit vs land units ?


illprovide you with the previous doto on the weekend.
but i think its also available in my download page - one of the first links under "versions".
ill check.

thanks Lebashar, so far your feedback's very productive to me and i appreciate it.
 
true -> i separated both so the ai would bombard and ranged as he likes. original idea was to use 1 for all. range that reduces city defense -> as stated above - > damage/hit depends on city %def
what do you think should be?

I think there should be have only one action for attacking cities, which do both. If there is only one, the AI can't make a bad choice if there is no choice at all.

really? you think removing the cap total? how about - make the combat limit - random - meaning, some attacks will be limited by the limit, and some will be un restrained?
the idea was to avoid exploit of ranged by human or ai, which will make it worth while only to range attack, not having to engage in combat and have the units walk out with 100% strength without fighting, just ranged destruction of the enemy.
maybe randomize it can be something in between?
and why forever? should other units attack and kill the ranged?

I have observed some ennemies galleon ranged strike my army near the coast. My trebuchets retaliate but can't totaly destroy galleon due to combat limit. Galleon as the same and can't destroy my army. And thus, turn after turn, they ranged strike me with no more result.
It was the same with galleon against galleon, except the ennemy has some caravels, and use them at last to sink my wounded galleon.
But the combat limit has clearly a bad side effect if the unit can only do a ranged strike.

I think the exploit is already avoid by the fact ennemy unit with ranged strike are able to retaliate. And it should be adjust with the cost of ranged striking unit (maybe they need to be costly).
And furthermore, ranged strike don't do so much damage, to completely crush ennemy army with only ranged strike, you need more than 3x more units than their, and attack an army which has no unit capable of retaliate.

having both attack styles is something i would like. i only fear what the ai would do, not sure though.

I think it is easy to know : I will make some ranged strike in a advciv mod and see what the AI do with units able to do both.
 
ok test is done : AI used ranged attack if his army is in inferiority, and point blank attack if his army is strongest. Like siege engine against a city.

But I have found another problem to solve : with ranged strike, boats can go in a city, and fire at will all ennemy boats in near sea, while thoses can't attack boats in the city. Boats in a city should be unable to shot at range.
 
I think there should be have only one action for attacking cities, which do both. If there is only one, the AI can't make a bad choice if there is no choice at all.
during the tests i have made, i had that also.
how about - no ranged attack on units if there is city defense %?
and if ignore buildings defense, than, the ranged strike with both lower city defense and will range strike units?
this will allow - one type of siege attack.

But the combat limit has clearly a bad side effect if the unit can only do a ranged strike.
mmm....bummer.
whats do you think we should have than?
1. remove combat limit -->
thus making the ranged units over powered?
maybe negate that with low damage from ranged
human can exploit it? to ruin enemy units without a loss?

2. deny land to sea and sea to land ranged attacks?
not logical but, manageable.
doing so - will remove combat limit for sea, no need for a limit if sea to sea.

3. ?

ok test is done : AI used ranged attack if his army is in inferiority, and point blank attack if his army is strongest. Like siege engine against a city.
how did you allow both types of attacks?
not sure i got this one.
maybe share a screen shot so ill know what you mean?
e in a advciv mod
how did you test in advc? you just added air range to land units?


But I have found another problem to solve : with ranged strike, boats can go in a city, and fire at will all ennemy boats in near sea, while thoses can't attack boats in the city. Boats in a city should be unable to shot at range.
huh good find.
VIP mod had land ranged units have an extended range, +1 i think from city.
i will add a check that will render sea units inside a city to range attack (ill try to disable range attack if land plot, though not sure ill be able too, maybe just disable attack)
 
I think the original choice in civ is boats in harbor can't fight at all.

Extended range for unit in garrison in city : hum, I don't think there is a realistic reason to do that, and it give a huge advantage for the defender.

how did you test in advc? you just added air range to land units?

Yes, and add the same attack value for air and land. It works fine for navy vs navy.

whats do you think we should have than?
1. remove combat limit -->
thus making the ranged units over powered?
maybe negate that with low damage from ranged
human can exploit it? to ruin enemy units without a loss?

First of all, I'm a pragmatic man, I think the best is the simple. So, no combat limit, and see what it does. If it's overpowered, it will become easily noticable, and if it's not, then, no need to do anything about that :)
But I suppose there shouldn't be a problem : siege units, and boats, have less attack than ground units of their era, and ground units have often terrain bonus defense, so I suppose it will be difficult to wipe out them entirely by the sea, even with the most powerfull boat at disposal. But it is obvious that will be change something in the game and make it more like civ2, and civ1, where navy was dangerous for troups in coastal proximity.

Maybe you can exploit it if you strike by the sea an adversary which haven't any costal cities, and thus, no navy. But if it is so, this adversary will be defeated no matter what because he can't reach your territory.

Finally, I think we can counter the power of coastal bombardment with low cost counter units, like submarines (in modern era) which can have a big attack bonus, a poor defense, and a low cost, and then, be the perfect unit to guard your coasts with easy repair and protection in cities or forts. In gunpowder era, it should be ironclad. So powerfull boat can be dreadfull, but, they can be easily sink by low cost counter so, you can't win only with them. And maybe, like in reality, ruin you by using them.

It make me think of something else : in civ2 there was a city building called "costal defense" which give defense% against boat and attack from the sea like marines. Maybe we could make something like that : a building which do a retaliation fire against ranged strike ? but it would be so powerful that we need in that case the ranged strike capable of destroy some cities building to let a chance to attackers.

And another thing : is the ranged strike be affected by the health of the firing unit ? I think not. Maybe we can make the strike function of the unit health, so, a wounded unit to 50% health could only do 50% of its regular damage ? it could greatly reduce the threat of ranged strikers.

how about - no ranged attack on units if there is city defense %?
and if ignore buildings defense, than, the ranged strike with both lower city defense and will range strike units?

I'm not sure to understand.
Are you want to say, ancient siege unit before gunpowder, can't attack defenders with ranged strike if they haven't not reduce the city defense yet ? And gunpowder units don't need to reduce the defense and only shot ranged strike which always do the both ?

What do you fear about catapult and trebuchet ? totaly wipe out a defended cities if she don't have any siege engine for retaliate ? if it's the case, it should be the same result, just a matter of time. We can adjust the percent defense destruct which each shot for making it the same time to reduce it to zero than the current bombarment + attack with collateral, so it will result as the same, except the catapult wouldn't be lost, or even wounded, if there isn't any in defense. It is the reason why I previously said it could be necessarily to up the cost of siege engine. We will lost less of them, so they should be costly.

But the best for avoiding the player able to exploit something is to make the AI choose to stand some siege engine in city defense, and then, able to retaliate.
 
Extended range for unit in garrison in city : hum, I don't think there is a realistic reason to do that, and it give a huge advantage for the defender.
well, thats a VIP mod source code, i left it in.
i agree, ill remove this one.

Yes, and add the same attack value for air and land. It works fine for navy vs navy.
ok, so, allow both types of attacks , shouldnt be hard, ill make it into a game option.


First of all, I'm a pragmatic man, I think the best is the simple. So, no combat limit, and see what it does. If it's overpowered, it will become easily noticable, and if it's not, then, no need to do anything about that :)
But I suppose there shouldn't be a problem : siege units, and boats, have less attack than ground units of their era, and ground units have often terrain bonus defense, so I suppose it will be difficult to wipe out them entirely by the sea, even with the most powerfull boat at disposal. But it is obvious that will be change something in the game and make it more like civ2, and civ1, where navy was dangerous for troups in coastal proximity.
only thing i fear is that the ai wont handle the siege units right. if the units power is lower than other units, unclear if the AI will decide to build it...
another thing is that, if you have no limit, and you attack sea to land, will the ai move the units from that plot? will it know that his units are exposed and being attacked? need to test that the units are not sitting ducks.


Finally, I think we can counter the power of coastal bombardment with low cost counter units, like submarines (in modern era) which can have a big attack bonus, a poor defense, and a low cost, and then, be the perfect unit to guard your coasts with easy repair and protection in cities or forts. In gunpowder era, it should be ironclad. So powerfull boat can be dreadfull, but, they can be easily sink by low cost counter so, you can't win only with them. And maybe, like in reality, ruin you by using them.
thats a good Aim. i like that, get units that can attack bombarding ships at a lower faster cost.

It make me think of something else : in civ2 there was a city building called "costal defense" which give defense% against boat and attack from the sea like marines. Maybe we could make something like that : a building which do a retaliation fire against ranged strike ? but it would be so powerful that we need in that case the ranged strike capable of destroy some cities building to let a chance to attackers.
i remember, i played tons of civ2.
thats something i thought of, but i dont think i have the c++ coding skills to have that.
i wished for a civ5/6 city ability to range bombard. i was thinking maybe allow an immobile + understandable + capture-able unit , that is created upon city build/build-able from a certain tech. that should be manageable, just the capture thing.


And another thing : is the ranged strike be affected by the health of the firing unit ? I think not. Maybe we can make the strike function of the unit health, so, a wounded unit to 50% health could only do 50% of its regular damage ? it could greatly reduce the threat of ranged strikers.
actually, yes, VIP mod calculated the damage for the ranged based on the health of the attack and the defender, ill get the formula here.

if you wish, you can take a look at cvunit.cpp file in the source code - look for "Vincents range strike" tags.

I'm not sure to understand.
Are you want to say, ancient siege unit before gunpowder, can't attack defenders with ranged strike if they haven't not reduce the city defense yet ? And gunpowder units don't need to reduce the defense and only shot ranged strike which always do the both ?

What do you fear about catapult and trebuchet ? totaly wipe out a defended cities if she don't have any siege engine for retaliate ? if it's the case, it should be the same result, just a matter of time. We can adjust the percent defense destruct which each shot for making it the same time to reduce it to zero than the current bombarment + attack with collateral, so it will result as the same, except the catapult wouldn't be lost, or even wounded, if there isn't any in defense. It is the reason why I previously said it could be necessarily to up the cost of siege engine. We will lost less of them, so they should be costly.

well , ill put this in other words -> what should be the effect of city defense on ranged units attacks?
it is indeed a matter of time,
but the combat limit, breaks ranged units abilities to destroy the entire city defense - from range, which i feared. i dont want city conquering becoming easy - just get some ranged, defend them near an enemy city, and range attack until conquer with minimal losses from retaliation if any.

in case of having just one ranged attack type,
so, ranged attack should do -> lower city defense + damage defending units . while the damage is affected by the city defense amount -> lets say is a city has 15% defense - than, the damage will be - 15% less? or attack success instead?


But the best for avoiding the player able to exploit something is to make the AI choose to stand some siege engine in city defense, and then, able to retaliate.
if ill manage to get a fake unit in each city that gives ranged attack, than every city will be able to retaliate vs ranged attacks.
i did set siege units with city defense AI combat , so you should see some defend a city.


i dont want to loose track of our decisions , can you have some test files with what we should go with?
 
will it know that his units are exposed and being attacked? need to test that the units are not sitting ducks.

You're right, it need to be tested. Anyway we already know that the AI can do the costal bombing with boats ^^

i was thinking maybe allow an immobile + understandable + capture-able unit , that is created upon city build/build-able from a certain tech. that should be manageable, just the capture thing.

There is a elemenal guardian associated with a building in FFH2

what should be the effect of city defense on ranged units attacks?
while the damage is affected by the city defense amount -> lets say is a city has 15% defense - than, the damage will be - 15% less?

Seems a good start point for me. So a 100% city defense will receive 0 collateral damage ? and as the defense reduce, the damage goes up.

but the combat limit, breaks ranged units abilities to destroy the entire city defense - from range, which i feared. i dont want city conquering becoming easy - just get some ranged, defend them near an enemy city, and range attack until conquer with minimal losses from retaliation if any.

I understand that, but I don't think it will be the case. Units in the city, if they hold position, will heal themself, while units bombarding them don't. So turn after turn, attacker will lost some power. Even without something to retaliate, attacker will need many siege engine to be able to completely wipe out at least one defender in one turn. If it has this superiority, it will gain the war no matter what. But if the defender has something for retaliate, turn after turn the defender heal himself while the attacker lost his life. It maybe will him who being the standing duck, and finaly crushed by a counterattack.

Don't forget we has some other units to play with, like cavalry. they can have the flanking ability, which is devastating against a bunch of wounded catapults. If we make some low cost skirmisher cavalry, with high chance of withdraw, we have the perfect counter : even if they actually lost the battle, and withdraw, they evenly do the flanking ! I have used it y my mod. So if the ennemy has a powerfull army, many defenders for his siege engine, you already can beat him by skirmish and force him to withdraw because all his catapult are near to death and good for nothing and the defender be able to destroy the entire attacker army. Many skirmisher would be death, but, they don't cost too much, and those who survive gain good promotions.

So like for the boats, I think the best counter is to use low cost, specialised units. And the AI seem really good for doing this.

And we have also promotions, we can use for adjusting all of that. the anti siege promotion isn't really usefull in vanilla's, but we can make something with this, if it will be necessarily.

i did set siege units with city defense AI combat , so you should see some defend a city

Is there somewhere I can find the whole list of valid command in the <UnitAIs> tag ?

i dont want to loose track of our decisions , can you have some test files with what we should go with?

I don't understand "test file". Roadmap file ?
 
hey ,

Is there somewhere I can find the whole list of valid command in the <UnitAIs> tag ?
https://forums.civfanatics.com/threads/list-of-unitais-and-what-they-do.353919/

I don't understand "test file". Roadmap file ?
oops, i meant text...
yeah , RoadMap.

need to be tested.
ok, we'll wait and see then.

There is a elemenal guardian associated with a building in FFH2
oh nice, low chances of me to be able to extract something, will try do makde do with what i have...:(

So a 100% city defense will receive 0 collateral damage
yup, it will just reduce the city defs, if it hits.

but I don't think it will be the case.
yup, i understand your anecdotes.so we will test it.
the countering method should be working well, they ai can indeed deal with it.


i hope to start working a bit on the weekend.
first thing, id like to revert to advc core civics and just add minor stuff from my code.
 
Roadmap :

For now, try to make the ranged strike working good.
- more testing with renaissance and modern units

- merge bombardment and ranged strike when attacking a city
-> only one attack type
-> for non gunpowder units, this strike reduce city defense + do collateral, reduced by the amount of remaining city defense
-> for gunpowder units, this strike reduce city defense and do collateral no matter what is the remaining city def %.

- make naval units able to do both ranged strike and normal attack.

- testing how the AI use them

- adjusting units stats (power, collateral, cost, combat limit)

- adjusting units stats (power, collateral, cost) for the counter units, and testing how AI use them

Goal achieved when all work fine, and AI use ranged attack with pertinence, defend his cities against ranged, and make counterattack when threaten by it.

After that decide what we want to do with religion, civics, ressources, tech tree, news units, graphism (if any), terrain, improvement, buildings, espionnage...


I wonder if it could be easiest to use a unmoded advciv mod for make all this work and testing ? It will reduce the possibility of side effect caused by another modification. And when all work as intented, merge it. What do you think ?

ps : thank for the link AI tag :)
 
hey friend,

for gunpowder units, this strike reduce city defense and do collateral no matter what is the remaining city def %.
wont his will render city defense to nothing? after gunpowder units?

ok, i started to work:

done - untested
- if land or see unit with air range ==> deny regular bombard attack type (for one range attack type method)
- added a game option that will allow sea units to have two attack types - only one at a turn --> do we want for sea units to be able to attack twice? both range both direct?
-remove code that disable ranged attack if city has defense and the unit have no ignore building defense.
-added bombard to range strike -> now, if city is bombard-able
the unit will also damage city defense -> with a random factor(same as the regular bombard)
-added experience from ranged strike on units on a random number % outcome.
-random chance for collateral damage on retaliation strike back.


maybe you can adjust the xml values for the range units?

i will create a git branch source for the version - 105.
i can allow you access to it so you will see the development and have the ability to do changes directly to it.


thanks,
im so happy you help out!
 
Last edited:
wont his will render city defense to nothing? after gunpowder units?

Against siege units, yes. But city defense always act against regular troups, no ? I think it was already the case.

- added a game option that will allow sea units to have two attack types - only one at a turn --> do we want for sea units to be able to attack twice? both range both direct?

No they should'nt attack more than one time, without blitz promotion.
 
hey,

ok , new development branch is up on git - 105.

the changes so dar:

+new ranged mechanism:
-new ranged strike option -> sea units can choose their attack type
-removed extra ranged strike area from cities hills or mountains
-merged bombard city to ranged strike:
now both damage type will be executed when city bombard
-removed link to city bombard from ai logic for ranged strike(priority was to regular bombard)
-if a unit have air range, it wont be able to use the regular bombard - so we will have just one attack type.
-removed added time for kmissions after ranged strike - oos issues
-added experience and collateral damage from ranged attack based off a random chance - i hope...need to test.
-if a city have defense % - no collateral damage can be made.


here it is:
https://github.com/keldath/kmod-adv-Doto/tree/Doto-1.05

i recommend installing github desktop.
its what i use.


Against siege units, yes. But city defense always act against regular troups, no ? I think it was already the case.
ok.

No they should'nt attack more than one time, without blitz promotion
agreed and done.
 
I'm testing it, there is a lot of graphical issues with ressources, tech, leaderhead etc.

edit : ok found it, you have compressed the fpk so he game don't read it
 
Last edited:
Firsts testing comment :
- the AI use well catapults and trebuchet, for attacking cities, defend, and also ranged strike on the field if needed. They build many, maybe a slight modification is needed (lower power or higher cost). But the main goal is reach.
- a huge stack of catapult don't succes to really destroy by themself defenders of a well defended city. Even with 15 catapults, defenders are totaly healed the turn after. But the AI don't try to wipe this stack out even if there is no ground unit to protect them, so, maybe siege engine need to have a better attack but a lower defense : maybe with their stat, to give them lower power, but attack boost against anything. Should make them equal in attack, but easy prey in counterattacks.
- we should modifing all the siege engine promotions. probably merge collateral and bombardement upgrade.
- it is imperative that units with ranged strike can't be allowed to move + strike, because if so, they can ranged striking AND don't move so heal themself each turn which is ridiculous.
- the missing strike are really useless. the ranged power of this units are already so low that add a even low probablily of complete miss make them, in my mind, totally useless. Build more swordmen will cost less and do better result. For now, cities are hardest to take then before, because a ranged strike do less damage than the previous regular suicidal attack.

- the error of the incorrect value on the information screen for the ranged strike when the mouse is ont the unit selection icon always occur (see screenshot)
- all units has always olders stats so I can't test rennaissance boats (no one has ranged strike except ship of the line) nor if modern units with 100% damage limit would be to powerfull. I will mod it myself and see.
 

Attachments

  • Civ4ScreenShot0008.JPG
    Civ4ScreenShot0008.JPG
    450.5 KB · Views: 293
hi,
i merged some advc fixes and tweaks from advc latest commits.

ok -
maybe a slight modification is needed (lower power or higher cost). But the main goal is reach.
i hope so. lower power - wont they ai consider the siege bot strong and buy them?

maybe we can add bonus vs siege to all regular units. something to make them easy to be killed. that will prompt the ai to attack them.

a huge stack of catapult don't succes to really destroy by themself defenders of a well defended city. Even with 15 catapults, defenders are totaly healed the turn after. But the AI don't try to wipe this stack out even if there is no ground unit to protect them,
huge? how huge? humm...not sure why the ai wont strike, maybe something in the unit ai...maybe f1rpo can take a look - can you post a save game?

we should modifing all the siege engine promotions. probably merge collateral and bombardement upgrade.
yes i know, we need to accommodate the new changes.

it is imperative that units with ranged strike can't be allowed to move + strike, because if so, they can ranged striking AND don't move so heal themself each turn which is ridiculous.
i made it as a game option right? so i should set it always to end turn right?
if so ,meanwhile you can set them off until i change it.

the missing strike are really useless
alright - so - we decide on remove random chance? 100% damage success?
+ no damage limit?

the error of the incorrect value on the information screen for the ranged strike when the mouse is ont the unit selection icon always occur (see screenshot)
i havnt changed the hover info yet, i will.
you mean the ranged strike info right?

all units has always olders stats so I can't test rennaissance boats (no one has ranged strike except ship of the line) nor if modern units with 100% damage limit would be to powerfull. I will mod it myself and see
not sure i got what you mean?

thanks for the tests !
if you can , go ahead and change xml values on your end, that will help allot.
 
Last edited:
other bugs :
- when a siege engine kill another, the log text invert the attacker and the defender (say your trebuchet has kill a canon while it is my canon who kill the trebuchet)
- ranged strike seems don't do collateral damage when the city defense is reduced to zero
-> well it's not that. ranged strike don't do collateral damage when the unit which retaliate has already reach the damage limit, BUT, if there is other units in the same tile which are full life, they should receive collateral, but they don't.

huge? how huge? humm...not sure why the ai wont strike, maybe something in the unit ai...maybe f1rpo can take a look - can you post a save game?

15 catapults, near a city with nearly 20 units for defense.

i made it as a game option right? so i should set it always to end turn right?

Yes, I just want to say there is a major exploit there. I don't know if it is even a good idea to make the option choosable, because it make the game absurd.

alright - so - we decide on remove random chance? 100% damage success?

I have change myself and test it : even with 100 in the global define there is always some miss, in attack or in retaliation. Very weird.

But even with all succesfull strike, a crushing superiority of ranged attacker don't wipe out defenser : 15 canons against 3 longbow, 1 crossbow, and 1 pikeman = all defensors wounded by 30 to 50%. no one killed. at first glance, seem 1 to 3 less powerfull that the vanilla's regular suicidal attack, no ? I think with 4 canon charging, you lost maybe two, but let defenders in the same state.
ranged strike never do more than 30% damage, and, often something like 10 to 15%. So, you need 10 to 1 units ratio to be able to wipe out something a range. I think for now it is not overpowered but somewhat underpowered. Especialy when there is technological difference : canons should do heavy damage to medieval units, like grenadier versus macemen, or macemen versus swordmen, and for now it isn't the case.

Do you know the formula used in ranged strike damage ? I don't know how to improve the effect of ranged strike, at least to something worth the cost.

not sure i got what you mean?

combat limits, strike range etc. I have remodified myself.
Naval battle seem lack of something, often it is the attacker who take the heaviests damage. hum. maybe try with attack bonus.

Well, in fact I think what should be really good, is a critical shot : a ranged strike who hit something vital and make the whole boat explode or sink. Perfect shot. Should be relatively rare.
Or maybe just with a bigger range of the damage dice ?
 
when a siege engine kill another, the log text invert the attacker and the defender (say your trebuchet has kill a canon while it is my canon who kill the trebuchet)
oh, i might have switched by mistake ...
i remember something about it.

BUT, if there is other units
i guess the limit, stops the attack maybe, its gotta switch a target if the limit has been reached.
ill check.

15 catapults, near a city with nearly 20 units for defense.
too much i think, gotta make they ai spam less.

Yes, I just want to say there is a major exploit there. I don't know if it is even a good idea to make the option choosable, because it make the game absurd.
agreed. will remove for next push.


Do you know the formula used in ranged strike damage ?
yes,
2 things,
that is the damage function:
RANGE_COMBAT_DAMAGE -> this is a modifier from regular civ4 - its in the globals xml its on 30% i think.
BOMBARD_HIT_CHANCE - as name suggests - in the altglobals
Code:
int CvUnit::rangeCombatDamage(const CvUnit* pDefender) const
{
    CvPlot* pPlot = pDefender->plot();

    //int iOurStrength = airCurrCombatStr(pDefender);
    //keldath change - vincentz ranged attack - i hope it right
    int iOurStrength = currCombatStr(pPlot,pDefender);
    FAssertMsg(iOurStrength > 0, "Combat strength is expected to be greater than zero");
    int iTheirStrength = pDefender->maxCombatStr(pPlot, this);

    int iStrengthFactor = ((iOurStrength + iTheirStrength + 1) / 2);

    int iDamage = std::max(1, ((GC.getDefineINT("RANGE_COMBAT_DAMAGE") * (iOurStrength + iStrengthFactor)) / (iTheirStrength + iStrengthFactor)));
    //Vincentz RANGED STRIKE Random Damage Start
    //keldath notes - i guess ths controls random damage with added city defense if any
    if (pPlot->getPlotCity() != NULL)
    {
        iDamage *= 100;
        iDamage /= std::max(0, (pPlot->getPlotCity()->getBuildingDefense() + 100));
    }
    iDamage *= (50 + GC.getGame().getSorenRandNum(100, "RandomHit"));
    iDamage /= 100;
    //Vincentz RANGED STRIKE Random Damage End
    return iDamage;
}

Well, in fact I think what should be really good, is a critical shot : a ranged strike who hit something vital and make the whole boat explode or sink. Perfect shot. Should be relatively rare.
Or maybe just with a bigger range of the damage dice ?
maybe - need to apply some code that will return 100% damage on a random factor . i like this idea - exiting attacks...:)

edit:
ok i changed some stuff with the ai code and the bugs you mentioned.
ill gather more stuff before the update.
p.s. if you take a new dll it should not break your save game.
 
Last edited:
too much i think, gotta make they ai spam less.

No it's me which have theses catapults for testing ;) I never see the AI build so much


I have change the RANGE_COMBAT_DAMAGE to 100 from 20. ranged strike are dreadfull with that, because they nearly always do the full damage of their damage limit and one shot the target. Or do 80% damage if the damage limit is at 80%

So it seem to be the good factor. I will try with different values.
 
Top Bottom