Adding interjections...
#1
Posted 07 November 2005 - 06:55 PM
Sticz
#2
Posted 08 November 2005 - 12:42 AM
However, if you've grasped how to do it for your NPC then its basically no different for a Bioware NPC. You just need to use their Death Variables (which can be looked up in any number of places e.g. their CRE files, interdia.2da etc) instead of your NPC's.
Edited by cmorgan, 03 January 2010 - 03:42 PM.
malformed url tag repaired after forum move
#3
Posted 08 November 2005 - 08:21 PM
Are there any mods out there with good examples? Im using the Gareth mod for all my examples (basically rewrote him) as my NPC.
Sticz
#4
Posted 09 November 2005 - 06:27 AM
INTERJECT_COPY_TRANS KORGANJ 16 LE#KorganInterject
== BTASHIA IF ~InParty("Tashia")~ THEN @23
== KORGANJ IF ~InParty("Tashia")~ THEN @24
END
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move - Douglas Adams
I like persons better than principles, and I like persons with no principles better than anything else in the world - Oscar Wilde
Give a man a fire, and he's warm for a day. But set a man on fire, and he's warm for the rest of his life. - Terry Pratchett
#5
Posted 11 November 2005 - 04:50 PM
Sticz
BTW, when setting up interjections for ToB (& watchers keep if played in SoA) do I put the interjections in the 25 file? (IE VICONI25.d)? I am away from my desktop now and dont want to re-invent the wheel when I get back.
Sticz
#6
Posted 13 November 2005 - 12:58 PM
#7
Posted 13 November 2005 - 02:02 PM
#8
Posted 13 November 2005 - 02:39 PM
IF ~~ State SAY ~Hi~ ++ ~Bye.~ EXIT END
Yikari, monk NPC
Shed's Mods - Three time TeamBG Contest winner!
The Jerry Zinger Show
ShedPlant.net
#9
Posted 13 November 2005 - 04:07 PM
INTERJECT KELDOR 0 VICONIAKeldorn
== KELDOR IF ~InParty("VICONIA")~ THEN ~What ho?! YOU are the ones who travel with this Drow!~
== VICONIJ IF ~InParty("VICONIA")~ THEN ~Fitting that you are in the sewers knight! The vermin that reside here will not have to travel far to feast on your flesh!~
== KELDOR IF ~InParty("VICONIA")~ THEN ~Prepare to have your evil cleansed!~ DO ~ChangeEnemyAlly(Myself,Enemy)~
END
Im using INTERJECT because it doesnt link back, but... I get the NO VALID REPLIES OR LINKS afterwards and Im just as bad off. I tried EXIT, but that is not a proper command. Nor do I see any commands to end dialog in the IDS list.
Things that make you go hmmmm.
Sticz
#10
Posted 13 November 2005 - 04:12 PM
INTERJECT KELDOR 0 VICONIAKeldorn == KELDOR IF ~InParty("VICONIA")~ THEN ~What ho?! YOU are the ones who travel with this Drow!~ == VICONIJ IF ~InParty("VICONIA")~ THEN ~Fitting that you are in the sewers, knight! The vermin that reside here will not have to travel far to feast on your flesh!~ == KELDOR IF ~InParty("VICONIA")~ THEN ~Prepare to have your evil cleansed!~ DO ~ChangeEnemyAlly(Myself,Enemy)~ EXIT END
Yikari, monk NPC
Shed's Mods - Three time TeamBG Contest winner!
The Jerry Zinger Show
ShedPlant.net
#11
Posted 13 November 2005 - 04:42 PM
For some reason that isnt working. The EXIT after the text is getting me a parsing.parse_error. if I remove the EXIT it complies normally, so thats gotta be it. Im thinking that Ill have to extend the dialog and I havent done something like that yet. The directions from Weidu are a little hard for me to grasp.
Is there a way to just remove the PC portion of the conversation? That would work too.
Sticz
#12
Posted 14 November 2005 - 03:20 AM
INTERJECT KELDOR 0 VICONIAKeldorn == KELDOR IF ~InParty("VICONIA")~ THEN ~What ho?! YOU are the ones who travel with this Drow!~ == VICONIJ IF ~InParty("VICONIA")~ THEN ~Fitting that you are in the sewers, knight! The vermin that reside here will not have to travel far to feast on your flesh!~ == KELDOR IF ~InParty("VICONIA")~ THEN ~Prepare to have your evil cleansed!~ DO ~ChangeEnemyAlly(Myself,Enemy)~ END Somefile somestate
If you want to just end the dialogue there, then you can't use INTERJECT . What's the context of the dialogue? Is it a banter, or triggered at a certain point?
Yikari, monk NPC
Shed's Mods - Three time TeamBG Contest winner!
The Jerry Zinger Show
ShedPlant.net
#13
Posted 14 November 2005 - 07:40 AM
INTERJECT KELDOR 0 VICONIAKeldorn == KELDOR IF ~InParty("VICONIA")~ THEN ~What ho?! YOU are the ones who travel with this Drow!~ == VICONIJ IF ~InParty("VICONIA")~ THEN ~Fitting that you are in the sewers, knight! The vermin that reside here will not have to travel far to feast on your flesh!~ == KELDOR IF ~InParty("VICONIA")~ THEN ~Prepare to have your evil cleansed!~ DO ~ChangeEnemyAlly(Myself,Enemy)~ EXIT
According to the WeiDU readme, INTERJECT takes the following form:
INTERJECT entryFilename entryLabel globalVariable chainText list chainEpilogue
One of the possible non-terminals chainEpilogue can be is EXIT, as required.
Edited by Grim Squeaker, 14 November 2005 - 09:48 AM.
#14
Posted 14 November 2005 - 09:22 AM
And I cannot even use I_C_T: it is a romance interjection after the second Slayer transformation (at rest). It should not allow two interjections in the row.
I am stuck with PC replies at the moment.
IWD NPC, Xan, The Sellswords, Back to Brynnlaw, Assassinations, Dungeon Crawl, Reunion, Branwen, Coran, Tiax, Xan BG1 Friendship
BG1 NPC, Romantic Encounters
#15
Posted 14 November 2005 - 09:52 AM
I tried Exit (sorry for butting in)! You do not want to know what it has done with my dialog.tlk yesterday. In the end, I had to write PC replies, even if they should not be there under any cicrumstances.
And I cannot even use I_C_T: it is a romance interjection after the second Slayer transformation (at rest). It should not allow two interjections in the row.
I am stuck with PC replies at the moment.
You say you tried EXIT? What error did it throw? Because it should work according to the WeiDU syntax and I've never had a problem with using EXIT in that kind of situation. A way around it is to do the following:
... DO ~ChangeEnemyAlly(Myself,Enemy)~ END IF ~~ THEN EXIT
or even:
... END IF ~~ THEN DO ~ChangeEnemyAlly(Myself,Enemy)~ EXIT
Could you post your exact code including the EXIT you tried? I'm curious as to where its going wrong.
Edited by Grim Squeaker, 14 November 2005 - 09:54 AM.
#16
Posted 14 November 2005 - 10:26 AM
END
IF ~~ THEN EXIT compiled all right, and it shows in IE as if it works.
A rough example of my old code: (what it did was turning dialogue trees into some endless cycles):
INTERJECT Player1 7 NPCSlayerChange
== NPCJ IF ~InParty("NPC")~ THEN ~text1~
END
++ ~answer1~
DO ~SG("NPCSlayerChange",1)~ EXTERN NPCJ NPCSlayerChange1
++ ~answer2~
DO ~SG("NPCSlayerChange",1)~ EXTERN NPCJ NPCSlayerChange1
++ ~answer2~
DO ~SG("NPCSlayerChange",1)~ EXTERN NPCJ NPCSlayerChange1
CHAIN NPCJ NPCSlayerChange1
~text2~
DO ~ActionOverride(Player1,ReallyForceSpell(Myself,SLAYER_CHANGE))~
EXIT
INTERJECT Player1 10 NPCSlayerSurvived
== NPCJ IF ~InParty("NPC") G("NPCSlayerChange",1)~ THEN ~text3~
EXIT
The last line caused the nastiness, I assume.
IWD NPC, Xan, The Sellswords, Back to Brynnlaw, Assassinations, Dungeon Crawl, Reunion, Branwen, Coran, Tiax, Xan BG1 Friendship
BG1 NPC, Romantic Encounters
#17
Posted 14 November 2005 - 10:33 AM
INTERJECT Player1 10 NPCSlayerSurvived
== NPCJ IF ~InParty("NPC") G("NPCSlayerChange",1)~ THEN ~text3~
EXIT
The last line caused the nastiness, I assume.
So did it not actually cause an error? I mean, did it compile alright?
#18
Posted 14 November 2005 - 10:49 AM
...but then I started to test and found out that all interjections were in the wrong places. Say, Simiaz' one suddenly appeared in Sola's dialogue, etc. When I opened IE to check out what the hell was going on, I found out that the dialogue tree went like this:
- normal state
- InParty(NPC) InMyArea(NPC) - my normal interjection
- IsValidForPartyDialogue(NPC) - an interjection with my NPC that I did not program at all.
More, in some places the dialogue tree simply went into an infinite loop. And all because of a single mistake... Brrr...
IWD NPC, Xan, The Sellswords, Back to Brynnlaw, Assassinations, Dungeon Crawl, Reunion, Branwen, Coran, Tiax, Xan BG1 Friendship
BG1 NPC, Romantic Encounters
#19
Posted 19 November 2005 - 06:54 PM
Sticz
#20
Posted 20 November 2005 - 12:21 AM
EDIT: I've realised that you might have wanted PC's *replies*, not *interjections*.
So, the code for replies:
INTERJECT SOMENPCNAME 1 SOMENPCNAME_WITH_MY_NPC
== MYNPC IF ~InParty("MYNPC") See("MYNPC")~ THEN
~say something~
END
++ ~reply 1~ EXTERN MYNPC CHAINWITHMYNPC1
++ ~reply 2~ EXTERN MYNPC CHAINWITHMYNPC2
++ ~reply 3~ EXTERN MYNPC CHAINWITHMYNPC3
CHAIN MYNPC CHAINWITHMYNPC1
~say something else 1~
EXIT
CHAIN MYNPC CHAINWITHMYNPC2
~say something else 2~
EXIT
CHAIN MYNPC CHAINWITHMYNPC3
~say something else 3~
EXIT
Code for interjections:
I_C_T PLAYER1 16 IRENICUSISGONE
== PLAYER1 ~Is this a victory at all?~
END
Edited by Kulyok, 20 November 2005 - 12:30 AM.
IWD NPC, Xan, The Sellswords, Back to Brynnlaw, Assassinations, Dungeon Crawl, Reunion, Branwen, Coran, Tiax, Xan BG1 Friendship
BG1 NPC, Romantic Encounters