Bam files can be sorted into frames and sequences. For example GUILS10.BAM is a single file which stores all gamescreen buttons like Inventory or Journal. An individual button in this file is a sequence, and the sequence consists of frames (normal, when clicked, when highlighted, etc.).
If you look at a BAM in Near Infinity, you'll see that it can have more than one cycle. Take a look at my multi portrait mod and the big buttons and small buttons are all in the same BAM. One cycle/sequence is small, pointing right, one is big, pointing left, etc. The cycle contains the whole button animation for pressing the button and toggling the button. One thing to be aware of is the cycle number in NI is numbered starting at 1, while the sequence number in UI.menu is numbered starting at 0.
Thanks @BillyYank . Coming from a C/C++ background, the 'off by one' aspect of Lua and the UI code is something I've come to grips with. Now if I can only stop trying to bracket Lua functions with braces
I've been trying to find a graphics stored by UI.menu's "rectangle" resources. Some rectangles are simple lines but some have graphics that have to be stored somewhere. I want to find a dialog box rectangle graphics so I can remove the two white lines at the bottom of its sides.
Is it possible to change the rate of the front size zoom? The lowest setting and the second lowest seem to have changed in the last patch. The lowest setting is the right size for the tooltop (the mouse hover over one) but the dialogue box text and the name/health that shows up with tab is to small. But the second lowest font size is just right for everything except the tooltip which is a little to large and in the way for my taste. Anyway to get the zoom to be in a happy middle?
@Dee I don't know if you can answer this but if not, you'll know who can. I've observed that if I add a menu to the end of UI.MENU, and it has the same name as a menu that appears earlier in the file, that the newly added menu definition overloads the old definition. Is this a consistent behavior or did I just get lucky in the hashing/sorting/whatever is used to organize the menu definitions? Thanks, and I realize it's a summer weekend so I'm not expecting a quick answer Edited for typo
I think that's consistent all the way through @AncientCowboy - items at the start of the menu file appear behind items further on. If things are 'named' the same and the appear afterwards they overwrite the earlier item.
@Mr2150 I know that is true visually (I use overlapping buttons/labels for example). However, I'm concerned about whether it is true from a code/data point of view. For example, if I add a menu named 'ESC_MENU' at the bottom of UI.MENU, have I effectively made the original 'ESC_MENU' definition 'go away'?
Quick question. The steps for activating UI mode are supposed to be the same for BG2EE version 2.3, right? I've entered SetPrivateProfileString('Program Options','UI Edit Mode','1') into my baldur.lua and saved it, but when I press F11 nothing happens. In fact, the only thing that seems to be affected is that when I press F5, the dialogue box moves down over my quick slots.
To be honest, I don't care that much about editing the UI myself, but I need the UI.Menu override file in order to use some of the changes that other people have made. Does anyone have a default version of it?
Alternatively, a BG2EE version of the Classic Character Record from a few pages back would be amazing. I can live with the glitchy journal and inability to customize the map notes, but I really don't like the Record screen.
Is it possible to send a clua console code from the GUI? Let's say I want to set in game GLOBAL variable when I enter and exit some screen (onOpen and onClose). The code that I want to send is for example C:SetGlobal("VariableName","GLOBAL",1). I think luaEdit and Infinity_LuaConsoleInput may be able to do that but I have problem with syntax. Could anyone please post example code here, if this can be implemented? Thanks in advance.
You can use the console codes exactly as they are in onOpen / onClose / Action events in the UI.
Since you are in an onOpen event you can't use the double quotes (") as you normally would, however you can substitute a ' wherever there is double quote. So the correct form would just be:
C:SetGlobal('VariableName','GLOBAL',1)
I'd suggest to use variables as the 'VariableName' and settings just so you can change these quickly and easily elsewhere in the code (although it's not necessary). For example, I just tested the following:
so I assume the value is somewhere in that file. But where exactly? Thanks in advance.
GetVersionString() formats a string from internal values in the source code. To my knowledge, the version is only stored in the code, CBaldurChitin just refers to the class name that function is stored in.
I two requests(to devs or those who know): - More character "stats" to be available for use in the UI. I have tried using the print_r(characters) to find more, but I didn't see any that aren't already in UI.menu, so I do not know if these already exist and I just need the correct reference, or if they would have to be added: characters[id].class.(IDS) = IDS number of class, as opposed to the Class/Kit Name returned by "characters[id].class" characters[id].kit = IDS number of kit characters[id].proficiencies.savingThrows.(type) = one for each saving throw type, to get the value for just that saving throw, rather than a list of all saving throws. characters[id].proficiencies.resistances.(type) = one for each resistance type, to get the value for just that resistance, rather than a list of all resistances.
- References for all available Tempstats, added Tempstat references for the following if they don't exist: each individual AC subtype each individual SavingThrow type each individual Resistance
For the Class/Kit ids you might want to look in the 2da files and also at this mod by @Adul
Thanks, while that mod is still beyond my understanding, I've previously had success at Chargen, just not elsewhere. Chargen.class[#].id works just fine at chargen to get the IDS of the Class, but I couldn't find a variation that works in the inventory: characters[id].class.id, characters[id].class.current, etc.
In UI.menu there is a directive that don't seem to use the PNG file with the same name from the override folder. It's called "rowbackground" and it is used only for the list of saved games.
rowbackground 'GUISAVEB'
I found the GUISAVEB resource under the MOS files, exported it as PNG in override directory, and changed the image, but the new image is not used when restarting the game.
Comments
I want to find a dialog box rectangle graphics so I can remove the two white lines at the bottom of its sides.
Anyway to get the zoom to be in a happy middle?
I've observed that if I add a menu to the end of UI.MENU, and it has the same name as a menu that appears earlier in the file, that the newly added menu definition overloads the old definition. Is this a consistent behavior or did I just get lucky in the hashing/sorting/whatever is used to organize the menu definitions? Thanks, and I realize it's a summer weekend so I'm not expecting a quick answer
Edited for typo
To be honest, I don't care that much about editing the UI myself, but I need the UI.Menu override file in order to use some of the changes that other people have made. Does anyone have a default version of it?
Alternatively, a BG2EE version of the Classic Character Record from a few pages back would be amazing. I can live with the glitchy journal and inability to customize the map notes, but I really don't like the Record screen.
https://forums.beamdog.com/discussion/30593/new-versions-of-nearinfinity-available/p1
You can use the console codes exactly as they are in onOpen / onClose / Action events in the UI.
Since you are in an onOpen event you can't use the double quotes (") as you normally would, however you can substitute a ' wherever there is double quote. So the correct form would just be:
C:SetGlobal('VariableName','GLOBAL',1)
I'd suggest to use variables as the 'VariableName' and settings just so you can change these quickly and easily elsewhere in the code (although it's not necessary). For example, I just tested the following:
myVar = 'DRIZZTFIGHT' myType = 'GLOBAL' mySetting = 0 C:SetGlobal(myVar, myType, mySetting)
and
C:CreateItem(selItm, cheatQtyAmt)
Make sure to use ' and not `
but UI.MENU uses: so I assume the value is somewhere in that file. But where exactly? Thanks in advance.
- More character "stats" to be available for use in the UI. I have tried using the print_r(characters) to find more, but I didn't see any that aren't already in UI.menu, so I do not know if these already exist and I just need the correct reference, or if they would have to be added:
characters[id].class.(IDS) = IDS number of class, as opposed to the Class/Kit Name returned by "characters[id].class"
characters[id].kit = IDS number of kit
characters[id].proficiencies.savingThrows.(type) = one for each saving throw type, to get the value for just that saving throw, rather than a list of all saving throws.
characters[id].proficiencies.resistances.(type) = one for each resistance type, to get the value for just that resistance, rather than a list of all resistances.
- References for all available Tempstats, added Tempstat references for the following if they don't exist:
each individual AC subtype
each individual SavingThrow type
each individual Resistance
rowbackground 'GUISAVEB'
I found the GUISAVEB resource under the MOS files, exported it as PNG in override directory, and changed the image, but the new image is not used when restarting the game.