Hello everyone!
I'm trying to add in a new background for my new class, Demon Hunters.
I was able to add in their background for my Character Creation and it looks fine (image below).
However, after creating the class from char-creation, it ends up looking like the race's background instead of the new class background (image below).
In GlueParent.lua, doing this alone (code below) doesn't do anything: if ( name == "DemonHunter" or name == "DEMONHUNTER" ) then
name = "DemonHunter";
end
I decided to look at a reference and looked into EoC from Stoneharry's release (credits to him for the following code).
He's put in CharacterCreate.lua the following code under the function "SetCharacterRace(id)":
-- Set background
local backgroundFilename = GetCreateBackgroundModel(faction);
if CharacterCreate.selectedClass == 11 then
backgroundFilename = "DEMONHUNTER"
end
SetBackgroundModel(CharacterCreate, backgroundFilename);
if faction == nil then
faction = "Alliance";
end
It seemed to work fine
for only the Character Creation screen, not the Character Selection.(I understand why it says selectedClass == 11 | So no need to go over that).
I tried copying that code and changing where it says "CharacterCreate" to "CharacterSelect", but that just makes the background not show anywhere at all.
Any ideas on what the code should be, and where in specific should it be added?
All I'm trying to do is add in a custom/new background for a class. I'm capable of adding it only into the Character Creation screen only with the help of Stoneharry's code. However, the Character Select screen, I'm not aware of how to get that to show there, for class-specific only.
My class is only available to Blood Elves and Night Elves. Class ID = 12. selectedClass would = 11 because it's the 11th class displayed on the character creation screen.
Any help would be great,
Thanks for your time!