Skip to content

[MOD] Unhide Chargen Options

AdulAdul Member Posts: 2,002
Version 1.0



The EE 2.0 update brought with it the new practice of hiding unavailable character choices during character creation. This means, for instance, that if you choose the halfling race, in class selection you will only see the 4 classes that are available to you and none of the disabled options, where in previous game versions you could see all the disabled options. As you can probably tell, I'm not a fan of this new behavior. So I made this.

The lazily named Unhide Chargen Options mod restores the original chargen behavior, showing disabled character options to you during character creation. It does not change which options you can choose, only which ones will show up (as in, all of them).

The following previously hidden options are restored:
  • Classes excluded by your race selection
  • Kits excluded by your race selection
  • Alignments excluded by your class/kit selections
  • Weapon proficiencies excluded by your class/kit selections

Install:

1. Download the zip file from the bottom of this post and unzip it into your override folder


2. Backup your UI.menu file, then open it up for editing


3. First, we'll make the race, class, kit, alignment, and racial enemy list rows a bit narrower so we can fit more options in there.

3a) Search for all instances of "area 0 0 340 44" (without quotes) and replace them with "area 0 0 340 32".

3b) Search for all instances of "rowheight 44" and replace them with "rowheight 32".


4. We need to ensure that the mod maps out all the available character options at the start of the character creation process. Search for the following code segment:
name 'CHARGEN' align center center ignoreescBelow it, insert the following code:
onOpen "generateAllChargenOptions()"


5. Now we'll make some changes to the class menu to restore the hidden classes. Search for name 'CHARGEN_CLASS'

5a) A few lines below, replace the onopen segment (the whole line) with the following code:
onopen " lastChargenClass = nil currentChargenClass = nil if (createCharScreen:GetCurrentStep() == const.STEP_DUALCLASS_CLASS) then allChargenClasses = chargen.class allChargenOptionsGenerated = false end "
5b) A few lines below, replace
text lua "Infinity_FetchString(chargen.class[rowNumber].name)"with
text lua "Infinity_FetchString(allChargenClasses[rowNumber].name)"
5c) Directly below the label segment that includes the above line, insert:
label { area 0 0 340 32 rectangle 1 rectangle opacity 180 enabled "getClassDisabled(allChargenClasses[rowNumber].id)" }
5d) Two lines below, replace the action segment (including the two quotation marks and everything between them) with:
actionUpdate " if (allChargenClasses[currentChargenClass] and getClassDisabled(allChargenClasses[currentChargenClass].id)) then currentChargenClass = lastChargenClass else lastChargenClass = currentChargenClass end if (allChargenClasses[currentChargenClass]) then createCharScreen:OnClassSelectButtonClick(allChargenClasses[currentChargenClass].id) end "
5e) Scroll down to
table "chargen.class"and replace it with
table "allChargenClasses"
5f) Scroll down to
text lua "classOrGeneralHelp()"and replace it with
text lua "getClassHelpText()"


6. Now we'll unhide the hidden kits. Scroll down to name 'CHARGEN_KIT'

6a) Insert just below the above line:
onopen "lastChargenKit = currentChargenKit"
6b) A few lines below, replace
text lua "Infinity_FetchString(chargen.kit[rowNumber].name)"with
text lua "Infinity_FetchString(allChargenClasses[currentChargenClass].kits[rowNumber].name)"
6c) Directly below the label segment that includes the above line, insert:
label { area 0 0 340 32 rectangle 1 rectangle opacity 180 enabled "getKitDisabled(allChargenClasses[currentChargenClass].kits[rowNumber].id)" }
6d) Two lines below, replace the action segment with:
actionUpdate " if (allChargenClasses[currentChargenClass].kits[currentChargenKit] and getKitDisabled(allChargenClasses[currentChargenClass].kits[currentChargenKit].id)) then currentChargenKit = lastChargenKit else lastChargenKit = currentChargenKit end if (allChargenClasses[currentChargenClass].kits[currentChargenKit]) then createCharScreen:OnKitSelectButtonClick(allChargenClasses[currentChargenClass].kits[currentChargenKit].id) end "
6e) Scroll down to
table "chargen.kit"and replace it with
table "allChargenClasses[currentChargenClass].kits"
6f) Scroll down to
text lua "kitOrGeneralHelp()"and replace it with
text lua "getKitHelpText()"


7. Now we'll do the same for the alignment menu. Scroll down to name 'CHARGEN_ALIGNMENT'

