Author Topic: More wand woes  (Read 1555 times)

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9835
Re: More wand woes
« Reply #15 on: March 23, 2017, 06:21:47 PM »
Happy to report that version 2.89 of the engine actually does fix this bug (I had introduced a bug in my scripting that was keeping things from working properly - said bug is not in the version of the databases that you have).

Incidentally, what caster level should the wand of magic missiles have? The current script is putting it at level 6. I tried to find the discussion I had with nologgie, but can't. I think he might have been leaning towards level 11 for wands.

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
Re: More wand woes
« Reply #16 on: March 24, 2017, 01:47:57 AM »
Happy to report that version 2.89 of the engine actually does fix this bug (I had introduced a bug in my scripting that was keeping things from working properly - said bug is not in the version of the databases that you have).
Thanks guys! I can now work on the final problem on my little game - I'm trying to make a light aura usable during combat. I'll let you know how it goes.

Incidentally, what caster level should the wand of magic missiles have? The current script is putting it at level 6. I tried to find the discussion I had with nologgie, but can't. I think he might have been leaning towards level 11 for wands.
The DMG says it's level 6 (pg 135) - I don't know if FRUA has a different standard.

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9835
Re: More wand woes
« Reply #17 on: March 24, 2017, 01:27:21 PM »
Thanks for the wand info. :) I will leave that 6 alone. If I recall, our discussion was AD&D vs FRUA, as most of them were. :)

I have just recently made a light aura that works in combat. :)
Here is what I have - there are two SAs to give the player the option of casting on the map or on the combatant, and there are two spells, one for graphics and one that is the spell that is cast - I have not tried to do this with just one spell...yet.

Special Abilities~
Code: [Select]
\(BEGIN)
name = spellArcaneLight
[OverrideSpellTargeting] = $VAR p5; $VAR p6; $VAR list; $VAR loc;
-p5 = $GET_HOOK_PARAM(5);
-p6 = $GET_HOOK_PARAM(6);
-list = "$Map$Combatant";
-loc = "$" + p5 + "$" + p6;
-$DEBUG (loc);
-$SET_COMBATANT_SA($AttackerContext(),"spellArcaneLightTargetXY",loc);
-$RETURN list;
[ProcessSpellTargetOverride] = $VAR p5; $VAR com;
-p5 = $GET_HOOK_PARAM(5);
-$DEBUG ("p5 = " + p5);
-$AURA_Create("arcaneLightAURA",p5,"","","");
\(END)

\(BEGIN)
name = arcaneLightAURA
[AURA_Create] = $VAR tgt; $VAR prm; $VAR pXY; $VAR X; $VAR Y;
-prm = $SA_PARAM_GET();
-pXY = $SA_COMBATANT_GET("spellArcaneLightTargetXY");
-X = $DelimitedStringSubstring(pXY,0);
-Y = $DelimitedStringSubstring(pXY,1);
-$DEBUG("x = " + X);
-$DEBUG("y = " + Y);
-tgt = $IndexOf($CombatantContext());
-$IF (prm == "Combatant"){$AURA_Attach("Combatant");$AURA_Combatant(tgt);};
-$IF (prm == "Map"){$AURA_Attach("XY");$AURA_Location(X,Y);};
-$AURA_Shape("AnnularSector");
-$AURA_Size(0,2,0,360);
-$AURA_Spell("Light AURA");
-$AURA_Wavelength("Xray");
-$DELETE_COMBATANT_SA($AttackerContext(),"spellArcaneLightTargetXY");
[AURA_Enter] = $VAR sus;
-sus = $GET_COMBATANT_SA($CombatantContext(),"monsterLightSusceptible");
-$IF (sus == "-?-?-"){$RETURN;};
-$SET_COMBATANT_SA($CombatantContext(),"IsLightBlinded","");
[AURA_Exit] = $DELETE_COMBATANT_SA($CombatantContext(),"IsLightBlinded");
SpellDuration = $SA_PARAM_SET($GET_HOOK_PARAM(5));
\(END)

Spells~
Code: [Select]
\(BEGIN)
name = Arcane Light
casting sound = sound_Cast.wav
cast msg = /c makes it lighter.
missile sound = none
coverage sound = none
hit sound = none
linger sound = none
cast art = spell_cast_MU.png,210,2,48,48,0,1,4,1,0,0
missile art = spell_missile_MU.png,100,4,48,48,0,1,0,1,0,0
target cover art = spell_coverage_IceStorm.png,100,9,240,240,0,1,0,1,0,0
target hit art = none
target linger art = none
school = Arcane
Cast by = wit
Cast by = wiz
can target friend = yes
can target enemy = yes
cumulative = yes
can memorize = no
allow scribe = no
auto scribe = no
in combat = yes
in camp = yes
can be dispelled = yes
lingers = yes
linger affects once = no
save versus = spell
save result = none
Special Ability = spellArcaneLight
Special Ability = arcaneLightAURA
targeting type = areacircle
target quantity = 25
target range = level
target radius = 2
level = 1
casting time = 0
casting time units = immediate
duration = 0
duration units = instantaneous
target duration = 0
price = 0
priority = 950
spell effect 1 = none
savingThrowScript =
savingThrowSucceededScript =
savingThrowFailedScript =
begin script =
end script =
\(END)

