Author Topic: More wand woes  (Read 1557 times)

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
More wand woes
« on: March 11, 2017, 11:34:21 PM »
I'm having problems getting wands to work with vanilla DC using the current version of the databases (special abilities version 2.05, released August 26th 2015) - for instance when wand of magic missiles is used, the wand's spell begins casting but never finishes the spell - ie, never gets to the point of selecting a target. Combat continues as usual onto the next turn.

Now this is not happening with the Pool of Radiance conversion I'm also working on, which is based on an older version of the databases (special abilities version 1.01, October 15th 2014) - that works just fine.

I'm using DC 2.78, will prepare a mini-mod if needed.

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9835
Re: More wand woes
« Reply #1 on: March 13, 2017, 01:15:28 PM »
The databases you are usinga re woefully out of date. Not that the new ones will work perfectly, mind you, but they have a lot less errors now...

I'm going to attach the text fiels here. :D I am getting ready to make a new update at SourceForge.
Note: there are monsters in the monsters database that need new icons (included in the new package and here).
« Last Edit: March 13, 2017, 01:17:33 PM by manikus »

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
Re: More wand woes
« Reply #2 on: March 17, 2017, 01:28:16 PM »
I've installed these - it's now saying version 1.14, Feb 21 2017 (I also updated to DC 2.79), but I still have the identical wand problem. What now?

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9835
Re: More wand woes
« Reply #3 on: March 18, 2017, 02:03:19 PM »
I am assuming that you are saying that the error is still occurring?

Please make a mini-mod for me to see the problem in action.

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
Re: More wand woes
« Reply #4 on: March 18, 2017, 05:22:29 PM »
I am assuming that you are saying that the error is still occurring?
Unfortunately, yes.

Please make a mini-mod for me to see the problem in action.
Attached.

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9835
Re: More wand woes
« Reply #5 on: March 18, 2017, 06:26:43 PM »
Got it. :( I'll look at it this weekend.

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
Re: More wand woes
« Reply #6 on: March 20, 2017, 12:58:56 AM »
Thanks Manikus - I've also come across another possible bug - the who tries event is always failing - this one seems to have started when I upgraded to the latest databases. I'll investigate a bit more.

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9835
Re: More wand woes
« Reply #7 on: March 20, 2017, 12:46:15 PM »
Thanks Manikus - I've also come across another possible bug - the who tries event is always failing - this one seems to have started when I upgraded to the latest databases. I'll investigate a bit more.

Well, the script for the Who Tries event has changed in quite a while, so we probably need a mini-mod to show it not working so we can get it to Paul.

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
Re: More wand woes
« Reply #8 on: March 20, 2017, 03:13:57 PM »
Well, the script for the Who Tries event has changed in quite a while, so we probably need a mini-mod to show it not working so we can get it to Paul.

I think I've found the problem. The older, working version of the special ability Who Tries script:
Code: [Select]
-$IF (abName == "Strength"){abLevel = $GET_CHAR_LIMITED_STR(me);}
-$ELSE
- {
- $IF (abName == "Intelligence"){abLevel = $GET_CHAR_LIMITED_INT(me);}
- $ELSE
- {
- $IF (abName == "Wisdom"){abLevel = $GET_CHAR_LIMITED_WIS(me);}
- $ELSE
- {
- $IF (abName == "Dexterity"){abLevel = $GET_CHAR_LIMITED_DEX(me);}
- $ELSE
- {
- $IF (abName == "Constitution"){abLevel = $GET_CHAR_LIMITED_CON(me);}
- $ELSE
- {
- $IF (abName == "Charisma"){abLevel = $GET_CHAR_LIMITED_CHA(me);}
- $ELSE {$RETURN "N";};
- };
- };
- };
- };
- };

The newer version has this:
Code: [Select]
-$IF (abName == "Strength"){abLevel = $GET_CHAR_LIMITED_STR(me);};
-$IF (abName == "Intelligence"){abLevel = $GET_CHAR_LIMITED_INT(me);};
-$IF (abName == "Wisdom"){abLevel = $GET_CHAR_LIMITED_WIS(me);};
-$IF (abName == "Dexterity"){abLevel = $GET_CHAR_LIMITED_DEX(me);};
-$IF (abName == "Constitution"){abLevel = $GET_CHAR_LIMITED_CON(me);};
-$IF (abName == "Charisma"){abLevel = $GET_CHAR_LIMITED_CHA(me);};
-$IF (abName == "StrengthMod"){abLevel = $GET_CHAR_LIMITED_STRMOD(me);}
-$ELSE {$RETURN "N";};
Focus on the last two lines - I think they will always make the script return "N" unless the abName is equal to "StrengthMod" - even if abName is some other valid value, like "Charisma". It's subtle and an easy mistake to make.

I replaced this section of the new script with the older version and ran the game a few times, which appears to fix the problem (although the older version of the script doesn't support "StrengthMod")
« Last Edit: March 20, 2017, 03:24:10 PM by marainein »

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9835
Re: More wand woes
« Reply #9 on: March 20, 2017, 03:40:43 PM »
Nice catch. :)

Bad on me for not remembering to put it in the change notes that I had done that.

Edited to add:
Okay, I know you have fixed your version, but thought I would post how I had changed it to work for the next database release - which will be very soon.

Code: [Select]
-$ELSE {$RETURN "N";};
replaced with...
Code: [Select]
-$IF (abLevel == "") {$RETURN "N";};
« Last Edit: March 20, 2017, 03:51:13 PM by manikus »

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2235
Re: More wand woes
« Reply #10 on: March 20, 2017, 06:31:51 PM »
The classic (and proper) solution to this problem would appear to be:

http://dianneandpaul.net/UAF/Help/GPDL$SWITCHKeyword.html

Except the documentation neglects to say that
"$ENDSWITCH"
Needs be be between the last close-brace and semi-colon.
I'll try to remember to fix it.

$SWITCH ()
{
  $CASE   
  $CASE
} $ENDSWITCH ;

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9835
Re: More wand woes
« Reply #11 on: March 21, 2017, 01:39:41 PM »
Thanks, Paul. :)
I was just looking at a talk.bin text version that I used this in...well, out of sight out of mind I guess. :D

Incidentally, the script is not the issue. I'm working on a mini-mod, but it's a Hook not being called from the spell attached to the item.

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9835
Re: More wand woes
« Reply #12 on: March 22, 2017, 05:26:32 PM »
Engine 2.80 is a step in the right direction for this issue.
The assassin can use the wand and the spell now fires. However it does 0 damage. We're still working, but closer. :D

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
Re: More wand woes
« Reply #13 on: March 23, 2017, 12:59:22 AM »
The assassin can use the wand and the spell now fires. However it does 0 damage.

Maybe we could think of it as a safety feature :P

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9835
Re: More wand woes
« Reply #14 on: March 23, 2017, 12:49:28 PM »
The assassin can use the wand and the spell now fires. However it does 0 damage.

Maybe we could think of it as a safety feature :P

This could be a great foil for a quest - "hey assassin, you must kill this guy with a wand...that does 0 damage" ;)