Jump to content


Photo

Please clarify the TP2 file for me


74 replies to this topic

#16 WarChiefZeke

WarChiefZeke
  • Members
  • 43 posts

Posted 23 November 2016 - 04:03 PM

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
 



#17 WarChiefZeke

WarChiefZeke
  • Members
  • 43 posts

Posted 23 November 2016 - 05:22 PM

forcing them into my party through CTRL-Q gives me a generic dialogue, so i'm assuming the join/post party dialog is mis assigned?

 

do the talk files in interdia need to go in a specific order?



#18 Ardanis

Ardanis

    A very GAR character

  • Modders
  • 2498 posts
  • Gender:Male
  • Location:Saint-Petersburg, Russia

Posted 23 November 2016 - 06:03 PM

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


"Uguu~ Boku Ayu."

Before you start breaking wall tiles with your bare fists, ask yourself first - do you truly need it?

#19 WarChiefZeke

WarChiefZeke
  • Members
  • 43 posts

Posted 23 November 2016 - 06:53 PM

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!



#20 agb1

agb1
  • Modders
  • 410 posts
  • Gender:Male

Posted 23 November 2016 - 07:01 PM

This is a helpful resource: https://gibberlings3.github.io/iesdp/ (this is more up-to-date than the other IESDP, I believe)

The relevant reference page is here: https://gibberlings3...tob/pdialog.htm

And a tutorial is here: http://gibberlings3....showtopic=15833

BiG World Fixpack (community collection of mod fixes and compatibility patches, with user-friendly cross-platform script)

 

BiG World Setup (tool to automate best-practice installation of Infinity Engine mods on Windows, with conflict analysis)

Latest version:    https://bitbucket.or.../get/master.zip


#21 WarChiefZeke

WarChiefZeke
  • Members
  • 43 posts

Posted 23 November 2016 - 09:06 PM

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~



#22 Roxanne

Roxanne
  • Modders
  • 1153 posts
  • Gender:Not Telling

Posted 23 November 2016 - 10:57 PM

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.)


Edited by Roxanne, 24 November 2016 - 12:44 AM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*


#23 agb1

agb1
  • Modders
  • 410 posts
  • Gender:Male

Posted 24 November 2016 - 12:25 AM

Shouldn't the PDIALOG order be ScriptName(DV) P.dlg J.dlg D.dlg? (DV P J D, not DV J P D)

BiG World Fixpack (community collection of mod fixes and compatibility patches, with user-friendly cross-platform script)

 

BiG World Setup (tool to automate best-practice installation of Infinity Engine mods on Windows, with conflict analysis)

Latest version:    https://bitbucket.or.../get/master.zip


#24 Roxanne

Roxanne
  • Modders
  • 1153 posts
  • Gender:Not Telling

Posted 24 November 2016 - 12:44 AM

Shouldn't the PDIALOG order be ScriptName(DV) P.dlg J.dlg D.dlg? (DV P J D, not DV J P D)

Yes, corrected, too much colours...sorry


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*


#25 WarChiefZeke

WarChiefZeke
  • Members
  • 43 posts

Posted 24 November 2016 - 09:09 AM

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?


Edited by WarChiefZeke, 24 November 2016 - 09:12 AM.


#26 Roxanne

Roxanne
  • Modders
  • 1153 posts
  • Gender:Not Telling

Posted 24 November 2016 - 09:43 AM

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


Edited by Roxanne, 24 November 2016 - 09:45 AM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*


#27 WarChiefZeke

WarChiefZeke
  • Members
  • 43 posts

Posted 21 December 2016 - 03:40 PM

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.


Edited by WarChiefZeke, 21 December 2016 - 03:41 PM.


#28 agb1

agb1
  • Modders
  • 410 posts
  • Gender:Male

Posted 21 December 2016 - 03:49 PM

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.../iesdp/main.htm


BiG World Fixpack (community collection of mod fixes and compatibility patches, with user-friendly cross-platform script)

 

BiG World Setup (tool to automate best-practice installation of Infinity Engine mods on Windows, with conflict analysis)

Latest version:    https://bitbucket.or.../get/master.zip


#29 WarChiefZeke

WarChiefZeke
  • Members
  • 43 posts

Posted 21 December 2016 - 04:22 PM

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]

 



#30 WarChiefZeke

WarChiefZeke
  • Members
  • 43 posts

Posted 21 December 2016 - 04:29 PM

i've read about opcodes on a few threads here, but i have no idea what they actually are or how to use them.





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users