[DiscordArchive] Good day. In my addon (for client version 1.12) I would like to display mob models. There are mobs i
[DiscordArchive] Good day. In my addon (for client version 1.12) I would like to display mob models. There are mobs i
Archived author: Wayborn • Posted: 2022-07-20T19:36:17.163000+00:00
Original source
Good day. In my addon (for client version 1.12) I would like to display mob models. There are mobs in the game with the same models but different textures. For example red and black birds. If I target a mob and call the code (here's a simplified version):
local model = CreateFrame("PlayerModel", nil, UIParent)
model:SetUnit("target")
Then I get on the screen the model I need with the desired texture.
But both red and black birds have model "Creature\\CarrionBird\\CarrionBird.m2" and if I want to display this model with code:
local model = CreateFrame("PlayerModel", nil, UIParent)
model:SetModel("Creature\\CarrionBird\\CarrionBird.m2")
Then I get a snow-white model on the screen without textures at all.
I tried to target different birds and get information about the target model using the functions in the section https://wowwiki-archive.fandom.com/wiki/..._API#Model but all the information about two birds with different textures was the same.
But there is a model like Wisp and code:
local model = CreateFrame("PlayerModel", nil, UIParent)
model:SetModel("Creature\Wisp\\Wisp.m2")
I get a blue translucent Wisp on the screen.
Tell me, please, is it possible for me to get a model with a texture using SetModel?
Archived author: stoneharry • Posted: 2022-07-20T20:56:27.816000+00:00
Original source
The textures must be hardcoded in the model, you can't render models that rely on DBC information to get textures
Archived author: Wayborn • Posted: 2022-07-20T20:58:41.793000+00:00
Original source
That is, if the Wisp or Onyxia model has a texture, but the CarrionBird model does not have a texture, then I will never be able to get a colored bird?
Archived author: stoneharry • Posted: 2022-07-20T21:01:44.502000+00:00
Original source
You can create new versions of the model that hardcodes the textures in the M2 file
Archived author: Wayborn • Posted: 2022-07-20T21:18:12.976000+00:00
Original source
There is a project https://github.com/Koward/Improved_Models and there some textures are in the form of pictures next to the m2 files. And where can I find textures in the regular client 1.12?
Archived author: stoneharry • Posted: 2022-07-20T21:23:56.725000+00:00
Original source
https://github.com/Koward/Improved_Model...arrionBird This is the CarrionBird model (M2 file) which can be edited with a binary editor such as 010 editor, where M2 templates are provided.
The BLP textures are in the same directory, but the way they will be connected to the model is from `DBFilesClient\CreatureDisplayInfo.dbc` - it needs to be hardcoded in the model itself.
I'm not super familiar with this and can't provide a step by step guide
Archived author: Wayborn • Posted: 2022-07-20T21:30:01.308000+00:00
Original source
Thanks in any case for the answer.
And then is there any way to at least stop the animation?
local model = CreateFrame("PlayerModel", nil, UIParent)
model:SetUnit("target")
I have tried model:SetSequence(1) functions - with different numeric values (-1, 0, 1). on animation the bird just flaps its wings, on model:SetSequence(false) - the game gives an error
and model:SetSequenceTime(1, 1) - also with -1, 0, 1 - also without changes, the bird flaps its wings in a loop
Archived author: Jamey • Posted: 2022-07-21T02:22:36.944000+00:00
Original source
PlayerModel / Model frame updates the sequence time on the update tick
Archived author: Jamey • Posted: 2022-07-21T02:22:46.755000+00:00
Original source
So you have to cancel that out AFAIK
Archived author: Kaev • Posted: 2022-07-21T07:13:30.624000+00:00
Original source
I know Krill did a lot of investigation around Warden modules. Not sure if he is still in the MaNGOS team, but you can probably find him on the MaNGOS forum or discord