The Black Wyrm Lair Forums
The Black Wyrm's Lair Terms of Use Help Search Members Calendar

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> More State Checks...
Sir_Carnifex
post Jun 5 2008, 12:48 AM
Post #1





Retired team member
Posts: 490
Joined: 8-April 08
From: U.S.A




Two questions here...

I know I saw somewhere (but can't remember where) that someone mentioned using this because it includes a lot of states... The problem is WeiDu gives me this message when I use it:

[StateCheck] argument [CD_STATE_NOTVALID] not found in [State.IDS]

The mod still installs, but with warnings. Is this usual when using that state check, or am I using/typing it wrong? This is how I have it:

!StateCheck("character",CD_STATE_NOTVALID)



And the second question. What is the check to determine if it is raining or not? I did find the weather identifiers, but not what check to put in place. Or is there such a thing?
Edit: Found the answer to the weather question.

This post has been edited by Sir_Carnifex: Jun 6 2008, 12:19 AM


--------------------
"Once the game is over, the king and the pawn go back into the same box." - Italian Proverb

"I like criticism, but it must be my way." - Mark Twain

"A positive attitude may not solve all your problems, but it will annoy enough people to make it worth the effort." - Herm Albright
Go to the top of the page
 
Quote Post
Bearwere
post Jun 5 2008, 03:21 AM
Post #2





Forum Member
Posts: 15
Joined: 27-April 08




APPEND ~STATE.IDS~ // adds custom IsValidForPartyDialogue state
~0x80101FEF CD_STATE_NOTVALID~
UNLESS ~CD_STATE_NOTVALID~
Go to the top of the page
 
Quote Post
Sir_Carnifex
post Jun 5 2008, 10:32 PM
Post #3





Retired team member
Posts: 490
Joined: 8-April 08
From: U.S.A




I assume you mean adding that bit to the TP2, right?

Edit:

Nevermind, I found the answer to this question. So now I added that to the TP2 and it still gives me the message. However, the install no longer says "Installed with warnings". Now I get "Successfully Installed". So does this mean I can ignore the parse error it gives me regarding the use of the new state check?

This post has been edited by Sir_Carnifex: Jun 5 2008, 10:58 PM


--------------------
"Once the game is over, the king and the pawn go back into the same box." - Italian Proverb

"I like criticism, but it must be my way." - Mark Twain

"A positive attitude may not solve all your problems, but it will annoy enough people to make it worth the effort." - Herm Albright
Go to the top of the page
 
Quote Post
jastey
post Jun 6 2008, 10:37 AM
Post #4





Forum Member
Posts: 1366
Joined: 22-August 04
From: Germany




What parse error do you get? Is it still there after you add the custom state to the ids via the tp2-patching? (Sorry for not pointing that out earlier, btw. I mentioned the custom state but didn't tell you how to implement it. It's from CamDawg, btw., just for the credits.)

To weather: No check, unfortunately, only action. So, if you want a banter only fire if it's raining (or not), you have to set the whether, run a timer of say 5 sec and then trigger the banter. I did that for one of Ajantis's love talks in BG1NPC project (script block slighty adapted to the example):

/* Weather change (no weather) */
IF
InParty(Myself)
(...)
!Detect([ENEMY])
See(Player1)
!StateCheck(Player1,CD_STATE_NOTVALID)
CombatCounter(0)
Global("C#WeatherTalk","GLOBAL",0)
OR(3)
AreaType(OUTDOOR)
AreaType(WEATHER)
AreaType(FOREST)
THEN
RESPONSE #100
SetGlobal("C#WeatherTalk","GLOBAL",1)
Weather(NOWEATHER)
RealSetGlobalTimer("C#WeatherTalkTimer1","GLOBAL",5)
MoveToObject(Player1)
END

Have a look in the IESDP which weather can be set: http://iesdp.gibberlings3.net/files/ids/bg2/weather.htm

This post has been edited by jastey: Jun 6 2008, 10:39 AM
Go to the top of the page
 
Quote Post
Sir_Carnifex
post Jun 7 2008, 02:34 AM
Post #5





Retired team member
Posts: 490
Joined: 8-April 08
From: U.S.A




QUOTE
What parse error do you get? Is it still there after you add the custom state to the ids via the tp2-patching? (Sorry for not pointing that out earlier, btw. I mentioned the custom state but didn't tell you how to implement it. It's from CamDawg, btw., just for the credits.)
CODE
[CXHalbo/CXHalbo.baf] PARSE ERROR at line 5 column 39-39
Near Text: )
    [StateCheck] argument [CD_STATE_NOTVALID] not found in [State.IDS]

That's the parse error I get AFTER appending the State.ids in the TP2. More towards the bottom, it says this:
CODE
[*.IDS] forgotten
Appending to files ...
Appending [0x80101FEF CD_STATE_NOTVALID...] to [STATE.IDS] because it does NOT contain [CD_STATE_NOTVALID]
Appended text to [STATE.IDS]

And it does say "Successfully Installed".

QUOTE
To weather: No check, unfortunately, only action. So, if you want a banter only fire if it's raining (or not), you have to set the whether, run a timer of say 5 sec and then trigger the banter. I did that for one of Ajantis's love talks in BG1NPC project (script block slighty adapted to the example):

