Jump to content

A puzzle with UI strings


DavidW

Recommended Posts

OK, I'm confused.

 

I want to change some of the text in the UI. As an illustration (this isn't my actual use case), suppose I wanted to change the description of the difficulty slider from "Difficulty" to "SCS settings". In vanilla BG2, that's fairly straightforward: that string is hardcoded to dialog.tlk string 11314, so you just use STRING_SET to change that string. (I did that lots in IWD-in-BG2.)

 

 

For EE I thought this would be easier, because so many engine strings are (apparently!) externalised to ENGINEST.2DA. For instance, in that file we find

 

STRREF_GUI_MIXED_DIFFICULTY_DIFFICULTY                   11314	
Changing that to a new strref ought to do it?

 

... no. The in-game string doesn't change at all, whatever I set the enginest.2da entry to.

 

OK, thought I, let's go back to the old method and change the 11314 string with STRING_SET. That's less elegant, but ought to work fine.

 

... no. And this is really peculiar, because the engine is displaying a string even though that string *no longer exists in dialog.tlk*.

 

(And yes, I checked to make sure it wasn't duplicated under a different strref.)

 

At this point, I'm really very confused. It's possible I'm doing something completely stupid and not noticing it, but if not, the game is storing text somewhere other than dialog.tlk. My best guess is that at the time the game is initially installed and you choose the language, it reads enginest.2da and dumps all the strings into some kind of hardcoded store, for speed. But despite a fair amount of digging, I can't find any sign of that store.

 

... any ideas? Any insight from someone who knows the innards of the EE engine? By now, I'm as much interested in the abstract puzzle as in the implications for the small task I was trying to do.

Link to comment

The contents of some UI strings are kept in L_xx_xx.lua files, where xx_xx is the international language label. English is L_en_US.lua, for example. ui,menu builds the actual UI, and will refer to the symbols in L_xx_xx.lua to retrieve the actual text used in the UI. I believe you're looking for, specifically, DIFFICULTY_LABEL.

 

The reason why this was done is that (on the BD development side) we now have one, central repository for the devs and translators that gets farmed out to the individual games as they're built.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...