Skip to content

Displaying 7 proficiency stars at character creation

GrammarsaladGrammarsalad Member Posts: 2,582
edited December 2018 in UI Modding
Right now, we can safely set max profs to 7 (the stat wraps around if you set it to 8+). If you have a character that has 6-7 ranks in a given proficiency, it displays on the character sheet, and everywhere else. It just doesn't display at character creation (and, I think, level up). As a sample, in this screenshot, I have created a fighter with 7 ranks in bastard sword in ToB. But, as you can see, it only displays 5 pips at character creation.




How would I change this so it displays all 6 or 7 pips?

Comments

  • BubbBubb Member Posts: 1,005
    edited December 2018
    @Grammarsalad: There's quite a few steps, so I think it would be easier if I posted a before and after of the relevant code.

    Search UI.MENU for
    table "chargen.proficiency"
    This is the list we will be editing.

    Change the list from this:
    list
    {
    column
    {
    width 62
    label
    {
    area 0 0 280 55
    text lua "Infinity_FetchString(chargen.proficiency[rowNumber].name)"
    text style "normal"
    align right center

    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 4"
    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 3"
    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 2"
    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 1"
    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 0"
    }
    }

    column
    {
    width 9
    label
    {
    area 0 6 45 42
    bam GUIOSW
    frame lua "getPlusFrame(7)"
    sequence 0
    align center center
    }
    }
    column
    {
    width 9
    label
    {
    area 0 6 45 42
    bam GUIOSW
    sequence 1
    frame lua "getMinusFrame(8)"

    align center center
    }
    }

    action "
    currentChargenThiefSkill = nil
    if ticksStarting < 10 then
    if cellNumber == 7 and plusButtonClickable(currentChargenProficiency) then
    createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, true)
    elseif cellNumber == 8 and minusButtonClickable(currentChargenProficiency) then
    createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, false)
    end
    end
    cellNumber = nil
    ticksPassed = 0
    ticksStarting = 0
    "
    actionUpdate "
    currentChargenThiefSkill = nil
    ticksStarting = ticksStarting + 1
    if ticksStarting > 10 then
    ticksPassed = ticksPassed + 1
    if ticksPassed > 7 then
    if cellNumber == 7 and plusButtonClickable(currentChargenProficiency) then
    createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, true)
    elseif cellNumber == 8 and minusButtonClickable(currentChargenProficiency) then
    createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, false)
    end
    ticksPassed = 0
    end
    end
    "

    rowheight 54
    area 37 248 523 432
    table "chargen.proficiency"
    var currentChargenProficiency
    scrollbar 'GUISCRC'

    }

    To this:
    list
    {
    column
    {
    width 54
    label
    {
    area 0 0 241 55
    text lua "Infinity_FetchString(chargen.proficiency[rowNumber].name)"
    text style "normal"
    align right center

    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 6"
    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 5"
    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 4"
    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 3"
    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 2"
    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 1"
    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 0"
    }
    }

    column
    {
    width 9
    label
    {
    area 0 6 45 42
    bam GUIOSW
    frame lua "getPlusFrame(9)"
    sequence 0
    align center center
    }
    }
    column
    {
    width 9
    label
    {
    area 0 6 45 42
    bam GUIOSW
    sequence 1
    frame lua "getMinusFrame(10)"

    align center center
    }
    }

    action "
    currentChargenThiefSkill = nil
    if ticksStarting < 10 then
    if cellNumber == 9 and plusButtonClickable(currentChargenProficiency) then
    createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, true)
    elseif cellNumber == 10 and minusButtonClickable(currentChargenProficiency) then
    createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, false)
    end
    end
    cellNumber = nil
    ticksPassed = 0
    ticksStarting = 0
    "
    actionUpdate "
    currentChargenThiefSkill = nil
    ticksStarting = ticksStarting + 1
    if ticksStarting > 10 then
    ticksPassed = ticksPassed + 1
    if ticksPassed > 7 then
    if cellNumber == 9 and plusButtonClickable(currentChargenProficiency) then
    createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, true)
    elseif cellNumber == 10 and minusButtonClickable(currentChargenProficiency) then
    createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, false)
    end
    ticksPassed = 0
    end
    end
    "

    rowheight 54
    area 37 248 523 432
    table "chargen.proficiency"
    var currentChargenProficiency
    scrollbar 'GUISCRC'

    }


    I've attached the two variants, so you can run a Diff tool on them to see exactly what changed.

    Also, to enable 7-pips on the engine-level, you need to do a special 2DA edit.

    PROFSMAX.2DA: The last three columns in this file aren't documented, but they determine the max amount of pips allowed at character creation in the relevant campaign. The last column defines ToB, I haven't tested the others. You need to set this to 7. (That is, if you want that amount of pips to be available when you first create your character).
    Post edited by Bubb on
  • GrammarsaladGrammarsalad Member Posts: 2,582
    Bubb said:

    @Grammarsalad: There's quite a few steps, so I think it would be easier if I posted a before and after of the relevant code.

    Search UI.MENU for

    table "chargen.proficiency"
    This is the list we will be editing.

    Change the list from this:
    list
    {
    column
    {
    width 62
    label
    {
    area 0 0 280 55
    text lua "Infinity_FetchString(chargen.proficiency[rowNumber].name)"
    text style "normal"
    align right center

    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 4"
    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 3"
    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 2"
    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 1"
    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 0"
    }
    }

    column
    {
    width 9
    label
    {
    area 0 6 45 42
    bam GUIOSW
    frame lua "getPlusFrame(7)"
    sequence 0
    align center center
    }
    }
    column
    {
    width 9
    label
    {
    area 0 6 45 42
    bam GUIOSW
    sequence 1
    frame lua "getMinusFrame(8)"

    align center center
    }
    }

    action "
    currentChargenThiefSkill = nil
    if ticksStarting < 10 then
    if cellNumber == 7 and plusButtonClickable(currentChargenProficiency) then
    createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, true)
    elseif cellNumber == 8 and minusButtonClickable(currentChargenProficiency) then
    createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, false)
    end
    end
    cellNumber = nil
    ticksPassed = 0
    ticksStarting = 0
    "
    actionUpdate "
    currentChargenThiefSkill = nil
    ticksStarting = ticksStarting + 1
    if ticksStarting > 10 then
    ticksPassed = ticksPassed + 1
    if ticksPassed > 7 then
    if cellNumber == 7 and plusButtonClickable(currentChargenProficiency) then
    createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, true)
    elseif cellNumber == 8 and minusButtonClickable(currentChargenProficiency) then
    createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, false)
    end
    ticksPassed = 0
    end
    end
    "

    rowheight 54
    area 37 248 523 432
    table "chargen.proficiency"
    var currentChargenProficiency
    scrollbar 'GUISCRC'

    }

    To this:
    list
    {
    column
    {
    width 54
    label
    {
    area 0 0 241 55
    text lua "Infinity_FetchString(chargen.proficiency[rowNumber].name)"
    text style "normal"
    align right center

    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 6"
    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 5"
    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 4"
    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 3"
    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 2"
    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 1"
    }
    }
    column
    {
    width 4
    label
    {
    bam GUIPFC
    area 0 19 16 16
    align center center
    enabled "chargen.proficiency[rowNumber].value > 0"
    }
    }

    column
    {
    width 9
    label
    {
    area 0 6 45 42
    bam GUIOSW
    frame lua "getPlusFrame(9)"
    sequence 0
    align center center
    }
    }
    column
    {
    width 9
    label
    {
    area 0 6 45 42
    bam GUIOSW
    sequence 1
    frame lua "getMinusFrame(10)"

    align center center
    }
    }

    action "
    currentChargenThiefSkill = nil
    if ticksStarting < 10 then
    if cellNumber == 9 and plusButtonClickable(currentChargenProficiency) then
    createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, true)
    elseif cellNumber == 10 and minusButtonClickable(currentChargenProficiency) then
    createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, false)
    end
    end
    cellNumber = nil
    ticksPassed = 0
    ticksStarting = 0
    "
    actionUpdate "
    currentChargenThiefSkill = nil
    ticksStarting = ticksStarting + 1
    if ticksStarting > 10 then
    ticksPassed = ticksPassed + 1
    if ticksPassed > 7 then
    if cellNumber == 9 and plusButtonClickable(currentChargenProficiency) then
    createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, true)
    elseif cellNumber == 10 and minusButtonClickable(currentChargenProficiency) then
    createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, false)
    end
    ticksPassed = 0
    end
    end
    "

    rowheight 54
    area 37 248 523 432
    table "chargen.proficiency"
    var currentChargenProficiency
    scrollbar 'GUISCRC'

    }


    I've attached the two variants, so you can run a Diff tool on them to see exactly what changed.

    Also, to enable 7-pips on the engine-level, you need to do a special 2DA edit.

    PROFSMAX.2DA: The last three columns in this file aren't documented, but they determine the max amount of pips allowed at character creation in the relevant campaign. The last column defines ToB, I haven't tested the others. You need to set this to 7. (That is, if you want that amount of pips to be available when you first create your character).
    Awesome! Thanks @Bubb
    I knew about profsmax, but it's good to have that info out there
  • kjeronkjeron Member Posts: 2,368
    Bubb said:

    PROFSMAX.2DA: The last three columns in this file aren't documented, but they determine the max amount of pips allowed at character creation in the relevant campaign.

    The columns represent levels, not campaigns.

    The first column is always level 1.
    The second column is for levels greater than one and less than the next column.
    The remaining columns are for all levels equal to the columns specified level (column header) and less than the next columns specified level, with the left-most columns having priority. The last column is for all levels equal or greater than the columns specified level.

    In it's default, column 1 is for level 1, column 2 is for level 2, column 3 is for levels 3-5, column 4 is for levels 6-8, and the last column for levels 9+. In the case of extending to 7 pips, you would add two columns, one with header (12) and the other (15), to keep the current trend (the maximum increases by one every third level).

    Right now, the only reason a Fighter cannot raise their proficiency to 5 at level 2 is because they don't receive any proficiency points at level 2, as "PROFSMAX.2da" would allow it if they did.
  • BubbBubb Member Posts: 1,005
    @kjeron: Oops! I should just stick with the UI stuff. Thanks for correcting :)
  • GrammarsaladGrammarsalad Member Posts: 2,582
    Works like a charm!



    Thanks again @Bubb !
Sign In or Register to comment.