Jump to content

Newbie Question


Recommended Posts

Hi Guys and Gals,


I have what is probably a newbie question relating to Dialogs, etc.


Some background first. I'm working on an IWD2 that does a number of things, but first and foremost, adds in a considerable number of new items and merchants. The problem that I'm having at the moment is in the D file for my bowyer NPC.


I want to add a "DO ~AddXpVar("Level_9_Easy",strref_num)" command to award some experience. I know that a strref# goes where I've placed "strref_num", but how do I get the actual string into TLK file? I know that basics of SAY and REPLY commands and using variables linking to the actual strings in the TRA files. But I haven't seen an example of this actual action, I've looked at the WeiDU readme, but frankly it's so large that it's overwhelming for me, if I can't simply do a Find on some command or string fragment to point me in the right direction.


I want the string in question to say something simple like "You have retrieved the Bowyer's new bowstring from Carynara."


I'm just confused because I understand that this action is expecting a strref, not an actual string, and I don't know how to get the actual string loaded into the TLK file.


If there's a specific tutorial or example that can help me, please point the way. Or post the instructions I need directly. I know that I could assign the XP more directly, but this AddXpVar seems to be a more commonly used action in the IWD2 DLG files, so I thought that I'd follow the apparant convention, if possible.



Link to comment

There are two ways,


DO ~AddXpVar("Level_9_Easy",~You have retrieved the Bowyer's new bowstring from Carynara~)


or DO ~AddXpVar("Level_9_Easy",@01)


@01 is defined in .tra.


When weidu compiles your .d file, your strings are added into the dialog.tlk. Basically it's same as with SAY and REPLY.

Link to comment

Thanks, Razfellow and Domi.


I was wondering if a mere @x variable replacement would suffice, but I hadn't seen any examples of Actions with their strref parameters being filled with a variable like SAY and REPLY's.

Link to comment


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

  • Create New...