I already got the weather talk done. I set the weather to clear, then a wait...then the talk triggers. It took a few tries of tinkering around, but I got it. Mine is a bit more complicated as it involves four triggers/talks. I was a bit surprised I got it done as fast as I did. Thanks anyway. smile.gif


--------------------
"Once the game is over, the king and the pawn go back into the same box." - Italian Proverb

"I like criticism, but it must be my way." - Mark Twain

"A positive attitude may not solve all your problems, but it will annoy enough people to make it worth the effort." - Herm Albright
Go to the top of the page
 
Quote Post
plainab
post Sep 1 2008, 04:52 PM
Post #6





Forum Member
Posts: 21
Joined: 18-November 06




I don't know if you were ever given the solution to resolve the error you were receiving regarding the use of CD_STATE_NOTVALID.
I will go ahead and answer here so that others who may look here for a solution to your problem as a help to their problem will understand what is going on.

1) If you wish to check for a certain state, you need to make sure that that state is present in the state.ids file.
2) if not, you need to add it somewhere within your tp2 prior to the script or dialog file where you wish to use the associated state.
Example from this topic:
CODE
APPEND ~STATE.IDS~ ~0x80101FEF CD_STATE_NOTVALID~
         UNLESS ~CD_STATE_NOTVALID~

3) however, weidu will not recognize the new entry until it's memory has been flushed and base game files reread.
Example to do this:
CODE
APPEND ~STATE.IDS~ ~0x80101FEF CD_STATE_NOTVALID~
         UNLESS ~CD_STATE_NOTVALID~
CLEAR_IDS_MAP


The addition of CLEAR_IDS_MAP tells weidu to clear it's memory of script dependent files and reread them. Once it does this, you will be able to use the new addition in any script or dialog file as you deem necessary. You only need to have the CLEAR_IDS_MAP one time before you compile any files using the additions. Therefore, you can append multiple states, spells, triggers, actions, shouts, etc. and have a single CLEAR_IDS_MAP on the line above your first file taking advantage of the new additions.

I hope this is helpful and clear to you and anyone else who has a similar question.

Go to the top of the page
 
Quote Post
The Bigg
post Sep 1 2008, 04:58 PM
Post #7





Forum Member
Posts: 165
Joined: 29-January 05
From: Modena (Italy)




QUOTE(plainab @ Sep 1 2008, 04:52 PM) *
The addition of CLEAR_IDS_MAP tells weidu to clear it's memory of script dependent files and reread them. Once it does this, you will be able to use the new addition in any script or dialog file as you deem necessary. You only need to have the CLEAR_IDS_MAP one time before you compile any files using the additions. Therefore, you can append multiple states, spells, triggers, actions, shouts, etc. and have a single CLEAR_IDS_MAP on the line above your first file taking advantage of the new additions.

Recent WeiDU versions don't need CLEAR_IDS_MAP anymore (can't find the exact version in the change log, but I'm sure it's post 204 and all mods should use W204 or later anyway).

Carnifex: the APPEND must be done before the COMPILE/EXTEND. Are you sure you aren't APPENDING to the IDS after COMPILEing? (hopefully I'm not insulting you by asking stupid questions smile.gif )


--------------------
Please do not contact me for assistance in using BGT, BP, any other of the 'large mods', or a mod I didn't write or contribute to. I'm not your paid support staff, so I'd suggest you to direct your help questions to the forum relative to the mod you're playing.

Thanks for your cooperation.
Go to the top of the page
 
Quote Post
Sir_Carnifex
post Sep 1 2008, 10:22 PM
Post #8





Retired team member
Posts: 490
Joined: 8-April 08
From: U.S.A




QUOTE(The Bigg @ Sep 1 2008, 11:58 AM) *
Carnifex: the APPEND must be done before the COMPILE/EXTEND. Are you sure you aren't APPENDING to the IDS after COMPILEing? (hopefully I'm not insulting you by asking stupid questions smile.gif )

That would be the problem. I read somewhere just to add the lines to the Tp2, but I don't remember seeing where to put them, so I just put it down at the bottom. So, no, it's not a stupid question ... it's a very helpful question. smile.gif

Thanks to both of you!


--------------------
"Once the game is over, the king and the pawn go back into the same box." - Italian Proverb

"I like criticism, but it must be my way." - Mark Twain

"A positive attitude may not solve all your problems, but it will annoy enough people to make it worth the effort." - Herm Albright
Go to the top of the page
 
Quote Post
The Bigg
post Sep 1 2008, 10:58 PM
Post #9





Forum Member
Posts: 165
Joined: 29-January 05
From: Modena (Italy)




QUOTE(Sir_Carnifex @ Sep 1 2008, 10:22 PM) *
So, no, it's not a stupid question ... it's a very helpful question. smile.gif

Glad to have helped. I ended up twice on the bad end of the "Is it plugged in?" anedoct - so perhaps there are no stupid questions after all tongue.gif


--------------------
Please do not contact me for assistance in using BGT, BP, any other of the 'large mods', or a mod I didn't write or contribute to. I'm not your paid support staff, so I'd suggest you to direct your help questions to the forum relative to the mod you're playing.

Thanks for your cooperation.
Go to the top of the page
 
Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:



- Lo-Fi Version Time is now: 15th November 2024 - 04:53 AM