\(BEGIN)
name = Light AURA
casting sound = sound_Cast.wav
cast msg =
missile sound = none
coverage sound = none
hit sound = none
linger sound = none
cast art = none
missile art = none
target cover art = spell_coverage_IceStorm.png,100,9,240,240,0,1,0,1,0,0
target hit art = none
target linger art = spell_coverage_IceStorm.png,100,9,240,240,0,1,0,1,0,0
school = Arcane
Cast by = wit
Cast by = wiz
can target friend = yes
can target enemy = yes
cumulative = yes
can memorize = no
allow scribe = no
auto scribe = no
in combat = yes
in camp = yes
can be dispelled = yes
lingers = yes
linger affects once = no
save versus = spell
save result = none
Special Ability =
Special Ability =
targeting type = areacircle
target quantity = 25
target range = 1
target radius = 2
level = 1
casting time = 0
casting time units = immediate
duration = level
duration units = rounds
target duration = 0
price = 0
priority = 950
spell effect 1 = none
savingThrowScript =
savingThrowSucceededScript =
savingThrowFailedScript =
begin script =
end script =
\(END)

This is still a work in progress, so I haven't made the IsLightBlinded SA yet, but you should have a good start with these. :D

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
Re: More wand woes
« Reply #18 on: March 24, 2017, 03:25:44 PM »
I have just recently made a light aura that works in combat. :)
Here is what I have - there are two SAs to give the player the option of casting on the map or on the combatant, and there are two spells, one for graphics and one that is the spell that is cast - I have not tried to do this with just one spell...yet.
Excellent :D

This is still a work in progress, so I haven't made the IsLightBlinded SA yet, but you should have a good start with these. :D
What would need to go in the IsLightBlinded SA?

Also, a question - is it possible to make a single giant image spell linger graphic that takes up many tiles, rather than having one repeating tile?

Edit - I just tried it, and I have a problem when it gives me a menu asking me to select combant or map - I can't select either, and pressing enter does nothing, so I'm trapped on that screen
« Last Edit: March 24, 2017, 03:32:00 PM by marainein »

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9835
Re: More wand woes
« Reply #19 on: March 24, 2017, 03:45:46 PM »
For lightblind, I imagine something like a penalty to thac0 and maybe no spellcasting and/or maybe decreased movement or no movement.

As for the linger image - the example spell uses the ice storm linger image which is 5x5 cells. ;)

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
Re: More wand woes
« Reply #20 on: March 24, 2017, 05:39:38 PM »
Yeah, I got the multi tile image thing to sort of work now - I had to give it more than one frame before it would work properly.

Is it possible to have the spell automatically originate from the caster AND have it create a lingering circle of effect?

Another thing I noticed is it seems possible to cheat the range limits on spells by switching to manual targeting and using the mouse (instead of the arrow keys) to target a square.

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9835
Re: More wand woes
« Reply #21 on: March 24, 2017, 06:05:28 PM »
Is it possible to have the spell automatically originate from the caster AND have it create a lingering circle of effect?
Yes, set target to "Self". Make sure "friendly fire allowed" is checked.

Another thing I noticed is it seems possible to cheat the range limits on spells by switching to manual targeting and using the mouse (instead of the arrow keys) to target a square.
I almost never use the mouse with DC. :)
If you make a mini-mod showing this, I'll get it in the queue to fix. :D

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
Re: More wand woes
« Reply #22 on: March 24, 2017, 06:31:28 PM »
Is it possible to have the spell automatically originate from the caster AND have it create a lingering circle of effect?
Yes, set target to "Self". Make sure "friendly fire allowed" is checked.
Do you mean the targeting/type field? If I do that, the radius field gets grayed out and I end up without any lingering graphics :(

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9835
Re: More wand woes
« Reply #23 on: March 27, 2017, 12:52:10 PM »
Is it possible to have the spell automatically originate from the caster AND have it create a lingering circle of effect?
Yes, set target to "Self". Make sure "friendly fire allowed" is checked.
Do you mean the targeting/type field? If I do that, the radius field gets grayed out and I end up without any lingering graphics :(

Oh yeah. ;)

Okay, the way it has to be done is Aarea: Circle, so you can set your radius, and the range has to be set to 0 so that the caster is the only target.

Converseley, if you are using AURA, set targeting type to Self and the radius is scripted in the AURA. ;)

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
Re: More wand woes
« Reply #24 on: March 27, 2017, 10:11:42 PM »
I had several problems getting the aura example to work - the first being simply that it got stuck on the menu to select a person or a square.

