April 13th, 2023, 01:41
(This post was last modified: April 13th, 2023, 01:54 by Suppanut.)
Posts: 1,063
Threads: 14
Joined: Nov 2020
(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
April 17th, 2023, 03:31
(This post was last modified: April 17th, 2023, 03:32 by Slingers.)
Posts: 543
Threads: 1
Joined: Dec 2019
MASTER.CAS does not contain SHPBuff and SHPPenalty variables. Maybe forgotten?
April 24th, 2023, 07:40
(This post was last modified: April 24th, 2023, 08:36 by Suppanut.)
Posts: 1,063
Threads: 14
Joined: Nov 2020
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.
Posts: 10,497
Threads: 395
Joined: Aug 2015
(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.
Posts: 1,063
Threads: 14
Joined: Nov 2020
(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.
April 26th, 2023, 20:09
(This post was last modified: April 26th, 2023, 20:12 by CreepyCaster.)
Posts: 14
Threads: 0
Joined: Apr 2023
(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.
April 26th, 2023, 21:17
(This post was last modified: April 26th, 2023, 23:48 by CreepyCaster.)
Posts: 14
Threads: 0
Joined: Apr 2023
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.)
April 26th, 2023, 22:21
(This post was last modified: April 26th, 2023, 22:23 by CreepyCaster.)
Posts: 14
Threads: 0
Joined: Apr 2023
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)
Posts: 1,063
Threads: 14
Joined: Nov 2020
(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.
Posts: 14
Threads: 0
Joined: Apr 2023
"Have already tried. It does not work."
That looks like a bug then.
|