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

Create an account  

 
Caster of Magic II - Current open decisions

This is the list of things marked on my list as "needs further discussion" :

1. How should the AI react to dispel resistance when casting a Disjunction spell?
The solution being considered is the following rule :
"if Disjunction priority<X and resistance is at least 1.75 times own dispel power then consider it an invalid target"
and if we decide to have that, we need a value for X.
You can see the Disjunction priorities for each spell here : http://www.realmsbeyond.net/forums/showt...?tid=10061

2. What should neutrals do if they can't reach and attack units in combat? (like city walls and flying unit in the gate)
In the original game they simply vanished which works but is less than ideal.
Turning them into a lair isn't possible because it can include raiders as well as monsters.
Doing nothing is the worst possible option because the units will attack each turn forcing the player to pas the 25 turns every time.

3. Mystic Surge - Do we want this to include the "Destiny" buff?

4. Drain Power, now that it's rare, do we want to change the amount of MP drained? Should the constant or the percentage component be greater, do we even need both?

5. Uranus' Blessing, how much extra power and overland skill do we want at what casting cost and maintenance?

That's everything currently listed under Milestone III.

Might as well include this now as well :

6. Auto button during combat.
Currently it selects targets and order of action at random which is worse than the original game (which uses the normal AI behavior for target selection but picks units in the order they entered combat in so melee units move first), but the AI is better now so either way it won't be the same.
We should probably try to define some simple rules for what order we want auto to move units and how to pick targets for the attack. We need to aim at something that's smart enough to win obviously trivial battles but dumb enough to lose everything else.
Reply

2. Apply a penalty to the city output for being under siege, stacking penalties for every unit (not every stack, but every unit) the city is surrounded by, unless the city has flying fortress. If the unit is standing on a road, halve the bonus from the road. Neutral stays there and receives a stacking -1 priority to attacking that city every turn it stays there without accomplishing anything, until the target switches to another city with higher priority.

3. No. I think Mystic Surge is already OP for its tier.

4. I think it would be more interesting if the amount drained scaled with the two wizards' casting skills. The higher the caster's compared to the target's, the larger the drain. But the amount drained should not go into SP or any Power, only direct Mana.
Reply

1. "Setting priority to zero if casting resistance is high but ignoring it otherwise can allow the AI to not waste resources on trying to dispel things they have low chance to successfully dispel at all." Any way to make it increment? The value gained by certain spells ends up eclipsing their cost by a huge margin if they've been allowed to linger for many turns.
- Their personality should affect that table as well

2a. Have them flee as if they were movement 5 creatures. The next turn that city should be flagged so they don't attack, retreat, attack, retreat, and kill themselves. The neutrals should also check for flying in the city or check for enchantments that cause the same effect and not attack at all if they aren't capable of reaching the enemy units. In the case of city walls and something like a single Pegasai guarding a bunch of bowmen, don't attack.
2b. Have an alert that says essentially "A Nearby Chaos Node morphed some units in this stack into flying creatures!" and apply chaos channels to a random number of creatures.

4. I like Drain Power but don't really notice the skill gain at all. The flat + 3% drain really helps to chip away at opponents who have snowballed (Myrrans I'm looking at you) and pulls them sorta in range of "touchable."

6. Select units with ranged first and have them fire at low shields enemies, in case of tie shoot at ranged enemies. Magicians should try spells if the odds of success are 50/50, otherwise fire like bowmen.
Reply

1. "Any way to make it increment? "
Possible but I'm not sure that would make the game better.
In general, Disjunction priority is governed by what's fun to play against, not what's the best or most economic for the AI.
The Runemaster retort and AEther Binding spell already serve as sources of wizards who dispel more often.

Personality or Objective could be added but there are only 6 of those in the game so adding a modifier to any of them is a 1/6 chance per enemy wizard to have the modifier which is way too frequent. I mean that's in addition to the chance of them playing Sorcery books (AEther Binding raises dispelling) or having Runemaster and those two are about the right amount of "this wizard dispels more often than usual".

Maybe a personality or Objective that dispels less often could work but that too should likely have a threshold priority and above that the trait should not have an effect. Dispelling Meteor Storm is not a matter of preferences or personalities, the AI either does it or loses the game.

2a. There are many different ideas here.
One, basically,if the neutral stack retreated, it should remember that city as an invalid target? That has a problem, in that they might encounter the same thing in the next city so this can lead to the stack having to maintain a list of cities so basically a lot of data stored for a marginal feature. So the other one is better, which was...
Two, the stack checks what is in the target cities, and avoids attacking if they can't win. Basically a rule of "if no unit in the stack can attack a flying unit, they also aren't noncorporeal or wall crusher, and the enemy has at least one flying unit or Flying Fortress enchantment, that target is invalid". This might be a viable solution.

4. So maybe a higher % on Drain and lower constant amount? Like 5%+100 MP?

6. "Select units with ranged first and have them fire at low shields enemies, in case of tie shoot at ranged enemies."
That's way too smart. Not even CoM I Auto selected ranged units first although it did attack the lowest defense target. Using ranged units first is a strategy the player has to discover on their own, the game shouldn't spoil it for them.
Reply

Thanks for giving your thoughts, I haven't seen the code so I don't know what is possible - I just throw out suggestions that seem to make sense even if they are unviable in the long run. Thanks for your mod I've spent way waaaay too much time on this game (or not enough!?) and enjoy the depth. The AI is incredibly satisfying to beat because it does a lot but isn't too powerful.

1. Good reasons, I agree that my suggestion falls short.

2a. Good reasons, best not to store data for a marginal feature. I've run into a few battles the Monsters had no chance of winning and it was pretty unfun. The only thing it did, I would say, is help bleed my mana stores which I was using while in combat with an enemy wizard, but that was the only role those attacks can play.

4. Maybe - If you lower the base amount and up the % drain it would be more effective against "mana-stockpiling," which I think the AI (and players) should do if they're not already. As of now I have little to no reason the entire game to put power into skill. It mostly is always on Mana and sometimes (based on need) put into research. There was one time basically I added a bunch of power to skill so that I could get 1 turn wraiths, but that's all I can remember. Obviously putting power into skill returns value the longer the power is invested in skill but I think the benefits are super-marginal. When I tried putting power into skill, I found that I didn't last in wars with enemy wizards because my mana generation was so low, and changing werewolves or ghouls from 2 turns to 1 didn't really matter. If you then believe that the majority of players and AI will stockpile mana, then the increase will be good for the game. If the AI or players don't do that, however, it will seem like a weird change.

6. Fair enough. I will say 2 things:
a. I believe that for the AI, unit composition matters more in general than combat procedure.
b. I believe we would be hard pressed to find a player who doesn't know to shoot first with their ranged units before their melee units engage in combat. That's kind of a SOP for all games, strategy or otherwise.
My fear is that I "steal" wins from the AI since their melee units took full strength return blows from my units because they didn't shoot first. That would disappoint and confuse me as a player; the AI isn't smart enough to know to shoot first and melee after but it gauges stack-strengths of garrisons or free units quite well, knows to target my strongest cities with debuffs, knows to cast resist magic against a Night Stalker or Confusion on my non-Death regenerating units. I guess the point is the AI reveals optimal play to the player throughout the game as it stands. For veteran players, then, the AI not shooting first often times seems like getting away with murder. Like when instead of blasting my ranged units with 9 strength 9 magic attacks (magician garrison) they all cast Bless or Flame Blade on units that need 3 turns to get to me and the following turn I destroy half of them with my own ranged magic attack.
Reply

6. Obviously the normal AI will shoot first, like it always has been.
Auto however, will not.
I agree magicians casting spells instead of attacking was a problem in CoM I mainly due to limited space for calculating priorities but it should be smarter on CoM II on deciding when to cast spells first. 
Certainly, the AI plays better and thus reveals the optimal play but should we allow the player to use that optimal play without putting in any effort? I don't think so. Auto is for convenience, it should be used in battles the player doesn't care about (or can't possibly lose). In battles that matter, turning Auto on should be strictly worse than playing manually, even for players who are not good at the game.
The question is, how much worse.
Not shooting first is one aspect of that but what about
-picking one of melee, shooting, casting a spell?
-picking the target? There are many details in this one like normal AI prioritizes reachable targets, prefer to attack the same thing again, prefers targets that take the most damage, etc. We can disable each of these separately for Auto as neede or keep the current version where it simply overrides the calculated priority with a completely random number (thus going as far in being dumb that it melees one unit then walks away from it to go after another within the same turn).
Reply

I see, I blended AI behavior with the auto button - my mistake.

The way you describe auto makes me believe no change is really needed since players are expected to use it only when they can't win or can't lose. It might be something that drains development time for little to no payout?

If I were coding a real basic AI (like what the auto button's intended purpose seems to be) then I would say shoot, melee, or move (to) that unit's closest enemy. In CoM I I actually learned from the auto button when I saw it casting Black Sleep on a unit that I fought regularly but didn't think to Black Sleep it even though its resistance was pretty low!

That being said the AI is sometimes too clever for itself - against a stack of Shadow Demons it prefers to Exorcise different units, ostensibly to reduce the strength of their ranged attack. If those units don't die and I win the combat they regenerate. If each magician instead Exorcised the closest unit until it was gone it would do more damage to me since even if I win the combat those units are permanently gone.
Reply

For 6, how about the following rule set :

Unit selection order - select randomly
Attack targeting - always target the nearest valid target, ignoring the calculated priority
Attack type selecting - Cast if available, then ranged if available, then melee if available, regardless of priorities. If neither is available, pass the turn for the unit.
Unit spellcasting - discard the calculated priority and replace by a random amount if the spell could be cast by the AI, but do not cast spells where the priority for the AI is "invalid", for example Darkness when we have no Death creatures, or a direct damage spell with expected damage output of zero. Basically, if the spell wouldn't be cast by an AI that has only that one spell available and nothing else, then auto doesn't cast it either.

We might want to add the ability to cast spells from the wizard (using a yes/no confirmation window) but if we do, it should use the same rule (pick any random valid spell). That makes it dumb enough to not be an issue, however I'm still hesitating because it means the game will ask the player THREE yes/no questions for the auto button.
Reply

I feel like you don't really need to provide confirmation dialogues for what's a convenience choice. It would be fine to have wizard auto casting on by default, and toggleable by an option in the Settings menu.
Reply

I ended up not adding auto spellcasting for flavor reasons because if the player is letting one of their commanders lead the battle then...who is casting spells? No one. Only the player has the power to do so and it's important to preserve the connection with that by requiring it to be done manually.
Reply



Forum Jump: