[ERM] problem with MA:X

Official forum of the Wake of Gods mod to Heroes of Might and Magic III.
User avatar
Beholder
Scout
Scout
Posts: 150
Joined: 27 Feb 2006
Location: Poland, Kraków
Contact:

[ERM] problem with MA:X

Unread postby Beholder » 28 Sep 2009, 19:50

Hi, I`m back from the dead ;) And I`ve recently played some WOG and found some bugs in my scripts. Rigth now I have a terrible problem with MA:X I believe...

I modify (set) flags for all units in the game and the result is that some units are hit by destroy undead:
pegasi+upg, unicorns+upg, magi+upg,gargoyles+upg, beholders+upg,ancient behemots (but not regular behemoths!), basilisks+upg, dwarves (but not upgs!)

I`ve seen through the code and all of above units have flag #16 (alive) set. Moreover as you can see fe. dwarves are hit while their upg is not yet they have the same value set. WTF?

I run WOG 3.58f + script update, the flag setting is done using local variable so it can't be overwritten by some other script.
Beholder

User avatar
GreatEmerald
CH Staff
CH Staff
Posts: 3330
Joined: 24 Jul 2009
Location: Netherlands

Unread postby GreatEmerald » 29 Sep 2009, 12:21

That's odd. What happens if you don't include the X changes for those units at all?

User avatar
Beholder
Scout
Scout
Posts: 150
Joined: 27 Feb 2006
Location: Poland, Kraków
Contact:

Unread postby Beholder » 29 Sep 2009, 16:31

hm... why haven`t I thought about that...

Well they get hit by destroy undead as well. I guess it's bug in some wog script, I`ll try to nail it down.

EDIT:
Got it. It turns out that the problem is in my script however it is not a MA:X problem. The problem for dwarves is this line:

!!EA16:B8/1/87/61/10/11/12/13/14/15/16/17/18/19/20;

Which sets their magic resist to 10-20%. If I change 61 to 43 ("=" changed to "add bonus") then it works fine. Moreover each of the above creatures that gets hit by destroy undead has Magic Resistance set in similar way. However there are other units that have it set in the same way and they are NOT hit by Destroy Undead fe. Upg. Dwarves. Any ideas?

EDIT2:

Ok, it turns out that upg dwarves were also affected - but they resisted the spell and didn't get hit X_X.

Anyway I`ve done some more tests and it turns out that ability 87 "dwarf type of resistance" can only be added (modifier 43) or increased by percentage (37) but not set (61). Too bad, this means I can't set Battle Dwarves resistance to fe. 5% per rank, I can only set it to 40 + X per rank or 40 + X%*40 per rank.
So there`s no way to reduce a creature's resistance?
Beholder

User avatar
GreatEmerald
CH Staff
CH Staff
Posts: 3330
Joined: 24 Jul 2009
Location: Netherlands

Unread postby GreatEmerald » 30 Sep 2009, 13:34

Hmm, interesting, I use 61 and never tried Destroy Undead. Does it only affect dwarves? Like, if you use 61 to add the resistance to someone who doesn't have any at all, does it glitch out like that? If it does, I'll have to alter all my scripts :(

User avatar
Beholder
Scout
Scout
Posts: 150
Joined: 27 Feb 2006
Location: Poland, Kraków
Contact:

Unread postby Beholder » 30 Sep 2009, 18:07

the glitch is always when you use 61 for other creatures as well... however the glitch appears with Ancient Behemoths but it doesn't appear with Behemoths... I`m totally at loss here
Beholder


Return to “Wake of Gods”

Who is online

Users browsing this forum: No registered users and 1 guest