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

Create an account  

 
Caster of Magic II Bug Reports!

(February 3rd, 2023, 15:49)prokolyo Wrote: Not sure if this is a bug, but how is it possible for an AI hero (warrior mage) and 8 sprites to clear out a bunch of seemingly difficult nodes (3 great drakes; efreet and few doom bats; djinn and storm giant cave). The wizard is white and green, it does have tactician but can't really cast in chaos nodes... And then the other funny thing is, some of those nodes, he didn't even wait until melded, he just kept going for the next one and left them unguarded.
Is all this normal?
PS And this same stack just beat a chaos node with many hydras!?
PS I attacked the stack just to see wtf, turns out he has prayer and black prayer, don't know if that counts in autocombat. But the AI stack wasn't very convincing against one of my generic garrison stacks (a strong halberd, a bear and 6 regular apprentices) and outside of a node. So I really don't know how it cleared out so many strong nodes...

I figured out how to log his last battle. So the hero and 8 sprites defeated 6 hydras in a chaos node, no spells cast. Is this possible? The hero (Warrior Mage) did have the Staff of Pain (+6 att +30 to hit, lightning). Only 6 shots though. Here is the log:

Stack of 9 units moves from 2,24,34 to 24,35
Stack arrives to 24,35 plane :2
Stack initiates combat!
Entered combat at X=24, Y=35P =2
Army #1
MELEE=0
ANTIFLYMELEE=22800
MISSILERANGED=0
MAGICRANGED=0
OTHERRANGED=0
HP=540(Invis :0,Flying :0,Miss.Im. :0,Mag.Im :0)
SAVEORDIE=0
POISON=0
RANGEDSAVE=0
RANGEDPOISON=0
AMMO=0
Casting Buff = 0
Casting RBuff = 0
Casting DD = 0
Casting Curse = 0
Casting Summon = 0
Casting Global = 0
Casting Antifly = 0
Army #2
MELEE=4412.61410788382
ANTIFLYMELEE=174.771784232365
MISSILERANGED=0
MAGICRANGED=12684.0248962656
OTHERRANGED=0
HP=170.690574985181(Invis :0,Flying :5.21754593953764,Miss.Im. :0,Mag.Im :0)
SAVEORDIE=0
POISON=0
RANGEDSAVE=0
RANGEDPOISON=0
AMMO=5.75103734439834
Casting Buff = 0
Casting RBuff = 0
Casting DD = 0
Casting Curse = 0
Casting Summon = 0
Casting Global = 0
Casting Antifly = 0
Player 2 will cast half as much spells to save mana. MP=811
Combat turn 1 player 1
Combat turn 1 player 2
Casting uses 0*Range MP
Buff = 0
Buff Ranged = 0
Damage = 0
Curse = 0
Summon = 0
Army deals 63.4201244813278 Magic Ranged damage
Combat turn 2 player 1
Combat turn 2 player 2
Army deals 63.4201244813278 Magic Ranged damage
Combat turn 3 player 1
Combat turn 3 player 2
Army deals 63.4201244813278 Magic Ranged damage
Combat turn 4 player 1
Combat turn 4 player 2
Army deals 63.4201244813278 Magic Ranged damage
Combat turn 5 player 1
Combat turn 5 player 2
Army deals 63.4201244813278 Magic Ranged damage
Army deals 22.0630705394191 Melee damage
Army deals 0.873858921161826 Antifly Melee damage
Combat turn 6 player 1
Army deals 23.0825751559841 Antifly Melee damage
Combat turn 6 player 2
Army deals 54.8437880909371 Magic Ranged damage
Army deals 19.0794700451204 Melee damage
Army deals 0.755686525145255 Antifly Melee damage
Combat turn 7 player 1
Army deals 14.4620448073701 Antifly Melee damage
Combat turn 7 player 2
Army deals 17.2101394464218 Melee damage
Army deals 0.681647364668704 Antifly Melee damage
Combat turn 8 player 1
Army deals 12.3967144536048 Antifly Melee damage
Combat turn 8 player 2
Army deals 15.6077686917937 Melee damage
Army deals 0.618181766059532 Antifly Melee damage
Combat turn 9 player 1
Army deals 10.52367916914 Antifly Melee damage
Combat turn 9 player 2
Army deals 14.2475021635269 Melee damage
Army deals 0.564305265109224 Antifly Melee damage
Combat turn 10 player 1
Army deals 8.81388484845615 Antifly Melee damage
Combat turn 10 player 2
Army deals 13.1082397106663 Melee damage
Army deals 0.519182141553133 Antifly Melee damage
Combat turn 11 player 1
Army deals 7.24080954345048 Antifly Melee damage
Combat turn 11 player 2
Army deals 12.1723093481755 Melee damage
Army deals 0.48211245556416 Antifly Melee damage
Combat turn 12 player 1
Army deals 5.78005206089363 Antifly Melee damage
Combat turn 12 player 2
Army deals 11.4251931330471 Melee damage
Army deals 0.452521190442286 Antifly Melee damage
Combat turn 13 player 1
Army deals 4.40895345656369 Antifly Melee damage
Combat turn 13 player 2
Army deals 10.8553019652095 Melee damage
Army deals 0.429949333083788 Antifly Melee damage
Combat turn 14 player 1
Army deals 3.10624555475781 Antifly Melee damage
Combat turn 14 player 2
Army deals 10.4537958199913 Melee damage
Army deals 0.41404675387237 Antifly Melee damage
Combat turn 15 player 1
Army deals 1.85172104109494 Antifly Melee damage
Combat turn 15 player 2
Army deals 10.2144466236308 Melee damage
Army deals 0.404566775546651 Antifly Melee damage
Combat turn 16 player 1
Army deals 0.625920011162791 Antifly Melee damage
Combat turn 16 player 2
Army deals 10.1335416447852 Melee damage
Army deals 0.40136234679752 Antifly Melee damage
Tlaloc spent 0 mana!
Defenderlossrate Neutral=1
Attackerlossrate Tlaloc=0.540701208080711
Defeated : Neutral's Hydra died in battle!
Defeated : Neutral's Hydra died in battle!
Defeated : Neutral's Hydra died in battle!
Defeated : Neutral's Hydra died in battle!
Defeated : Neutral's Hydra died in battle!
Defeated : Neutral's Hydra died in battle!
Winner : Tlaloc's Sprites died in battle!
Winner : Tlaloc's Sprites died in battle!
Winner : Tlaloc's Sprites died in battle!
Winner : Tlaloc's Sprites died in battle!
Treasure found by Tlaloc
Reply

The casting numbers are all zero which should only be correct if the wizard knows no Chaos spells and the system has to assume all their spells can be countered.

The initial army stats seem about correct at least as much as I can tell without knowing the unit stats.

The first 5 turns seem to be roughly correct as well - Hydras are slow so they can't melee that early and the AI army has enough ammo.

That's a total of 337 damage, enough to "destroy" roughly 2/3 of the hydra's melee attack strength by "killing" them.
That still leaves one third, ~8500 "antifly melee" strength to retaliate.
This resulting in only 23 damage seems to be on the low side - but assuming the hero had high enough defense to push their army higher than hydras whose defense stat is really low, it's still possible.

So what happens is, the hydras get mostly killed at range and what's left is unable to deal enough damage to win due to the hero's ability to tank damage.

...on the other hand I'm not seeing how this could beat efreets, great drakes or storm giants unless there were much fewer of them in which case yes, 9 ranged units vs 1-2 strong enemies usually wins by simply killing them turn 1 or 2.
...of course the possibility that the hero is strong enough to beat those things alone also exists. You didn't specify the defense stat but Warrior Mage heroes should at the bare minimum have Agility, and from a Nature/Life wizard, probably Holy Armor and several other buffs too.
Reply

(February 5th, 2023, 23:30)Seravy Wrote: The casting numbers are all zero which should only be correct if the wizard knows no Chaos spells and the system has to assume all their spells can be countered.

The initial army stats seem about correct at least as much as I can tell without knowing the unit stats.

The first 5 turns seem to be roughly correct as well - Hydras are slow so they can't melee that early and the AI army has enough ammo.

