Nythrun Posted February 24, 2007 Share Posted February 24, 2007 There's already an IMOENJ.DLG, you'd just be adding to it, but that's the idea. Link to comment
EiriktheScald Posted February 24, 2007 Author Share Posted February 24, 2007 This thread is where I'm stumbling: Interjections If I'm not supposed to append bioware npc's dialog, then what am I supposed to do? I didn't understand what was talked about then, and still don't. Link to comment
berelinde Posted February 24, 2007 Share Posted February 24, 2007 If you are talking about appending Imoen's dialogue *that was supplied by the BG1 NPC Project*, you can't. For the purposes of this post the BG1 NPC Project will be referred to as BNP, because I'm getting tired of typing the whole thing out. The first reason is ethical. Imoen's reaction to finding Tarnesh's spellbook (which doesn't actually exist, I might add) is part of the BNP, and that author retains the rights to it. The second reason is logical: you don't know the state number on every install. Because that dialogue is not BioWare dialogue, the state number will depend on which mods are installed and in which order. You can't even guarantee the BNP will be installed, although you can require it. As Eirik's story really makes so much more sense in combination with the BNP, I would understand why you might require it as part of an installation that includes Eirik. Even so, you can require that it be installed before Eirik, but you can't say "No other NPC mods at all." What happens if somebody goes and installs Gavin before the BNP? That will skew the state numbers by a lot, so you're going to be in trouble. Quest mods will add to Imoen's dialogue, too, so even if you say BNP followed by Eirik, *then* other NPC mods, the state number will still be off if somebody has installed GCE1, Sirene's Call, SoBH, or some other Quest mod. Best not to go there, but here's an illustration that will explain what I mean. When dialogue files are compiled, the statenames we give them go away, and the engine assigns them numbers. That is what is used for interjections. The numbers are made up. _IMOEN2 states, as supplied by BioWare 0-50 _IMOEN2 states, as supplied by BNP another 500 _IMOEN2 states, as supplied by Eirik another 75 _IMOEN2 states, as supplied by Gavin another 75 _IMOEN2 states, as supplied by Finch another 75 _IMOEN2 states, as supplied by Sirene's Call another 5 State number of that Tarnesh line if the installation is just BNP followed by Eirik: 128 (made up) State number of that Tarnesh line if the installation is Eirik followed by BNP: 203 State number of that Tarnesh line if the installation is Finch, followed by Gavin, followed by Sirene's Call, followed by BNP, followed by Eirik: 283 What you *can* do is have a followup dialogue triggered by a timer. For your BAF: IF Global("ESEirikImoenTarnesh","GLOBAL",0) PartyHasItem("SCRLTAR") Dead("tarnesh") InParty(Myself) InParty("imoen") InMyArea(Myself) InMyArea("imoen") !StateCheck(Myself,CD_STATE_NOTVALID) !StateCheck("imoen","CD_STATE_NOTVALID) THEN RESPONSE #100 SetGlobal("ESEirikImoenTarnesh","GLOBAL",1) RealSetGlobalTimer("ESEiImTaTime","GLOBAL",60) END IF RealGlobalTimerExpired("ESEiImTaTime","GLOBAL") Global("ESEirikImoenTarnesh","GLOBAL",1) InParty(Myself) InParty("imoen") InMyArea(Myself) InMyArea("imoen") !StateCheck(Myself,CD_STATE_NOTVALID) !StateCheck("imoen","CD_STATE_NOTVALID) THEN RESPONSE #100 SetGlobal("ESEirikImoenTarnesh","GLOBAL",2) StartDialogueNoSet("imoen") END /* This next bit is a state-of-the-art clip of coding Kulyok came up with to make sure conversations are never dropped */ IF RealGlobalTimerExpired("ESEiImTaTime","GLOBAL") Global("ESEirikImoenTarnesh","GLOBAL",2) InParty(Myself) InParty("imoen") InMyArea(Myself) InMyArea("imoen") !StateCheck(Myself,CD_STATE_NOTVALID) !StateCheck("imoen","CD_STATE_NOTVALID) THEN RESPONSE #100 StartDialogueNoSet("imoen") END Then, in Eirik's J file CHAIN IF ~Global("ESEirikImoenTarnesh","GLOBAL",2)~ THEN ESEirikJ ESImBook ~<CHARNAME> is right, you know.~ DO ~SetGlobal("ESEirikImoenTarnesh","GLOBAL",3)~ == _IMOEN2 ~Whatcha mean?~ == ESEirikJ ~Words have power~ == _IMOEN2 ~So what?~ == ESEirikJ ~I don't know. I have to get me a better writer.~ == _IMOEN2 ~Get EirikTheSkald to do it. I hear he knows what you sound like.~ == ESEirikJ ~Good idea. I'll see if he's free.~ EXIT Link to comment
EiriktheScald Posted February 24, 2007 Author Share Posted February 24, 2007 “When you are describing A shape, or sound, or tint; Don't state the matter plainly, But put it in a hint; And learn to look at all things With a sort of mental squintâ€Â-- Lewis Carroll See, I was confronted with what I perceived a paradox. The tutorials I've come across say one thing; it's very disconcerting, for the newbie, to then be told not to do this. Don't get me wrong, I understand the reasons. I liken the learning process, however, to an easter egg hunt. This information is not well publicized and often convoluted. And I can see how someone with little background in the subject (like myself) can easily become discouraged. Ah well, enough ranting. I apologize, if I've stepped on anyone's toes. Link to comment
berelinde Posted February 24, 2007 Share Posted February 24, 2007 When you are figuring out what is safe material for an interjection, you are best getting your state numbers from an unmodified installation. That way you know you won't be modding the mod. I don't think anyone would mind if you wrote a little exchange with Imoen assuming that she just talked to the PC about the spellbook. If you did it right, it would work whether BNP is installed or not. And it is confusing. I'm only a month or so further into this than you are, don't forget, but I didn't do any home repairs during that timeframe. Link to comment
EiriktheScald Posted February 24, 2007 Author Share Posted February 24, 2007 BTW, what is the check for BNP installed? Also, can you nest IF/THEN statements? Expanding on your script above, is this valid: /* Tarnesh's Spellbook */ IF Global("ESTarneshScroll","GLOBAL",0) PartyHasItem("SCRLTAR") Dead("tarnesh") InParty(Myself) InMyArea(Myself) !StateCheck(Myself,CD_STATE_NOTVALID) THEN RESPONSE #100 SetGlobal("ESTarneshScroll","GLOBAL",1) RealSetGlobalTimer("ESCommentBookTime","GLOBAL",60) END IF RealGlobalTimerExpired("ESCommentBookTime","GLOBAL") Global("ESTarneshScroll","GLOBAL",1) InParty(Myself) InMyArea(Myself) !StateCheck(Myself,CD_STATE_NOTVALID) THEN IF InParty("imoen") InMyArea("imoen") !StateCheck("imoen","CD_STATE_NOTVALID) THEN RESPONSE #100 SetGlobal("ESTarneshScroll","GLOBAL",2) //Start talking to Imoen StartDialogueNoSet("imoen") ELSE RESPONSE #100 SetGlobal("ESTarneshScroll","GLOBAL",3) //Skip Imoen, start talking to PC StartDialogueNoSet([PC]) END END Link to comment
devSin Posted February 24, 2007 Share Posted February 24, 2007 You cannot nest blocks in your scripts. Evidence suggests that you can use Continue() to achieve a similar effect, but it really is advanced usage and not something you should count on. Link to comment
berelinde Posted February 24, 2007 Share Posted February 24, 2007 Sorry, but you can't nest IF/THEN statemens. But, you can include a check for BNP, put the stuff that would pertain to it in separate files, and only install it if BNP is detected. Here's the check for BNP, that you'd put in your tp2: ACTION_IF FILE_EXISTS_IN_GAME ~override/X#BG1NPCCore.G3~ THEN BEGIN /* Installs BG1 NPC Cross-Mod files */ COMPILE ~MyMod/DLG/CrossMod.d~ EXTEND_BOTTOM ~ESEIRIK.bcs~ ~MyMod/BAF/CrossMod.baf~ //because ESEIRIK.baf has already been compiled END ELSE BEGIN /* Installs alternate files */ COMPILE ~MyMod/DLG/Alternate.d~ EXTEND_BOTTOM ~ESEIRIK.bcs~ ~MyMod/BAF/Alternate.baf~ END This would go in the ESEIRIK.baf: /* Tarnesh's spellbook */ IF Global("ESTarneshScroll","GLOBAL",0) PartyHasItem("SCRLTAR") Dead("tarnesh") InParty(Myself) InMyArea(Myself) !StateCheck(Myself,CD_STATE_NOTVALID) THEN RESPONSE #100 SetGlobal("ESTarneshScroll","GLOBAL",1) RealSetGlobalTimer("ESCommentBookTime","GLOBAL",60) END Then you'd put this in CrossMod.baf /* Tarnesh's Spellbook */ IF RealGlobalTimerExpired("ESCommentBookTime","GLOBAL") Global("ESTarneshScroll","GLOBAL",1) InParty(Myself) InParty("imoen") InMyArea(Myself) InMyArea("imoen") !StateCheck(Myself,CD_STATE_NOTVALID) !StateCheck("imoen","CD_STATE_NOTVALID) THEN RESPONSE #100 SetGlobal("ESTarneshScroll","GLOBAL",2) //Start talking to Imoen StartDialogueNoSet("imoen") END And you'd put this in Alternate.baf: IF RealGlobalTimerExpired("ESCommentBookTime","GLOBAL") Global("ESTarneshScroll","GLOBAL",1) /* Oh, hells! I forgot the obligatory InParty, !StateCheck, and InMyArea checks. Please be a dear and put them in. */ THEN RESPONSE #100 SetGlobal("ESTarneshScroll","GLOBAL",2) //you can use the same variable, since you're installing a different file if BNP is detected StartDialogueNoSet("Player1") END Is your brain actually bubbling out your ears yet? Link to comment
devSin Posted February 24, 2007 Share Posted February 24, 2007 Why do you have InMyArea(Myself) checks? It doesn't serve any purpose... Link to comment
berelinde Posted February 24, 2007 Share Posted February 24, 2007 Habit to prevent broken interjections. If Eirik is in the party, but gets left in a building, i.e. not in the area, he won't be talking to Imoen or the pc when his timer runs out. Link to comment
OTG Posted February 24, 2007 Share Posted February 24, 2007 I'm no scripting guru, I must admit, but isn't the following check extraneous? InMyArea(Myself) According to the IESDP, InMyArea() returns true only if the specified object is in the same area as the active CRE. As the active CRE is 'Myself', it will always return true. Bah, ninja'd by devSin Link to comment
berelinde Posted February 24, 2007 Share Posted February 24, 2007 Maybe for scripts, InMyArea(Player1) might be better. Link to comment
cmorgan Posted February 24, 2007 Share Posted February 24, 2007 /* This next bit is a state-of-the-art clip of coding Kulyok came up with to make sure conversations are never dropped */ IF AreaCheck("%FAI_OUTSIDE%") RealGlobalTimerExpired("ESEiImTaTime","GLOBAL") Global("ESEirikImoenTarnesh","GLOBAL",2) InParty(Myself) InParty("imoen") InMyArea("imoen") !StateCheck("imoen",CD_STATE_NOTVALID) !StateCheck(Player1,CD_STATE_NOTVALID) THEN RESPONSE #100 StartDialogueNoSet("imoen") END Then dialogue advances materials, then if area dependent /* This next bit shuts it off if it never fired somehow... */ IF !AreaCheck("%FAI_OUTSIDE%") RealGlobalTimerExpired("ESEiImTaTime","GLOBAL") Global("ESEirikImoenTarnesh","GLOBAL",2) THEN RESPONSE #100 Global("ESEirikImoenTarnesh","GLOBAL",3) END ... Don't worry about the %FAI_OUTSIDE% thing - it is a placeholder for the Tutu or BGT area reference. In this particular instance, if something jams up, you want to clear it out of the way when you leave the area (like to go inside FAI). In others, you may not need that final block. I am still studying Kulyok's variable settings, though, so hopefully she will be along to correct us... Link to comment
berelinde Posted February 24, 2007 Share Posted February 24, 2007 Um, danger! If you have an area check there, and the party moves inside right away, you're going to have trouble. The conversation doesn't need to happen outside, but forcing it to might mean it gets missed. But you do want to include the rest of the block to avoid dropping the talk. Edit: can't spell. Link to comment
cmorgan Posted February 24, 2007 Share Posted February 24, 2007 Always call SetLeavePartyDialogFile() when scripting LeaveParty(). berelinde, we need to add this to the BG1 NPC checklist... we don't do it consitently Ahh, yup, you are right... you could have it cover both %FAI_OUTSIDE% and %FAI_L1%; I was using this as an example! Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.