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!

(April 13th, 2023, 01:01)Seravy Wrote:
Quote:I try to make doom mastery allow 3 chaos channel effect on overland cast in OLSpell.cas but it keep report error.
The only problem I see there is the missing ; on the first line.
I checked and "SetScriptNumVar('SpellTargetUnit',SpellTargetUnit,1);" is there and I see no typo so it should work in theory.

Sorry, I tried it again and it did not work.

Code:
TU=(SpellTargetUnit);

: new effect of Doom Mastery, chaos channel give all 3 effects :
IF (SP=SChaosChannels) %AND HASGLOBAL(W,GEDoomMastery) THEN {
:Give Armor and Flight:
SETENCHANTMENTFLAG(TU,EncCCArmor,1,1);
SETENCHANTMENTFLAG(TU,EncCCFlight,1,1);
:Give Fire Breath if base unit has fire breath less than 4:
IF (GETSTAT(TU,SFireBreath,1)<4) THEN { SETENCHANTMENTFLAG(TU,EncCCBreath,1,1); }
}

Here is its error report.
   

same for this script on COSpell.cas
Code:
TU=SpellTargetUnit;

IF (SP=SWarpCreature) %AND HASGLOBAL(MAINCASTER,GEDoomMastery) THEN {
SETCOMBATENCHANTMENTFLAG(TU,EncWarpAttack,0,1);
SETCOMBATENCHANTMENTFLAG(TU,EncWarpDefense,0,1);
SETCOMBATENCHANTMENTFLAG(TU,EncWarpResist,0,1);
}

and here is error report
   
Reply

MASTER.CAS does not contain SHPBuff and SHPPenalty variables. Maybe forgotten?
Reply

I think this might able to considered to be bug as I play with target aid score rule and it not allow me to target web on sky drake. If web intend to be able to target anything as non-magic spell then I think target aid score rule might end up interfere and could not use on magic immune target. I also try add NonMagic=True in spells.ini for it and it still not works as well.
Reply

(April 24th, 2023, 07:40)Suppanut Wrote: I think this might able to considered to be bug as I play with target aid score rule and it not allow me to target web on sky drake. If web intend to be able to target anything as non-magic spell then I think target aid score rule might end up interfere and could not use on magic immune target. I also try add NonMagic=True in spells.ini for it and it still not works as well.

Bug, this probably affects the spell as a whole, as well as the NonMagic=true parameter on any spell. Also NonMagic=True is indeed missing from spells.ini.

This will be fixed in the next update.
Reply

(April 24th, 2023, 15:13)Seravy Wrote:
(April 24th, 2023, 07:40)Suppanut Wrote: I think this might able to considered to be bug as I play with target aid score rule and it not allow me to target web on sky drake. If web intend to be able to target anything as non-magic spell then I think target aid score rule might end up interfere and could not use on magic immune target. I also try add NonMagic=True in spells.ini for it and it still not works as well.

Bug, this probably affects the spell as a whole, as well as the NonMagic=true parameter on any spell. Also NonMagic=True is indeed missing from spells.ini.

This will be fixed in the next update.

