Jump to content

PIDs - how to code them?


Zireael07

Recommended Posts

You have to create a dialogue at the bottom of your KhalidJ.d file. It's like a banter, but it has to be "active" all the time, every time you click on Khalid. So, it should either begin with

 

IF ~True()~ KhalidPID

SAY ~(You decide to speak with Khalid. He is near you now.)~

++ ~Hello, Khalid!~ + KhalidPID1

++ ~Never mind.~ EXIT

END

 

However, I recommend using a variable instead of True(), because you may use different PIDs for different situations. For example, when Khalid joins you, set a variable MYPREFIXKhalidPIDSet=1(read about modding prefixes!) and use

 

IF ~Global("MYPREFIXKhalidPIDSet","GLOBAL",1)~ KhalidPID

SAY ~(You decide to speak with Khalid. He is near you now.)~

++ ~Hello, Khalid!~ + KhalidPID1

++ ~Never mind.~ EXIT

END

 

And then, in the Underdark, set it to 2 in his script and use:

 

IF ~Global("MYPREFIXKhalidPIDSet","GLOBAL",2)~ KhalidPID

SAY ~(Khalid regards the surroundings nervously. The caverns are definitely not to his liking.)~

++ ~So, how do you like the Underdark?~ + KhalidPID1

++ ~Never mind.~ EXIT

END

 

Remember, these states should be on the BOTTOM of your J file, AFTER all other Khalid dialogues that use his KhalidJ file, otherwise your PIDs will turn up instead of banters.

Link to comment

By the way, if you do make PIDs for Jaheira, they will certainly be incompatible with NPC Flirt Pack and a number of other mods, since Jaheira is a Bioware NPC, and others already made some PIDs for her. So, I would recommend making PIDs for Jaheira an optional component at the very least, and make them available only if she's not in romance with the PC(if Khalid is dead permanently). Then it may work.

Link to comment

Preliminary PIDs. Not Quite PDAs. But They Will Be, PDQ., PlayerInitiatedDialogs. PublicDisplaysofAffection. PrettyDarnedQuick. in Aran Whitehand does a step-by-step PID build.

 

For examples of existing mods that do good implementations in this area, quoting from the same thread,

...That being said, for the most comprehensive use/abuse of this system, try checking out PID coding in Jastey's Ajantis in BG1NPC, and to a lesser but as detailed extent Domi's SharTeel PID in the same mod. Other notable PIDs to research: for clean and efficient structuring, Kulyok's Xan and Angelo PID coding (in Xan especially, she separates a series of PIDs off and builds "leveling" menus and submenus that tailor the PID and available responses with an efficiency that is not present in any other PID currently publicly released). Berelinde's Gavin PID (she extends options, reactions, and gives the most comprehensive commenting out there so it is easy to follow most of her files) can give you a good handle on how the structure works, and for the simplest and easiest to understand PID, chose any of JCompton's Flirtpack entries. They are not called PIDs, probably because they (I think) predated the idea. But as we talked about in Flirts, each component of the FlirtPack adds a clean, simple PID.

 

Underdark PID follow-up here.

 

I would avoid adding anything to Jaheira in PID form - an easier way to get around compatibility issues with the existing Flirtpack material is to use Khalid's PID to set a variable and then have it enable or trigger a response from Jaheira. Or, do something wild like Amber and Solaufein do, and set up a script block that temporarily switches to a unique dialog file for the purposes of that particular talk, then switches back; but that is much more complicated.

Link to comment

Thank you all for replies (and the link! - I'm off to read it)

 

By the way, if you do make PIDs for Jaheira, they will certainly be incompatible with NPC Flirt Pack and a number of other mods, since Jaheira is a Bioware NPC, and others already made some PIDs for her. So, I would recommend making PIDs for Jaheira an optional component at the very least, and make them available only if she's not in romance with the PC(if Khalid is dead permanently). Then it may work.

 

Which mods are those (for reference)?

I'll ask my testers if it would be possible to disable Jaheira's flirts from Flirt Pack (they make no sense, since she's romancing Khalid not CHARNAME) as an optional crossmod component (like the alternate dialogue for "Wychowanek Goriona" mod).

 

Khalid's PID enabling responses/comments from Jaheira is a great idea!

Link to comment

You'll have to browse all NPC-related mods that offer new dialogues/reactions to Jaheira's J file without a WEIGHT command, including quest mods. You might find quite a few, I'm afraid. (Or not - to my knowledge only Imoen Romance added a WEIGHT-less reaction to Aerie, and it brought no end of bug reports when NPC Flirts was installed).

 

I was about to offer Khalid-Jaheira chain, too, but that won't work properly, because, well, you want to talk to Jaheira, not her husband. What if you want to talk to Jaheira *about* her husband? But it's probably the best option there is.

Link to comment
The PID are mostly done and they work... with one tiny exception.

 

Okay, how do I make a line with PC saying 'Okay, I don't want to talk to you right now' upon which the dialogue closes? I can't get that one thingy to work, whatever I try...

 

Never mind, I found out myself.

Link to comment

Archived

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

×
×
  • Create New...