Jump to content


Photo

"Diseased" state check broken?


  • Please log in to reply
7 replies to this topic

#1 Kevin Dorner

Kevin Dorner
  • Member
  • 185 posts

Posted 01 April 2003 - 08:01 PM

Trying to get the Deva's scripting fixed... they are supposed to cast Cure Disease on a diseased PC.

IF
	HaveSpell(CLERIC_CURE_DISEASE)
	See([PC])
	StateCheck(LastSeenBy(Myself),STATE_DISEASED)
THEN
	RESPONSE #100
  Spell(LastSeenBy(Myself),CLERIC_CURE_DISEASE)
END

How utterly simple... right? The exact same scripting works just great if CLERIC_CURE_DISEASE is replaced with CLERIC_NEUTRALIZE_POISON, STATE_DISEASED is replaced with STATE_POISONED. But it won't work with this. Checked SPELL.IDS and STATE.IDS to make sure they are valid. 0x00080000 STATE_DISEASED is what it is and damned if that isn't just what it should be. Checked that the right CURE_DISEASE is in the Deva's spellbook. Checked that the spellslots are proper. Wasted an evening on this...

So I tried replacing it with a "test" script consisting only of:

IF
	StateCheck([PC],STATE_DISEASED)
THEN
	RESPONSE #100
  Kill(Myself)
END

and still nothing happens when the PC is Diseased.

Here's hoping someone knows if the STATE_DISEASED state check is broken. At this point I hope it is.

#2 cirerrek

cirerrek
  • Member
  • 193 posts

Posted 01 April 2003 - 08:21 PM

Hey Kevin,

I can't give you a 100% definite answer for it, but Sarkyn left this on top of a segment for casting CLERIC_CURE_DISEASE

// * [Unsure if STATE_DISEASED is working, requires more testing]

I've never actually seen the scripts cast that particular spell, but I only memorize one if I can't think of anything else useful to memorize. And getting disease is as about as often as you encounter a oytugh (sp?)

You might check the old bgscripts board, someone probably did some testing on it back in the day.

Cirerrek

#3 Kevin Dorner

Kevin Dorner
  • Member
  • 185 posts

Posted 01 April 2003 - 08:31 PM

Thank you! Nah. i think that answers it... it's busted. There is only one other occurrence that I could find in the game where it does a statecheck for this and it's in the AI of the snake in WK. So it looks like no one noticed... or did they? The check is conspicuous by its absence from any of the cleric/defensive party AI's bundled in the script compiler folder. Strange that they wouldn't have it.

I am going to fiddle around with STATE.IDS. I bet it's wrong and one of those other rarely-checked states has disease's number.

#4 cirerrek

cirerrek
  • Member
  • 193 posts

Posted 01 April 2003 - 08:37 PM

From: John Winski
Date: Thu Dec 7, 2000 8:33 pm
Subject: Re: [BGScripts] Re: John can this be done?

I have a feeling that the STATE_DISEASED does not work. It may not have
been implemented.

Pulled this one out of the bgscripts boards, apparently Goran, GB, and several others have tried to see if it works properly and when everything failed a plea for answer went out to Bioware. Considering that kind of evidence, I would say it is B-U-S-T-E-D.

I hope you are right about one of the rarely used states being it. I keep hoping that for things MELEE and RANGED in the astyles.ids

Thanks,
Cirerrek

#5 Kevin Dorner

Kevin Dorner
  • Member
  • 185 posts

Posted 01 April 2003 - 10:32 PM

No luck. One of the most boring evenings in recent memory, which yielded nothing. 31 times I edited STATE.IDS and swapped values of STATE_DISEASED with other states. 31 times saved that file into Script Compiler and Override (just to make sure...) 31 times was the test script recompiled and tested, and 31 times a disappointment. There are no values that will make STATE_DISEASED work. It was forgotten about.

STATE_DISEASED is STATE_DEAD. Now, I should be STATE_SLEEPING.

#6 Nukenin

Nukenin
  • Member
  • 31 posts

Posted 02 April 2003 - 05:18 AM

Aye, the bundled cleric scripts were the first thing I checked, and in the one script that seems to be meant for party healing, STATE_DISEASED was conspicuous by its absence.

Don't drive yourself STATE_INSANE over it. :)

#7 Dyara

Dyara
  • Member
  • 262 posts

Posted 03 April 2003 - 04:18 AM

Sorry, I don´t know about STATE_DISEASED but

IF
  StateCheck(Myself,1)
THEN
  RESPONSE #100
    DisplayString(Myself,~Current State: 1~)
    Continue()
END

IF
  StateCheck(Myself,2)
THEN
  RESPONSE #100
    DisplayString(Myself,~Current State: 2~)
    Continue()
END

IF
  StateCheck(Myself,4)
THEN
  RESPONSE #100
    DisplayString(Myself,~Current State: 4~)
    Continue()
END

.
.
.
IF
  StateCheck(Myself,XY)
THEN
  RESPONSE #100
    DisplayString(Myself,~Current State: XY~)
    Continue()
END

.
.
.

should make things easier for you. Just compile the script with WeiDU (put WeiDU.exe and the baf file into your bg2 folder)

WeiDU chkstate.baf --tlkout dialog.tlk

and copy the chkstate.bcs into the script folder and rename it to chkstate.bs. Assign the script to a NPC and it will list you all the states that lie on that char.

#8 Kevin Dorner

Kevin Dorner
  • Member
  • 185 posts

Posted 04 April 2003 - 10:37 AM

Damn... that is nice. Thanks.

I really have to sit down and get reasonably competent at WeiDU one of these days. :(