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!

That looks correct.

However, "no healing" has two different versions of icon display.

"Healing Immunity" is displayed when the unit has the "EncNoHeal" enchantment flag. (This is generally granted by spell effects like Mystic Surge)
"No Healing" is displayed if the unit is an undead, zombie, or skeleton, and this does not require any enchantment flags.

Blood Lust turns units undead, however, only when unit stats are recalculated. Which is done directly before running the script.
So assuming you see "No Healing", that comes from Blood Lust turning the unit undead, which implies it's a result of there being an additional unit stat recalculation instance ran overland, but not during battle, before it reaches the display part of the code.
This is normal behaviour, and if you want the side effects of being undead instantly applied, you have to do so in the script. (change race to Death, add EncUndead flag, add immunities, basically you need to copy the effect of Blood Lust into your spell script.)

However if Healing Immunity also doesn't show up, then it might be a bug somewhere. That one should always be displayed whenever EncNoHeal is set.
Reply

Thanks, that clears up a lot.

I think I found another bug though, it turns out the GETCOMBATENCHANTMENTFLAG and GETOLENCHANTMENTFLAG are reversed in effect, the former actually checks enchantment flags applied on the overworld while the latter checks enchantment flags applied in combat.
Reply

We've been unsuccessful at making 'area=true' damage, having no area of effect. Even having area=true in warp lightning made no difference.

[238]
Name=Dissolution
Rarity=4
TradeValue=41
Category=5
Realm=3
CastingCost=80
ResearchCost=12000
AIResearchPriority=1770
AIResearchGroup=9
Attack=4
Irrecoverable=True
Doom=True
Area=True
SpellTypeGroup=4
CastingLocation=255
Custom=True
CustomAnimation=47
CustomSound=33

Reply

I don't see a problem in the code and we've received no bug reports about the spells that use the flag working incorrectly. (Fireball, firestorm, etc.)

Is there a chance you forgot to delete your spells.dat to refresh the data?

Quote:I think I found another bug though, it turns out the GETCOMBATENCHANTMENTFLAG and GETOLENCHANTMENTFLAG are reversed in effect, the former actually checks enchantment flags applied on the overworld while the latter checks enchantment flags applied in combat.

Confirmed, this will be fixed in the next version.
Reply

The problem was that we were trying to make Doom damage apply as a figure aoe, but it turns out Doom damage skips many aspects of the damage calculation, including whether the damage should be applied per figure, and just deals damage equal to the attack delivered.
Reply

(March 12th, 2022, 03:56)MrBiscuits Wrote: Playing with version 1.3.0 and have a crash when I press next turn (attached). Also all the power graphs of the other wizards have gone to zero for some reason.

I've noticed invisible units from mass invisibility lose any buff auras they have.

It's crashing due to the historian values being zero. (division by zero)

I couldn't find a way to skip the historian calculation at the beginning of a new turn, nor a way to increase the turn counter without a new turn actually starting in the code. I will need a save file that can reproduce this from the previous turn to track how the historian is skipped.
Reply

These are not crash bugs, just noticed AI behavior after modding: 
- The "Stealth" ability also works quite well on normal units. However, AI normal units are visible despite "Stealth". 
- AI units with the "Invisibility" spell ability fail to use it and get eaten.
Reply

Quote:AI units with the "Invisibility" spell ability fail to use it and get eaten.

Units cast spells only when the priority to cast the spell is higher than the priority of a melee or ranged attack.
While I can artificialy raise this priority for specific spells or even force the use of the spell every time, that would make the unit overlook cases when not casting the spell is a better move, for example if the unit has a very powerful ranged (or melee) attack and could kill a powerful enemy unit in a single turn.

Invisibility in particular gains priority from the enemy army having ranged units without illusion immunity present.
However if there are fewer than 4 such units, Invisibility receives the "invalid spell" priority currently.
Maybe that's too harsh? I think it's reasonable for wizards - casting Invisibility against a non-ranged army is a wasted turn. It only protects a single unit from enemy spells so it's inefficient at reducing losses, and while it does provide a damage reduction in melee combat, that part of the effect is not so powerful to justify this expensive spell, and it's usually better to cast anything else.
But I'll change it so that this rule won't apply when units are casting the spell. It'll still require the priority to be higher than an attack though, so it won't be used much if the unit is very powerful, but that should be good enough to work on average normal units and even more so on support units with low offensive stats.

Quote:- The "Stealth" ability also works quite well on normal units. However, AI normal units are visible despite "Stealth".

Stealth seems to have the exact same coding as invisibility for the overload map. I'll need more details for this as I see no reason why they'd be visible.
Reply

(April 4th, 2022, 06:49)Seravy Wrote: However if there are fewer than 4 such units, Invisibility receives the "invalid spell" priority currently.
Maybe that's too harsh? I think it's reasonable for wizards - casting Invisibility against a non-ranged army is a wasted turn. It only protects a single unit from enemy spells so it's inefficient at reducing losses, and while it does provide a damage reduction in melee combat, that part of the effect is not so powerful to justify this expensive spell, and it's usually better to cast anything else.
But I'll change it so that this rule won't apply when units are casting the spell. It'll still require the priority to be higher than an attack though, so it won't be used much if the unit is very powerful, but that should be good enough to work on average normal units and even more so on support units with low offensive stats.

Stealth seems to have the exact same coding as invisibility for the overland map. I'll need more details for this as I see no reason why they'd be visible.

Aha. In my example it could have been 4 or less ranged units. The last surviving Doom Bat caught easily the teleporting Gnome Magicians who did not use their Invisibility ability. Also, I would like to find out if units can use a Flight ability to outmaneuver walking units.

AI Stealth units within cities are visible. Maybe it has to be like this? So far I have not been able to reproduce visible AI Stealth units walking around on the overland map. I think I didn't manage to put Stealth on settlers or anything.
Reply

Check out the set up in Myrror. I placed my units so they blocked the raiders path, in order to see if the raiders would attack me or the AI town. Press End Turn and find that the stack of shaman with 2 moves have gone through my stacks and 3 tiles.

Also, anyone know of how to get this site to consistently send emails when threads are updated or created? It seems to send emails to me for a short while, and I click through, but it trails off until I get none.


Attached Files
.zip   4.zip (Size: 143.37 KB / Downloads: 2)
Reply



Forum Jump: