Forums WoW Modding Support Archives WoWModding Support Archives [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

[DiscordArchive] Good day. In my addon (for client version 1.12) I would like to display mob models. There are mobs i

rektbyfaith
Administrator
0
07-20-2022, 07:36 PM
#1
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?
rektbyfaith
07-20-2022, 07:36 PM #1

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?

rektbyfaith
Administrator
0
07-20-2022, 08:56 PM
#2
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
rektbyfaith
07-20-2022, 08:56 PM #2

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

rektbyfaith
Administrator
0
07-20-2022, 08:58 PM
#3
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?
rektbyfaith
07-20-2022, 08:58 PM #3

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?

rektbyfaith
Administrator
0
07-20-2022, 09:01 PM
#4
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
rektbyfaith
07-20-2022, 09:01 PM #4

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

rektbyfaith
Administrator
0
07-20-2022, 09:18 PM
#5
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?
rektbyfaith
07-20-2022, 09:18 PM #5

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?

rektbyfaith
Administrator
0
07-20-2022, 09:23 PM
#6
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
rektbyfaith
07-20-2022, 09:23 PM #6

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

rektbyfaith
Administrator
0
07-20-2022, 09:30 PM
#7
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
rektbyfaith
07-20-2022, 09:30 PM #7

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

rektbyfaith
Administrator
0
07-21-2022, 02:22 AM
#8
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
rektbyfaith
07-21-2022, 02:22 AM #8

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

rektbyfaith
Administrator
0
07-21-2022, 02:22 AM
#9
Archived author: Jamey • Posted: 2022-07-21T02:22:46.755000+00:00
Original source

So you have to cancel that out AFAIK
rektbyfaith
07-21-2022, 02:22 AM #9

Archived author: Jamey • Posted: 2022-07-21T02:22:46.755000+00:00
Original source

So you have to cancel that out AFAIK

rektbyfaith
Administrator
0
07-21-2022, 07:13 AM
#10
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
rektbyfaith
07-21-2022, 07:13 AM #10

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

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)