Jump to content

Where is the script file that deals with the journal?


squareinc

Recommended Posts

Hi all,

 

I've been tinkering with BG 2 and I want to make some adjustments to the journal. Right now, I know that the game automatically creates a date stamp every time you have a quest added to the journal. I'm trying to find out where the code for this might be. I want to move the date stamp a bit lower from the title of the quests you receive. I hope this makes sense.

 

If anyone can help me locate the code or function declaration page where the formatting of the journal is handled I would really be grateful. Thank you for reading :)

Link to comment

Depends on which game you target *old BG* or *EE*, it is handled on the GUI level but quite differently depending on the platform.

 

I'm using old BG2. Do you know where I could find the code that makes the game but a date stamp after the first line of a journal entry. For example, when you get a quest it will appear in the journal 'Find missing teddy for child' then there would be the date stamp: Day 15 (Month) 1364. After this it will have the description of the quest. I can't seem to find the code that adds all of this.

Link to comment

 

Depends on which game you target *old BG* or *EE*, it is handled on the GUI level but quite differently depending on the platform.

 

I'm using old BG2. Do you know where I could find the code that makes the game but a date stamp after the first line of a journal entry. For example, when you get a quest it will appear in the journal 'Find missing teddy for child' then there would be the date stamp: Day 15 (Month) 1364. After this it will have the description of the quest. I can't seem to find the code that adds all of this.

 

Sorry but no - not for old BG2, I guess very few people will know that. Those things are not easily accessible in the old game (but have been changed for the EE games, so they are no longer in the baldur.exe code itself.)

 

Hope that some of the *old* experts read this...

Link to comment

It's most likely one of the many string references that are hardcoded into the game executable. You can find it out by enabling strrefs with the following console command:

CLUAConsole:StrrefOn()

The string itself can be modified by WeiDU script or in a resource editor such as NI or DLTCEP.

Link to comment

 

 

Depends on which game you target *old BG* or *EE*, it is handled on the GUI level but quite differently depending on the platform.

 

I'm using old BG2. Do you know where I could find the code that makes the game but a date stamp after the first line of a journal entry. For example, when you get a quest it will appear in the journal 'Find missing teddy for child' then there would be the date stamp: Day 15 (Month) 1364. After this it will have the description of the quest. I can't seem to find the code that adds all of this.

 

Sorry but no - not for old BG2, I guess very few people will know that. Those things are not easily accessible in the old game (but have been changed for the EE games, so they are no longer in the baldur.exe code itself.)

 

Hope that some of the *old* experts read this...

 

 

I hope some of the old experts read it too then. But you're saying that it might be embedded in the exe file itself?

Link to comment

It's most likely one of the many string references that are hardcoded into the game executable. You can find it out by enabling strrefs with the following console command:

CLUAConsole:StrrefOn()

The string itself can be modified by WeiDU script or in a resource editor such as NI or DLTCEP.

 

Thank you! I will try this and see if I can find anything.

Link to comment

It's most likely one of the many string references that are hardcoded into the game executable. You can find it out by enabling strrefs with the following console command:

CLUAConsole:StrrefOn()

The string itself can be modified by WeiDU script or in a resource editor such as NI or DLTCEP.

 

 

So I found the refs for the date stamps I think. It's 15980 15981 and 15944. I've attached a picture, if that helps (the game is slightly modded). I couldn't find the refs in Near Infinity though. Do you have any advice on where I can find the reference? Thank you again.

post-9686-0-81880500-1487360749_thumb.jpg

Link to comment

Open the String Editor in NI (Edit -> Dialog.tlk or Ctrl+S). Enter the number into the StrRef input field and press Enter. You should see a line with lots of <tokens> that are replaced by actual text in the game.

 

Okay I've found it, thank you. Do you know where the script that would actually add this reference to the journal be? For example, the quest reference would be added to the journal when you get a quest and the scripts for the quests can be found (partially) in the BSC files. I want to locate the little line of code that says for each new entry in the journal, insert string ref 15980.

Link to comment

Open the String Editor in NI (Edit -> Dialog.tlk or Ctrl+S). Enter the number into the StrRef input field and press Enter. You should see a line with lots of <tokens> that are replaced by actual text in the game.

 

It might be helpful to also explain what I want to do. From the picture I sent, you can see the red line that is the title of each quest (eg Trouble at the Tradesmeet). I realise that the first line of each quest entry will always be this red line. If I edit the quest blurb and break up the first sentence into two lines (I press enter, not just a fullstop) then only the first line is red.

 

My problem is that the red line does not word wrap. The regular black text will word wrap, but the red line will always be one horizontal line of text and sometimes it will be cut off if the entry is too long. Ive checked out the UI in DLTCP, and both the red line of text and regular writing uses the same text box. The black text of course will word wrap. I want to see if I can fiddle with the code that adds the date stamp right after the first line (the red line) and give it more space so that maybe it can word wrap or something. I want to see if I can stop it from being cut off if the first sentence of the journal entry is too long.

Link to comment

I can't really help you further in this regard as GUI modding is not my field of expertise. The GUI is generally very hard to modify in the original games. I think you're on the right track by modifying UI files in DLTCEP though.

 

You were really helpful though! Thanks a lot! I'll try to mess with the GUI some more and see where it leads. Do you know where the games script files are held though? I know the BCS files are script files, but do you know where else any other code, or scripts might be stored? I know a poster above said some of it might be stored in the baldur.exe itself. Would you have any idea how to edit/open that? I think TobEx did it for some of its stuff. Thanks again!

Link to comment

There are no more script files except for BCS. GUI layout and other stuff is controlled by binary files of various types. For example, UI files are binary files with .CHU extension. Near Infinity provides a simple CHU viewer to see what it may look like in the game. The CHUI format itself is described in IESDP. Graphics files used by the GUI are usually of BAM or MOS format.

Link to comment

There are no more script files except for BCS. GUI layout and other stuff is controlled by binary files of various types. For example, UI files are binary files with .CHU extension. Near Infinity provides a simple CHU viewer to see what it may look like in the game. The CHUI format itself is described in IESDP. Graphics files used by the GUI are usually of BAM or MOS format.

 

Thank you! I will try to see what I can do.

Link to comment

Archived

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

×
×
  • Create New...