As a French person I feel like it's my duty to explain strikes to you. - AdrienIer

Create an account  

 
game discussion!

He's up to multiple Great Unsummonings each round. Fantastic! In about 14 months his skill has gone from ~250, to ~600. He's finally declared war on me. First battle he cast: high prayer, counter magic, 4 (or 5) resurrections, iron skin, 4 invulnerabilities, a phantom beast, a dispel magic that took out 4 spells, and half a dozen smaller spells.
Reply

Dominions3/4 has a system that automatically overrides the usage of expensive combat spells, in the case say you're army of 1000 is attacked by a lone 1 man.

I'd say the ultimate intelligence is for the AI to run the combat in strategic combat mode, then determine the outcome, if they win without loses, they can set maximum mana expenditure to say 50% of their skill, if they win without losing very much hp at all, they could set it to 0-25% or something? (This would have to be done at the instant the actual normal turn based combat began?)

Of course I suppose there's no way to call that routine at the time. Something similar could be good though, perhaps percentage of current army strength in the battle versus global? so say if the battle is 5% of their forces and 10% of the opponents use full skill, but vica versa, maybe not? Again probably not possible to check.

That a "feint" attack is just a real thing, it works on human beings in reality in all sorts of games or fights. Not sure you'll ever bullet proof the ai to a fake out attack designed only to waste their attention.
Reply

i regularly win strategic combat with 0 damage, let alone 0 losses. even against sky drakes/great wyrms, etc. The current formula simply isn't robust enough to help the AI determine if it's a fake attack.
Reply

I'm considering the following formula :

If (Not at someone's capital) AND ((Mana<=Skill) OR ((Battle situation is total advantage) OR (Not in city AND no hero involved) THEN
No casting if mana<=Skill, Cast only if the chosen spell's priority is rated over 50+8*(5-Mana/Skill) otherwise.

The typical priority of a spell is RND(20)+(combat situation modifiers max 50)+Spell modifiers (typically 0-30)

Meanwhile I checked, the AI intends to keep 16*Skill mana in their mana reserves, so that means highest possible skill is 1875. No game will ever last over 1k though.
I'm tempted to change this to 32* but that would be unrealistic for the early game, with 20 skill that would require them to produce and hold 640 mana. Even with 200 skill they'd need 6400 oh wait that's reasonable. The 640 early isn't though. Or maybe it is...first 30 turns override this anyway and uses a fixed 75% mana 25% skill ratio.
What I'm worried about, if this is too high the AI on low difficulty will be stuck at really low skill.
Reply

Modifier per difficulty? Keep 16x up to hard, 24x for extreme, 32x for impossible?
Reply

Done coding the no-casting system.

-It never takes effect if the battle is at someone's capital (yes, including if they attack yours)
-Also never takes effect is the caster is a unit, for obvious reason.
-Otherwise, if mana<2*Skill, or 3* if the player has Death books, spellcasting is entirely disabled. It's easy to use up the entire skill's worth of mana crystals with a single spell if the range multiplier is 3x so it's 1x skill would not have worked. Have to consider how much the last spell still allowed drops the remaining mana below the threshold.
-If neither of the above were true, check combat situation. If it's rated 4 (at least 3x advantage) or 5 (at least 5x advantage) use conserving tactics. At 4, conserve less strictly then at 5.
-Finally, if the combat is not at a city (defending ours or attacking the player) and neither side has a hero in battle, use conserving tactics anyway because losing that battle is not a big deal.
If none of the above are true, cast spells as usual.

If conserving tactics are enabled, spell priority has to be higher the lower the mana to skill ratio of the AI is. If there was no city, no hero and no 3x advantage, conserving mana is much stricter.
In general, there is absolutely no restriction around 13x mana to skill ratio and the effects are close to none between 10-13x. Below that, crappy spells might not be cast immediately, only on turns where they roll better priority. As it goes down further, medicore spells stop being used, and at an unimportant battle at 4x mana only the best spells will be cast, while advantage based battles might still cast good or average spells but no low rated ones.

I have absolutely no idea what influence this will have on the game.
I also changed that 16x to 32x. If the AI is not involved in wars, it should be able to hold the mana well and reach the higher amounts anyway, and if they are, they wouldn't have managed even the 16x. The AI will be much slower at raising skill (and even at research to an extent) on low difficulty but I guess it's fine, they would have trouble with mana crystals otherwise.
Have to run some games and see how it goes. Considering how long I stay at 20 skill in the early game even as the human player, that doesn't sound so unrealistic for normal difficulty for the AI.

Edit : A more important problem I see is if the AI keeps that much more mana crystals then Drain Power might become overpowered at draining 5% power. Casing it twice per turn, if the AI aims at 10k mana crystals for their 300 skill, it means they are down by 1.2k per turn...which is usually not even half of the AI's mana income on extreme+ hmm...not as bad as I thought but still kinda too good...maybe 4% would be better?idk
Reply

As much as it sucks, you might want to do a slider scale on drain power. base 75 cost which drains 5% or 300 whichever is less. You can increase cost up to 300; for each extra point you spend, you can drain an additional 4 mana, although 5% always stays as the max. If 5% would cost less mana than you spent, spend that much mana instead, to a minimum of 75.

or if the concern is that it will grant too much skill... I dunno if that's a concern.
Reply

It seems a bit unfair to nerf a spell that's only good because the ai is cheating so hard. Especially because it makes no sense to patch both of those changes at once.
If they're going to start conserving mana in unimportant fights x16 mana is plenty. If they're not going to start conserving mana at all though x32 mana is definitely required.

Why make both changes at the same time? They address the exact same problem, and both of them could solve it by themselves? Not sure it's worth making both changes at the same time.
In fact if they're able to conserve their mana, moving them from x16 to x32 might just slow them down and provide them no benefit. Of course if the conserving doesn't really work, then they do probably want to start saving more. Unspent mana doesn't do a lot when there is no war though, but slow you down.
Reply

I'm confused - how often are you getting more than 300 mana with drain power? The number could be changed that's just the average I see. And when AI uses it, it sometimes reaches 500 but not often. The only time it would change is if the AI had more than 6000 mana, which means (currently) more than 350 skill, although it will be closer to 175 skill now. Lower difficulties it shouldn't make any difference (in fact it will boost drain power as the AI will save more mana on lower difficulties), only very late hard, late extreme, and impossible will it be noticed.
Reply

Quote:Why make both changes at the same time?
Because they address different problems.

Conserving mana : Helps against player abuse, and kicks in when the reserves are low. It's meant for emergency situations only, and protects the capital and overland spellcasting ability.
Storing 32x : Helps when the war begins and there is a lot of combat. We don't want the AI fight the entire war on "conserving mode", not casting spells. As mentioned above, conserving mana starts to have effect on weaker spells around the 10x mark so aiming for only 16x is too close anyway. Also conserving will not happen in important battles so if the large scale war begins with 12 even battles against their 12 cities or hero stacks then...they need that mana to protect them.

I had 24 battles in one turn before, and over half of those were "important" as in, they attacked my city. And this was just the AI's attacks on me, not my attacks on them, which was like another 7-8 battles on the first turn. I literally used up 3000-4000 mana crystals a turn for like 3 turns in a row and I had a skill of ~300. The AI ran out of mana each turn after like the 10th battle If I saved on mine I could win a lot of battles which would have been impossible otherwise. Just because I can't attack their capital, doesn't mean it's ok to lose a large number of battles to not having mana to cast.

Fortunately, it is, as the name suggests, just a reserve. If it's not used up, the AI doesn't need to refill it. So overall mana production will not be much different, except in the early game when it's first filled up. I ran a simulation, on Normal difficulty, with only one AI, it had no problems starting to raise their skill, and reached 170ish in 1415, of course it had the entire world to itself. It did take like 8 years before it first raised the skill, but hey, I often do that myself so I suppose that's realistic if receiving no bonus to power base.

Quote:I'm confused - how often are you getting more than 300 mana with drain power?
Currently you don't. If the AI keeps twice the current amount of mana, you will get 500-900 out of it when you get 300-500 now.
I think the best would be to alter the formula, instead of draining 120+5%, drain 150+3%. That way it's not weaker on the lower end, but less overpowered on the high end.
Considering you steal 120 (or 150) and only spend 100, it would be a fair spell even without any % bonus, that is only there to give the player something that specifically helps them on high difficulty. Do we even need that feature?
When I added it, I thought 5k mana is a lot, well...after playing some big games against fixed AI, not anymore. That's merely what you use up in an intense turn. Don't think there should be a spell that punishes that...at least not to this extent?
Then again, draining power means you aren't casting overland spells, and that can be a steep price...still I think the "return" should be no more than 3-4x the investment on a typical high difficulty scenario, and certainly not 7-10x.
Reply



Forum Jump: