Azazello Posted November 27, 2007 Share Posted November 27, 2007 Hi. I need some help. I'm not a modder, so I'm sure I'm missing something simple here. I'm modifying an existing mod, and a creature is not recognizing that's Imoen's alive and well. Imoen's script name is Imoen2. I'm testing this mod in a MegaInstall, IF ~NumTimesTalkedToGT(0)~ THEN BEGIN Query SAY ~Do you wish to travel at this time?~ IF ~~ THEN REPLY ~We are ready to go now.~ GOTO Check4Imoen IF ~~ THEN REPLY ~Perhaps at a later time.~ DO ~Wait(5)~ EXIT END IF ~OR(2) !InParty("Imoen") !InParty("Imoen2")~ THEN BEGIN Check4Imoen SAY ~The one named *Imoen* must accompany you through the gateway.~ IF ~~ THEN DO ~Wait(5)~ EXIT END IF ~~ THEN BEGIN BuggerOff SAY ~The portal violently teleports you to somewhere outside the Sphere.~ IF ~~ THEN DO ~SetGlobal("hf_Teleport_Party","LOCALS",1) SetGlobal("TeleportDialog","GLOBAL",1)~ EXIT END Link to comment
Kulyok Posted November 27, 2007 Share Posted November 27, 2007 I think you need AND instead of OR(2). Link to comment
devSin Posted November 27, 2007 Share Posted November 27, 2007 Yep, the condition should be ~!InParty("Imoen") !InParty("Imoen2")~ (neither Imoen nor Imoen2 are in the party). Your condition says only that Imoen and Imoen2 aren't both in the party (which is an impossible occurrence of course). Link to comment
Azazello Posted November 27, 2007 Author Share Posted November 27, 2007 Thanks. Will try it out once I get home in a coupla hours. Yay! Link to comment
Azazello Posted November 28, 2007 Author Share Posted November 28, 2007 EDIT: I made the change and it did not work. The goal is to require Imoen in order for the party to jump elsewhere. I used the OR to check for one or another instance of her in the party. Either/or, yes-no? So again why didn't that work? With the change, isn't the game looking for both Imoen and Imoen2 NOT to be in the party? That is nearly-certainly impossible. Lastly, I guess ideally I should look for other scriptnames/death-variables/aliases for Imoen but that's too complicated at this stage. Or is it? Link to comment
berelinde Posted November 28, 2007 Share Posted November 28, 2007 If you want Imoen in the party to do something, the check would be ~OR(2) InParty("imoen") InParty("imoen2")~ Edit: but hang on. Imoen is Imoen. She's got the same DV in both BG2 and BGT. You aren't Tutu modding are you, because that's the only one that's different. A simple InParty("imoen2") would do it. Link to comment
Azazello Posted November 28, 2007 Author Share Posted November 28, 2007 Imoen just has to be present in the party. Technically she should be alive. I've been reading about better checks to ensure the NPC is also coherent, but that's too much for now. The original mod that this mod mods has many checks for Imoen and Imoen2, so I'ld like to keep the flow going. This really shouldn't be that difficult. Is the dialogue not the place to check if a NPC is in the party? Link to comment
Miloch Posted November 28, 2007 Share Posted November 28, 2007 I used the OR to check for one or another instance of her in the party. Either/or, yes-no? So again why didn't that work? With the change, isn't the game looking for both Imoen and Imoen2 NOT to be in the party? That is nearly-certainly impossible. In fact, it is quite possible. It's a negation, so the logic is reversed. It's saying: IF (imoen is NOT InParty) AND (imoen2 is NOT InParty) THEN block the gate. That means, logically, that neither the first nor the second instance of Imoen can be in your party for the routine to evaluate as TRUE and kick in. If however, one of those instances is true (say imoen2 is InParty), the whole routine evaluates as FALSE, and the routine should not kick in. Obviously, you cannot have both Imoens in your party, but if you used the console to do that, the routine would also evaluate as FALSE. If you used an OR with the negations, it would still kick in (evaluate as TRUE) even if one Imoen was in your party. If you wanted to reverse the logic of the routine, you would use an OR without the negations. So the short story is, I don't know why it doesn't work, unless one of your mods changed Imoen's DV or something. Or maybe you're spawning imoen.cre to test it - you will need to spawn imoen10 (whose DV is imoen) or imoen15 (whose DV is imoen2). Link to comment
devSin Posted November 28, 2007 Share Posted November 28, 2007 It's coded completely wrong for what you want. You need the condition as part of the transition, and you have nothing going to BuggerOff (that we can see; nobody can help you without all the relevant parts of the dialogue). If what you posted is the full dialogue (in which case, the Query trigger is not what you'd want to use), you want something like this: IF ~NumTimesTalkedToGT(0)~ THEN BEGIN Query SAY ~Do you wish to travel at this time?~ IF ~!InParty("Imoen") !InParty("Imoen2")~ THEN REPLY ~We are ready to go now.~ GOTO Check4Imoen IF ~OR(2) InParty("Imoen") InParty("Imoen2")~ THEN REPLY ~We are ready to go now.~ GOTO BuggerOff IF ~~ THEN REPLY ~Perhaps at a later time.~ DO ~Wait(5)~ EXIT END IF ~~ THEN BEGIN Check4Imoen SAY ~The one named *Imoen* must accompany you through the gateway.~ IF ~~ THEN DO ~Wait(5)~ EXIT END IF ~~ THEN BEGIN BuggerOff SAY ~The portal violently teleports you to somewhere outside the Sphere.~ IF ~~ THEN DO ~SetGlobal("hf_Teleport_Party","LOCALS",1) SetGlobal("TeleportDialog","GLOBAL",1)~ EXIT END As berelinde suggests, if this is all taking place after Chapter 1, you don't even need the "Imoen" check (after Irenicus' dungeon, she's gone forever), so your triggers would just be '+ ~!InParty("Imoen2")~ +' and '+ ~InParty("Imoen2")~ +'. But you can leave them in if you want (it will make no difference whatsoever). InParty(O:Object) requires that Object be in the party and be alive. I'm sure the portal would still work even if <CHARNAME> has to carry her through (unless it wants a kiss from her or something), so any additional state checks would be suspect. Link to comment
Azazello Posted November 28, 2007 Author Share Posted November 28, 2007 Thank-you-Thank-you-Thank-you! That worked perfectly. I understand now that I needed to change around the logic. Although the extra Imoen checks are fluff, I'm leaving them in, in order to follow the logic of the original developer. If he comes back and removes them, so be it. And yes, apart for an opening line, there is no more dialogue. Some history: This mini-mod was created several years ago by a renown modder on another board, who, like many other Greats, has ascended to another plane of gamer existence. (Probably NWN. Notice I didn't say it was heaven). It was created to get around one of the complaints that many had with the then-MegaInstall. It worked as-was back in the day (I had tried it once) but with all the enhancements to weidu and modding, it needed updating. Since it was small mod, I decided to try my hand at it. I'm still no modder, but I'm glad for the learning experience. I would say more, but I do not want to incur the wrath of He-Who-Must-Not-Be-Named (because it's his mod that is modded by this one). I'll say only this: if you check my sig on the other boards, it links to a list of mods. One of them is this mod. You will know it, as it'll have a "thanks to the G3 folks" with a link-traceback to here. Give me a day or so to update the links. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.