Also, is it possible to get the visual effect to move when the PC it's centered on moves?

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9835
Re: More wand woes
« Reply #25 on: March 28, 2017, 01:07:46 PM »
Hmm, it is quite possible that you did not get the final version of the scripts...but that is not what I intended. :) i've just looked them over, and they seem like the final version...

If the AURA is attached to a combatant, the AURA will move with the combatant.

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
Re: More wand woes
« Reply #26 on: March 29, 2017, 02:09:22 PM »
I'm using a wand to test the spells - when I try to activate Arcane Light on my PC I get stuck on a menu screen, neither mouse click or enter will allow me to select an option - although I can use the arrow keys to move between options.

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9835
Re: More wand woes
« Reply #27 on: March 29, 2017, 02:44:54 PM »
Here is the final script...which I think is what I posted, but this has all the commented lines left in.

Code: [Select]
\(BEGIN)
name = spellArcaneLight
[OverrideSpellTargeting] = $VAR p5; $VAR p6; $VAR list; $VAR loc;
-p5 = $GET_HOOK_PARAM(5);
-p6 = $GET_HOOK_PARAM(6);
-list = "$Map$Combatant";
-loc = "$" + p5 + "$" + p6;
-$DEBUG (loc);
-//$SET_PARTY_ASL("spellArcaneLightTargetXY",loc);
-$SET_COMBATANT_SA($AttackerContext(),"spellArcaneLightTargetXY",loc);
-$RETURN list;
[ProcessSpellTargetOverride] = $VAR p5; $VAR com;
-p5 = $GET_HOOK_PARAM(5);
-$DEBUG ("p5 = " + p5);
-$AURA_Create("arcaneLightAURA",p5,"","","");
\(END)

\(BEGIN)
name = arcaneLightAURA
[AURA_Create] = $VAR tgt; $VAR prm; $VAR pXY; $VAR X; $VAR Y;
-prm = $SA_PARAM_GET();
-//pXY = $GET_PARTY_ASL("spellArcaneLightTargetXY");
-pXY = $SA_COMBATANT_GET("spellArcaneLightTargetXY");
-X = $DelimitedStringSubstring(pXY,0);
-Y = $DelimitedStringSubstring(pXY,1);
-$DEBUG("x = " + X);
-$DEBUG("y = " + Y);
-tgt = $IndexOf($CombatantContext());
-$IF (prm == "Combatant"){$AURA_Attach("Combatant");$AURA_Combatant(tgt);};
-$IF (prm == "Map"){$AURA_Attach("XY");$AURA_Location(X,Y);};
-$AURA_Shape("AnnularSector");
-$AURA_Size(0,2,0,360);
-$AURA_Spell("Light AURA");
-$AURA_Wavelength("Xray");
-//$DELETE_COMBATANT_SA($AttackerContext(),"spellArcaneLightTarget");
-//$DELETE_PARTY_ASL("spellArcaneLightTargetXY");
-$DELETE_COMBATANT_SA($AttackerContext(),"spellArcaneLightTargetXY");
[AURA_Enter] = $VAR sus;
-sus = $GET_COMBATANT_SA($CombatantContext(),"monsterLightSusceptible");
-$IF (sus == "-?-?-"){$RETURN;};
-$SET_COMBATANT_SA($CombatantContext(),"IsLightBlinded","");
[AURA_Exit] = $DELETE_COMBATANT_SA($CombatantContext(),"IsLightBlinded");
SpellDuration = $SA_PARAM_SET($GET_HOOK_PARAM(5));
\(END)

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
Re: More wand woes
« Reply #28 on: March 30, 2017, 04:47:01 AM »
Here is the final script...which I think is what I posted, but this has all the commented lines left in.
Manikus thanks, but I'm still getting stuck on the same menu :(
I take it the menu works for you?

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9835
Re: More wand woes
« Reply #29 on: March 30, 2017, 12:45:44 PM »
Here is the final script...which I think is what I posted, but this has all the commented lines left in.
Manikus thanks, but I'm still getting stuck on the same menu :(
I take it the menu works for you?

Yup - works fine. Tested it before posting. Just tested it again and realized I still had engine 2.78 in the mini-mod (because the issue was resolved, so why put in a new engine?). Tested it with 2.81, still works well.
However, and this shouldn't matter, I am casting a spell and you are using an item. Perhaps the script is confused about combatant context because it is an item?

 

anything