That's a total of 337 damage, enough to "destroy" roughly 2/3 of the hydra's melee attack strength by "killing" them.
That still leaves one third, ~8500 "antifly melee" strength to retaliate.
This resulting in only 23 damage seems to be on the low side - but assuming the hero had high enough defense to push their army higher than hydras whose defense stat is really low, it's still possible.

So what happens is, the hydras get mostly killed at range and what's left is unable to deal enough damage to win due to the hero's ability to tank damage.

...on the other hand I'm not seeing how this could beat efreets, great drakes or storm giants unless there were much fewer of them in which case yes, 9 ranged units vs 1-2 strong enemies usually wins by simply killing them turn 1 or 2.
...of course the possibility that the hero is strong enough to beat those things alone also exists. You didn't specify the defense stat but Warrior Mage heroes should at the bare minimum have Agility, and from a Nature/Life wizard, probably Holy Armor and several other buffs too.

Thanks for the answer!

The Warrior Mage was only a commander, but with 13 def @40%. Only had bless, fear and wraithform. Also 13 att @40%. Even assuming that the hydras can't hurt him, there is no way he'd deal so much damage as to kill all the remaining hydras within 25 turns. After all the hydra has a massive health pool, plus regen.
The sprites doing 4a@50% vs hydra's 6d@30%... That's about 1 dam per sprites unit, 8 dam for all sprites vs hydra's 90 health per one hydra plus regen... I don't know... 
Then the node with the efreet and doom bats. OK, let's assume that the sprites can kill off the slow hydras, but the doom bats? No way.
I know that the autocombat rules are different but this seemed very, very unfair so I ended up just starting another game. I was doing very well, but this guy was just clearing a hard node after hard node every other turn pretty much, with this ridiculous stack.

Oh, and how about the clearing the node and moving on without guarding on melding it? Is that an expected behavior?
Reply

A save with the Warrior Mage's stack could help pinpoint the problem. It does sound like the auto combat is exaggerating some of his abilities.
Reply

Quote:Oh, and how about the clearing the node and moving on without guarding on melding it? Is that an expected behavior?

Only if it was conquered by what the AI considers a doomstack - it doesn't want to split those up- but this seems to be the case.
This seems to be the case where the different rules simply benefit the AI army over the hydras.
In particular when calculating army totals the numbers are using the formula (weighted army average*number of units) where the average is pushed towards the overall stronger unit, assuming it will participate in the most actual attack exchanges.
While this generally produces better overall results, in the case when a single unit is paired with a bunch of weak ones, it can result in the "good" unit pushing the numbers of the army up a bit too far.

Anyway, looking at the numbers, 4 attack and 40% chance to hit would put a single unit of sprites at 350*40*6/200 ranged power which is .. 420. The hero shouldn't be much better due to having a single figure but in that case weighting can't push the numbers up either.
I don't see how this resulted in over 12k ranged attack power when it should be around 4500 unless the stats are slightly higher than what you posted in which case it should be correct. (Guiding Beacon on hero maybe?)

Then there is the hp.
170 divided by 9 is ~19, that sounds awfully lot for the army average, even if the hero has hp buffs and it is weighted toward him. And only 5 of that is "flying" hp.
Are you 100% sure there was no invisible demigod hero in the stack or something? I don't see a bug in the calculation of hp and it's a really simple thing. The 6 hydras correctly had 540= 6*90 too and weighting had no influence on them being identical.

Please post the save file.
Reply

Please check if new feature of custom attributes are actually working or not. I have tried using it and found that although no error warning on process from units.ini and master.cas for invalid attribute, script part in unitcalc.cas, unitcalcpre.cas and disabil.cas does not trigger on condition using them.
Reply

(February 7th, 2023, 23:28)Suppanut Wrote: Please check if new feature of custom attributes are actually working or not. I have tried using it and found that although no error warning on process from units.ini and master.cas for invalid attribute, script part in unitcalc.cas, unitcalcpre.cas and disabil.cas does not trigger on condition using them.

I see no obvious problem in the source code.
Please post an example unit from units.ini and the script code for the ability and I'll try to reproduce the problem.
Reply

