• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How to use alternate hero skins?

Status
Not open for further replies.
Level 3
Joined
May 27, 2013
Messages
48
I am trying to figure out how to use the alternate female Death Knight and Demon Hunter skins in a custom (not Melee) map. I am told I can accomplish this with triggers, but I have no idea how. Can anybody walk me through how to set the trigger?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,511
It uses rawcodes. Go to the object editor and find some units that you want to use. Then press Control + D. You'll see the unit names change to their rawcode form. Paladin becomes Hpal, Archmage becomes Hamg, Footman becomes hfoo, etc...

Here's the default action.
  • Unit - Set Unit Skin of (Triggering unit) to 'Hamg'
So simply replace Hamg with the rawcode of your desired unit. The ' ' are needed or it won't work.

So if you want the Paladin skin:
  • Unit - Set Unit Skin of (Triggering unit) to 'Hpal'
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,511
I'm not sure how experienced you are at making triggers so forgive me if you know this already.

Click (Triggering unit) and it will bring up a list of functions you can use. You can select a pre-placed unit on the map, or choose one of the many Event Responses.

Event Responses are as their name implies, a response to an Event.
Events are things that happen in the game. A unit dies, A hero gains a level, A unit casts an ability, A player types a chat message, etc.

Your basic trigger structure will have an Event (something that happened), Conditions (here's where you ask questions), and then the Actions (what should happen as a result of all of this?). You'll see that inside of your Conditions/Actions you will have access to a long list of Event Responses. Only use the ones that work with your Event. It's easy to tell which ones these are because their names will be very similar.

So for example take this Event:
  • Unit - A unit dies
The Event Response Dying unit will be the unit that died. The Event Response Killing unit will be the unit that killed it (IF a unit killed it in the first place). Triggering unit will be the Dying unit as well. Triggering Unit is always set to the unit mentioned in the Event (A unit dies...).


So now the question is how do you want to apply the Skins? It's entirely up to you and how you want your map to work. Should all of the Death Knight's have the Female Skin after being trained from an altar? If yes, then we need to Apply the Skin to the Hero when it first comes into creation. We can do this using the "A unit enters map" Event. (This Event also works if you create the Death Knight through triggers since it'll Enter the map upon being created).

This trigger should turn the normal Death Knight into it's female form when it enters the map (trained/created):
  • Male to Female Deathknight
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Death Knight
    • Actions
      • Custom script: call BlzSetUnitSkin( GetTriggerUnit(), 1432642918 )
You'll notice this is slightly different from what I showed you before. It's using Custom script in place of the Set Unit Skin action. This custom script actually IS the Set Unit Skin action, but in it's Jass (code) form.

I actually just learned this now but it seems as though the Female Death Knight and other skins are sort of hidden from us. It's not too difficult to figure out their Id's but they'll come in this long integer form. This form is actually too long to fit in the trigger editor's value box so you'll have to use Custom script. Custom script is the actual code that Warcraft 3 uses (Jass). It has less limitations but it's also a lot uglier and less friendly to work with.
Edit: Looks like you can dig up the rawcode id's as well and not have to use the Custom script method.
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,511
You would change the Unit in the Condition from Death Knight to Demon Hunter and change the Integer in the custom script to whatever the Female DH's id is. I don't know what it is unfortunately. Try searching around for it.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,511
My bad, thought you could do that for some reason. Try the custom script:
  • Custom script: call BlzSetUnitSkin( GetTriggerUnit(), 'Edef' )
I found everything from the thread I linked.
 
Last edited:
Level 3
Joined
May 27, 2013
Messages
48
Now I just need to figure out why the sounds for the custom goblin unit I made aren't working. It's supposed to use the same sounds as the Goblin Tinker, but it only sounds off when I first train it.
 
Status
Not open for further replies.
Top