Jump to content


Photo

Coding help


  • Please log in to reply
13 replies to this topic

#1 Essande

Essande
  • Member
  • 16 posts

Posted 15 April 2005 - 12:36 AM

I'm attempting to make a pair of NPCs that both join and leave the party together. I am aware that Jaheira and Kahlid and Minsc and his old witch do so in BG1 but I can't find the code for that.

#2 Andyr

Andyr

    HERR RASENKOPF

  • Member
  • 2318 posts

Posted 15 April 2005 - 06:11 AM

I think it might just involve an ActionOverride("blah",LeaveParty()) at the end of each of the pair's chuckout dialogue to get rid of the other one. :) Not tried it personally, though.
"We are the Gibberlings Three, as merry a band as you ever did see..." - Home of IE mods

< jcompton > Suggested plugs include "Click here so Compton doesn't ban me. http://www.pocketplane.net/ub"

#3 Essande

Essande
  • Member
  • 16 posts

Posted 17 April 2005 - 02:51 AM

Thanks for the code Andyr. I haven't been able to test it though, I want one of the NPCs to join only if you have the first one in your party and I'm still working the bugs out on that. On a side note, does anybody know the code for the magic license in Amn?

#4 Andyr

Andyr

    HERR RASENKOPF

  • Member
  • 2318 posts

Posted 17 April 2005 - 05:54 AM

For the first part, you'd want an InParty check on the dialogue branch where you ask the second NPC to join. :)

As for the Magic License, I don't know the variables offhand but try looking at the actors in the Government Building to get the .CRE file, then peer into his dialogue.
"We are the Gibberlings Three, as merry a band as you ever did see..." - Home of IE mods

< jcompton > Suggested plugs include "Click here so Compton doesn't ban me. http://www.pocketplane.net/ub"

#5 Essande

Essande
  • Member
  • 16 posts

Posted 19 April 2005 - 06:39 AM

Andyr, again thank you. I had tried the InParty check before and it wasn't working so I changed it all together. And I found the magic license thing. Now I'm attempting to install the mod but it says that one of the files ******J isn't in the chitin.key so it won't compile one of my .d files and that just stops the whole thing. What I'm trying to do in the dialogue is have interaction between my two characters and the PC but EXTERN doesn't seem to be working. Is this just reserved for the banter files? If it's not I'd like to know what I'm doing wrong and if it is I'm open to suggestions on how to rearrange my text.

#6 Deathsangel

Deathsangel

    Living on Wings of Dreams

  • Modder
  • 3089 posts

Posted 19 April 2005 - 06:47 AM

Can you not alike Andyr's Idea do in their script

IF
!InParty("Other-NPC")
THEN
RESPONSE 100#
Dialog(Player1)
END

The dialog would be a line like: "Why do you kick Other-NPC out? You know this will make me go as well don't you?" then EXTERN to the kick out dialog as if that person would be kicked out

Edited by Deathsangel, 19 April 2005 - 06:54 AM.

Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.


Sentences marking (my) life:

Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams



(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable :P

~~ I love it, and I am humbled! Yay! ~~


#7 Andyr

Andyr

    HERR RASENKOPF

  • Member
  • 2318 posts

Posted 19 April 2005 - 09:28 AM

Andyr, again thank you.  I had tried the InParty check before and it wasn't working so I changed it all together.  And I found the magic license thing.  Now I'm attempting to install the mod but it says that one of the files ******J isn't in the chitin.key so it won't compile one of my .d files and that just stops the whole thing.  What I'm trying to do in the dialogue is have interaction between my two characters and the PC but EXTERN doesn't seem to be working. Is this just reserved for the banter files? If it's not I'd like to know what I'm doing wrong and if it is I'm open to suggestions on how to rearrange my text.

View Post


Can you post your .tp2? And the name of the **J file it says it cannot find?

EXTERN works anywhere, if you post the code you're using I will try and help.
"We are the Gibberlings Three, as merry a band as you ever did see..." - Home of IE mods

< jcompton > Suggested plugs include "Click here so Compton doesn't ban me. http://www.pocketplane.net/ub"

#8 -Ashara-

-Ashara-
  • Guest

Posted 19 April 2005 - 09:55 AM

Have you started you new file for NPC with

BEGIN xxxxJ

?

#9 -Guest_Essande_*-

-Guest_Essande_*-
  • Guest

Posted 19 April 2005 - 07:11 PM

Too lazy to log in...anyway here's my TP2 file.

BACKUP ~Tiva and Isa\Isa\backup~
AUTHOR ~EssandetheFireLily@hotmail.com~
BEGIN ~Isa and Tiva NPCs for BG2:SoA V.1~

COPY ~Tiva and Isa\Isa\Isa.cre~ ~override\Isa.cre~
SAY NAME1 ~Isa~
SAY NAME2 ~Isa~
SAY BIO ~ISA laughs as she tells of her travels from her hometown to here. She smiles when she tells you how she became a paladin of Eldath and is proud to be Tiva's official guardian. At this Tiva just sighs and tells Isa to be quiet.~
SAY SELECT_ACTION1 ~I'm on it.~ [Isa_]
SAY SELECT_COMMON4 ~What?~ [Isa0]
SAY TARGET_IMMUNE ~Why won't you die?!~ [Isa2]
SAY INVENTORY_FULL ~My pack's full, make Tiva carry it.~ [Isa3]
SAY PICKED_POCKET ~I wonder if they'll notice this is missing?~ [Isa4]
SAY EXISTANCE1 ~Can ya see me?~ [Isa5]
SAY EXISTANCE2 ~What happened?~ [Isa6]
SAY BATTLE_CRY1 ~Prepare for pain!~ [Isaa]
SAY LEADER ~You want *me* to be leader? You're kidding, right?~ [Isab]
SAY TIRED ~Can we rest now?~ [Isac]
SAY BORED ~Come on people! Let's move!~ [Isad]
SAY HURT ~TIVA! Need a medic over here!~ [Isae]
SAY SELECT_COMMON1 ~Yes?~ [Isaf]
SAY SELECT_COMMON2 ~What's your order?~ [Isag]
SAY SELECT_COMMON3 ~Do you need something?~ [Isah]
SAY BATTLE_CRY2 ~Yeehah!~ [Isai]
SAY BATTLE_CRY3 ~Here goes nothing!~ [Isaj]
SAY BATTLE_CRY4 ~I will whack you until either you die--or my arm gets tired.~ [Isak]
SAY DAMAGE ~~ [Isal]
SAY DYING ~T-Tiva I...~ [Isam]
SAY AREA_FOREST ~Aren't the trees just lovely?~ [Isan]
SAY AREA_CITY ~This place is nothing like home.~ [Isao]
SAY AREA_DUNGEON ~Why are dungeons always so...dark?~ [Isap]
SAY AREA_DAY ~Ain't it beautiful today?~ [Isaq]
SAY AREA_NIGHT ~Ever wonder if there's more to the night sky than just stars?~ [Isar]
SAY SELECT_ACTION2 ~Happy to do it.~ [Isas]
SAY SELECT_ACTION3 ~It's done.~ [Isat]
SAY SELECT_ACTION4 ~I obey!~ [Isau]
SAY SELECT_ACTION5 ~Off to work then?~ [Isav]
SAY SELECT_RARE1 ~Huh? What? Where?~ [Isax]
SAY SELECT_RARE2 ~Will that be all your majesty?~ [Isay]
SAY CRITICAL_HIT ~Ooo, that *had* to hurt.~ [Isaz]

COMPILE ~Tiva and Isa\Isa\Isa.d~
COMPILE ~Tiva and Isa\Isa\BIsa.d~
COMPILE ~Tiva and Isa\Isa\IsaP.d~
COMPILE ~Tiva and Isa\Isa\IsaJ.d~

COPY ~Tiva and Isa\Isa\IsapicS.bmp~ ~override\IsapicS.bmp~
COPY ~Tiva and Isa\Isa\IsapicL.bmp~ ~override\IsapicL.bmp~
COPY ~Tiva and Isa\Isa\sound~ ~override~

EXTEND_TOP ~AR0900.bcs~ ~Tiva and Isa\Isa\AR0900.baf~

APPEND ~pdialog.2da~
~Isa IsaP IsaJ IsaD Isa25P Isa25J Isa25D Isa25~
UNLESS ~Isa~

APPEND ~interdia.2da~
~Isa BIsa B25Isa~
UNLESS ~Isa~

COPY ~Tiva and Isa\Tiva\Tiva.cre~ ~override\Tiva.cre~
SAY NAME1 ~Tiva~
SAY NAME2 ~Tiva~
SAY BIO ~When asked about her past TIVA sighs and mutters something before turning her gaze away from you and walking past, effectively ending the conversation.~
SAY SELECT_ACTION1 ~Must I?~ [Tiva_]
SAY SELECT_COMMON4 ~Yes?~ [Tiva0]
SAY TARGET_IMMUNE ~This isn't right...~ [Tiva2]
SAY INVENTORY_FULL ~Might Isa have room in her pack for this?~ [Tiva3]
SAY PICKED_POCKET ~I'll be taking this...~ [Tiva4]
SAY EXISTANCE1 ~Best to be hidden right now...~ [Tiva5]
SAY EXISTANCE2 ~Not good.~ [Tiva6]
SAY BATTLE_CRY1 ~Don't make me do this!~ [Tivaa]
SAY LEADER ~Grand...my first act as leader will be...to ask you to reclaim the position.~ [Tivab]
SAY TIRED ~I am weary...might we rest?~ [Tivac]
SAY BORED ~Our idleness is getting us nowhere.~ [Tivad]
SAY HURT ~Asistance...please!~ [Tivae]
SAY SELECT_COMMON1 ~Your command?~ [Tivaf]
SAY SELECT_COMMON2 ~I'm here.~ [Tivag]
SAY SELECT_COMMON3 ~What is your will?~ [Tivah]
SAY BATTLE_CRY2 ~Surrender and you shall be spared!~ [Tivai]
SAY BATTLE_CRY3 ~I don't want to hurt you but--~ [Tivaj]
SAY BATTLE_CRY4 ~This is work for Isa.~ [Tivak]
SAY DAMAGE ~~ [Tival]
SAY DYING ~I'm...at peace...~ [Tivam]
SAY AREA_FOREST ~Eldath has been here, I feel it.~ [Tivan]
SAY AREA_CITY ~Choas about every turn...may we leave this place soon.~ [Tivao]
SAY AREA_DUNGEON ~I dislike the tension in the air.~ [Tivap]
SAY AREA_DAY ~The land is so much more active during the hours of light.~ [Tivaq]
SAY AREA_NIGHT ~I enjoy the tranquility of the night...~ [Tivar]
SAY SELECT_ACTION2 ~It is done.~ [Tivas]
SAY SELECT_ACTION3 ~Next.~ [Tivat]
SAY SELECT_ACTION4 ~Very well.~ [Tivau]
SAY SELECT_ACTION5 ~If I must.~ [Tivav]
SAY SELECT_RARE1 ~Glad to.~ [Tivax]
SAY SELECT_RARE2 ~At your service.~ [Tivay]
SAY CRITICAL_HIT ~I apologize.~ [Tivaz]

COMPILE ~Tiva and Isa\Tiva\Tiva.d~
COMPILE ~Tiva and Isa\Tiva\BTiva.d~
COMPILE ~Tiva and Isa\Tiva\TivaP.d~
COMPILE ~Tiva and Isa\Tiva\TivaJ.d~

COPY ~Tiva and Isa\Tiva\TivpicS.bmp~ ~override\TivpicS.bmp~
COPY ~Tiva and Isa\Tiva\TivpicL.bmp~ ~override\TivpicL.bmp~
COPY ~Tiva and Isa\Tiva\sound~ ~override~

EXTEND_TOP ~AR0900.bcs~ ~Tiva and Isa\Tiva\AR0900.baf~

APPEND ~pdialog.2da~
~Tiva TivaP TivaJ TivaD Tiva25P Tiva25J Tiva25D Tiva25~
UNLESS ~Tiva~

APPEND ~interdia.2da~
~Tiva BTiva B25Tiva~
UNLESS ~Tiva~


When compiling Isa.d it complains it can't find TivaJ.d in the key. Thanks for the suggestion Deathsangel but I'm fine with Andyr's suggestion. And I did begin the ****J file with BEGIN TivaJ if that's what you mean.

#10 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 19 April 2005 - 07:20 PM

If they're crossreferenced to one another, you're better off compiling them all together so WeiDU has the full range of internal state names available.

COMPILE ~Tiva and Isa\Isa\Isa.d~
         ~Tiva and Isa\Isa\BIsa.d~
         ~Tiva and Isa\Isa\IsaP.d~
         ~Tiva and Isa\Isa\IsaJ.d~
         ~Tiva and Isa\Tiva\Tiva.d~
         ~Tiva and Isa\Tiva\BTiva.d~
         ~Tiva and Isa\Tiva\TivaP.d~
         ~Tiva and Isa\Tiva\TivaJ.d~

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#11 -Guest_Essande_*-

-Guest_Essande_*-
  • Guest

Posted 19 April 2005 - 07:29 PM

Thanks I'll try that.

#12 Essande

Essande
  • Member
  • 16 posts

Posted 20 April 2005 - 03:02 AM

Thank you CamDawg, the error is gone. Unfortunately I have another one. Please excuse my stupidity it's probably something extremely simple but I want to make one of my characters interject the other one, and since they'll always be together I didn't bother using InParty checks but that's not the problem. I used EXTERN in the command but now it's not reading the label when I want the text ot go back to the original speaker.

IF ~~ THEN BEGIN S1
SAY ~blah~
IF ~~ THEN EXTERN ISAJ S2
END

APPEND ISAJ
IF ~~ THEN BEGIN S2
SAY ~blah~
IF ~~ THEN EXTERN TIVA S3
END
END


This is what I have. The APPEND is at the end of the file so I can't figure out what's wrong. Again, sorry for being a nuisance.

#13 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 20 April 2005 - 03:19 AM

If it's NPC-NPC banter, your life will be much simpler with a CHAIN.

CHAIN TIVA S1 ~blah~ // tiva's s1
== ISAJ ~blah~ // isaj's s2
== TIVA ~blah~ // tiva's s3
// more if necessary
END

You could continue adding to the CHAIN as long as you needed, and you can end the dialogue, send it to another dialogue state, or offer PC replies as needed at the end of the CHAIN.

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#14 Essande

Essande
  • Member
  • 16 posts

Posted 20 April 2005 - 04:01 AM

Thanks CamDawg but I found the problem with my old code and fixed it. It installs now. Thanks.