7a) A few lines below, replace the onopen segment with the following code:
onopen " lastChargenAlignment = nil currentChargenAlignment = nil "
7b) A few lines below, replace
text lua "Infinity_FetchString(chargen.alignment[rowNumber].name)"with
text lua "Infinity_FetchString(allChargenAlignments[rowNumber].name)"
7c) Directly below the label segment that includes the above line, insert:
label { area 0 0 340 32 rectangle 1 rectangle opacity 180 enabled "getAlignmentDisabled(allChargenAlignments[rowNumber].id)" }
7d) Two lines below, replace the action segment with:
actionUpdate " if (allChargenAlignments[currentChargenAlignment] and getAlignmentDisabled(allChargenAlignments[currentChargenAlignment].id)) then currentChargenAlignment = lastChargenAlignment else lastChargenAlignment = currentChargenAlignment end if allChargenAlignments[currentChargenAlignment] then createCharScreen:OnAlignmentSelectButtonClick(allChargenAlignments[currentChargenAlignment].id) end "
7e) Scroll down to
table "chargen.alignment"and replace it with
table "allChargenAlignments"
7f) Scroll down to
text lua "alignmentOrGeneralHelp()"and replace it with
text lua "getAlignmentHelpText()"


8. Finally, we need to restore the hidden proficiencies. Search for name 'CHARGEN_PROFICIENCIES'

8a) A few lines below, replace the onopen segment with the following code:
onopen " currentChargenProficiency = nil currentChargenThiefSkill = nil ticksPassed = 0 ticksStarting = 0 if (chargen.levelingUp or (createCharScreen:GetCurrentStep() == const.STEP_DUALCLASS_PROFICIENCIES)) then allChargenProficiencies = chargen.proficiency allChargenOptionsGenerated = false profRowDict = nil else translateProficiencyRows() end "
8b) Scroll down to
text lua "Infinity_FetchString(chargen.proficiency[rowNumber].name)"and replace it with with
text lua "Infinity_FetchString(allChargenProficiencies[rowNumber].name)"
8c) Search for all instances of
chargen.proficiency[rowNumber].valueand replace them with
getTranslatedProficiencyValue(rowNumber)
8d) Scroll down to
frame lua "getPlusFrame(7)"and insert below it
enabled "getTranslatedProficiencyEnabled(rowNumber)"
8e) Scroll down to
frame lua "getMinusFrame(8)"and insert below it
enabled "getTranslatedProficiencyEnabled(rowNumber)"
8f) Search for all instances of
chargen.proficiency[currentChargenProficiency].idand replace them with
getTranslatedProficiencyId(currentChargenProficiency)
8g) Scroll down to
table "chargen.proficiency"and replace it with
table "allChargenProficiencies"
8h) Search for
text lua "proficiencyOrGeneralHelp()"and replace it with
text lua "getProficiencyHelpText()"


9. Just kidding, there's no 9. You're done. Congratulations!
mf2112inethJuliusBorisovMr2150RodrianRavenslightGrammarsaladTalarasha[Deleted User]

Comments

  • AdulAdul Member Posts: 2,002
    Post reserved for additional info (updates, etc.)
  • [Deleted User][Deleted User] Posts: 0
    edited June 2016
    The user and all related content has been deleted.
  • Mr2150Mr2150 Member Posts: 1,170
    edited June 2016
    Why not immediately useful, as it's not adding new stuff or changing functionality, what this mod does do is unhide the missing stuff. As a result, I find this mod very interesting for the possibilities it opens up (and had already messaged @Adul about it). Now this information is available what can Adul/others then do with it...

    Also the way the mod works, how it collects all the alternatives, is very clever and robust - especially if the user has modded the class/kits in some way.
    Post edited by Mr2150 on
    Adul
  • iavasechuiiavasechui Member Posts: 274
    Does the new version not show classes that races cannot get in vanilla even if the player is using a mod that gives more classes to races? If that is the case then this mod is a very useful one indeed.
  • RodrianRodrian Member Posts: 426
    I personally find Adul's #1 reason to be quite important, accurate and doubtlessly worth consideration with the future updates, so I'm gonna' tag @Dee here. .
    Adul
  • DeeDee Member Posts: 10,447
    I'll pass it along. In the meantime, you should be able to add a toggle button that hides/shows the disabled choices. That would let you see the full list if you're curious without forcing you to scroll when you know what you want.
    Rodrianmf2112AncientCowboyAdul
  • The user and all related content has been deleted.
  • lefreutlefreut Member Posts: 1,462
    edited November 2019
    ***
    Post edited by lefreut on
  • The user and all related content has been deleted.
  • AdulAdul Member Posts: 2,002
    To be fair, I don't think it was ever just a cosmetic change. Removing options from menus that could be available to you is a fairly drastic turn towards a more streamlined and less transparent UI design that does not fit well with the original game in my opinion.

    And I did submit a feature request to restore the missing chargen options ages ago, but unfortunately the ticket (not unlike my other feature requests) hasn't seen much activity from the official side:
    https://support.baldursgate.com/issues/20614
    [Deleted User]
Sign In or Register to comment.