Jump to content

RE dlg files


Crimpson

Recommended Posts

so i'm really getting into this whole scripting thing. I just started though.

I really want to take a look at how some of the RE characters were scripted, for examples on how to do some things. so i open my cmd prompt with the game directory already set, i type: weidu <charname>.dlg to decompile and get a .d file. weidu wont find the dlg file. am i doing it right? What's the best way to go about viewing these scripts, so i can get a better understanding on how to make a similar script?

Link to comment

Well the easiest way to look through the dialogue files is to go to your BG2 directory then into the Romantic Encounters folder (whatever it's called) and you can look at the .d files there. However, they may be translated which makes it a bit harder to read.

Link to comment
Yeah, those .d files dont hold any of the dialogue, just variables and such, and i don't understand yet what they all reference to. where's the actual dialogue?

 

They kind of do. What those files include are the structure of the dialogues, which references the actual lines

e.g, you could have a block of text in foo.d that says:

IF ~~ BEGIN introduction
SAY @5
IF ~~ THEN REPLY @6 goto i_hate_you
IF ~~ THEN REPLY @7 goto i_wuv_you
END

Then in foo.tra you have the English translation of the lines that says:

@5 = ~So, do you fancy a shag?~
@6 = ~Fuck off and die in a pit of rabid crocodiles you horny bastard.~
@7 = ~Sure, why not.  I've got ten minutes...~

With the two of these you can figure out what the actual dialogues says in English:

IF ~~ BEGIN introduction
SAY ~So, do you fancy a shag?~
IF ~~ THEN REPLY ~Fuck off and die in a pit of rabid crocodiles you horny bastard.~ goto i_hate_you
IF ~~ THEN REPLY ~Sure, why not.  I've got ten minutes...~ goto i_wuv_you
END

i.e., the character propositions the player and the player can choose one of two options, the nice or the not so nice one.

 

However, for someone new to coding it's a bit of a bitch to read dialogues once they've been translated like this. If you just want a general look at the structure of dialogues I'd suggest theacefes' NPC making tutorial or feel free to have a look through the code for my Tyris Flare NPC (as I haven't got around to translating it yet - so all the dialogues look like that third style i.e., no @s to be seen, just readable dialogue)

Link to comment
Yeah, those .d files dont hold any of the dialogue, just variables and such, and i don't understand yet what they all reference to. where's the actual dialogue?

 

There should be folders labeled for languages as well (english, german, spanish ...). Open the language you want and you should get the complete lines that your looking for. The .d files are using referense #'s to pull the proper lines up when called for in the game. I have not actually checked out the RE folders but this is how I've seen it set up in many other Mod.

 

Edit:Never mind Grim already answered and I didn't realize that it would be more confusing with the different language translations as Grim describes.

Link to comment
so... where are the tra files they reference to? they're not in the RE folder, and i dont know yet where else they would be.

 

They'll either be in RE/English or RE/Translations/English (or something like that). The filenames should always match up i.e., for blah.d you'll want blah.tra.

 

Have fun :blush:

Link to comment

Archived

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

×
×
  • Create New...