Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: jastey
« on: September 16, 2007, 01:31:36 AM »

Cool. 8)
Posted by: the bigg
« on: September 15, 2007, 07:39:24 PM »

Jas: yeah, exactly.
Posted by: jastey
« on: September 15, 2007, 01:54:51 PM »

Wait a minute . what is I_C_T3 and I_C_T4?

Did I understand it right that 3 "works" like 1 in the meaning of where the actions are put; and 4 like 2, but with I_C_T4, something like this

I_C_T4 ~%tutu_var%DYNAHE~ 10 X#AjantisDynaheir
== ~%AJANTIS_JOINED%~  IF ~InParty("ajantis") InMyArea("ajantis") !StateCheck("ajantis",CD_STATE_NOTVALID)~
THEN @21 DO ~LeaveParty() SetLeavePartyDialogFile() ChangeAIScript("",DEFAULT) Enemy() SetGlobal("X#AjantisRomanceActive","GLOBAL",3)~
== ~%KIVAN_JOINED%~ IF ~InParty("kivan") InMyArea("kivan") !StateCheck("kivan",CD_STATE_NOTVALID)~
THEN @33
DO ~ActionOverride("kivan",LeaveParty()) ActionOverride("kivan",Enemy())~
END

would actually work, in the sense that (all NPC could talk even if the ones in front) Kivan could speak his line even if Ajantis isn't interjecting?
Posted by: cmorgan
« on: September 15, 2007, 09:18:49 AM »

I_C_T2/4  in-interjection actions are left where they are.
 That was the last key - I think I understand now!
Posted by: the bigg
« on: September 15, 2007, 09:13:21 AM »

I am at the point of not understanding what you're trying to ask. The safe-safe answer looks to be using I_C_T3 with callbacks and no ActionOverride().

I_C_T2/4 leave the action from the transitions in the state you're interjecting in with the original speaker, in-interjection actions are left where they are.

In that case, I_C_T1/3 (without callback) are a no-no, because the original dialogue has a talker-specific line.
Also, I_C_T1/2 are no because otherwise Kivan won't talk if Ajantis wasn't in the party.
Posted by: cmorgan
« on: September 15, 2007, 08:44:19 AM »

But if we were to recode to I_T_C4,
the code

I_C_T4 ~%tutu_var%DYNAHE~ 10 X#AjantisDynaheir
== ~%AJANTIS_JOINED%~  IF ~InParty("ajantis") InMyArea("ajantis") !StateCheck("ajantis",CD_STATE_NOTVALID)~
THEN @21 DO ~LeaveParty() SetLeavePartyDialogFile() ChangeAIScript("",DEFAULT) Enemy() SetGlobal("X#AjantisRomanceActive","GLOBAL",3)~
== ~%KIVAN_JOINED%~ IF ~InParty("kivan") InMyArea("kivan") !StateCheck("kivan",CD_STATE_NOTVALID)~
THEN @33
DO ~ActionOverride("kivan",LeaveParty()) ActionOverride("kivan",Enemy())~
END

would NOT work, as 1. actions are left with the original speaker, but 2. the interjections themselves introduce new transitional actions

so the code would be
Code: [Select]
/* Dynaheir hostile leave if attacked */
I_C_T4 ~%tutu_var%DYNAHE~ 10 X#AjantisDynaheir

== ~%AJANTIS_JOINED%~ IF ~valid~ THEN @21 DO ~
ActionOverride("ajantis",LeaveParty())
ActionOverride("ajantis",SetLeavePartyDialogFile())
 ActionOverride("ajantis",ChangeAIScript("",DEFAULT))
ActionOverride("ajantis",Enemy())
SetGlobal("X#AjantisRomanceActive","GLOBAL",3)~

== ~%KIVAN_JOINED%~ IF ~valid~ THEN @33 DO ~
ActionOverride("kivan",LeaveParty())
ActionOverride("kivan",SetLeavePartyDialogFile())
ActionOverride("kivan",ChangeAIScript("",DEFAULT))
ActionOverride("kivan",Enemy())~
END

