Skip to content

The New UI System: How to Use It

1234579

Comments

  • PeccaPecca Member Posts: 2,175
    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.).
    Mr2150AncientCowboy
  • AncientCowboyAncientCowboy Member Posts: 199
    Thanks, all. Frames I had, but NI refers to cycle so I wasn't sure exactly what sequence was.
  • BillyYankBillyYank Member Posts: 2,768
    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.
    AncientCowboy
  • AncientCowboyAncientCowboy Member Posts: 199
    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 :smile:
  • PeccaPecca Member Posts: 2,175
    edited June 2016
    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.

    Mr2150
  • AncientCowboyAncientCowboy Member Posts: 199
    Nearest thing I can find are the 'box1' to 'box8' PVRZ resources. Box5.PVRZ looks a lot like 'rectangle 4'. Might be worth checking out :smile:
    AdulMr2150lefreutmf2112
  • PeccaPecca Member Posts: 2,175
    Cool thanks @AncientCowboy that's it!
  • PeccaPecca Member Posts: 2,175
    Turns out it makes it possible to remove the rectangle from tab tooltip text, if you put an empty box2.pvrz file to the override.


    brusmf2112
  • ParysParys Member Posts: 205
    lefreut said:

    Thanks @AncientCowboy, now I can customize the dialog box :)


    I like it. Could you share with this dialog box?
  • lefreutlefreut Member Posts: 1,462
    edited November 2019
    ***
    Post edited by lefreut on
    ParysJuliusBorisov
  • PsiryuPsiryu Member Posts: 13
    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?
  • AncientCowboyAncientCowboy Member Posts: 199
    edited June 2016
    @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 :smile:
    Edited for typo
    Adul
  • Mr2150Mr2150 Member Posts: 1,170
    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.
    Adul
  • AncientCowboyAncientCowboy Member Posts: 199
    @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'?
  • RatatoskrRatatoskr Member Posts: 711
    edited June 2016
    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.
  • BillyYankBillyYank Member Posts: 2,768
    Just download Near Infinity and extract it from the game files. I haven't been bothering with UI Edit Mode since my first forays into modding.
    https://forums.beamdog.com/discussion/30593/new-versions-of-nearinfinity-available/p1
  • RatatoskrRatatoskr Member Posts: 711
    I actually just got one as part of a journal quest fix, but thanks for the reply. I'll just edit that one for any further changes.
  • switswit Member, Translator (NDA) Posts: 495
    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.
  • Mr2150Mr2150 Member Posts: 1,170
    @swit

    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 `
    mf2112swit
  • switswit Member, Translator (NDA) Posts: 495
    thanks, Mr2150. Works as expected.
    Mr2150
  • switswit Member, Translator (NDA) Posts: 495
    Question to devs - at which offset of the CHITIN.KEY we can read version of the game? IESDP doesn't mention it https://lynxlynxlynx.github.io/iesdp/file_formats/ie_formats/key_v1.htm
    but UI.MENU uses:
    CBaldurChitin:GetVersionString()
    so I assume the value is somewhere in that file. But where exactly? Thanks in advance.
  • Zach_BDZach_BD Member Posts: 9
    swit said:

    Question to devs - at which offset of the CHITIN.KEY we can read version of the game? IESDP doesn't mention it https://lynxlynxlynx.github.io/iesdp/file_formats/ie_formats/key_v1.htm
    but UI.MENU uses:

    CBaldurChitin:GetVersionString()
    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.
    JuliusBorisovCrevsDaak
  • kjeronkjeron Member Posts: 2,367
    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
  • Mr2150Mr2150 Member Posts: 1,170
    edited September 2016
    For the Class/Kit ids you might want to look in the 2da files and also at this mod by @Adul
  • kjeronkjeron Member Posts: 2,367
    Mr2150 said:

    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.
  • lefreutlefreut Member Posts: 1,462
    edited November 2019
    ***
    Post edited by lefreut on
    Mr2150AncientCowboyJuliusBorisov
  • ImionaImiona Member Posts: 30
    edited October 2016
    -fixed-
    Post edited by Imiona on
  • gunmangunman Member Posts: 215
    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.
  • gunmangunman Member Posts: 215
    Can anyone confirm this, nobody tried to mod the save game window? Am I doing something wrong?
Sign In or Register to comment.