Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Axis & Allies 1942 Online is now available in Early Access! Buy it on Steam. The FAQ is available.
New Premium Module: Tyrants of the Moonsea! Read More
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

[MOD] Unhide Chargen Options

AdulAdul Member Posts: 1,912
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: 1,912
    Post reserved for additional info (updates, etc.)

  • subtledoctorsubtledoctor Member Posts: 11,231
    edited June 2016
    I don't mean for this to sound critical, but... why? What's the difference? Seems like this just introduces more unnecessary scrolling.

    EDIT - seriously not being critical. Just want to know more about what motivated you to make this.

  • 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: 273
    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: 414
    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
  • subtledoctorsubtledoctor Member Posts: 11,231
    Dee said:

    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.

    Anyone have any idea how to do this? And, importantly, could it be done in Weidu? (I don't understand any of this UI modding stuff, I literally had to have a drink after reading the install instructions in the first post of this thread... :(

    Why doesn't the game already have a toggle button or game option to show/hide this stuff??

  • lefreutlefreut Member Posts: 1,426

    Anyone have any idea how to do this? And, importantly, could it be done in Weidu? (I don't understand any of this UI modding stuff, I literally had to have a drink after reading the install instructions in the first post of this thread... :(

    The only way to be able to show the disabled choices is to build the list manually (like in the first post). I'm not aware of any hidden option that can do that automatically.

    This tweak is in EEUITweaks. It's easier to install it that way.

    Why doesn't the game already have a toggle button or game option to show/hide this stuff??

    They change how this works in the new UI in 2.0 (probably thinking it was not really important to add an option for this). And since then, we didn't have a big patch only bug fixes. But as a new update is coming, it's time to open a feature request about it :)

  • subtledoctorsubtledoctor Member Posts: 11,231
    lefreut said:

    They change how this works in the new UI in 2.0 (probably thinking it was not really important to add an option for this).

    I defended Beamdog change earlier in this thread, but that was before I realized this change is not just cosmetic, but actually can cause functional issues in the game, not allowing you to choose proficiencies that should be available to you:
    https://support.baldursgate.com/issues/31771

  • AdulAdul Member Posts: 1,912
    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.