as long as all actions added in the interjection that are speaker-specific are turned into ActionOverrides (thus being kicked out of the regular processing order and assigned to their actor directly).

Or would this be a simple I_C_T? The original state has only one potential transition. We are adding transitional actions in the first case which need to carry to specific actors. In the second case, we are taking that out of play by use of ActionOverride. By my figuring, that means that simple  I_C_T1 could be used, as no actor-specific actions are added.
Posted by: the bigg
« on: September 15, 2007, 05:21:51 AM »

Yes, moving all of them to I_C_T1 with callback is the easiest solution.
Posted by: cmorgan
« on: September 14, 2007, 09:09:02 PM »

Just to make sure I have this really down:

Original code:
Code: [Select]
IF ~~ THEN BEGIN 10 // from: 9.1
  SAY #86901 /* ~An unfortunate decision!  Pardon me while I put up a fight!~ */
  IF ~~ THEN DO ~ActionOverride("minsc",LeaveParty())
ActionOverride("minsc",Enemy())
Enemy()
~ EXIT
END

Error report =
Code: [Select]
WARNING: I_C_T2: the interjection point (_DYNAHE 10) has multiple exit transitions that have different actions!
First Action: SetGlobal("X#KivanDynaheir","GLOBAL",1)
ActionOverride("minsc",LeaveParty())
ActionOverride("minsc",Enemy())
Enemy()
Other Action: ActionOverride("minsc",LeaveParty())
ActionOverride("minsc",Enemy())
Enemy()

is picking up that in one file we do this:
Code: [Select]
/* Dynaheir hostile leave if attacked */
I_C_T2 ~%tutu_var%DYNAHE~ 10 X#AjantisDynaheir
== ~%AJANTIS_JOINED%~ IF ~InParty("ajantis") InMyArea("ajantis") !StateCheck("ajantis",CD_STATE_NOTVALID)~ THEN @21 DO ~LeaveParty() SetLeavePartyDialogFile() ChangeAIScript("",DEFAULT) Enemy() SetGlobal("X#AjantisRomanceActive","GLOBAL",3)~
END
and in another file we do this:
Code: [Select]
I_C_T2 ~%tutu_var%DYNAHE~ 10 X#KivanDynaheir
== ~%KIVAN_JOINED%~ IF ~InParty("kivan") InMyArea("kivan") !StateCheck("kivan",CD_STATE_NOTVALID)~ THEN @33
DO ~ActionOverride("kivan",LeaveParty()) ActionOverride("kivan",Enemy())~
END

If we don't want to break up other mods, this has to be repaired by using I_C_T with passback, and making sure that all interjected states use ActionOverride, so that:

Code: [Select]
/* Dynaheir hostile leave if attacked */
I_C_T ~%tutu_var%DYNAHE~ 10 X#AjantisDynaheir
== ~%AJANTIS_JOINED%~ IF ~InParty("ajantis") InMyArea("ajantis") !StateCheck("ajantis",CD_STATE_NOTVALID)~ THEN @21 DO ~ActionOverride("ajantis",LeaveParty()) ActionOverride("ajantis",SetLeavePartyDialogFile()) ActionOverride("ajantis",ChangeAIScript("",DEFAULT)) ActionOverride("ajantis",Enemy()) SetGlobal("X#AjantisRomanceActive","GLOBAL",3)~
==  ~%tutu_var%DYNAHE~ ~Some Reply Here.~
END

Code: [Select]
I_C_T2 ~%tutu_var%DYNAHE~ 10 X#KivanDynaheir
== ~%KIVAN_JOINED%~ IF ~InParty("kivan") InMyArea("kivan") !StateCheck("kivan",CD_STATE_NOTVALID)~ THEN @33
DO ~ActionOverride("kivan",LeaveParty()) ActionOverride("kivan",SetLeavePartyDialogFile()) ActionOverride("kivan",ChangeAIScript("",DEFAULT))ActionOverride("kivan",Enemy())~
==  ~%tutu_var%DYNAHE~ ~Some Reply Here.~
END

right?
Posted by: cmorgan
« on: September 14, 2007, 07:08:58 PM »

That is absolutely so awesomely wicked cool...

and when I get to my own code this will do a safe and better way of mass interjecting, rather than breaking the original state and setting up a big separate CHAIN cloning the original transitions and terminations!!!!

For this project, I don't want to do the recode unless I have to, because it will mean resorting .tra files from the 10 separate sources, when I can bribe berelinde into adding one .tra line :) .  But I think I just found a massive set of interjections into the same state, where it is going to need to be redone this way in order to get it repaired (or lots of gratitous states will be needeed to play "catch" with the transitions). So I will definitely need to add a recode of several of these as I_C_T3 or I_C_T4 - this particular finding had all but one returning to the original, but many will not.

So, to make this a "jump into a state with multiple different transitions, with actions passed to the last speaker, playing tag":
Code: [Select]
I_C_T3 ~_WILLIA~ 10 ManyInt6
== ~BranwenJ~ IF ~InParty("Branwen")~ THEN ~Hi, I'm Branwen.~
== ~_WILLIA~ IF ~InParty("Branwen")~ THEN ~Hello, Branwen.~
== ~MinscJ~ IF ~InParty("Minsc")~ THEN ~Hi, I'm Minsc.~
== ~_WILLIA~ IF ~InParty("Minsc")~ THEN ~Hello, Minsc.~
== ~ImoenJ~ IF ~InParty("Imoen")~ THEN ~Hi, I'm Imoen.~
== ~_WILLIA~ IF ~InParty("Imoen")~ THEN ~Hello, Imoen.~
END
and to make it a "jump into a state with multiple different transitions, with actions retained by the original speaker no matter what":
Code: [Select]
I_C_T4 ~_WILLIA~ 10 ManyInt6
== ~BranwenJ~ IF ~InParty("Branwen")~ THEN ~Hi, I'm Branwen.~
== ~MinscJ~ IF ~InParty("Minsc")~ THEN ~Hi, I'm Minsc.~
== ~ImoenJ~ IF ~InParty("Imoen")~ THEN ~Hi, I'm Imoen.~
END

Gotta grab some dinner and feed the dogs, but wow - my brain is finally opening up to this . This is definitely fun.
Posted by: the bigg
« on: September 14, 2007, 06:49:47 PM »

Regarding the 'messy' post: it posts the warning pointing out which action is different (from a prior I_C_T2) rather than the current I_C_T2 being processed.
A fix (apart from using I_C_T1 and the go-back-to-original-speaker in each case) would be to recode them all as a giant I_C_T3/4:

Code: [Select]
I_C_T4 ~_WILLIA~ 10 ManyInt6
== ~BranwenJ~ IF ~InParty("Branwen")~ THEN ~Hi, I'm Branwen.~
// == ~_WILLIA~ IF ~InParty("Branwen")~ THEN ~Hello, Branwen.~
== ~MinscJ~ IF ~InParty("Minsc")~ THEN ~Hi, I'm Minsc.~
// == ~_WILLIA~ IF ~InParty("Minsc")~ THEN ~Hello, Minsc.~
== ~ImoenJ~ IF ~InParty("Imoen")~ THEN ~Hi, I'm Imoen.~
// == ~_WILLIA~ IF ~InParty("Imoen")~ THEN ~Hello, Imoen.~
END

Thanks to I_C_T4, you can code all of them as a giant chain-like construct (rather than splitting them up).
I_C_T4 leaves the actions to the original speakers (like I_C_T2), whereas I_C_T3 transfers the actions to the last speaker in the I_C_T chain.
Hence, with  I_C_T3 you need the back-to-original-speaker line like in I_C_T (they're currently commented out). You must make sure that in all chains the back-to-original is the last line.
Posted by: cmorgan
« on: September 14, 2007, 06:33:58 PM »

And a situation where things are messy...

of all of these:
Code: [Select]
Searching for: WILLIA~ 10
phase2\dlg\x#ajint.d(29): I_C_T ~%tutu_scriptbg%WILLIA~ 10 ManyInt10
phase2\dlg\x#alint.d(236): I_C_T2 ~%tutu_scriptbg%WILLIA~ 10 X#ManyInt15
phase2\dlg\x#brint.d(39): I_C_T2 ~%tutu_scriptbg%WILLIA~ 10 X#ManyInt6
phase2\dlg\x#edint.d(93): I_C_T2 ~%tutu_scriptbg%WILLIA~ 10 ManyInt12
phase2\dlg\x#elint.d(7): I_C_T2 ~%tutu_scriptbg%WILLIA~ 10 ManyInt9
phase2\dlg\x#gaint.d(84): I_C_T2 ~%tutu_scriptbg%WILLIA~ 10 ManyInt11
phase2\dlg\x#imint.d(1238): I_C_T2 ~%tutu_scriptbg%WILLIA~ 10 ManyInt14
phase2\dlg\x#jaint.d(214): I_C_T2 ~%tutu_scriptbg%WILLIA~ 10 ManyInt16
phase2\dlg\x#miint.d(266): I_C_T2 ~%tutu_scriptbg%WILLIA~ 10 ManyInt7
phase2\dlg\x#miint.d(274): I_C_T2 ~%tutu_scriptbg%WILLIA~ 10 ManyInt8
phase2\dlg\x#xaint.d(195): I_C_T2 ~%tutu_scriptbg%WILLIA~ 10 ManyInt13
Found 11 occurrence(s) in 10 file(s)

only one throws an error message:
Code: [Select]
WARNING: I_C_T2: the interjection point (_WILLIA 10) has multiple exit transitions that have different actions!
First Action: SetGlobal("ManyInt6","GLOBAL",1)
EscapeArea()
Other Action: EscapeArea()
The problem code:
Code: [Select]
I_C_T2 ~%tutu_scriptbg%WILLIA~ 10 ManyInt6
== ~%BRANWEN_JOINED%~ IF ~InParty("branwen") InMyArea("branwen") !StateCheck("branwen",CD_STATE_NOTVALID)~ THEN @9
== ~%tutu_scriptbg%WILLIA~ IF ~InParty("branwen") InMyArea("branwen") !StateCheck("branwen",CD_STATE_NOTVALID)~ THEN @10
END
and state 10 originally:
Code: [Select]
IF ~~ THEN BEGIN 10 // from:
  SAY #78838 /* ~Cute as a bug, you were. Go play with your friends now. Go on.~ */
  IF ~~ THEN DO ~EscapeArea()
~ EXIT
END

Which has only one response.

But, I am assuming the error is not just in this state - one of the other I_C_T2s processed after ManyInt6 is picking up on the global automatically set to make an interjection play once. Each one of the ones on the list need to be

I_C_T with a pass-back dialogue state, in order to not interfere with the others being processed, right?

As a confirmation, every single one on the list already incorporates a "William is last speaker" line except one

Code: [Select]
I_C_T2 ~%tutu_scriptbg%WILLIA~ 10 ManyInt16
== ~%JAHEIRA_JOINED%~ IF ~InParty("jaheira") InMyArea("jaheira") !StateCheck("jaheira",CD_STATE_NOTVALID)~ THEN @57
== ~%KHALID_JOINED%~ IF ~InParty("jaheira") InMyArea("jaheira") !StateCheck("jaheira",CD_STATE_NOTVALID) InParty("khalid") InMyArea("khalid") !StateCheck("khalid",CD_STATE_NOTVALID)~ THEN @58
== ~%JAHEIRA_JOINED%~ IF ~InParty("jaheira") InMyArea("jaheira") !StateCheck("jaheira",CD_STATE_NOTVALID) InParty("khalid") InMyArea("khalid") !StateCheck("khalid",CD_STATE_NOTVALID)~ THEN @59
== ~%KHALID_JOINED%~ IF ~InParty("jaheira") InMyArea("jaheira") !StateCheck("jaheira",CD_STATE_NOTVALID) InParty("khalid") InMyArea("khalid") !StateCheck("khalid",CD_STATE_NOTVALID)~ THEN @60
END
.
Posted by: cmorgan
« on: September 14, 2007, 06:07:43 PM »

I'm hanging out here for awhile with the thread open, to compare and contrast with decompiled code - I think I can get the number of times that a workaround is required way, way down. It does look like the original coders worked with the default "I_C_T2" for everything, and then selectively moved things back to I_C_T when a cutscene was not working, or hen something else resulted in an error.

Thank you both a great deal. I will try some repairs, and see how the resulting code decompiles.

Edit: In fact, I think I have the opposite - an example where we need to use a workaround (but it is already coded, by accident).

Code: [Select]
WARNING: I_C_T2: the interjection point (_SAFANA 5) has multiple exit transitions that have different actions!
First Action: JoinParty()
Other Action: SetGlobalTimer("Safana","GLOBAL",FIVE_DAYS)
SetGlobal("MACGolemCave","GLOBAL",1)
JoinParty()

The wrong use of I_C_T2, casuing the error,
Code: [Select]
I_C_T2 ~%tutu_var%SAFANA~ 5 JaheiraSafana1
== ~%JAHEIRA_JOINED%~ IF ~Gender(Player1, MALE) InParty("jaheira") InMyArea("jaheira") !StateCheck("jaheira",CD_STATE_NOTVALID)~ THEN @19
== ~%tutu_var%SAFANA~ IF ~Gender(Player1, MALE) InParty("jaheira") InMyArea("jaheira") !StateCheck("jaheira",CD_STATE_NOTVALID)~ THEN @20
END
the original state 5,
Code: [Select]
IF ~~ THEN BEGIN 5 // from: 4.1
  SAY #88285 /* ~Ohh, thank you, you won't regret your decision.  I know that powerful heroes like you will easily push through any obstacles in our path.  Well, we should be off then.  From what my map showed, the pirate cove is located somewhere along the coast, just south of Candlekeep.~ */
  IF ~Global("MACGolemCave","GLOBAL",0)
~ THEN DO ~SetGlobalTimer("Safana","GLOBAL",FIVE_DAYS)
SetGlobal("MACGolemCave","GLOBAL",1)
JoinParty()
~ UNSOLVED_JOURNAL #88286 /* ~Safana's treasure hunt

We have agreed to help Safana recover a treasure from the talons of some type of monster.  She was most persuasive when requesting our help.  The treasure cove is located somewhere along the coast, just south of Candlekeep.~ */ EXIT
  IF ~GlobalGT("MACGolemCave","GLOBAL",0)
~ THEN DO ~JoinParty()
~ EXIT
END
In this instance, the bantering already returns to Safana, so the recode is simply moving it to I_C_T. Safana will carry out the actions in the transition rather than Jaheira.
Posted by: jastey
« on: September 14, 2007, 05:56:30 PM »

"has to be used"
Sorry, my "too" was referring to "I_C_T2 to be used for single action", not in the sense of "as well as I_C_T".
Thank you for clarification!
Posted by: the bigg
« on: September 14, 2007, 05:54:43 PM »

And if it would be

IF ~~ THEN BEGIN 28 // from: 36.1 32.2 31.2 30.2 27.1 27.0
  SAY #82628 /* ~Pardon if I do not thank fully. Leave me now. I do not wish your sight.~ */
  IF ~~ THEN REPLY ~OK, I'm replying~ DO ~EscapeArea()~
  IF ~~ THEN REPLY ~bla1~ DO ~EscapeArea()~
  IF ~~ THEN REPLY ~bla2~ DO ~EscapeArea()~

I_C_T2 could be used save, too ?
"has to be used". (well, unless you use the "Get back to the interjectee" trick, in which case I_C_T1 would still be fine).
Posted by: jastey
« on: September 14, 2007, 05:51:51 PM »

And if it would be

IF ~~ THEN BEGIN 28 // from: 36.1 32.2 31.2 30.2 27.1 27.0
  SAY #82628 /* ~Pardon if I do not thank fully. Leave me now. I do not wish your sight.~ */
  IF ~~ THEN REPLY ~OK, I'm replying~ DO ~EscapeArea()~
  IF ~~ THEN REPLY ~bla1~ DO ~EscapeArea()~
  IF ~~ THEN REPLY ~bla2~ DO ~EscapeArea()~

I_C_T2 could be used save, too ?