Hi @Iroumen, may I please ask for some guidance? How do I publish an additional list to the tabs? It seems like that is my problem now, I got the attribute scores to show back up by changing it to listItems = at the top, and that works for tabs 1 and 2. Unfortunately when the next listItems comes in on tab 3 and the other tabs I lose the attribute scores. It seems like I need to change the attributes scores list to something else so it doesn't interfere with anything else but I can't quite get the trick of that. I saw "otherlist" and I tried copying it to a new block and naming it "listattr" but that didn't work out either.
Finally figured out how to get past this, well somewhat. There can be several listItems but they can't step on each other. On some tabs I had to put the attribute list block first, and on some it went last.
One note that should help out as well, if you run the exe from the command line, you'll end up seeing a bunch more log details, including if you've got some exceptions in your lua.
In particular, you should see the output of
print_r(characters)
which should print out the whole characters table which would show you all the possible information about a character you could possibly see.
About the comment about the mage book size, we adjust the side of some elements programatically. Some of the items also have a name field. We didn't name most of the elements because they are not referenced, but the ones that do have a name are probably referenced elsewhere.
If you search the UI.menu for that name you will find the other places that may adjust it.
Since I am having problems right now I tried this but pretty cryptic so far. I didn't see the print_r(characters) output anywhere, is there any way to log it to a file? Even with the cmd prompt set to 9999 lines it gets filled up before I can click back to the other screen to stop it. Thanks!
I managed to stop the output finally. I don't see print_r(characters) anywhere unfortunately.
C:\Program Files (x86)\Steam\steamapps\common\Baldur's Gate II Enhanced Edition>INFO: status: 0
INFO: Creating DPWrapper
Setting breakpad minidump AppID = 257350
Steam_SetMinidumpSteamID: Caching Steam ID: 76561198291464780 [API loaded no]
INFO: scanning:(0) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/override
INFO: scanning:(1) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/scripts
INFO: scanning:(2) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/sounds
INFO: scanning:(3) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/lang/en_US/sounds
INFO: scanning:(4) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/portraits
INFO: scanning:(5) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/characters
INFO: scanning:(6) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/movies
INFO: scanning:(7) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/lang/en_US/movies
INFO: scanning:(8) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/override
INFO: scanning:(9) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/scripts
INFO: scanning:(10) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/sounds
INFO: scanning:(11) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/portraits
INFO: scanning:(12) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/characters
INFO: scanning:(13) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/movies
INFO: scanning:(0) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/override
INFO: scanning:(1) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/scripts
INFO: scanning:(2) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/sounds
INFO: scanning:(3) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/lang/en_US/sounds
INFO: scanning:(4) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/portraits
INFO: scanning:(5) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/characters
INFO: scanning:(6) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/movies
INFO: scanning:(7) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/lang/en_US/movies
INFO: scanning:(8) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/override
INFO: scanning:(9) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/scripts
INFO: scanning:(10) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/sounds
INFO: scanning:(11) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/portraits
INFO: scanning:(12) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/characters
INFO: scanning:(13) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/movies
INFO: LUA: UI string not found: Recent events text will go here.
INFO: LUA: Initializing Quests
INFO: gl.useShaders: 1
gl.has_s3tc: 1
gl.has_pvrtc: 0
gl.has_atc: 0
gl.postprocessing: 0
gl.uploadFormat: 0x80E1
gl.uploadType: 0x8367
INFO: Font: loaded font STONESML
INFO: Baldur's Gate II - Enhanced Edition v2.0.61.0
INFO: Font: loaded font NORMAL
INFO: Font: Added point size (12) for font STONESML
INFO: Font: loaded font REALMS
INFO: Font: Added point size (20) for font REALMS
INFO: Font: Added point size (15) for font STONESML
INFO: Font: Added point size (23) for font STONESML
INFO: LUA: Initializing Quests
INFO: sAchieveID=NONE,m_sGlobalName=BD_STORY_MODE,m_nValue=0
INFO: sAchieveID=NONE,m_sGlobalName=BD_NIGHTMARE_MODE,m_nValue=0
INFO: sAchieveID=NONE,m_sGlobalName=GameDifficulty,m_nValue=2
INFO: sAchieveID=NONE,m_sGlobalName=GameDifficulty,m_nValue=4
INFO: sAchieveID=NONE,m_sGlobalName=GameDifficulty,m_nValue=4
INFO: Font: loaded font FLOATTXT
INFO: Font: Added point size (12) for font FLOATTXT
INFO: Font: Added point size (16) for font NORMAL
INFO: Font: loaded font TOOLFONT
<< THIS was when I pushed the Ability tab button >>
INFO: [string "function variant07E471B0 () return Infinity_F..."]:1: attempt to index field '?' (a number value)
stack traceback:
return debug.traceback():1: in main chunk
=[C]: in function '__index'
function variant07E471B0 () return Infinity_FetchString( listItems[rowNumber][1].strRef) end:1: in function <[string "function variant07E471B0 () return Infinity_F..."]:1>
INFO: [string "function variant07E471B0 () return Infinity_F..."]:1: attempt to index field '?' (a number value)
stack traceback:
return debug.traceback():1: in main chunk
=[C]: in function '__index'
function variant07E471B0 () return Infinity_FetchString( listItems[rowNumber][1].strRef) end:1: in function <[string "function variant07E471B0 () return Infinity_F..."]:1>
INFO: [string "menu"]:643: attempt to index field '?' (a number value)
stack traceback:
return debug.traceback():1: in main chunk
=[C]: in function '__index'
menu:643: in function <[string "menu"]:638>
(...tail calls...)
INFO: [string "menu"]:634: attempt to index field '?' (a number value)
stack traceback:
return debug.traceback():1: in main chunk
=[C]: in function '__index'
menu:634: in function <[string "menu"]:629>
(...tail calls...)
INFO: [string "function variant07E471B0 () return Infinity_F..."]:1: attempt to index field '?' (a number value)
stack traceback:
return debug.traceback():1: in main chunk
=[C]: in function '__index'
function variant07E471B0 () return Infinity_FetchString( listItems[rowNumber][1].strRef) end:1: in function <[string "function variant07E471B0 () return Infinity_F..."]:1>
INFO: [string "menu"]:643: attempt to index field '?' (a number value)
stack traceback:
return debug.traceback():1: in main chunk
=[C]: in function '__index'
menu:643: in function <[string "menu"]:638>
(...tail calls...)
INFO: [string "menu"]:634: attempt to index field '?' (a number value)
stack traceback:
return debug.traceback():1: in main chunk
=[C]: in function '__index'
menu:634: in function <[string "menu"]:629>
(...tail calls...)
INFO: [string "function variant07E471B0 () return Infinity_F..."]:1: attempt to index field '?' (a number value)
stack traceback:
return debug.traceback():1: in main chunk
=[C]: in function '__index'
function variant07E471B0 () return Infinity_FetchString( listItems[rowNumber][1].strRef) end:1: in function <[string "function variant07E471B0 () return Infinity_F..."]:1>
INFO: [string "menu"]:643: attempt to index field '?' (a number value)
stack traceback:
return debug.traceback():1: in main chunk
=[C]: in function '__index'
menu:643: in function <[string "menu"]:638>
(...tail calls...)
(errors repeat many thousands of times until cancelled)
I am close to working out these character sheet issues. The only tabs I am having problems on are Combat Stats, Abilities, and Proficiencies. For some reason the attributes scores there go kinda haywire.
The default front page so far works ok.
The combat stats page always makes the attributes go away except for strength value. Played with this for a few hours now.
I got the attributes to show up properly on the Proficiencies and Skills tabs, but only by forcing OpenAdvance to 1 so details always start hidden.
If I click the Show Details button, the output gets wonky. It is showing the label numbers from the attributes?
Thank you, I will be doing that shortly. I made a partial breakthrough and got it working on the Combat Stats page! Plus a bonus, AC, HP, Damage, and THAC0 top line values only but with the saving throws expanded!
I am still getting the same strange behavior from the Ability tab, well, actually it is changed now, maybe for the better. The attributes are listed on the left now, yay. But the right shows the attribute label numbers instead of the Abilities text block. Hmm.
With this ui.menu code, the attributes show up normally but the abilities list is replaced with the label numbers.
This is what happens when I switch that code around.
Withi this ui.menu code, the Abilities list is displayed but the attributes won't show up. It is exactly the same bit of code as above but with the attribute list at the top instead of the bottom. Strange...
Going to bed now but I finally got everything working except the stupid Ability tab. I need to fix it, then maybe try to switch up Combat Stats and Class to make Combat Stats be the "default" tab. Then I need to figure out something to put in the lower left corner somehow.
@Iroumen, please remove those images and convert them to PNG or JPG! I'm surprised this forum doesn't block the use of IMG tags for BMP image files, though they did recently go through a shift from HTML to BBCode.
@mf2112
Inserting a new tab is doable. Currently there are 11 defined. Just look for the code
tabs = { }
and you see the 11 defined ones below it. Mine are ordered like this:
table.insert(tabs, {'BIOGRAPHY_LABEL', 7})
table.insert(tabs, {'CHARACTER_SHEET_LABEL', 1})
table.insert(tabs, {'CLASS_LABEL', 2})
table.insert(tabs, {'KIT_DESC_LABEL', 5})
table.insert(tabs, {'COMBAT_STATS_LABEL', 9})
table.insert(tabs, {'PROFICIENCIES_LABEL', 3})
if not (next(characters[currentID].proficiencies.class_skills) == nil) then
table.insert(tabs, {'SKILLS_LABEL', 4})
end
table.insert(tabs, {"Miscellaneous", 8})
if characters[currentID].hasMageBook or characters[currentID].hasSorcererBook or characters[currentID].hasClericBook or characters[currentID].hasShamanBook then
table.insert(tabs, {'SPELLS_LABEL', 10})
end
table.insert(tabs, {'INVENTORY_LABEL', 11})
table.insert(tabs, {"Statistics", 6})
--hardcoded string to replace Stats into Statistics.
You can add a new tab there by typing this.
table.insert(tabs, {"YourLabel", 12})
Then a bit later on in the code each Tab is addressed separately by this type of statement
elseif currentTab == 2 then
Notice that currentTab == 2 means the CLASS_LABEL tab, not the second tab in your UI. You need to define another elseif for your tab, e.g.
elseif currentTab == 12 then
--do stuff
About the lists in one Tab when using 1 table. What you do wrong is that you define listitems twice in your code (by stating listitems = {something}) and it always uses the last one you defined. So what you need to do is extend the first listitems with the new items.
So in your first attempt use something like this (you may need to swap the order of the three entries, I do not know what you want to see:
In your second attempt, simply remove this line in the middle of the block. I am not certain it will work perfectly because the original listitems has only 2 columns defined, the latter 3 columns. I did not fiddle around with these things much yet.
@Iroumen, please remove those images and convert them to PNG or JPG! I'm surprised this forum doesn't block the use of IMG tags for BMP image files, though they did recently go through a shift from HTML to BBCode.
Sorry, I do not understand the reason for this request. Aren't bitmaps supported by bbcode? Is it picture size/download that bothers you, changed it for you.
@ScottBrooks Is writing a file bychance blocked? Because I was trying to write some variables and keys to file inside the UI.menu, but the file was never created (I checked the path where I was writing to and I have write access there). I was circumventing the print_r using > ui.menu.log because it logs much more than I need. I guess I have to print some clear identifiers for myself around the blocks I am interested in.
@XKal I guess extra spaces in the tab labels would work. I *think* this should work. The double quotes have 2 spaces. Normally in lua combining text is with .. inbetween.
@mf2112
Inserting a new tab is doable. Currently there are 11 defined. Just look for the code
Hi Iroumen, actually I was asking about how to insert a new list, not a tab.
tabs = { }
and you see the 11 defined ones below it. Mine are ordered like this:
table.insert(tabs, {'BIOGRAPHY_LABEL', 7})
table.insert(tabs, {'CHARACTER_SHEET_LABEL', 1})
table.insert(tabs, {'CLASS_LABEL', 2})
table.insert(tabs, {'KIT_DESC_LABEL', 5})
table.insert(tabs, {'COMBAT_STATS_LABEL', 9})
table.insert(tabs, {'PROFICIENCIES_LABEL', 3})
if not (next(characters[currentID].proficiencies.class_skills) == nil) then
table.insert(tabs, {'SKILLS_LABEL', 4})
end
table.insert(tabs, {"Miscellaneous", 8})
if characters[currentID].hasMageBook or characters[currentID].hasSorcererBook or characters[currentID].hasClericBook or characters[currentID].hasShamanBook then
table.insert(tabs, {'SPELLS_LABEL', 10})
end
table.insert(tabs, {'INVENTORY_LABEL', 11})
table.insert(tabs, {"Statistics", 6})
--hardcoded string to replace Stats into Statistics.
You can add a new tab there by typing this.
table.insert(tabs, {"YourLabel", 12})
Then a bit later on in the code each Tab is addressed separately by this type of statement
elseif currentTab == 2 then
Notice that currentTab == 2 means the CLASS_LABEL tab, not the second tab in your UI. You need to define another elseif for your tab, e.g.
elseif currentTab == 12 then
--do stuff
About the lists in one Tab when using 1 table. What you do wrong is that you define listitems twice in your code (by stating listitems = {something}) and it always uses the last one you defined. So what you need to do is extend the first listitems with the new items.
So in your first attempt use something like this (you may need to swap the order of the three entries, I do not know what you want to see:
In your second attempt, simply remove this line in the middle of the block. I am not certain it will work perfectly because the original listitems has only 2 columns defined, the latter 3 columns. I did not fiddle around with these things much yet.
listitems = { }
Edit, combined multiple responses in 1 post.
I had been sitting here beating on it for a while and had realized that my problem is that I didn't really understand how the lists were getting put together. Thank you very much for explaining that, that does make sense, especially with the different number of columns. That might explain some of the weird results I was seeing. I did see otherlist and tried using it a bit but no real luck. I figured you pros will be working magic in there soon though, so I am excited to see the millions of permutations ahead. And this is just the character sheet, it looks like every screen so far is editable to some extent. :0
I did find out by accident that changing the order did make a significant difference in some cases and I was able to achieve the result I wanted for the most part.
Main page. I commented out some things I didn't need like the XP bar and "Character Sheet" and the "Saving Throws" and "Resistances" titles.
Class page. Next I need to figure out how to add this to the main page....that was actually pretty easy, I guess I am getting this a bit more now.
Proficiencies page. It only comes up right in Hide Details mode, but that is fine for me anyways for now. I just realized this is probably exactly what you mentioned above with the list and three columns.
Bio page. Everything works.
Skills page. Again it only works in hide details default mode, no problem.
Stats Page. I kept trying to include the Portrait but for some reason (poor list construction on my part -_- ) it kept including the strength value in the upper left.
I liked this old paper background. More freedom to move things around instead of trying to place things and fit them within small boxes.
After a few final tweaks, here is my last saved character before the final Melissan fight. No scroll bars. It is not a complete wall of text, I would like move the compacted proficiencies list uo to the front page and I know how to do that now I think but I would like to do a bit more with colors or fonts to break it up a bit more first.
This effort makes me pretty happy though. This has brought a whole new life back to my game, I am looking forward to my next playthrough now.
There is going to be so much of a reaction to this, no offence to the dev team but the UI has been begging to be ripped out and re-factored since 1999...
I actually genuinely get RSI from the way BG makes you fiddle around with stuff. It is no fun the way that puts an end to a 12 hour session. Heh.
I cant wait to make or see a 'no scrollbars, minimal paging, non intrusive' UI mod
When you think about it, if you play a pnp game, you'd never have all your character abilities and information scattered across a dozen different pieces of paper, that's just awkward, but that is basically what BG did, and I can never imagine why. It really hurts the organisation freak inside me.
When you think about it, if you play a pnp game, you'd never have all your character abilities and information scattered across a dozen different pieces of paper, that's just awkward, but that is basically what BG did, and I can never imagine why. It really hurts the organisation freak inside me.
No, that's what their trying to do now. Previously a lot of the information was presented in the Inventory screen negating a lot of need to look elsewhere and if you did need to look for stuff not listed in the inventory it was all in a singular location within the Character Record screen. Now their trying to hide information in the Inventory/make it harder to gain a general overview of information in the Inventory and spreading information across multiple pages in the Character Record screen!
When you think about it, if you play a pnp game, you'd never have all your character abilities and information scattered across a dozen different pieces of paper, that's just awkward, but that is basically what BG did, and I can never imagine why. It really hurts the organisation freak inside me.
It's because at 640x480 pixels, there's only so much you can fit on a screen before it becomes unusable.
INFO: [string "function variant07E471B0 () return Infinity_F..."]:1: attempt to index field '?' (a number value)
stack traceback:
return debug.traceback():1: in main chunk
=[C]: in function '__index'
function variant07E471B0 () return Infinity_FetchString( listItems[rowNumber][1].strRef) end:1: in function <[string "function variant07E471B0 () return Infinity_F..."]:1>
That means that you've got a bug in your lua code. Chances are listItems[rowNumber] is a number, and not a table.
When the game is running, you shouldn't see any spam like that.
I can't comment on that, since I don't have access to the beta. But I am happy all the same, because it seems that it can and will be fixed by modders, which is something that Beamdog don't really have the same amount of liberty to do themselves, because as is abundantly clear, even minor changes annoy veteran BG players.
It's because at 640x480 pixels, there's only so much you can fit on a screen before it becomes unusable.
I remember it was 640x480, but so were all games back in the day. They still made terribly inefficient use of the space that they had. Borrowing an image from the net, http://scarvell.net/wiki/images/5/52/Imoen-2.png , it's atrocious. You have your six basic stats, stats that in normal circumstances hardly ever change unless you know about it, taking up a third of the screen on the left, meanwhile an endless amount of important information is crammed into a miniscule scroll box on the right. This was before you had the luxury of having basic info on the inventory screen.
It's improved over the years, especially with the EE shake up, but pretty much every screen is full of wasted space, pointless redundancy and thoughtless design. It's just crap, crap, crap, and even though I love the game to bits, I unapologetically condemn every single aspect of its user interface, the only existing wart on an unparalleled masterpiece of a game. I've devoted time into hacking it before for myself, and managed to squeeze so much more information and functionality out of the same space, even with a personally applied 640x480 limit. So as you can imagine, I am shocked and delighted to hear about this upcoming new functionality
When you think about it, if you play a pnp game, you'd never have all your character abilities and information scattered across a dozen different pieces of paper, that's just awkward, but that is basically what BG did, and I can never imagine why. It really hurts the organisation freak inside me.
No, that's what their trying to do now. Previously a lot of the information was presented in the Inventory screen negating a lot of need to look elsewhere and if you did need to look for stuff not listed in the inventory it was all in a singular location within the Character Record screen. Now their trying to hide information in the Inventory/make it harder to gain a general overview of information in the Inventory and spreading information across multiple pages in the Character Record screen!
I kind of take exception to the suggestion that we have set ourselves a goal of making it harder to find what you're looking for, and this post has nothing to do with helping people to understand the new UI system or asking questions for yourself. This is not the thread for whatever it is you're trying to do.
When you think about it, if you play a pnp game, you'd never have all your character abilities and information scattered across a dozen different pieces of paper, that's just awkward, but that is basically what BG did, and I can never imagine why. It really hurts the organisation freak inside me.
No, that's what their trying to do now. Previously a lot of the information was presented in the Inventory screen negating a lot of need to look elsewhere and if you did need to look for stuff not listed in the inventory it was all in a singular location within the Character Record screen. Now their trying to hide information in the Inventory/make it harder to gain a general overview of information in the Inventory and spreading information across multiple pages in the Character Record screen!
I kind of take exception to the suggestion that we have set ourselves a goal of making it harder to find what you're looking for, and this post has nothing to do with helping people to understand the new UI system or asking questions for yourself. This is not the thread for whatever it is you're trying to do.
To clarify, I know that you guys mean well and I know that further discussion isn't really useful until after v2.0 is finished and everyone has had a chance to mess with it, so I will drop discussion for it for a while. I've already made it obvious how I feel about the new UI as it is currently.
I cannot think of another game or application of any kind where I could do this. Me, someone who knows literally nothing about the internals, the code, any of the modder's tools. I don't even have NearInfinity working. I keep getting a Java error, probably memory, but it is okay since I don't need it.
All I need is the game, a good text editor (Notepad++ is free), GIMP to make cool transparent backgrounds (also free), and a willingness to put a few hours into it to do some pretty cool stuff. That's all. Oh, plus a backup or two of the ui.menu file, it got wonky once when I changed something while the game was in edit mode. My fault but incredibly easily fixed by copying the file I had made an hour before back to the overrides folder and restarting. I had learned enough by that point that I was able to redo what I had done within a few minutes and actually better since I got the things working that I had struggled with for a bit. My return on investment...priceless. I may enjoy "my" game for another 16 years now.
Putting a custom image to the main menu screen is easy and cool, so I put together a little guide on how to do it here (it's for BG:EE, but the process is similar for BG2:EE too). I also use unscaled interface.
Adding custom image to the Main Menu
You will need to edit several instances in the UI.menu file (the F11 mode doesn't work well for adjusting the screen size). They are:
-EE menu (the first one)
-Main menu (the second one)
-Single player menu
-Options menu
You will need to search for these in the UI.menu file. Search for:
mosaic 'START
It will find all four instances. One is called 'STARTEE', you can rename it to 'START' for simplicity. Above all these instances there is an "area" line with the image coordinates and size (default 0 0 1024 768). Change the screen size (1024 768) to your own screen resolution. It also helps if you resize or crop your custom image to this resolution.
Now put your custom image in PNG format in the override folder and rename it to "start". When you save the UI.menu file and start the game you will see the custom image line perfectly to your screen but you also need to adjust the buttons. In the first screen they look well, but in the other three they need to change the look.
Return to your UI.menu file. When you search for the keyword again, you will see these bits of code:
button
{
bam 'STARTMBT'
sequence 6
area 50 306 300 44
align center center
text style "button"
text "TUTORIAL_BUTTON"
action
"
startEngine:OnTutorialButtonClick()
"
}
This is the button from the first screen. The important is to set "sequence" to "6" and the last two numbers from the "area" to "300 44" as seen above.
Now search for following lines and adjust these values for all the buttons below them:
name 'START_MAIN'
CONTINUE_BUTTON (doesn't need to change)
SINGLEPLAYER_BUTTON
MULTIPLAYER_BUTTON
HOW_TO_PLAY_BUTTON (unused)
STORE_BUTTON (unused)
OPTIONS_BUTTON
BACK_BUTTON
Scroll little further to see:
NEW_GAME_BUTTON
LOAD_GAME_BUTTON
PREGENERATE_BUTTON
IMPORT_BUTTON (unused)
OPTIONS_BUTTON
BACK_BUTTON
Now search for:
name 'START_OPTIONS'
and see buttons below:
SOUND_BUTTON
GRAPHICS_BUTTON
LANGUAGE_BUTTON
MOVIES_BUTTON
GAMEPLAY_BUTTON
BACK_BUTTON
When you change all these buttons to the right sequence and size, run the game, press F11 and position them to wherever you want. You might also want to use the UI.menu file to adjust the coordinates exactly.
What we are missing now is the game title (if you don't use an image that already has it. We can steal the image from the baldursgate web site (attached below). Now we place this code:
label
{
area 0 0 449 350
mosaic 'bgeelogo'
align center center
}
in each of the four menus below the "QUIT_GAME_BUTTON" or the "BACK_BUTTON" like this:
button
{
bam 'STARTMBT'
sequence 6
area 1534 580 300 44
align center center
text style "button"
text "QUIT_GAME_BUTTON"
action
"
startEngine:OnQuitButtonClick()
"
}
label
{
area 0 0 449 350
mosaic 'bgeelogo'
align center center
}
I renamed the image from the web site to "bgeelogo", it must only have 8 characters at max. Now you can see it in the game and adjust its position in the F11 mode.
Edit: Forgot about the load menu, so, find the following line:
name 'LOAD'
Adjust the screen size below that line to your resolution the same way as above menus and rename the "GUISRSVB" to "START". Run the game go to the load menu and adjust the positions in the F11 mode. Note that you can expand the area with the save slots, so if you have high resolution on unscaled interface, you can see a lot more save slots than default four.
Adding Custom Image to the background of the Character Generation screen
This is a little different, because we want to put the custom image behind the stone Character Generation image. Search for this line:
name 'CHARGEN'
and put this bit of a code (use your own screen resolution instead of the 1920 1080 I use in the example):
label
{
area 0 0 1920 1080
mosaic 'START'
}
under the "ignoreesc" line like this:
name 'CHARGEN'
align center center
ignoreesc
label
{
area 0 0 1920 1080
mosaic 'START'
}
label
{
area 0 0 1024 768
mosaic 'GUICGB'
}
This will add the image behind the stone chargen image but it will also put t to the top left corner. To put it back exactly to the center of your screen, you will need to do a little bit of math.
Calculate following:
([X coordinate] - 1024) / 2
([Y coordinate] - 768) / 2
Example for the 1920x1080 resolution:
(1920 - 1024) / 2 = 896 / 2 = 448
(1080 - 768) / 2 = 312 / 2 = 156
Put these values to the 'GUICGB' label in the above code like this:
name 'CHARGEN'
align center center
ignoreesc
label
{
area 0 0 1920 1080
mosaic 'START'
}
label
{
area 448 156 1024 768
mosaic 'GUICGB'
}
Now run the game. You will see the custom image behind the stone chargen image, which will lie in the exact center of the screen, but the buttons are still aligned to the top left. Press F11 and put them where they belong. You only need to do this for the main chargen screen, other screens (like race and class) are centered automatically.
Now search for this line:
name 'IMPORTPARTY'
and do the exact same thing for the "create party" screen.
@Flashburn: I encourage everyone to try it. The full-fledged UI mod might be a little bit hard to distribute, because the user needs to put his screen resolution into the code for the full screen menu effect.
I saved each of the 6 frames to separated png files and named them "start1.png" "start2.png" etc...
Then opened the UI.menu file and found this line:
function GetDLCImage()
It's a function for the DLC area and I put a similar function for the main menu below it:
startFrame = 0
function GetStartAnimation()
startFrame = startFrame + 1
if startFrame > 60 then
startFrame = 0
end
if startFrame >= 50 then
return "START6"
elseif startFrame >= 40 then
return "START5"
elseif startFrame >= 30 then
return "START4"
elseif startFrame >= 20 then
return "START3"
elseif startFrame >= 10 then
return "START2"
elseif startFrame >= 0 then
return "START1"
end
end
The numbers represent the amount of time to show each frame. I don't know exactly which unit it is, but 10 is pretty quick.
Now all that was left, was to rename all these lines
Comments
Finally figured out how to get past this, well somewhat. There can be several listItems but they can't step on each other. On some tabs I had to put the attribute list block first, and on some it went last.
In particular, you should see the output of which should print out the whole characters table which would show you all the possible information about a character you could possibly see.
About the comment about the mage book size, we adjust the side of some elements programatically. Some of the items also have a name field. We didn't name most of the elements because they are not referenced, but the ones that do have a name are probably referenced elsewhere.
If you search the UI.menu for that name you will find the other places that may adjust it.
I managed to stop the output finally. I don't see print_r(characters) anywhere unfortunately.
INFO: Creating DPWrapper
Setting breakpad minidump AppID = 257350
Steam_SetMinidumpSteamID: Caching Steam ID: 76561198291464780 [API loaded no]
INFO: scanning:(0) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/override
INFO: scanning:(1) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/scripts
INFO: scanning:(2) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/sounds
INFO: scanning:(3) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/lang/en_US/sounds
INFO: scanning:(4) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/portraits
INFO: scanning:(5) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/characters
INFO: scanning:(6) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/movies
INFO: scanning:(7) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/lang/en_US/movies
INFO: scanning:(8) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/override
INFO: scanning:(9) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/scripts
INFO: scanning:(10) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/sounds
INFO: scanning:(11) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/portraits
INFO: scanning:(12) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/characters
INFO: scanning:(13) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/movies
INFO: scanning:(0) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/override
INFO: scanning:(1) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/scripts
INFO: scanning:(2) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/sounds
INFO: scanning:(3) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/lang/en_US/sounds
INFO: scanning:(4) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/portraits
INFO: scanning:(5) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/characters
INFO: scanning:(6) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/movies
INFO: scanning:(7) C:/Program Files (x86)/Steam/steamapps/common/Baldur's Gate II Enhanced Edition/lang/en_US/movies
INFO: scanning:(8) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/override
INFO: scanning:(9) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/scripts
INFO: scanning:(10) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/sounds
INFO: scanning:(11) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/portraits
INFO: scanning:(12) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/characters
INFO: scanning:(13) C:/Users/Mike/Documents/Baldur's Gate II - Enhanced Edition/movies
INFO: LUA: UI string not found: Recent events text will go here.
INFO: LUA: Initializing Quests
INFO: gl.useShaders: 1
gl.has_s3tc: 1
gl.has_pvrtc: 0
gl.has_atc: 0
gl.postprocessing: 0
gl.uploadFormat: 0x80E1
gl.uploadType: 0x8367
INFO: Font: loaded font STONESML
INFO: Baldur's Gate II - Enhanced Edition v2.0.61.0
INFO: Font: loaded font NORMAL
INFO: Font: Added point size (12) for font STONESML
INFO: Font: loaded font REALMS
INFO: Font: Added point size (20) for font REALMS
INFO: Font: Added point size (15) for font STONESML
INFO: Font: Added point size (23) for font STONESML
INFO: LUA: Initializing Quests
INFO: sAchieveID=NONE,m_sGlobalName=BD_STORY_MODE,m_nValue=0
INFO: sAchieveID=NONE,m_sGlobalName=BD_NIGHTMARE_MODE,m_nValue=0
INFO: sAchieveID=NONE,m_sGlobalName=GameDifficulty,m_nValue=2
INFO: sAchieveID=NONE,m_sGlobalName=GameDifficulty,m_nValue=4
INFO: sAchieveID=NONE,m_sGlobalName=GameDifficulty,m_nValue=4
INFO: Font: loaded font FLOATTXT
INFO: Font: Added point size (12) for font FLOATTXT
INFO: Font: Added point size (16) for font NORMAL
INFO: Font: loaded font TOOLFONT
<< THIS was when I pushed the Ability tab button >>
INFO: [string "function variant07E471B0 () return Infinity_F..."]:1: attempt to index field '?' (a number value)
stack traceback:
return debug.traceback():1: in main chunk
=[C]: in function '__index'
function variant07E471B0 () return Infinity_FetchString( listItems[rowNumber][1].strRef) end:1: in function <[string "function variant07E471B0 () return Infinity_F..."]:1>
INFO: [string "function variant07E471B0 () return Infinity_F..."]:1: attempt to index field '?' (a number value)
stack traceback:
return debug.traceback():1: in main chunk
=[C]: in function '__index'
function variant07E471B0 () return Infinity_FetchString( listItems[rowNumber][1].strRef) end:1: in function <[string "function variant07E471B0 () return Infinity_F..."]:1>
INFO: [string "menu"]:643: attempt to index field '?' (a number value)
stack traceback:
return debug.traceback():1: in main chunk
=[C]: in function '__index'
menu:643: in function <[string "menu"]:638>
(...tail calls...)
INFO: [string "menu"]:634: attempt to index field '?' (a number value)
stack traceback:
return debug.traceback():1: in main chunk
=[C]: in function '__index'
menu:634: in function <[string "menu"]:629>
(...tail calls...)
INFO: [string "function variant07E471B0 () return Infinity_F..."]:1: attempt to index field '?' (a number value)
stack traceback:
return debug.traceback():1: in main chunk
=[C]: in function '__index'
function variant07E471B0 () return Infinity_FetchString( listItems[rowNumber][1].strRef) end:1: in function <[string "function variant07E471B0 () return Infinity_F..."]:1>
INFO: [string "menu"]:643: attempt to index field '?' (a number value)
stack traceback:
return debug.traceback():1: in main chunk
=[C]: in function '__index'
menu:643: in function <[string "menu"]:638>
(...tail calls...)
INFO: [string "menu"]:634: attempt to index field '?' (a number value)
stack traceback:
return debug.traceback():1: in main chunk
=[C]: in function '__index'
menu:634: in function <[string "menu"]:629>
(...tail calls...)
INFO: [string "function variant07E471B0 () return Infinity_F..."]:1: attempt to index field '?' (a number value)
stack traceback:
return debug.traceback():1: in main chunk
=[C]: in function '__index'
function variant07E471B0 () return Infinity_FetchString( listItems[rowNumber][1].strRef) end:1: in function <[string "function variant07E471B0 () return Infinity_F..."]:1>
INFO: [string "menu"]:643: attempt to index field '?' (a number value)
stack traceback:
return debug.traceback():1: in main chunk
=[C]: in function '__index'
menu:643: in function <[string "menu"]:638>
(...tail calls...)
(errors repeat many thousands of times until cancelled)
I am close to working out these character sheet issues. The only tabs I am having problems on are Combat Stats, Abilities, and Proficiencies. For some reason the attributes scores there go kinda haywire.
The default front page so far works ok.
The combat stats page always makes the attributes go away except for strength value. Played with this for a few hours now.
I got the attributes to show up properly on the Proficiencies and Skills tabs, but only by forcing OpenAdvance to 1 so details always start hidden.
If I click the Show Details button, the output gets wonky. It is showing the label numbers from the attributes?
ui.menu code here.
showJustText = 1
showStats = 0
showSpells = 0
helpTextString = ''
listItems = { }
listItems = {
{ 'AC_LABEL', characters[currentID].AC.current, characters[currentID].AC.details },
{ 'HP_LABEL', characters[currentID].HP.current .. '/' .. characters[currentID].HP.max , characters[currentID].HP.details },
{ 'DAMAGE_LABEL', displayDamage(), characters[currentID].damage.details },
{ 'THAC0_LABEL', characters[currentID].THAC0.current, characters[currentID].THAC0.details },
}
if characters[currentID].THAC0.offhand then
listItems[4][2] = characters[currentID].THAC0.current .. '\n' .. t( 'OFF_HAND_THAC0' ) .. ': ' .. characters[currentID].THAC0.offhand
end
for k, v in ipairs(listItems) do
helpTextString = helpTextString .. '^M' .. t(v[1]) .. ': '.. v[2] .. '^-' .. '\n'
--helpTextString = helpTextString .. '^M' .. t(v[1]) .. ': '.. v[2] .. '^-' .. '\n' .. v[3] ..'\n \n'
end
listItems = {
{ '', '', characters[currentID].proficiencies.savingThrows },
--{ 'SAVING_THROWS_LABEL', '', characters[currentID].proficiencies.savingThrows },
--{ 'RESISTANCES_LABEL', '', characters[currentID].proficiencies.resistances },
--{ 'CURRENT_SCRIPT_LABEL', '', characters[currentID].proficiencies.currentScript },
}
for k, v in ipairs(listItems) do
--helpTextString = helpTextString .. '^M' .. t(v[1]) .. ': '.. v[2] .. '^-' .. '\n'
helpTextString = helpTextString .. '^M' .. t(v[1]) .. ': '.. v[2] .. '^-' .. '\n' .. v[3] ..'\n'
end
listItems = {
{ characters[currentID].attr.str, 9582 },
{ characters[currentID].attr.dex, 9584 },
{ characters[currentID].attr.con, 9583 },
{ characters[currentID].attr.int, 9585 },
{ characters[currentID].attr.wis, 9586 },
{ characters[currentID].attr.cha, 9587 },
}
I am still getting the same strange behavior from the Ability tab, well, actually it is changed now, maybe for the better. The attributes are listed on the left now, yay. But the right shows the attribute label numbers instead of the Abilities text block. Hmm.
With this ui.menu code, the attributes show up normally but the abilities list is replaced with the label numbers.
This is what happens when I switch that code around.
Withi this ui.menu code, the Abilities list is displayed but the attributes won't show up. It is exactly the same bit of code as above but with the attribute list at the top instead of the bottom. Strange...
Going to bed now but I finally got everything working except the stupid Ability tab. I need to fix it, then maybe try to switch up Combat Stats and Class to make Combat Stats be the "default" tab. Then I need to figure out something to put in the lower left corner somehow.
@ScottBrooks: Thanks for the answer, but does that mean we won't be able to adjust the size of it at all?
Inserting a new tab is doable. Currently there are 11 defined. Just look for the code and you see the 11 defined ones below it. Mine are ordered like this: --hardcoded string to replace Stats into Statistics.
You can add a new tab there by typing this. Then a bit later on in the code each Tab is addressed separately by this type of statement Notice that currentTab == 2 means the CLASS_LABEL tab, not the second tab in your UI. You need to define another elseif for your tab, e.g.
About the lists in one Tab when using 1 table. What you do wrong is that you define listitems twice in your code (by stating listitems = {something}) and it always uses the last one you defined. So what you need to do is extend the first listitems with the new items.
So in your first attempt use something like this (you may need to swap the order of the three entries, I do not know what you want to see: In your second attempt, simply remove this line in the middle of the block. I am not certain it will work perfectly because the original listitems has only 2 columns defined, the latter 3 columns. I did not fiddle around with these things much yet.
Sorry, I do not understand the reason for this request. Aren't bitmaps supported by bbcode? Is it picture size/download that bothers you, changed it for you.
@ScottBrooks Is writing a file bychance blocked? Because I was trying to write some variables and keys to file inside the UI.menu, but the file was never created (I checked the path where I was writing to and I have write access there). I was circumventing the print_r using > ui.menu.log because it logs much more than I need. I guess I have to print some clear identifiers for myself around the blocks I am interested in.
@XKal I guess extra spaces in the tab labels would work. I *think* this should work. The double quotes have 2 spaces. Normally in lua combining text is with .. inbetween.
Edit, combined multiple responses in 1 post.
I had been sitting here beating on it for a while and had realized that my problem is that I didn't really understand how the lists were getting put together. Thank you very much for explaining that, that does make sense, especially with the different number of columns. That might explain some of the weird results I was seeing. I did see otherlist and tried using it a bit but no real luck. I figured you pros will be working magic in there soon though, so I am excited to see the millions of permutations ahead. And this is just the character sheet, it looks like every screen so far is editable to some extent. :0
I did find out by accident that changing the order did make a significant difference in some cases and I was able to achieve the result I wanted for the most part.
Main page. I commented out some things I didn't need like the XP bar and "Character Sheet" and the "Saving Throws" and "Resistances" titles.
Class page. Next I need to figure out how to add this to the main page....that was actually pretty easy, I guess I am getting this a bit more now.
Proficiencies page. It only comes up right in Hide Details mode, but that is fine for me anyways for now. I just realized this is probably exactly what you mentioned above with the list and three columns.
Bio page. Everything works.
Skills page. Again it only works in hide details default mode, no problem.
Stats Page. I kept trying to include the Portrait but for some reason (poor list construction on my part -_- ) it kept including the strength value in the upper left.
I liked this old paper background. More freedom to move things around instead of trying to place things and fit them within small boxes.
After a few final tweaks, here is my last saved character before the final Melissan fight. No scroll bars. It is not a complete wall of text, I would like move the compacted proficiencies list uo to the front page and I know how to do that now I think but I would like to do a bit more with colors or fonts to break it up a bit more first.
This effort makes me pretty happy though. This has brought a whole new life back to my game, I am looking forward to my next playthrough now.
We might need a UI Modding forum once the update goes live. I'm really liking what I've seen so far in this thread.
Edit: look at the buttons on the new Journal screen for some ideas too.
There is going to be so much of a reaction to this, no offence to the dev team but the UI has been begging to be ripped out and re-factored since 1999...
I actually genuinely get RSI from the way BG makes you fiddle around with stuff. It is no fun the way that puts an end to a 12 hour session. Heh.
I cant wait to make or see a 'no scrollbars, minimal paging, non intrusive' UI mod
When you think about it, if you play a pnp game, you'd never have all your character abilities and information scattered across a dozen different pieces of paper, that's just awkward, but that is basically what BG did, and I can never imagine why. It really hurts the organisation freak inside me.
No, that's what their trying to do now. Previously a lot of the information was presented in the Inventory screen negating a lot of need to look elsewhere and if you did need to look for stuff not listed in the inventory it was all in a singular location within the Character Record screen. Now their trying to hide information in the Inventory/make it harder to gain a general overview of information in the Inventory and spreading information across multiple pages in the Character Record screen!
It's because at 640x480 pixels, there's only so much you can fit on a screen before it becomes unusable.
The onopen of the 'MAGE' menu adjusts the Y and Height of the entries depending on if we are showing the contingency details in the mage book.
That will overwrite any changes you make to the Y and Height values of the elements named bookListMage, and bookDescription.
@mf2112, That spam of messages like That means that you've got a bug in your lua code. Chances are listItems[rowNumber] is a number, and not a table.
When the game is running, you shouldn't see any spam like that.
I can't comment on that, since I don't have access to the beta. But I am happy all the same, because it seems that it can and will be fixed by modders, which is something that Beamdog don't really have the same amount of liberty to do themselves, because as is abundantly clear, even minor changes annoy veteran BG players.
I remember it was 640x480, but so were all games back in the day. They still made terribly inefficient use of the space that they had. Borrowing an image from the net, http://scarvell.net/wiki/images/5/52/Imoen-2.png , it's atrocious. You have your six basic stats, stats that in normal circumstances hardly ever change unless you know about it, taking up a third of the screen on the left, meanwhile an endless amount of important information is crammed into a miniscule scroll box on the right. This was before you had the luxury of having basic info on the inventory screen.
It's improved over the years, especially with the EE shake up, but pretty much every screen is full of wasted space, pointless redundancy and thoughtless design. It's just crap, crap, crap, and even though I love the game to bits, I unapologetically condemn every single aspect of its user interface, the only existing wart on an unparalleled masterpiece of a game. I've devoted time into hacking it before for myself, and managed to squeeze so much more information and functionality out of the same space, even with a personally applied 640x480 limit. So as you can imagine, I am shocked and delighted to hear about this upcoming new functionality
I kind of take exception to the suggestion that we have set ourselves a goal of making it harder to find what you're looking for, and this post has nothing to do with helping people to understand the new UI system or asking questions for yourself. This is not the thread for whatever it is you're trying to do.
Practically everyone else will be ecstatic to see the interface grown up, you can't please everyone.
To clarify, I know that you guys mean well and I know that further discussion isn't really useful until after v2.0 is finished and everyone has had a chance to mess with it, so I will drop discussion for it for a while. I've already made it obvious how I feel about the new UI as it is currently.
I cannot think of another game or application of any kind where I could do this. Me, someone who knows literally nothing about the internals, the code, any of the modder's tools. I don't even have NearInfinity working. I keep getting a Java error, probably memory, but it is okay since I don't need it.
All I need is the game, a good text editor (Notepad++ is free), GIMP to make cool transparent backgrounds (also free), and a willingness to put a few hours into it to do some pretty cool stuff. That's all. Oh, plus a backup or two of the ui.menu file, it got wonky once when I changed something while the game was in edit mode. My fault but incredibly easily fixed by copying the file I had made an hour before back to the overrides folder and restarting. I had learned enough by that point that I was able to redo what I had done within a few minutes and actually better since I got the things working that I had struggled with for a bit. My return on investment...priceless. I may enjoy "my" game for another 16 years now.
Adding custom image to the Main Menu
You will need to edit several instances in the UI.menu file (the F11 mode doesn't work well for adjusting the screen size). They are:
-EE menu (the first one)
-Main menu (the second one)
-Single player menu
-Options menu
You will need to search for these in the UI.menu file. Search for: It will find all four instances. One is called 'STARTEE', you can rename it to 'START' for simplicity. Above all these instances there is an "area" line with the image coordinates and size (default 0 0 1024 768). Change the screen size (1024 768) to your own screen resolution. It also helps if you resize or crop your custom image to this resolution.
Now put your custom image in PNG format in the override folder and rename it to "start". When you save the UI.menu file and start the game you will see the custom image line perfectly to your screen but you also need to adjust the buttons. In the first screen they look well, but in the other three they need to change the look.
Return to your UI.menu file. When you search for the keyword again, you will see these bits of code: This is the button from the first screen. The important is to set "sequence" to "6" and the last two numbers from the "area" to "300 44" as seen above.
Now search for following lines and adjust these values for all the buttons below them: CONTINUE_BUTTON (doesn't need to change)
SINGLEPLAYER_BUTTON
MULTIPLAYER_BUTTON
HOW_TO_PLAY_BUTTON (unused)
STORE_BUTTON (unused)
OPTIONS_BUTTON
BACK_BUTTON
Scroll little further to see:
NEW_GAME_BUTTON
LOAD_GAME_BUTTON
PREGENERATE_BUTTON
IMPORT_BUTTON (unused)
OPTIONS_BUTTON
BACK_BUTTON
Now search for: and see buttons below:
SOUND_BUTTON
GRAPHICS_BUTTON
LANGUAGE_BUTTON
MOVIES_BUTTON
GAMEPLAY_BUTTON
BACK_BUTTON
When you change all these buttons to the right sequence and size, run the game, press F11 and position them to wherever you want. You might also want to use the UI.menu file to adjust the coordinates exactly.
What we are missing now is the game title (if you don't use an image that already has it. We can steal the image from the baldursgate web site (attached below). Now we place this code: in each of the four menus below the "QUIT_GAME_BUTTON" or the "BACK_BUTTON" like this:
I renamed the image from the web site to "bgeelogo", it must only have 8 characters at max. Now you can see it in the game and adjust its position in the F11 mode.
Edit: Forgot about the load menu, so, find the following line: Adjust the screen size below that line to your resolution the same way as above menus and rename the "GUISRSVB" to "START". Run the game go to the load menu and adjust the positions in the F11 mode. Note that you can expand the area with the save slots, so if you have high resolution on unscaled interface, you can see a lot more save slots than default four.
Final image can look like this:
Attaching the title image here:
Adding Custom Image to the background of the Character Generation screen
This is a little different, because we want to put the custom image behind the stone Character Generation image. Search for this line:
and put this bit of a code (use your own screen resolution instead of the 1920 1080 I use in the example):
under the "ignoreesc" line like this:
This will add the image behind the stone chargen image but it will also put t to the top left corner. To put it back exactly to the center of your screen, you will need to do a little bit of math.
Calculate following:
([X coordinate] - 1024) / 2
([Y coordinate] - 768) / 2
Example for the 1920x1080 resolution:
(1920 - 1024) / 2 = 896 / 2 = 448
(1080 - 768) / 2 = 312 / 2 = 156
Put these values to the 'GUICGB' label in the above code like this:
Now run the game. You will see the custom image behind the stone chargen image, which will lie in the exact center of the screen, but the buttons are still aligned to the top left. Press F11 and put them where they belong. You only need to do this for the main chargen screen, other screens (like race and class) are centered automatically.
Now search for this line: and do the exact same thing for the "create party" screen.
Image:
http://www.baldursgate.com/img/backgrounds/bgee_candlekeep.jpg
http://www.baldursgate.com/img/backgrounds/BanditCampArtflatsmall.jpg
http://www.baldursgate.com/img/backgrounds/city.jpeg
http://www.baldursgate.com/img/backgrounds/BlackPitsmoviescene2.jpg
http://www.siegeofdragonspear.com/img/backgrounds/sod-dragonspear-2.jpg
http://www.siegeofdragonspear.com/img/backgrounds/army.jpg
http://www.siegeofdragonspear.com/img/backgrounds/demonbattle.jpg
http://www.siegeofdragonspear.com/img/backgrounds/sod-the-bridge.jpg
http://www.siegeofdragonspear.com/img/backgrounds/sod-flags.jpg
Adding animation to the main menu
The hardest part is to find/draw a good gif or another image sequence. I used this one for testing purposes: https://media.giphy.com/media/3oEduYJ5WzNGsAadKU/giphy.gif
I saved each of the 6 frames to separated png files and named them "start1.png" "start2.png" etc...
Then opened the UI.menu file and found this line: It's a function for the DLC area and I put a similar function for the main menu below it:
The numbers represent the amount of time to show each frame. I don't know exactly which unit it is, but 10 is pretty quick.
Now all that was left, was to rename all these lines
to these:
and watch the wonder.