I'm trying to set the background of the Troll to the cata one, but it keeps using the Orc UI I don't really know how to refer to the troll race and I couldn't see anything obvious in the LUA.
It's handled in GlueParent.lua as far as I remember.
Okay, I tried it like this:GlueAmbienceTracks["ORC"] = "GlueScreenOrc";GlueAmbienceTracks["TROLL"] = "GlueScreenTroll";And nothing changed. I have the map UI_Troll in my models folder.
TROLL is not being parsed into it. Look at where the table is accessed from.
-- Function to set the background model for character select and create screensfunction SetBackgroundModel(model, name) local nameupper = strupper(name); local path = "Interface\Glues\Models\UI_"..name.."\UI_"..name..".m2"; if ( model == CharacterCreate ) then SetCharCustomizeBackground(path); else SetCharSelectBackground(path); end PlayGlueAmbience(GlueAmbienceTracks[nameupper], 4.0); SetLighting(model, nameupper)end
function CharacterSelect_SelectCharacter(id, noCreate) if ( id == CharacterSelect.createIndex ) then if ( not noCreate ) then PlaySound("gsCharacterSelectionCreateNew"); SetGlueScreen("charcreate"); end else CharacterSelect.currentModel = GetSelectBackgroundModel(id); SetBackgroundModel(CharacterSelect,CharacterSelect.currentModel); SelectCharacter(id); endend
... local backgroundFilename = GetCreateBackgroundModel(); SetBackgroundModel(CharacterCreate, backgroundFilename);end
-- This line of code is already called in the same function in CharacterCreatelocal race, fileString = GetNameForRace();-- Use this data to hack itif race == "TROLL" thenbackgroundFilename = "TROLL"end
message(fileString);
In GlueParent.lua we can see this function:Code: [Select]-- Function to set the background model for character select and create screensfunction SetBackgroundModel(model, name) local nameupper = strupper(name); local path = "Interface\Glues\Models\UI_"..name.."\UI_"..name..".m2"; if ( model == CharacterCreate ) then SetCharCustomizeBackground(path); else SetCharSelectBackground(path); end PlayGlueAmbience(GlueAmbienceTracks[nameupper], 4.0); SetLighting(model, nameupper)endThis is loading the backgrond based on a name.If we look for all references to this function we can see in CharacterSelect.lua:Code: [Select]function CharacterSelect_SelectCharacter(id, noCreate) if ( id == CharacterSelect.createIndex ) then if ( not noCreate ) then PlaySound("gsCharacterSelectionCreateNew"); SetGlueScreen("charcreate"); end else CharacterSelect.currentModel = GetSelectBackgroundModel(id); SetBackgroundModel(CharacterSelect,CharacterSelect.currentModel); SelectCharacter(id); endendAnd CharacterCreate.lua:Code: [Select]... local backgroundFilename = GetCreateBackgroundModel(); SetBackgroundModel(CharacterCreate, backgroundFilename);endGetCreateBackgroundModel is an internal function. I believe it gets that data from the CharRaces.dbc, but that is a guess.You could hack it by saying:Code: [Select]-- This line of code is already called in the same function in CharacterCreatelocal race, fileString = GetNameForRace();-- Use this data to hack itif race == "TROLL" thenbackgroundFilename = "TROLL"endIf you want to figure out what is in a variable, you can do this:Code: [Select]message(fileString);Which displays it in a box.