Author Topic: More wand woes  (Read 1111 times)

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
Re: More wand woes
« Reply #30 on: March 30, 2017, 02:56:03 PM »
Let me replicate your testing context and we'll see if that fixes it. I was using engine 2.80 - I'll grab 2.81. Also, I was using the wand because it seemed easy to attach a new spell to and then use a give treasure event to give the wand to the testing character/party. What steps are you using to cast the spell directly? Can you give it directly to a PC?

Online manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9585
Re: More wand woes
« Reply #31 on: March 30, 2017, 03:03:50 PM »
The trick is to create an NPC to give the spell to. Check the box to make it a pregen character and you can add it to party at the beginning. :D

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
Re: More wand woes
« Reply #32 on: March 31, 2017, 04:40:14 PM »
Thanks! I tried that, and it did work, although I had to change the spell type from 'Arcane' to  'Magic User' before my npc could memorize it. I'm no longer stuck on the choose combatant/map location menu, although I do get an error message there (image attached). Also, the fact that it works from a spell and not a spell cast from an item implies there's another problem there.


Online manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9585
Re: More wand woes
« Reply #33 on: March 31, 2017, 04:53:01 PM »
The answer to both is, "mini-mod". ;)

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2138
Re: More wand woes
« Reply #34 on: March 31, 2017, 06:17:05 PM »
This particular error has a very simple explanation.
Your hook named AURA_Create used function
$CombatantContext().  But no such context is
available for that hook.  In fact, the documentation:

http://dianneandpaul.net/UAF/Help/SAAURA.html

lists no context whatsoever for that hook.

What did you expect the result to be?  Which combatant
did you expect to be associated with $CombatantContext()?

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
Re: More wand woes
« Reply #35 on: April 04, 2017, 01:48:52 PM »
Manikus, do you get this error when you run your script or not?

Online manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9585
Re: More wand woes
« Reply #36 on: April 04, 2017, 05:46:52 PM »
As I mentioned above, I do not get any errors from my scripts. My mii-mod has quite a bit more going on than just target selection override.

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
Re: More wand woes
« Reply #37 on: April 05, 2017, 03:28:24 AM »
Ok, arcane light mini-mod attached.

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2138
Re: More wand woes
« Reply #38 on: April 05, 2017, 09:37:35 AM »
I have your mini-mod.  It demonstrates your problem
perfectly.  I'll update this note later today with my findings.

Here is what I see:

Your mage cast  "Arcane Light".

The Hook  "ProcessSpellTargetOverride" executed the function "$AURA_Create"
with:
SA name  "arcaneLightAURA
parameter  "Combatant"
user data  "","",""

The engine found a hook with a script named
"AURA_Create" attached to the SA "arcaneLightAURA"
and attempted to run it.

That script used function $CombatantContext().
But that hook does not run in the context of a combatant.
See documentation at:
http://dianneandpaul.net/UAF/Help/SAAURA.html

You will see that no context whatsoever is listed for
the hook "AURA_Create.

Therefore:  Error message that says pretty much what I
have just said.

« Last Edit: April 05, 2017, 09:59:16 AM by Paul R. Stevens »

Online manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9585
Re: More wand woes
« Reply #39 on: April 05, 2017, 01:37:17 PM »
The question I have, is why when I run the same script, I do not receive an error? My script is one layer deeper - spell with OverrideSpellSelection to call the light spell. I odnt know if this matters.

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2138
Re: More wand woes
« Reply #40 on: April 05, 2017, 03:31:29 PM »
If you want to know why your module works correctly then
you will have to submit a mini-mod with a detailed explanation
of why it should not work. ;-)
« Last Edit: April 05, 2017, 04:06:27 PM by Paul R. Stevens »

Online manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9585
Re: More wand woes
« Reply #41 on: April 05, 2017, 04:27:34 PM »
If you want to know why your module works correctly then
you will have to submit a mini-mod with a detailed explanation
of why it should not work. ;-)

I will give that mini-mod the appropriate priority. :D :D :D

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
Re: More wand woes
« Reply #42 on: April 21, 2017, 05:58:55 PM »
Has the light problem here been fixed? I was hoping to use Manikus's script in my project.

Online manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9585
Re: More wand woes
« Reply #43 on: April 24, 2017, 02:32:29 PM »
I haven't really done anything on this because my scripts in my design work. I have posted all of those scripts. They don't work for you. Paul says that they shouldnn't work. Or at least not work without an error message.

I'll take a look at the mini-mod again. It's weird trying to come up with an alternative to a script that is working just fine (for me). I'll see what i can come up with.

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2138
Re: More wand woes
« Reply #44 on: April 24, 2017, 02:59:25 PM »
Manikus.....

I downloaded his mini-mod  (light-minimod.dsn.zip)
and it does indeed fail for me using 2.84 of the engine.

If that mini-mod does not fail for you then perhaps
we need some serious debugging.