This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [QUESTION] Different Race backgrounds on Char creation/selec  (Read 914 times)

spiderwaseem

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 154
    • View Profile
    • http://anarchy-wow.com/
Hello!

For the past couple of hours, I've been trying to make a race (Orc, ID 2) have a different character creation screen background, than it's character selection screen. I failed several times to do so.

I use the following code in GlueParent.lua to set a character creation background:
Quote
   if ( name == "Orc" or "ORC" ) then
      name = "Orc";
   end

The code above signifies that ["Orc" or "ORC"] are representing which race to set the background for.
And [name = "Orc";] sets which background model to set for the race.

This is also within the same function which allows me to just say the UI Backgrounds name instead of "UI_...." :
Quote
   local nameupper = strupper(name);
    local path = "Interface\Glues\Models\UI_"..name.."\UI_"..name..".m2";
   if ( model == CharacterCreate ) then
      SetCharCustomizeBackground(path);
   else
      SetCharSelectBackground(path);
   end


I believe this code isn't new to anyone here, but I'm providing as much info as possible, to recieve as much info as possible.

----
Now, what I'm trying to do is make the Orc race have 2 different backgrounds for 2 different occasions.
1 Background on the Character Creation screen, then a different background on the Character Selection Screen.

I tried the following code in GlueParent.lua, under the following function:

function SetBackgroundModel(model, name)

Quote
   if ( name == "Orc" or "ORC" and CharacterCreate_Finish(true)) then
      name = "Human";
   end

The above didn't work, so I've tried the following:

Quote
   if ( name == "Orc" or "ORC" and CharacterCreate_Finish(true)) then
      SetCharCustomizeBackground("Interface\Glues\Models\UI_Human\UI_Human.m2");
   end

That didn't work either.

In total, I tried to use similar code on "OnShow" or similar functions.
Overall, I edited GlueParent.lua, CharacterSelect.lua and CharacterCreate.lua.
I didn't really get anywhere.


In conclusion, I'm asking for help from anyone here who can write a lua code for WoW 3.3.5 that can cause a race (Orc, ID: 2) to have 2 different backgrounds. 1 On the Character Creation screen, and one on Character Selection.


Thanks for everyone's time who read and will help. :)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Kaev

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 308
    • View Profile
Re: [QUESTION] Different Race backgrounds on Char creation/s
« Reply #1 on: July 16, 2015, 07:44:09 am »
This is client modding, not serverside modding. :P
And this won't fix the problem, but maybe problems in the future:
Code: [Select]
if ( name == "Orc" or name == "ORC" and CharacterCreate_Finish(true)) then

You had name == "Orc" or "ORC" instead of name == "Orc" or name == "ORC".
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

spiderwaseem

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 154
    • View Profile
    • http://anarchy-wow.com/
Re: [QUESTION] Different Race backgrounds on Char creation/s
« Reply #2 on: July 16, 2015, 09:01:54 am »
Quote from: "Kaev"
This is client modding, not serverside modding. :P
And this won't fix the problem, but maybe problems in the future:
Code: [Select]
if ( name == "Orc" or name == "ORC" and CharacterCreate_Finish(true)) then

You had name == "Orc" or "ORC" instead of name == "Orc" or name == "ORC".

Thanks for the heads up on that. :)

If anyone can help on this issue, thought, that would be great!
« Last Edit: January 01, 1970, 01:00:00 am by Admin »