Thank you for reply. It seem that NonMagic=True is working on direct damage spells (I have spell like that in Warlord mod and it could targeting Sky Drake without problem but this attribute is not working on enchantment spell.
Reply

(April 13th, 2023, 01:41)Suppanut Wrote:
Code:
TU=(SpellTargetUnit);

: new effect of Doom Mastery, chaos channel give all 3 effects :
IF (SP=SChaosChannels) %AND HASGLOBAL(W,GEDoomMastery) THEN {
:Give Armor and Flight:
SETENCHANTMENTFLAG(TU,EncCCArmor,1,1);
SETENCHANTMENTFLAG(TU,EncCCFlight,1,1);
:Give Fire Breath if base unit has fire breath less than 4:
IF (GETSTAT(TU,SFireBreath,1)<4) THEN { SETENCHANTMENTFLAG(TU,EncCCBreath,1,1); }
}


Try moving the line:

TU=(SpellTargetUnit);

Inside the IF/THEN statement:

Code:
: new effect of Doom Mastery, chaos channel give all 3 effects :
IF (SP=SChaosChannels) %AND HASGLOBAL(W,GEDoomMastery) THEN {
TU=(SpellTargetUnit); :<=====:
:Give Armor and Flight:
SETENCHANTMENTFLAG(TU,EncCCArmor,1,1);
SETENCHANTMENTFLAG(TU,EncCCFlight,1,1);
:Give Fire Breath if base unit has fire breath less than 4:
IF (GETSTAT(TU,SFireBreath,1)<4) THEN { SETENCHANTMENTFLAG(TU,EncCCBreath,1,1); }
}

The OLSpell.cas script is executed for EVERY overland spell that's cast.  The script starts out empty so it does nothing by default.  The comments inside the script file state: "Only the variable(s) applicable for the spell's targeting type are set."

In other words, any time an overland spell that doesn't target a unit gets cast, your script will throw that "SpellTargetUnit" undefined variable exception because it wouldn't be set.  Your IF statement guarantees the spell being cast is "SChaosChannels" so it's appropriate to assign the value of TU within your IF statement.  If it still doesn't work then there's definitely a problem with the engine and not your code.
Reply

Unit attribute "ALargeShield" is missing from MASTER.CAS.
(I edited Cracks Call to subtract defense rating from the damage done and I wanted to include large shield in this damage reduction.)
Reply

Either TERRAINGOLD in EcoGold.CAS doesn't seem to populate with a value or the Gold=x lines in TERRAIN.INI aren't parsed correctly by the engine and thus always get set to 0 internally by default.

I tested this by setting the Gold values of various terrain types in the TERRAIN.INI file and then using

ADDRESLINE "Terraingold",TERRAINGOLD;

in the EcoGold.CAS script and could never get it to output a value. (It should have printed the output as a bunch of coins equal to the combined TERRAINGOLD percentage covered by the city)
Reply

(April 26th, 2023, 20:09)CreepyCaster Wrote:
(April 13th, 2023, 01:41)Suppanut Wrote:
Code:
TU=(SpellTargetUnit);

: new effect of Doom Mastery, chaos channel give all 3 effects :
IF (SP=SChaosChannels) %AND HASGLOBAL(W,GEDoomMastery) THEN {
:Give Armor and Flight:
SETENCHANTMENTFLAG(TU,EncCCArmor,1,1);
SETENCHANTMENTFLAG(TU,EncCCFlight,1,1);
:Give Fire Breath if base unit has fire breath less than 4:
IF (GETSTAT(TU,SFireBreath,1)<4) THEN { SETENCHANTMENTFLAG(TU,EncCCBreath,1,1); }
}


Try moving the line:

TU=(SpellTargetUnit);

Inside the IF/THEN statement:

Code:
: new effect of Doom Mastery, chaos channel give all 3 effects :
IF (SP=SChaosChannels) %AND HASGLOBAL(W,GEDoomMastery) THEN {
TU=(SpellTargetUnit); :<=====:
:Give Armor and Flight:
SETENCHANTMENTFLAG(TU,EncCCArmor,1,1);
SETENCHANTMENTFLAG(TU,EncCCFlight,1,1);
:Give Fire Breath if base unit has fire breath less than 4:
IF (GETSTAT(TU,SFireBreath,1)<4) THEN { SETENCHANTMENTFLAG(TU,EncCCBreath,1,1); }
}

The OLSpell.cas script is executed for EVERY overland spell that's cast.  The script starts out empty so it does nothing by default.  The comments inside the script file state: "Only the variable(s) applicable for the spell's targeting type are set."

In other words, any time an overland spell that doesn't target a unit gets cast, your script will throw that "SpellTargetUnit" undefined variable exception because it wouldn't be set.  Your IF statement guarantees the spell being cast is "SChaosChannels" so it's appropriate to assign the value of TU within your IF statement.  If it still doesn't work then there's definitely a problem with the engine and not your code.

Have already tried. It does not work.
   
Reply

"Have already tried. It does not work."

That looks like a bug then.
Reply



Forum Jump: