Ok, so getting heads to work 101. You can download the
modfile here. I'm using a copy of AlphaSoldiers Zerosuit skin for this, since I was trying to help with his problem with custom head skins initially. You should substitute all instances of zerosuit for whatever name you used for your skins xml file in the animation directory.
1. Put all the png's for the skin in a \naija sub directory inside graphics. In the example of zerosuit
_mods\head_texture\graphics\naija\zerosuit-body.png
_mods\head_texture\graphics\naija\zerosuit-frontleg1.png
_mods\head_texture\graphics\naija\zerosuit-frontarm1.png
The game will automatically be looking for the head graphics in this folder. To my knowledge the head graphics are hard coded this way, no matter what you put in the skin xml file it will always look in the mod graphics folder and then in the root Aquaria graphics folder for a head file with a name that matches the skin, this means if you use naija.xml for your skin file you should end up with the standard form Naija heads in the aquaria root/gfx folder.
NOTE: If you just moved all your png's into the naija subdirectory, don't forget to update the xml file for the skin to point to "naija/graphic.png" so it doesn't screw up the rest of your skin.
2. All the heads must have a file title that matches the name of the xml that defines the skin. That means if you skin is called zerosuit.xml then your head must be :- graphics\naija\zerosuit-head.png.
_mods\head_texture\animations\skins\zerosuit.xml
_mods\head_texture\graphics\naija\zerosuit-head.png
_mods\head_texture\graphics\naija\zerosuit-head-pain.png
_mods\head_texture\graphics\naija\zerosuit-head-sing.png
...ect
3. If you aren't using naija.xml for your skin file, you will want to add at setcostume("mycosutmename") call in the code. To get it to switch. Putting this in mod-init.lua causes an instant crash. I just added a node into the level that switches the costume over on first update, like this:
runonce=false
function update (me,dt)
if runonce == false then
setCostume("zerosuit")
runonce = true
end
end
There is probably a more elegant way of doing it, but I was trying to put this tutorial together in a snap.