(February 8th, 2023, 00:47)Seravy Wrote:
(February 7th, 2023, 23:28)Suppanut Wrote: Please check if new feature of custom attributes are actually working or not. I have tried using it and found that although no error warning on process from units.ini and master.cas for invalid attribute, script part in unitcalc.cas, unitcalcpre.cas and disabil.cas does not trigger on condition using them.

I see no obvious problem in the source code.
Please post an example unit from units.ini and the script code for the ability and I'll try to reproduce the problem.

Here is example in my test build. I will picking part that could be easy to reproduce for you.

Units.ini
Code:
[197]
Name=Nagas
Attack=4
Ammo=0
Hit=40
Defense=4
Resistance=7
Moves=6
Cost=65
LairCost=98
Upkeep=1
Race=17
Building1=6
Building2=0
HP=4
Scouting=1
Transport=0
Figures=3
Roadbuilding=0
AIProduction=0
AIgarrsion=6
Sound=146
Waterwalking=Yes
Fantastic=Yes
FirstStrike=Yes
Poison=3
Custom1=Yes
Foodupkeep=0

Master.cas
Code:
AFExorcise=66;

: SCustom=100 , Use 100-119 to read/write custom data to the unit, not used for anything else.:
SMariner=100 : Custom1 :

DisAbil.cas
Code:
IF (GetEnchantmentFlag(U,EncMariner,0)>0) %OR (GETSTAT(U,SMariner,1)=1) THEN {
AddAbilityLine 0,194,"Mariner","Mariner"; }

Unitcalcpre.cas
Code:
IF (ISCOMBAT()>0) THEN {

: if Kraken/Nagas/Marines arrive at combat sea tile :
X=(GetStat(U,SCoX,0));
Y=(GetStat(U,SCoY,0));

: Mariner enchantment is now using by Marines and Sea Hags and given by script :
IF ( INCOMBAT(U) ) %AND ((GETTERRAIN(X,Y,0))=2) %AND ( (GetEnchantmentFlag(U,EncMariner,0)>0) %OR (GETSTAT(U,SMariner,1)=1) ) THEN {
  SETSTAT(U,ASailing,0,1);
  SETSTAT(U,AFireImmunity,0,1);
  SETSTAT(U,SOLMaxMoves,0,(GetStat(U,SCombatMaxMoves,0)+4));
  SETSTAT(U,SOLMovesLeft,0,(GetStat(U,SCombatMovesLeft,0)+4));
  SETSTAT(U,SCombatMaxMoves,0,(GetStat(U,SCombatMaxMoves,0)+4));
  SETSTAT(U,SCombatMovesLeft,0,(GetStat(U,SCombatMovesLeft,0)+4));
}
}

Code in unitcalcpre.cas and disabil.cas was written to make sure that it would not break old savegame. You could remove part related to enchantment flag "EncMariner" and result would still be the same.

And here is test build in question that support version 1.04.07 of CoM for windows in case you want to see full code.
https://www.mediafire.com/file/kutjer0cy...0j.7z/file
Reply

Zypher has report bug when using dispel magic in battle fought tower lair in savegame below when he play Warlord mod but I don't think it is something might caused by me. I could not think how I could end up create bug on dispel spell with my current capability, I only make add dispel strength +100% with power link in DPower.cas and not change DResist.cas at all. 

so I forward his report here on bug report for you to see. He also upload savegame for warlord mod version 1.4.20 at link below.

https://www.realmsbeyond.net/forums/show...#pid823768

(February 8th, 2023, 05:35)Zypher Wrote: Love the new race. But found one situation where the game crashed and that's when I try to dispel guardian wind when attacking lairs (haven't been able to see if it occurs otherwise yet). This is in the warlord mod, not the lite-version.

and here is link for the mod to open the save there.
https://www.moddb.com/mods/caster-of-mag...nloadsform


Attached Files
.zip   Dispelbug.zip (Size: 279.17 KB / Downloads: 0)
Reply

Two low priority things:

1. Exorcise item enchantment tool tip doesn't say target should resist at -3 but manual indicates -3 resistance.
2. add Bloodsucking description to manual?

Thanks.
Reply



Forum Jump: