Jump to content

Question about StateCheck("",CD_STATE_NOTVALID)


Xenala

Recommended Posts

- if, after your mod, you install another mod which adds more replies to Firkraag dialogue(some quest mod, for example; Romantic Encounters do that, too, though not exactly in this place), and the player chooses this new reply, your variable will not get set.
That is rue, unfortunately. You can come away with it, if the variable is connected to this special reply option the PC chooses, i.e. referring to what he/she is saying in that moment ("yes, I want to have that kiss", for example..). Hopefully the other mod uses COPY_TRANS somehwere, which should put the former reply options with your modifications into the mod dialogue state, closing the cycle.
Link to comment

The problem with using ADD_TRANS_ACTION to set a variable is that there is no way to make it only happen if MyNPC is in the party. I was doing that with Gavin, and then got bug reports that he was commenting on events that he didn't witness.

 

I went with using INTERJECT_COPY_TRANS and having him say something. If it wasn't important enough for him to say something, I figured it wasn't important enough for him to comment about it afterward.

 

But that was just what I did, so you might choose a different option.

Link to comment
The problem with using ADD_TRANS_ACTION to set a variable is that there is no way to make it only happen if MyNPC is in the party. I was doing that with Gavin, and then got bug reports that he was commenting on events that he didn't witness.

That is why the "!InParty(Myself)" Checks in Ajantis' script are nearly as long as the "InParty(Myself)" ones. I coded it so that "!InParty(Myself)" plus "variable set via ADD_TRANS_ACTION" euquals "set variable to 0".

The NPC has to be outside the party for long enough for the script to run, of course.

Link to comment

I run into this problem with testing RE, so I probably should post this here, as well:

 

- when the NPC is out of party, his script is only running when PC is in the same (master) area. And, unless your script is fraught with Continue()'s(which can be performance-slowing), your !InParty blocks will be running with the speed of one block per six seconds.

 

So, if, for example, Ajantis is waiting in the Order building for you, it is very likely that only one, maximum two blocks will run before he joins. If seven events have passed without him in party, and then you picked him up again, it is very likely that immediately upon joining he'll comment on five.

 

That's why I posted a warning in RE mod - reactions component. I think it is impossible to determine whether the NPC has been in party correctly, unless you're doing it via setting a variable in I_C_T - and that's what I had been doing in Xan all along.

Link to comment

The problem with using ADD_TRANS_ACTION to set a variable is that there is no way to make it only happen if MyNPC is in the party. I was doing that with Gavin, and then got bug reports that he was commenting on events that he didn't witness.

That is why the "!InParty(Myself)" Checks in Ajantis' script are nearly as long as the "InParty(Myself)" ones. I coded it so that "!InParty(Myself)" plus "variable set via ADD_TRANS_ACTION" euquals "set variable to 0".

The NPC has to be outside the party for long enough for the script to run, of course.

Well fortunatelly in this part of the romance throw er I'm not sure that really english sorry) Trriviahn away will mean stop the mod cause I won't come back so I won't have this problem :cry:

Link to comment

I had better go make sure all our A_T_As in the Core Components in The BG1 NPC Project get a COPY_TRANS after them, then, shouldn't I...

 

 

sample of current entries...

 /* XAN */
REPLACE_STATE_TRIGGER ~_BXANNN~ 0 ~InteractingWith("eldoth") RandomNum(3,1) Global("X#BIOXA1","LOCALS",0)~
REPLACE_STATE_TRIGGER ~_BXANNN~ 1 ~InteractingWith("eldoth") RandomNum(3,2) Global("X#BIOXA2","LOCALS",0)~
REPLACE_STATE_TRIGGER ~_BXANNN~ 2 ~InteractingWith("eldoth") RandomNum(3,3) Global("X#BIOXA3","LOCALS",0)~

ADD_TRANS_ACTION ~_BXANNN~ BEGIN 0 END BEGIN END ~SetGlobal("X#BIOXA1","LOCALS",1)~
ADD_TRANS_ACTION ~_BXANNN~ BEGIN 1 END BEGIN END ~SetGlobal("X#BIOXA2","LOCALS",1)~
ADD_TRANS_ACTION ~_BXANNN~ BEGIN 2 END BEGIN END ~SetGlobal("X#BIOXA3","LOCALS",1)~

/* BRANWEN */
REPLACE_STATE_TRIGGER ~_BBRANW~ 2 ~InteractingWith("tiax") RandomNum(2,1) Global("X#BIOBR3","LOCALS",0)~

ADD_TRANS_TRIGGER ~_BBRANW~ 0 ~Global("X#BIOBR1","LOCALS",0)~
ADD_TRANS_TRIGGER ~_BBRANW~ 1 ~Global("X#BIOBR2","LOCALS",0)~

ADD_TRANS_ACTION ~_BBRANW~ BEGIN 0 END BEGIN END ~SetGlobal("X#BIOBR1","LOCALS",1)~
ADD_TRANS_ACTION ~_BBRANW~ BEGIN 1 END BEGIN END ~SetGlobal("X#BIOBR2","LOCALS",1)~
ADD_TRANS_ACTION ~_BBRANW~ BEGIN 2 END BEGIN END ~SetGlobal("X#BIOBR3","LOCALS",1)~


>>>>and in JFIX
/* Adding Globals to Coran's Wyvern Misadventure: */
ADD_STATE_TRIGGER ~_CORANJ~ 6 ~Global("X#CoranWyvernWarning1","GLOBAL",1)~
ADD_TRANS_ACTION  ~_CORANJ~ BEGIN 6 END BEGIN END ~SetGlobal("X#CoranWyvernWarning1","GLOBAL",2)~
ADD_STATE_TRIGGER ~_CORANJ~ 5 ~Global("X#CoranWyvernWarning2","GLOBAL",1)~
ADD_TRANS_ACTION  ~_CORANJ~ BEGIN 5 END BEGIN END ~SetGlobal("X#CoranWyvernWarning2","GLOBAL",2)~
Link to comment
I had better go make sure all our A_T_As in the Core Components in The BG1 NPC Project get a COPY_TRANS after them, then, shouldn't I...
It's more the other mods should have it, so the (in this case) BG1NPC A_T_A will get executed if reply options were added.

 

For BG1NPC, make sure there is a COPY_TRANS after EXTEND_BOTTOM to asure A_T_A of other mods get executed (Sais she who coded INTERJECT for her paladin.)

Link to comment

Heheheh.

 

I'll tell you more - Quest Pack actually replaces entire states.

 

But, yeah, when I add replies(just a reply) into, say, Teos' RE component, I do not COPY_TRANS back - I go to the state I want to go, so.

Link to comment

Directions, please, ladies? We do not COPY TRANS on E_Bs in most code...

I can post in the workroom if you folks want.

We can't ajust for everyone's modding practices, but we sure can try to make things ok from our end :cry:

Link to comment

It doesn't work always, that's the problem. But ideally, a mod would add an INTERJECT reps. E_B to introduce a new dialogue path, and once that is finished, gives a COPY_TRANS of the dialogue state the new branch started. (EDIT: Instead of copying the former reply options by hand, for example!)

This way, all other mods, who maybe want to do the same, get a chance to work properly.

 

But sometimes INTERJECT does exactly what it was designed for, it changes the path of dialogue. In BG1NPC Ajantis interjects this way into the greeting dialogue of whatshisname in Nashkel, if the PC lies about being the awaited for bounty hunter. There it doesn't make any sense to end with a COPY_TRANS, because it would mean the PC could lie about his identity after Ajantis already told the truth.

 

It's only if designing dialogue interjections, it would be great if all modder would keep the compatibility in mind, closing a new dialogue path with a COPY_TRANS, whenever possible.

Link to comment

I understand. I know this means checkig for duplicated/"cloned" states. I am asking if anyone on the team has noticed an area where we have failed to do a COPY_TRANS where we do not create a completely new state, hijacking the end state.

Link to comment

Archived

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

×
×
  • Create New...