Jump to content

State.ids update


Ithildur

Recommended Posts

Apparently SCS adds some new states to the state.ids file, one of them being state_not_targetable

 

There seems to be a conflict between the number assigned to this new state and state_not_visible, as they both seem to share 0x00400010. Whenever I try and run eseries script's thief script with it's auto 'hide and detect' routine, there seems to be a problem as that script checks for state_not_visible; the result is that the game locks up and crashes.

 

At one point it was working, al beit incorrectly, as the script seemed to skip over the check for state_not_visible as if it weren't there, as if looking for state_not_targetable instead (the net effect is the character constantly goes into a loop where they repeatedly try to hide every second or so even when they're already in stealth). Regardless, for some reason it stopped working altogether and simply locks up now.

 

I'm not knowledgable enough about the ids files to know whether simply assinging a new numerical value to either not_visible or not_targetable would fix this, or would create problems for other scripts (bcs or bs) that need to check for either.

Link to comment

Ok, maybe the above isn't the culprit exactly; I've tried removing STATE_NOT_TARGETABLE from the states.ids files in both the override and script compiler folders, recompiling, and running the script ingame; crash still occurs when trying the below routine so something else is amiss (though still related to the below as removing the section from the script makes the crashing stop)...

 

Any thoughts?

 

// **********************************************************************
// *		   Segment Name: gs_HideAndDetect.baf
// **********************************************************************

// * HIDE AND DETECT TRICK
// * [Allows a Thief character to be BOTH hidden and detecting Traps 90% of the time]
// * [Only done when >75%HP to avoid not getting healed by gs_HealOther]

// * If not already detecting traps, and hidden, detect traps and start the timer
IF
 ActionListEmpty()
 CombatCounter(0)														 // and combat is over
 OR(2)
 Class(Myself,THIEF_ALL)
 Class(Myself,MONK)
 !ModalState(DETECTTRAPS)
 ModalState(STEALTH)
THEN
 RESPONSE #100
   SetGlobalTimer("gh_Thief","LOCALS",18)
   FindTraps()
END

// * If timer expired, and I'm not damaged -> hide!
IF
 ActionListEmpty()
 CombatCounter(0)														 // and combat is over
 GlobalTimerExpired("gh_Thief","LOCALS")
 HPPercentGT(Myself,65)
 CheckStatGT(Myself,35,HIDEINSHADOWS)									 // and I have a decent chance of success
THEN
 RESPONSE #100
   Hide()
END

// * If not already hidden, and I'm not damaged -> hide!
IF
 ActionListEmpty()
 CombatCounter(0)														 // and combat is over
 OR(2)
 Class(Myself,THIEF_ALL)
 Class(Myself,MONK)
 !StateCheck(Myself,STATE_NOT_VISIBLE)								    // and not invisible/impinvis/hiding
 HPPercentGT(Myself,65)
 CheckStatGT(Myself,35,HIDEINSHADOWS)									 // and I have a decent chance of success
THEN
 RESPONSE #100
   Hide()
END

Link to comment

Actually, for the record:

state_not_targetable ... state_not_visible, as they both seem to share 0x00400010
This is not a problem if the State.ids carryes both because the game can handle both, as the 0x00400010 is the number the creature file is tagged by spells etc effect when the script is excecuted and in that case the creature matches both, the first one with all true IF ~conditions~ in the script ladder is ran... by the actor that has the script. As the state.ids is actually just a replacement function of the numbers for easier to understand/read .baf files, nothing more.
Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...