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] Adding 1 Time Play Animations to Character Create  (Read 1942 times)

spiderwaseem

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

Since Cataclysm, when you click on a class in the character creation screen, it plays an animation based on the class picked. So for example if you pick a Warrior, the race will Roar 1 time. If you pick a Mage or Warlock, the race will cast a ranged spell.

I want to do something similar or exact on WoTLK.
I've looked through all the FrameXML and GlueXML files in Cataclysm, but I couldn't find a solution.
So my guess is that this isn't made through lua/xml? (ofc not xml, but lua, I would have thought so).

I've tried Google, and a Blizzard forum post was made by some user who said to use the following code:
Code: [Select]
Model:SetAnimation()However, that code didn't work out (I did put in a number of an Animation in the "()", Ex:
Code: [Select]
Model:SetAnimation(74);This is the forum I looked at: http://us.battle.net/wow/en/forum/topic/8569600188


If anyone can help me set a spell cast or animation based on a class selection for WoTLK 3.3.5, then that would be amazing!

Thank You.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

samgartell

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 92
    • View Profile
Re: [QUESTION] Adding 1 Time Play Animations to Character Cr
« Reply #1 on: July 17, 2015, 10:58:18 am »
I think people are gonna need to know how you tried to implement that code, possibly with snippets and why it didn't work out. Asking for help on a forum is a two way deal, give us what you've got so far, so we don't have to make the same mistakes.

Have you taken a loot at Cataclysms character create XML/LUA? Unfortunately PlayerModel:SetAnimation wasn't added until 5.0.4 so that's why it didn't work, and I can't promise whatever they did in Cataclysm to make it work is in 3.3.5a either, it was a fairly big change from LK to Cata, but it's still your best bet.
« 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] Adding 1 Time Play Animations to Character Cr
« Reply #2 on: July 17, 2015, 04:31:50 pm »
Quote from: "samgartell"
I think people are gonna need to know how you tried to implement that code, possibly with snippets and why it didn't work out. Asking for help on a forum is a two way deal, give us what you've got so far, so we don't have to make the same mistakes.

Have you taken a loot at Cataclysms character create XML/LUA? Unfortunately PlayerModel:SetAnimation wasn't added until 5.0.4 so that's why it didn't work, and I can't promise whatever they did in Cataclysm to make it work is in 3.3.5a either, it was a fairly big change from LK to Cata, but it's still your best bet.

Thanks for the reply.
I do notice that the code doesn't exist yet in 3.3.5.
I was making this thread to see if anyone can help me find the right code to use.
I have looked all over the Cataclysm's FrameXML and GlueXML lua/xml files, however, I found nothing.
I triple checked but there is nothing in those files with the following terms:
Quote
anim
animation
animate
model:
playermodel:
setan
setanim
spell
cast
And since I really want to find an answer for this, I checked the entire xml/lua for CharacterCreate.lua/xml, CharacterSelect.lua/xml, GlueParent.lua/xml, and a lot more.

I couldn't find anything relating to playing an animation or spell or attack in the character creation screen.
Or even to play an animation in general.

So if you could possibly provide me with anymore information, that would be great.

Thank You.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ghaster

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 51
    • View Profile
Re: [QUESTION] Adding 1 Time Play Animations to Character Cr
« Reply #3 on: July 17, 2015, 04:41:30 pm »
I am pretty sure that the animations are hardcoded into the wow.exe
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [QUESTION] Adding 1 Time Play Animations to Character Cr
« Reply #4 on: July 17, 2015, 11:00:31 pm »
It is hardcoded. Those setanimation functions on simplemodel are only there since mop, I think. You may be able to fake stuff, but certainly not with spells cast and stuff.
« 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] Adding 1 Time Play Animations to Character Cr
« Reply #5 on: July 18, 2015, 12:01:33 am »
Quote from: "schlumpf"
It is hardcoded. Those setanimation functions on simplemodel are only there since mop, I think. You may be able to fake stuff, but certainly not with spells cast and stuff.

So what kind of similar functions exist in WoTLK?
Where can I view them all?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [QUESTION] Adding 1 Time Play Animations to Character Cr
« Reply #6 on: July 18, 2015, 01:09:09 am »
I personally do not know of any related functionality in wotlk. If there is, it will be members of SimpleModel or whatever that character selection element was. To reiterate, 90% of that stuff is done in the binary, not lua, so you will have a bad time to begin with. Eg, it is the binary triggering changes in model and armor when changing races/classes. I don't even really know if there is some lua event you can hook to then do special stuff like placing that animation. In cata, it is completely hardcoded.
« 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] Adding 1 Time Play Animations to Character Cr
« Reply #7 on: July 18, 2015, 03:08:44 am »
Quote from: "schlumpf"
I personally do not know of any related functionality in wotlk. If there is, it will be members of SimpleModel or whatever that character selection element was. To reiterate, 90% of that stuff is done in the binary, not lua, so you will have a bad time to begin with. Eg, it is the binary triggering changes in model and armor when changing races/classes. I don't even really know if there is some lua event you can hook to then do special stuff like placing that animation. In cata, it is completely hardcoded.

I see.
However, setting the gear appearance on the character creation screen is set through a DBC file called "CharStartOutFit". I have mine completely edited into the MoP Challenge Set (Donor gear on my server).

If I may ask, how about changing the camera view on a click of a button on the character creation screen?
For example, since MoP, when you click the "Next" button, it goes into customizations and zooms in onto the character or race model's face or body depending on what customizations you selected.
I looked through the WoD Code and I see the following:
Code: [Select]
SetFaceCustomizeCamera(true);I believe this zooms into the race's face.
I believe this is hard coded too but the camera is set within the M2 of the background.
I know how to change the camera with hex editing, so doesn't this mean if I can somehow switch backgrounds when I click "Next" to the one that's zoomed in, it will do a similar effect?

So I guess now the question is, can I switch the background on the forward "next" button somehow in lua?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

samgartell

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 92
    • View Profile
Re: [QUESTION] Adding 1 Time Play Animations to Character Cr
« Reply #8 on: July 18, 2015, 10:42:31 am »
Quote from: "spiderwaseem"
I see.
However, setting the gear appearan...

That isn't what he meant, WoW.exe reads the DBC to find which pieces of armour to apply to the model, and then does it, itself. The DBC is just to store the data, the binary interprets it based on it's definition of the file and then uses the data, so I'm not really sure where you were going with that.

As for the camera problem, "SetFaceCustomizeCamera(true)" definitely isn't in 3.3.5, that ones obvious, if there isn't a generic camera switching function (Not saying there isn't, but even if there is, there's no promising it'll work the way you want it) that's compatible with 3.3.5, this again isn't possible.

Switching the background MIGHT work though a little hacky, I think it'd be done in CharacterCreate_Forward() but don't take my word for it.

"MODEL_CAMERA_CONFIG" seems to define "distance" so that's your best lead in my opinion.
« 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] Adding 1 Time Play Animations to Character Cr
« Reply #9 on: July 18, 2015, 02:07:28 pm »
Quote from: "samgartell"
Quote from: "spiderwaseem"
I see.
However, setting the gear appearan...

That isn't what he meant, WoW.exe reads the DBC to find which pieces of armour to apply to the model, and then does it, itself. The DBC is just to store the data, the binary interprets it based on it's definition of the file and then uses the data, so I'm not really sure where you were going with that.

As for the camera problem, "SetFaceCustomizeCamera(true)" definitely isn't in 3.3.5, that ones obvious, if there isn't a generic camera switching function (Not saying there isn't, but even if there is, there's no promising it'll work the way you want it) that's compatible with 3.3.5, this again isn't possible.

Switching the background MIGHT work though a little hacky, I think it'd be done in CharacterCreate_Forward() but don't take my word for it.

"MODEL_CAMERA_CONFIG" seems to define "distance" so that's your best lead in my opinion.

I understand what you mean.
As for the "MODEL_CAMERA_CONFIG", I really see it doing no difference at all.
The actual camera is set within the M2 of the background itself and it can be changed by hex editing.
So if I can somehow change the background to another background by lua or something, then I can change the camera to the zoomed in one on CharacterCreate_Forward().

Do you happen to know how to change the camera on CharacterCreate_Forward(), or basically in lua 3.3.5?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »