Anyone know how to edit death model with this? Doesn't have an actor so I'm stumped but there must be a way to change the death animation with texture select by id.
You can make a unit use a custom death actor. I would recommend copying the default UnitDeathModel actor, set it up accordingly and link it in the Death Actor Model of your unit actor.
Can we please compile a list of all the combinations of working 'slot, substring, prefix' values for each unit that doesn't just use the normal
Slot: main
Trigger on Substring: _TextureType
Prefix: UnitName_
I've been going through a couple units and some are so fukin annoying to find the right combination of underscore or no underscore or main.diffuse instead of just main that works for different units, so..
Can we please compile a list of all the combinations of working 'slot, substring, prefix' values for each unit that doesn't just use the normal
Slot: main
Trigger on Substring: _TextureType
Prefix: UnitName_
I've been going through a couple units and some are so fukin annoying to find the right combination of underscore or no underscore or main.diffuse instead of just main that works for different units, so..
I say we start compiling a list
I would say, there is no need. There is a list for usable slots in the tutorial. Usable additions are .diffuse .emissive .specular .normal. If there are more, I do not know them.
The safest way to replace the correct texture is to just pick a random slot, always type out the addition at both the model and the texture, dont use the Prefix at all and type the exact texture name (case sensitve, with all underscores, even with the .dds ending to really avoid any possible misread) in the Trigger at Substring field.
Considering you can usually see what to type by just looking at the texture in the previewer. There is no need for a list of over how many hundred models?
Every subfolder in the Materials folder of the model(viewable from inside the Previewer) has at least 1 texture that you should be able to switch out.
The full path of the texture is available for viewing, and it will give you the Texture Type/Slot, usually Emissive/ Diffuse/ Normal/ Specular/ Decal. I haven't seen any models that have a different texture type/slot than the 5 I listed. As Kueken said, there's absolutely no need for a list.
If people have difficulty getting a certain texture to work from a certain model, they can always make a post or send a PM to myself, or any other who won't mind answering stuff.
Then I have 2 questions, how can you change the texture of the goo of the baneling & how can you avoid the "blah blah texture and expression equals 1." error in game?
I get that error in game after changing the main texture of the baneling. I asked for a list because although it may not be difficult to get a combination of slot, texture type, etc. to show the texture in game, there is only one combination that will be error free. I can prove this because I had an error free texture swapped baneling when I first started messing with the model, but after changing more things the error came (but I can still get the new texture to show).
got it set up as baneline_diffuse with 1 texture and goosplat_3 using the same texture as bling diffuse
Okay. I am not exactly sure, but it looks like you are trying to use the same texture file twice on one model. This is not possible currently, because you cannot use 2 texture objects for the same file for unknown reasons, possibly a bug, and you cannot use the same texture object twice on one model, because the slot would conflict.
So, if you really need to use the same texture file twice on a unit, you have to export and re-import it in your map, so the file is available 2 times and you can use 2 different texture objects. Or you could take a different, but similar or otherwise matching 2nd texture.
Wow you were right, that killed the error message... this should be added to page 1 of the topic to fix that error... and I'm surprised you understood what I was going on about.. sounded vague to me
Now, just gotta figure out how to change the baneling goo in the back *goes to test*
Now, just gotta figure out how to change the baneling goo in the back *goes to test*
The green glow in the baneling's back is caused by the emissive texture. Try to swap that; but be careful: Most emissive textures do not work correctly with the baneling model. You can try, which one works in my testmap.
Sorry, but I have been struggling with another major bug for a long time now (textures seemed to randomly apply to a different slot), and was finally able to pinpoint it. Its a little complex, I will try to explain it as best as I can.
If a model uses a specific texture, and you use this exact texture file for a texture object, and you happen to have another texture object of another file you want to apply to the model, and both texture objects use the same slot, the texture you want to apply might replace the texture used by the first texture object, instead of the texture you defined in the texture declarations.
This did probably lead to more confusion than clarification, so I will give you an example:
You want to re-skin the arms of a firebat.
You add a texture declaration, slot main.diffuse , trigger on substring FirebatMercenary_Diffuse.dds
You create a texture object, slot main.diffuse, containing the texture of your choice.
I will use Assets/Textures/Battlecruiser_diffuse.dds
You TextureSelectById the texture in the Firebat's actor
So far, so good; everything should work.
But now, we will add a new texture object, slot main.diffuse, file Assets/Textures/FireBat_Diffuse.dds.
Suddenly, just by creating this additional texture object, our previous texture will not be applied to the arm parts, but cover the body of the firebat instead, even though we didn't even add the body to the model's texture declarations.
This sounds, as if it would almost never happen, but many textures are used by a huge amount of models, for example generic glows, smokes, beams... if you want to swap those, be careful.
Note, that this does not happen always, if you do it the other way around and try to swap the Firebat's body, it will work properly.
Solution: Don't use slots you use for the model for textures also used by the model ;)
Attached a test map, containing the firebat example. Just delete the FireBat_Diffuse texture and see what happens (you have to start the game or restart the editor to see the difference)
@DrSuperEvil: Go
hm.. I dont quite understand your question; I probably didn't clarify the problem enough:
The model files don't use or block any slots. You use the slots for your own model objects. If you use some slots seldomly, take those.
The problem is, that the game somehow links the texture declarations with the texture objects by file name, and the texture objects to other texture objects by slot.
If you have a texture declaration holding a texture, which is used by a model you want to swap textures for, AND this texture object happens to use the same slot like the texture object applied to the model, it will replace the texture for the model, which is used for the first texture object.
This is independent of the used slot, the declarations and the actually applied textures in the actor.
As you can see in the testmap, I use main.diffuse to swap the arm diffuses. It works just fine, when deleting the body texture.
As soon as the body texture exists and uses the main.diffuse slot as well, the body will get the texture. The texture object only needs to exist; it is not applied to the actor, hell the model does not even have the declaration for the body. But still, it swaps the body texture.
In general, its just like seraphilo said: The slot doesn't matter at all. I could have used decal.emissive to swap the diffuse map, or hair.specular. But as soon as there is the texture object holding the body textures and the same slot, it bugs (and I am pretty sure, this is indeed a bug).
Anyone know how to edit death model with this? Doesn't have an actor so I'm stumped but there must be a way to change the death animation with texture select by id.
@GhostNova91: Go
You can make a unit use a custom death actor. I would recommend copying the default UnitDeathModel actor, set it up accordingly and link it in the Death Actor Model of your unit actor.
Can we please compile a list of all the combinations of working 'slot, substring, prefix' values for each unit that doesn't just use the normal
Slot: main
Trigger on Substring: _TextureType
Prefix: UnitName_
I've been going through a couple units and some are so fukin annoying to find the right combination of underscore or no underscore or main.diffuse instead of just main that works for different units, so..
I say we start compiling a list
I would say, there is no need. There is a list for usable slots in the tutorial. Usable additions are
.diffuse .emissive .specular .normal. If there are more, I do not know them.
The safest way to replace the correct texture is to just pick a random slot, always type out the addition at both the model and the texture, dont use the Prefix at all and type the exact texture name (case sensitve, with all underscores, even with the .dds ending to really avoid any possible misread) in the Trigger at Substring field.
Considering you can usually see what to type by just looking at the texture in the previewer. There is no need for a list of over how many hundred models?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@iE4TM4PS: Go
Every subfolder in the Materials folder of the model(viewable from inside the Previewer) has at least 1 texture that you should be able to switch out.
The full path of the texture is available for viewing, and it will give you the Texture Type/Slot, usually Emissive/ Diffuse/ Normal/ Specular/ Decal. I haven't seen any models that have a different texture type/slot than the 5 I listed. As Kueken said, there's absolutely no need for a list.
If people have difficulty getting a certain texture to work from a certain model, they can always make a post or send a PM to myself, or any other who won't mind answering stuff.
Then I have 2 questions, how can you change the texture of the goo of the baneling & how can you avoid the "blah blah texture and expression equals 1." error in game?
I get that error in game after changing the main texture of the baneling. I asked for a list because although it may not be difficult to get a combination of slot, texture type, etc. to show the texture in game, there is only one combination that will be error free. I can prove this because I had an error free texture swapped baneling when I first started messing with the model, but after changing more things the error came (but I can still get the new texture to show).
Have you used the same texture for other slots?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
got it set up as baneline_diffuse with 1 texture and goosplat_3 using the same texture as bling diffuse
Okay. I am not exactly sure, but it looks like you are trying to use the same texture file twice on one model. This is not possible currently, because you cannot use 2 texture objects for the same file for unknown reasons, possibly a bug, and you cannot use the same texture object twice on one model, because the slot would conflict.
So, if you really need to use the same texture file twice on a unit, you have to export and re-import it in your map, so the file is available 2 times and you can use 2 different texture objects. Or you could take a different, but similar or otherwise matching 2nd texture.
@Kueken531: Go
Wow you were right, that killed the error message... this should be added to page 1 of the topic to fix that error... and I'm surprised you understood what I was going on about.. sounded vague to me
Now, just gotta figure out how to change the baneling goo in the back *goes to test*
The green glow in the baneling's back is caused by the emissive texture. Try to swap that; but be careful: Most emissive textures do not work correctly with the baneling model. You can try, which one works in my testmap.
Example baneling without the goo:
An awsome Viking.
Shoots freezing warhead.
YESS!!
Sorry, but I have been struggling with another major bug for a long time now (textures seemed to randomly apply to a different slot), and was finally able to pinpoint it. Its a little complex, I will try to explain it as best as I can.
If a model uses a specific texture, and you use this exact texture file for a texture object, and you happen to have another texture object of another file you want to apply to the model, and both texture objects use the same slot, the texture you want to apply might replace the texture used by the first texture object, instead of the texture you defined in the texture declarations.
This did probably lead to more confusion than clarification, so I will give you an example:
I will use Assets/Textures/Battlecruiser_diffuse.dds
So far, so good; everything should work.
But now, we will add a new texture object, slot main.diffuse, file Assets/Textures/FireBat_Diffuse.dds.
Suddenly, just by creating this additional texture object, our previous texture will not be applied to the arm parts, but cover the body of the firebat instead, even though we didn't even add the body to the model's texture declarations.
This sounds, as if it would almost never happen, but many textures are used by a huge amount of models, for example generic glows, smokes, beams... if you want to swap those, be careful.
Note, that this does not happen always, if you do it the other way around and try to swap the Firebat's body, it will work properly.
Solution: Don't use slots you use for the model for textures also used by the model ;)
Attached a test map, containing the firebat example. Just delete the FireBat_Diffuse texture and see what happens (you have to start the game or restart the editor to see the difference)
@Kueken531: Go
That's not a bug and I've already telling it weeks before.
Just never use 2 textures declaration in a same slot.
Which slot you want to use, main, body, head, hair, arm, generic01, it's all depends on which one you like. The model itself doesn't have any slots.
And just don't declaration 2 same slots on a single model.
Other textures like Glow, lightningZap, gunflash is all samething, there is NO BUG for it and it's totally NO PROBLEM at all.
I don't want to tell you this but I figured that you are in a wrong way since the begining.
I don't think we are talking about the same thing; re-read my post.
So in hindsight is there some slot that is seldomly used by most models? I.e. some slot we could use for retexturing half a model diffuse textures?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go hm.. I dont quite understand your question; I probably didn't clarify the problem enough:
The model files don't use or block any slots. You use the slots for your own model objects. If you use some slots seldomly, take those.
The problem is, that the game somehow links the texture declarations with the texture objects by file name, and the texture objects to other texture objects by slot.
If you have a texture declaration holding a texture, which is used by a model you want to swap textures for, AND this texture object happens to use the same slot like the texture object applied to the model, it will replace the texture for the model, which is used for the first texture object.
This is independent of the used slot, the declarations and the actually applied textures in the actor.
As you can see in the testmap, I use main.diffuse to swap the arm diffuses. It works just fine, when deleting the body texture.
As soon as the body texture exists and uses the main.diffuse slot as well, the body will get the texture. The texture object only needs to exist; it is not applied to the actor, hell the model does not even have the declaration for the body. But still, it swaps the body texture.
In general, its just like seraphilo said: The slot doesn't matter at all. I could have used decal.emissive to swap the diffuse map, or hair.specular. But as soon as there is the texture object holding the body textures and the same slot, it bugs (and I am pretty sure, this is indeed a bug).
And there is no way to remove these properties using the Texture Declarations - Adaptions - Properties Remove field?
Or Properties Removed on the actual textures?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Still not sure, what you mean. Could you make an example?