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!

(August 24th, 2021, 06:07)Slingers Wrote: But the spell is now different from Possession Vanilla. For example, you could dispel it there, but that did´nt change anything as the unit aready switched sides.

That is very clearly a bug though, as evidenced by the fact that it's Possession's caster that can dispel it, not the player whose unit was stolen. It's the same with Creature Binding. The reversal of the control change not having any code despite there being some (albeit also bugged) for state 2 Confusion could be inferred as an intent for these spells to be non-dispellable. However, their inclusion in the dispel code in general, as well as the AI assigning a high priority to trying to remove them, suggests otherwise. Personally, I consider the latter argument to be the stronger one.
Reply

Aha. "... control change spells in COM are balanced around not being removable ..." There is this modding option, however: "Spell effect : Control changing effects to not kill, kill, or irrecoverably kill the unit after it dies or the battle ends.".
Reply

That's ComWin, and the upcoming version, too.

In CoMWin, these spells apply a continuous effect, so as soon as the enchantment is not on the unit, it's controller is no longer being altered.
In the DOS game, control change simply changed the controller when the spell was applied to the unit, permanently. It didn't apply a continuous effect and removing the enchantment in any way didn't change the controller along with the removal.

Either way that's a modding feature with a "don't do this" warning attached. It's meant for people who don't like losing units to confusion and I very much expect that to break the game and result in nasty new problems for them. Aside from the already wrong interaction with Rase Dead type spells, not killing the unit at the end of battle basically means the battle ends with a unit that is yours but returns to the loser's side afterwards as ending the combat makes the enchantments disappear. So the unit dies anyway, unless it was Confusion on a unit that was originally yours OR the battle ended in a draw or fleeing so neither side got annihilated. As is, it's not possible to end a battle by winning it while your unit is controlled by the enemy, so that case cannot happen. (Unless said unit got Possessed then affected by Mystic Surge, then Creature Bound back to the original owner in which case you can win the battle and your unit will not die. But this won't ever happen.)
Reply

254) (again)
AI combat spell available :Life Drain , priority to cast = 33
AI combat spell available :Dispel Magic , priority to cast = 32
AI selected to cast :Life Drain
AI spell target selection
AI Spell Life Drain best target =Chosen

AI combat spell available :Life Drain , priority to cast = 35
AI combat spell available :Dispel Magic , priority to cast = 34
AI selected to cast :Life Drain

AI combat spell available :Life Drain , priority to cast = 33
AI combat spell available :Dispel Magic , priority to cast = 33
AI selected to cast :Life Drain

AI selected to cast :Iron Skin 31 times. AI selected to cast :Dispel magic 114 times. AI selected to cast :Resist elements 3 times. AI selected to cast :Black Prayer 12 times.
AI selected to cast :Mana Leak 10 times. AI selected to cast :Life Drain 8 times. AI selected to cast :Animate Dead 2 times. AI selected to cast :Wild Boars 3 times
183 spells cast by the AI in total.

I saved this random log, just in case you asked. Dosn't really help much. But the AI values Life drain way too high, should prolly be -100 instead when there is no valid target. Only target in all these fights is Torin the Chosen.
https://www.dropbox.com/s/rdlmrk2agjznsn...l.txt?dl=0
Reply

First bug I found, the AI uses -4 save to simulate damage. It should be -5, in fact it shouldn't be -5 but the value read from the spells.dat file. These are no longer hardcoded.
Assuming the spell wasn't cast by a unit, there should be no additional modifier from spell save items.

At 23 resistance (Black Prayer), this should be doing 0 damage even at the worst possible save roll.
Damage less than 2.5 should be worth 0 priority for targeting. Targets must have over 0 priority to get selected.

So the AI shouldn't see the Chosen as a valid target.

Second bug found, the AI didn't use the "direct damage" block to evaluate the casting priority, instead used some old leftover code. But this also doesn't explain how it was able to select a spell that had no valid target.

...found it. There is an override added that when the AI is actually choosing targets on an already cast spell, the priority value cannot be zero.
This was added because simulated damage can fluctuate. If the initial simulation yields 2.6 damage, the AI will consider the spell valid and possibly cast it but the actual spell targeting decision gets 2.4 on the same simulation and finds the target is invalid then the game ends up crashing as it's casting a spell without a target.
Problem was the fact the AI is doing a simulation decision didn't propagate through the "can we actually cast this spell or not" check, only through the one that added the total priority value to the spell's casting priority.
So while it correctly added zero, it didn't skip the spell as invalid.
Reply

240) (again)
Irrecoverable damage - Spells that is explained fine in manual:
Crack's Call, Petrify, Exorcise, Holy Word, Confusion, Banish, Great Unsummoning, Gate of Hades, Wave of Despair, Annihilate, Disintegrate.

Spells that could be improved in the manual in regards to how they deal irrecoverable damage:
Possession "you control it"
Creature Binding "for the rest of the combat"
(Confusion does a good job in the manual here.)

Ingame spellbook text for spells that dosn't mention irrecoverable damage at all:
Banish "or be returned whence they were summoned"
Possession "fights for the casting wizard until combat ends"
Creature Binding "The bound creature disappears arfter combat ends."
Annihilate "slain instantly"
Massacre "or be struck dead where they stand."
Confusion "will desert once combat ends. Regeneration cannot prevent this effect"
Petrify "is instantly destroyed"
Exorcise "destroyed by the holy fires."
Holy word "Attempts to banish outright all fantastic and/or undead creatures."
Great Unsummoning "Tries to banish all enemy fantastic creatures"

250) (again)
Did you happen to check if Archmage managed to sneak its 100% dispel defence into the game somehow? If not, it is still on my to-do list for another day.

257) (again)
Yeah, I have always been wondering why that "Target: n/a" wasn't just removed, dosn't really have a point. (Except for floating island of course.)

258)
CASTERWIN.html: Great Unsummoning, does this need to specify that it is irrecoverably destroyed? I can't think of any difference between "destroyed" and "irrecoverably destroyed" on the overland map for fantastic creatures?

259)
Units killed while they have Black Sleep on them can still be raised with Animate dead. "(...) when killed, the target won't be possible to raise as undead"
Reply

258. A Chaos Channelled hero would vanish along with their items.
259. They can't be raised as the result of undead creation damage, this doesn't apply to the Animate Dead spell though.
If I wanted to nitpick, I would say that spell Animates the target, not Raises them.
Reply

250. Archamage is not in the dispel resistance function. Only ruler of heaven, Specialist, Runemaster, nothing else.
Reply

I'm a bit baffled by this banishment. In this save, Rjak's capital is on screen when you load, and Sharee's army is just west of it. Over the end turn, Sharee banishes Rjak: https://ufile.io/b5f0k1cp

  • Sharee's stack: 1 mediocre hero, 1 giant spider, 1 war bear, 2 cockatrices, 1 magic spirit
  • Rjak's capital stack: 3 heroes, 3 shadow demons, 1 magician, 2 lizard turtles, city enchantments: wall of fire and wall of darkness

This would be a no loss win for Rjak (or at least a human with the same army) yet instead it's Sharee who almost gets by with no loss, only losing the war bear and magic spirit.

I know there's an elimination mechanic, but could that be at work here? Rjak is around middle rank (or was until a couple turns ago) so it doesn't seem like that should be at work.

Sorry if this is something I could investigate for myself, I don't know where to find any useful log data or whatnot in the release version.
Reply

Rjak fortress city is Stettin, wall of darkness and wall of fire. Rjak has an overwhelming force in his city. Rjak has fate of mastery active.
Sharee has no overland spells. Both have plenty of mana. Globaly Rjak is in the weaker end of the wizards.
Rjak has 9 death books, 2 chaos, 1 nature. Cult leader.
Sharee has 8 nature books, 4 chaos, 1 death. Sage master. Has Crack's call.

Sharee army: Druid(High level(lord), flying, elemental armor, wraithform, immolation + item: ranged -3 death (not seen in video)), cockatrices, cockatrices, giant spiders(water walking), war bears(water walking), magic spirit
Rjak army: Beastmaster(Items+Wraithform), Sage(Items+Wraithform), War Monk(Items+Wraithform), Shadow demons, Shadow demons, Shadow demons, Dragon turtle, Dragon turtle, Magicians(high elf).

Sharee AI turn, phase 6 execute
Stack arrives to 74,35 plane :1 (City of Stettin)
Stack initiates combat!
(...) Spell casting for the first 3½ turns
Combat turn 4 player 2 (Sharee initiates with first melee damage)
Army deals 1,37979956380568 Melee damage
Army deals 27,261282122533 Antifly Melee damage
Combat turn 5 player 1 (Rjak)
Army deals 6,8831486040292 Melee damage
Army deals 19,8559375948969 Antifly Melee damage
(...)
Combat turn 9 player 1
Army deals 0,759866113676369 Melee damage
Army deals 2,19199889492474 Antifly Melee damage
Combat turn 9 player 2
Army deals 0,696866902409322 Melee damage
Army deals 12,2220454163176 Antifly Melee damage
Rjak spent 90 mana!
Sharee spent 345 mana!
Defeated : Rjak's ((Big army)) died in battle!
Winner : Sharee's Giant Spiders died in battle!

Rjak have a massive army with a massive ranged advantage, maybe Wall of darkness prevents him from shooting out? There is no ranged attacks at all.
Not sure if the fortress lightning is being logged?
But this fight should be won overwhelmingly by Rjak.
https://www.dropbox.com/s/klucrjfjeehtn7...e.mp4?dl=0 (Rjaks army before fight)
https://www.dropbox.com/s/0ut75nw7zwlb5r...n.mp4?dl=0 (Sharees army arfter fight, only lost one giant spider)
https://www.dropbox.com/s/h09ij44bv07hao...r.mp4?dl=0 (Time and powerlevel of Rjak)
https://www.dropbox.com/s/2t4ptad95jjvwr...t.txt?dl=0 (Log of fight)
https://www.dropbox.com/s/pq3iti7wzvorvo...t.txt?dl=0 (Log of full turn, there is 12 out of 13 AI remaining)
Reply



Forum Jump: