Jump to content


Photo

Where is the script file that deals with the journal?


28 replies to this topic

#1 squareinc

squareinc
  • Members
  • 18 posts

Posted 16 February 2017 - 05:52 PM

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



#2 Roxanne

Roxanne
  • Modders
  • 1500 posts
  • Gender:Not Telling

Posted 17 February 2017 - 01:36 AM

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


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*


#3 squareinc

squareinc
  • Members
  • 18 posts

Posted 17 February 2017 - 10:40 AM

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.



#4 Roxanne

Roxanne
  • Modders
  • 1500 posts
  • Gender:Not Telling

Posted 17 February 2017 - 10:48 AM

 

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


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*


#5 argent77

argent77
  • Modders
  • 681 posts
  • Gender:Male

Posted 17 February 2017 - 11:23 AM

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.



#6 squareinc

squareinc
  • Members
  • 18 posts

Posted 17 February 2017 - 11:24 AM

 

 

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?



#7 squareinc

squareinc
  • Members
  • 18 posts

Posted 17 February 2017 - 11:26 AM

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.



#8 squareinc

squareinc
  • Members
  • 18 posts

Posted 17 February 2017 - 11:41 AM

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.

Attached Thumbnails

  • 20170217_154510.jpg


#9 argent77

argent77
  • Modders
  • 681 posts
  • Gender:Male

Posted 17 February 2017 - 12:08 PM

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.



#10 squareinc

squareinc
  • Members
  • 18 posts

Posted 17 February 2017 - 12:17 PM

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.  



#11 squareinc

squareinc
  • Members
  • 18 posts

Posted 17 February 2017 - 12:23 PM

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.


Edited by squareinc, 17 February 2017 - 12:25 PM.


#12 argent77

argent77
  • Modders
  • 681 posts
  • Gender:Male

Posted 18 February 2017 - 04:31 AM

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.



#13 squareinc

squareinc
  • Members
  • 18 posts

Posted 18 February 2017 - 06:44 AM

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!



#14 argent77

argent77
  • Modders
  • 681 posts
  • Gender:Male

Posted 18 February 2017 - 07:04 AM

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.



#15 squareinc

squareinc
  • Members
  • 18 posts

Posted 18 February 2017 - 07:18 AM

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. 





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users