Skip to content

HLA selection screen in Bg1ee (v2.1 with SOD)

CalienonCalienon Member Posts: 1
edited May 2016 in UI Modding
Good evening peeps. As you may have guessed from the title, I took a few minutes and copied the HLA-specific sections from the bg2ee (2.1) ui.menu file and pasted them into the bg1ee (v2.1 with SOD) ui.menu file.

I mainly did this because I'd been wondering if it would be that easy for a week or so...It was that easy.

I took a few more minutes to tidy up the "Abilities" button that actually opens the pane. After that, I moved into the "Abilities" pane and tweaked the placement just a bit (the pane was set up to overlay a graphic in BG2EE....it doesn't look perfect overlaying the BG1ee graphic that still exists for this menu, but it's functional.) Since I won't be using this window for any of my own mods, that's as far as I'm going to go in "beautifying" it :D

Besides the above changes, I tweaked the Abilities-button's "clickable" and "enabled" lines to make it ALWAYS visible and enabled. This prevents the issue where if you get a HLA on one level (and use it), then go another level WITHOUT adding an HLA, the screen never becomes available again after that (at least I THINK that used to be an issue lol)...Anyway, whether it was or not, it definitely is not now :P

Here is what I copy/pasted from BG2ee (with the changes listed above)

Copy the text in the 3rd spoiler, then I pasted mine into the same area of the BG1ee UI file that it was in in the BG2ee UI file (it seriously looks like it was simply cut out in the first place lol...things above it are the same in both and below it are the same in both).

The area to put it is around the line #14500 mark. Right after the end of the section for multiplayer (which looks like)

button
{
area 586 632 230 44
bam GUIBUTMT
text 11973
text style "button"
enabled "fromMultiPlayer"
action
"
Infinity_PopMenu()
Infinity_PopMenu()
Infinity_PopMenu()
Infinity_PopMenu()

if connectionLocalNetworkGame == 1 then
connectionIsHosting = true
chooseNetworkProtocol(2)
end

fromMultiPlayer = false
mulitplayerPreexistingDifficulty = currentDifficulty
connectionScreen:OnNewGameButtonClick()
"
}
}


so after that,
and BEFORE


` TEXT_popup_big = 0 `





`
currentHLASelection = nil
function chargenHLADescription()
if currentHLASelection == nil then
--return 63817 --commented this line because it was a nonsensical strref entry!
return "These are your high level abilites. Choose wisely!" --added this line to have direct control over the text shown. Instead of a strref being used.
else
--return chargen.HLAs[currentHLASelection].description --commented this line to implement the end result directly below.
return Infinity_FetchString(chargen.HLAs[currentHLASelection].description)--added this line to fetch the string in this routine, then send THAT back to the caller instead of a strref int
end
end
function chargenHLAPlusMinusFrame(cell, rownumber)
if cell == 3 then
if chargen.HLAs[rownumber].canAdd then
return currentCellCheck(cell)
else
return 3
end
elseif cell == 4 then
if chargen.HLAs[rownumber].canSubtract then
return currentCellCheck(cell)
else
return 3
end
end
end
`
menu
{
name 'CHARGEN_HIGH_LEVEL_ABILITIES'
align center center
--ignoreesc --commented out to make esc work for closing the window WITHOUT clicking done.
modal
onOpen
"
currentHLASelection = nil
"
label
{
area -16 -8 864 710
mosaic GUIHSBS
}
label
{
area 58 10 712 30
text "ABILITIES_TITLE"
text style "title"
}
label
{
area 30 122 426 32
text lua "chargen.numHLAs"
text style "title"
}
text
{
area 506 122 300 476
--text lua "Infinity_FetchString(chargenHLADescription())" --commented this out since I moved this step into the "chargenHLADescription" routine directly
text lua "chargenHLADescription()" --Added this line to take TEXT from that routine instead of a strref int.
text style "normal"
scrollbar 'GUISCRC'
}

list
{
column
{
width 15

label
{
bam GUIBTBUT
area 0 0 52 52
align center center
icon lua "chargen.HLAs[rowNumber].icon"
glow lua "chargen.HLAs[rowNumber].count > 0"
count lua "chargen.HLAs[rowNumber].count"
}
}
column
{
width 61
label
{
area 4 0 -1 -1
text lua "Infinity_FetchString(chargen.HLAs[rowNumber].name)"
text style "normal"
align left center

}
}
column
{
width 12
label
{
area 0 4 45 42
bam GUIOSW
frame lua "chargenHLAPlusMinusFrame(3, rowNumber)"
sequence 0
}
}
column
{
width 12
label
{
area 0 4 45 42
bam GUIOSW
frame lua "chargenHLAPlusMinusFrame(4, rowNumber)"
sequence 1

}
}


scrollbar 'GUISCRC'
rowheight 52
area 52 198 386 384
table "chargen.HLAs"
var currentHLASelection
action
"
print(chargen.HLAs[currentHLASelection].count)
if cellNumber == 3 and chargenHLAPlusMinusFrame(3, currentHLASelection) ~= 3 then
createCharScreen:OnHLAButtonClick(currentHLASelection, 1)
elseif cellNumber == 4 and chargenHLAPlusMinusFrame(4, currentHLASelection) ~= 3 then
createCharScreen:OnHLAButtonClick(currentHLASelection, -1)
end
cellNumber = nil
"
}
button
{
area 192 644 238 44
bam GUIOSTUL
text "DONE_BUTTON"
text style "button"
clickable lua "createCharScreen:IsDoneButtonClickable()"
action
"
createCharScreen:OnDoneButtonClick()
"
}
}


If you don't have other UI mods to preserve, and just want the file, here's a link to it in my dropbox:
https://www.dropbox.com/s/enh8hxyk3xxp4pm/UI.menu?dl=0

...Keep in mind it does come with a few other tweaks I've made for my own enjoyment. I will list those tweaks in another spoiler.
[spoiler='My personal ui menu tweaks']
1.) I commented out the "ignoreesc" line in 2 of the "chargen" blocks. This lets me use the esc key to activate the "BACK_BUTTON" button during level up

2.) I commented out the "clickable" line of the "BACK_BUTTON" in the chargen.levelingup section. This lets the button be clicked which (usually) allows me to cancel the level up process. I say usually because if I've opened a sub-screen (for example, the ABILITIES pane), and forced that window closed without completing it, the "back" button on the main screen clicks but does nothing :)

3.)I added a 2nd button at the character generation abilities (stats) screen right next to the old reroll button. Then, I made it so both buttons reroll, BUT if the current roll is lower than the stored roll (or no roll stored yet), the left one is clickable...if in the process of clicking THAT button, you get a roll higher than the stored, then that button becomes disabled and the one to the right becomes active. This prevents us from "accidentally" clicking past a better roll when clicking furiously :)

4.) Added a label next to the "Store" button at character generation stats screen that simply shows the value of the stored roll.

5.) Added a label next to the previous label that shows how many "rerolls" have been done

6.) Added a button to the right of the "recall" button (and below the previous 2 labels) that "rerolls" until a result is higher than the stored roll (it gives up and recalls the stored roll after 500 tries to prevent the game from seeming locked)

7.) And obviously it has the High Level Abilities screen enabled :)
[/spoiler]

There are some other things I'm trying to do with this, but I'll detail them in another post. This is my first time posting here, so I hope the formatting comes out like I expect lol

EDIT1.) [code] blocks don't work, so reverted to spoiler instead...doesn't maintain indents that way, anyone got a tip for that?

EDIT2.) looked at other posts and figured out what to use :)...I think

EDIT3.) Finally found the correct tags to keep code from wordwrapping when pasted :D
Post edited by Calienon on

Comments

Sign In or Register to comment.