Jump to content

Please clarify the TP2 file for me


WarChiefZeke

Recommended Posts

Hopefully my last problem- my npc approaches me as they should, but can not get them to actually talk. I have the original greeting and post dialogues attached to the cre file, and also appended to pdialog.2da in my TP2, and my script looks like this:

IF
See([PC])
NumTimesTalkedTo(0)
THEN
RESPONSE #100
Dialogue([PC])
END

Link to comment

2DA dialog tables are only used when character joins/leaves, until then it's whatever they have in the dialog field.

So, possible causes are:

1) you don't actually have the correct dialog assigned to CRE (hover cursor over it and CTRL-M to check)

2) dialog state has invalid trigger conditions

3) dialog has been compiled as a different resource name

Link to comment

Yep...CTRL M is showing dialog as "multig" which certainly isn't mine. The script i assigned is showing up just fine.

 

so I have only four dialog files- one for the initial encounter and if they come back but didnt ask to join the first time, one for when they are asked to leave the party, all dialogues with the PC, and all banters with the NPCs. I know the npc banter is appended at the bottom in interdia, but what should be compiled, and what should be put in pdialog? the join party file goes onto the cre, correct?

 

i'm sorry i've flooded this board with questions, but you've solved a lot of my problems i've struggled with so far, and now i'm so close to getting this done i can almost taste it!

Link to comment

Well, seems like it's using the J file dialog when not in party according to CTRL M, which is odd as NearInfinity is saying it has the correct file attached. Then getting a generic one when actually in party still. Putting all my greeting files into J, just for funsies, makes a conversation actually work as planned for the first time ever which is a relief, I suppose. This is my revised TP2, have i made an error?

 

 

COMPILE ~Ishlilkamod/Dialogues/ishyhi.d~
COMPILE ~Ishlilkamod/Dialogues/IshyJ.d~
COMPILE ~Ishlilkamod/Dialogues/BISHY.d~
COMPILE ~Ishlilkamod/Dialogues/ishyP.d~



COMPILE ~Ishlilkamod/Scripts/ishyscrp.baf~

// Adding her location

EXTEND_TOP ~_AR2300.bcs~ ~Ishlilkamod/Scripts/FW2300.baf~

COPY ~Ishlilkamod/Portraits/IshlilS.bmp~ ~override/IshlilS.bmp~
COPY ~Ishlilkamod/Portraits/IshlilM.bmp~ ~override/IshlilM.bmp~

APPEND ~pdialog.2da~
~#Ishy ishyhi IshyJ IshyP~
UNLESS ~#Ishy~

APPEND ~interdia.2da~
~#Ishy BISHY~
UNLESS ~#Ishy~

Link to comment

Well, seems like it's using the J file dialog when not in party according to CTRL M, which is odd as NearInfinity is saying it has the correct file attached. Then getting a generic one when actually in party still. Putting all my greeting files into J, just for funsies, makes a conversation actually work as planned for the first time ever which is a relief, I suppose. This is my revised TP2, have i made an error?

 

 

COMPILE ~Ishlilkamod/Dialogues/ishyhi.d~ //- you assign this in the CRE file (at offset 2cc or field called Dialog)

COMPILE ~Ishlilkamod/Dialogues/IshyJ.d~ // This is the dialogue when in party as defined in pdialog.2da

COMPILE ~Ishlilkamod/Dialogues/BISHY.d~// This is the dialogue when in party and NPC/NPC dialogue (triggered by Interact command or time) defined in interdia.2da

COMPILE ~Ishlilkamod/Dialogues/ishyP.d~ // This is the dialogue when kicked out as defined in pdialog.2da

 

 

 

COMPILE ~Ishlilkamod/Scripts/ishyscrp.baf~

 

// Adding her location

 

EXTEND_TOP ~_AR2300.bcs~ ~Ishlilkamod/Scripts/FW2300.baf~

 

COPY ~Ishlilkamod/Portraits/IshlilS.bmp~ ~override/IshlilS.bmp~

COPY ~Ishlilkamod/Portraits/IshlilM.bmp~ ~override/IshlilM.bmp~

 

APPEND ~pdialog.2da~

~#Ishy ishyhi IshyJ IshyP~ // #Ishy is the Script Name defined in the CRE file (at offset 280) // ishyhi is defined in CRE file (see above) and not here

UNLESS ~#Ishy~

 

So it should look like this

 

APPEND ~pdialog.2da~

~#Ishy ishyhishyP IshyJ I IshyD~ // IshyD is the name of a script file (Baf) you can use to trigger talks when the party goes to rest (at inn or via sleep button - you can define it here or put *****, it is an option - I propose to define it even if you do not have the file already, it does not hurt and you may want to use it one day)

UNLESS ~#Ishy~

 

APPEND ~interdia.2da~

~#Ishy BISHY~

UNLESS ~#Ishy~

See red and green annotations

 

The banter joined and parting dialogues are automatically replacing the dialogue file defined in the cre file at the moment the NPC joins.

The J file is triggered by commands like Dialogue...like in your meeting script

The B file is triggered by commands like Interact (there is also a hidden time trigger for non scripted banters that starts them at random if conditions are met)

The P file automatically replaces J if the creature was in party and is kicked out.

This is the default behaviour which you can overwrite by script commands (but that may be for advanced tutorial and not needed today).

 

(And you can call all of the above files by whatever name you like as long as you follow the pattern outlined above,e.g. you can put all dialogue in a single file, you just have to specify it in interdia and pdialog.)

Link to comment

It all works now! After I organized the files correctly, the intro started as planned, the timed dialogues started as planned, checking the script showed all variables active and working.

 

I can not thank you all enough for walking me through these issues, and with what i've learned hopefully adding this NPC to the rest of the series of games will be less of a technical hassle.

 

Now that it all works, I just want to refine it as much as possible before I release it :)

 

"IshyD is the name of a script file (Baf) you can use to trigger talks when the party goes to rest (at inn or via sleep button - you can define it here or put *****, it is an option"

 

do you have a sample of that code, if possible? I have timed conversations for in between certain chapters and for other events, but I didn't know how to create that one. Also, it's a script file that goes into the pdialog?

Link to comment

It all works now! After I organized the files correctly, the intro started as planned, the timed dialogues started as planned, checking the script showed all variables active and working.

 

I can not thank you all enough for walking me through these issues, and with what i've learned hopefully adding this NPC to the rest of the series of games will be less of a technical hassle.

 

Now that it all works, I just want to refine it as much as possible before I release it :)

 

"IshyD is the name of a script file (Baf) you can use to trigger talks when the party goes to rest (at inn or via sleep button - you can define it here or put *****, it is an option"

 

do you have a sample of that code, if possible? I have timed conversations for in between certain chapters and for other events, but I didn't know how to create that one. Also, it's a script file that goes into the pdialog?

You create the talk you want before going to sleep just like normal, e.g. in your J or B file. Instead of putting the trigger into your override script, you put it into D. This means that in addition to other conditions you set, there is an automatically added condition that the party goes to rest.

Here an example from my own mod

IF

InParty("CVSandr")

Global("SanDreamTalk","GLOBAL",0)

AreaType(OUTDOOR)

!StateCheck(Player1,CD_STATE_NOTVALID)

RealGlobalTimerExpired("SanDreamTalkTime","GLOBAL")

!AreaType(CITY) //this triggers when the party goes to rest outside but not in a city and after the PC is in the party already for some time (the timer was set earlier by the override script)

THEN

RESPONSE #100

SetGlobal("SanDreamTalk","GLOBAL",1)

RealSetGlobalTimer("SanDreamTalkTime","GLOBAL",SANROM_TIMER) //This resets the timer again for some next banter in the future, probably in a couple of game days

Interact("CVSandr") // In this case the talk to be executed is in my B file (Interact), it is the talk with the trigger Global("SanDreamTalk","GLOBAL",1), the dialogue will set the global to 2 so it does not repeat.

END

Link to comment

Hi everyone, i'm back.

 

Progress on this mod has been slow but steady, quests are completed and functional at this point, and writing the A.I scripts to be challenging was a lot of fun and something I hope to do a lot more of when I add this NPC and associated quests to other installments.

 

Now with a bit of free time on my hands I have the opportunity to buckle down and iron out the details I want added in before releasing it. And again i've hit some problems i'm having difficulty figuring out myself, and again i'm pretty sure it has to do with this darn TP2.

 

This time, I hit a problem adding a custom soundset for her to the game. The result has been to not add the soundset, and give me an Invalid: numbers message in the Name and Bio sections upon spawning this NPC.

 

My method has been to copy the sound files from my folder into the override, and then assign those sounds to the actions they are associated with, with [] brackets. an example:

 

SAY CRITICAL_HIT ~This ends now!~ [i!ishcrit]

 

The files are in .wav, in case that is the issue.

 

Also, this doesn't have to do with the above problem, but is there a method of scripting a voice sound to play when events happen such as a level up, or upon use of a specific item? Just wondering how much level of detail is possible here.

Link to comment

Can you attach the actual TP2? It sounds like you're doing the right thing.

 

As for playing sounds via script, there is a PlaySound script action that takes a single parameter: the sound file you want to play, without the .wav extension.

 

As for playing sounds on activation of an ability on an item, there is an opcode to play a sound effect, which works similarly, but the length of the sound file (not counting .wav extension, which you omit here too) is limited to 8 characters.

 

Look for "sound" in the actions and effects sections of the IESDP here: https://gibberlings3.github.io/iesdp/main.htm

Link to comment

Here's the relevant bit. It does seem to be in order from all that i've read, making it all the more confusing.

COPY ~Ishlilkamod/Characters/#Ishy.cre~ ~override/#Ishy.cre~
COPY ~Ishlilkamod/Sounds~ ~override~

SAY BIO ~Ishlilka acts surprised that you are interested in her past at all. The young half orc says she is here to prove to her father she is worthy as a mage hunter, and beyond that, little else. ~
SAY NAME1 ~Ishlilka~
SAY MORALE ~I underestimated this foe...I must fall back.~ [i!ishflee]
SAY HAPPY ~I'm glad I joined up with you, this group is honorable.~
SAY LEADER ~Hm, a band of mercenaries under my control...this should be interesting.~ [i!ishlead]
SAY TIRED ~My mind and body need sleep...believe me, you'll not want to deal with me without it.~ [i!ishtired]
SAY BORED ~Have all our tasks been completed?~ [i!ishbored]
SAY BATTLE_CRY1 ~~ [i!ishbattle1]
SAY BATTLE_CRY2 ~United, we are invincible!~ [i!ishbattle2]
SAY BATTLE_CRY3 ~None can stand against me!~
SAY BATTLE_CRY4 ~~
SAY BATTLE_CRY5 ~~
SAY DAMAGE ~~ [i!ishow]
SAY DYING ~~ [i!ishdeath]
SAY HURT ~Please....help me.~ [i!ishurt]
SAY AREA_FOREST ~The scenery is nice, but shouldn't be push on?~ [i!ishforest]
SAY AREA_CITY ~~
SAY AREA_DUNGEON ~Stay together, everyone. And be prepared.~
SAY AREA_DAY ~What a beautiful day.~
SAY AREA_NIGHT ~Let's keep on alert. Who knows what could sneak up on us.~
SAY SELECT_COMMON1 ~I'm listening~ [i!ishs1]
SAY SELECT_COMMON2 ~I'm here.~ [i!ishs2]
SAY SELECT_COMMON3 ~What would you like?~ [i!ishs3]
SAY SELECT_COMMON4 ~Hm?~ [i!ishs4]
SAY SELECT_COMMON5 ~Yes?~ [i!ishs5]
SAY SELECT_COMMON6 ~~
SAY SELECT_ACTION1 ~If it pleases you.~ [i!ishact1]
SAY SELECT_ACTION2 ~I'm there.~ [i!ishact2]
SAY SELECT_ACTION3 ~If you'd like.~ [i!ishact3]
SAY SELECT_ACTION4 ~Uh-huh.~ [i!ishact4]
SAY SELECT_ACTION5 ~It will be so.~ [i!ishact5]
SAY SELECT_ACTION6 ~Yes?~
SAY SELECT_ACTION7 ~I hear ya.~
SAY CRITICAL_HIT ~This ends now!~ [i!ishcrit]
SAY CRITICAL_MISS ~Ah, stand still!~
SAY TARGET_IMMUNE ~Not working! Do we have another plan?~
SAY INVENTORY_FULL ~I can't carry this, sorry.~
SAY SELECT_RARE1 ~~
SAY SELECT_RARE2 ~~
SAY REACT_TO_DIE_GENERAL ~No! I'll not let your death be in vain.~ [i!ishdeathr]

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...