[MOD] Unhide Chargen Options
 Adul                
                
                    Member Posts: 2,002
Adul                
                
                    Member Posts: 2,002                
            
                
                                    
                                  in UI Modding             
                    
                    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:
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:
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:
5b) A few lines below, replace
5c) Directly below the label segment that includes the above line, insert:
5d) Two lines below, replace the action segment (including the two quotation marks and everything between them) with:
5e) Scroll down to
5f) Scroll down to
6. Now we'll unhide the hidden kits. Scroll down to name 'CHARGEN_KIT'
6a) Insert just below the above line:
6b) A few lines below, replace
6c) Directly below the label segment that includes the above line, insert:
6d) Two lines below, replace the action segment with:
6e) Scroll down to
6f) Scroll down to
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:
7b) A few lines below, replace
7c) Directly below the label segment that includes the above line, insert:
7d) Two lines below, replace the action segment with:
7e) Scroll down to
7f) Scroll down to
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:
8b) Scroll down to
8c) Search for all instances of
8d) Scroll down to
8e) Scroll down to
8f) Search for all instances of
8g) Scroll down to
8h) Search for
9. Just kidding, there's no 9. You're done. Congratulations!
                
                

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)"withtext 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 withtable "allChargenClasses"5f) Scroll down to
text lua "classOrGeneralHelp()"and replace it withtext 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)"withtext 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 withtable "allChargenClasses[currentChargenClass].kits"6f) Scroll down to
text lua "kitOrGeneralHelp()"and replace it withtext 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)"withtext 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 withtable "allChargenAlignments"7f) Scroll down to
text lua "alignmentOrGeneralHelp()"and replace it withtext 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 withtext lua "Infinity_FetchString(allChargenProficiencies[rowNumber].name)"8c) Search for all instances of
chargen.proficiency[rowNumber].valueand replace them withgetTranslatedProficiencyValue(rowNumber)8d) Scroll down to
frame lua "getPlusFrame(7)"and insert below itenabled "getTranslatedProficiencyEnabled(rowNumber)"8e) Scroll down to
frame lua "getMinusFrame(8)"and insert below itenabled "getTranslatedProficiencyEnabled(rowNumber)"8f) Search for all instances of
chargen.proficiency[currentChargenProficiency].idand replace them withgetTranslatedProficiencyId(currentChargenProficiency)8g) Scroll down to
table "chargen.proficiency"and replace it withtable "allChargenProficiencies"8h) Search for
text lua "proficiencyOrGeneralHelp()"and replace it withtext lua "getProficiencyHelpText()"9. Just kidding, there's no 9. You're done. Congratulations!
9        
             
                                
Comments
1. It is detrimental to new players learning about the game. A player who is unfamiliar with the options available to them could, for example, pick the halfling race and go through the rest of the character creation process without ever finding out that there are more than 4 classes in the game. Not to mention the unlikeliness of finding out about the dwarven defender kit.
2. It curbs the viability of iterating character design. I often find myself wanting to take a look at all the available classes in the game first, before deciding on what kind of character I want to create. With the 2.0 behavior, looking at all the options in-game is just not possible. (That is, without cycling through all the races and making a mental list of the classes available to each one, which is obviously not very convenient.)
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.
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