okay, i promised a turtorial.....so here it goes.....we will be taking this from the most basic perspective in order to make it completely understandable.....in other words i will show you a model_default.skin from an already existing model folder and show you how to take it apart in order to gather the necessary references for creating a head.skin, a torso.skin, and a head.skin.....this all may sound difficult but it's really quite simple.....
let's take the stormtrooper folder and extract it from the assets1.pk3.....and into a models/players/"whatever you would like it named".....let's say for clarity's sake we're naming it "jedi_stm".....in the folder you should have certain essential files....
here is a list of what you should have in the beginning:
armor.jpg
armor_blue.jpg
armor_red.jpg
armor_spec.png
helmet.jpg
helmet_blue.jpg
helmet_red.jpg
helmet_spec.png
icon_blue.jpg
icon_red.jpg
icon_default.jpg
model.glm
model_default.skin
model_blue.skin
model_red.skin
shoulder.jpg
torso_legs.jpg
torso_legs_blue.jpg
torso_legs_red.jpg
torso_legs_spec.png
first your model.glm is very important as it is your model .....second, the model_default.skin will load all image files into a completely skinned model.....there will also be all the images the model_default.skin link to.....as well as the images that will link to the model_red.skin, and the model_blue.skin as well as those skins.....these are being used for team mode in MP.....but can be used to create extra torsos, heads and legs.....(though usually heads do not change colors)
i will walk you through the necessary steps to create one head, one torso, and one lower .skin file.....and the rest will be up to you......
the model_default skin should be your original point of reference if you are just beginning this sort of project.....
the model_default.skin looks like this(stormtrooper)....
hips,models/players/stormtrooper/torso_legs.tga
hips_body,models/players/stormtrooper/torso_legs.tga
l_leg,models/players/stormtrooper/torso_legs.tga
l_leg_knee,models/players/stormtrooper/torso_legs.tga
r_leg,models/players/stormtrooper/torso_legs.tga
r_leg_knee,models/players/stormtrooper/torso_legs.tga
torso,models/players/stormtrooper/torso_legs.tga
torso_armor_neck_augment,models/players/stormtrooper/torso_legs.tga
head,models/players/stormtrooper/helmet.tga
torso_pauldron,*off
l_arm,models/players/stormtrooper/torso_legs.tga
l_arm_sleeve,models/players/stormtrooper/armor.tga
l_arm_cap_torso_off,models/players/stormtrooper/caps.tga
l_hand,models/players/stormtrooper/torso_legs.tga
l_hand_plate,models/players/stormtrooper/torso_legs.tga
l_hand_cap_l_arm_off,models/players/stormtrooper/caps.tga
l_arm_cap_l_hand_off,models/players/stormtrooper/caps.tga
l_arm_shoulder,models/players/stormtrooper/torso_legs.tga
r_arm,models/players/stormtrooper/torso_legs.tga
r_arm_shoulder,models/players/stormtrooper/torso_legs.tga
r_arm_sleeve,models/players/stormtrooper/armor.tga
r_arm_cap_torso_off,models/players/stormtrooper/caps.tga
r_hand,models/players/stormtrooper/torso_legs.tga
r_hand_plate,models/players/stormtrooper/torso_legs.tga
r_hand_cap_r_arm_off,models/players/stormtrooper/caps.tga
r_arm_cap_r_hand_off,models/players/stormtrooper/caps.tga
torso_cap_hips_off,models/players/stormtrooper/caps.tga
torso_body_neck_augment,models/players/stormtrooper/torso_legs.tga
torso_cap_head_off,models/players/stormtrooper/caps.tga
torso_cap_r_arm_off,models/players/stormtrooper/caps.tga
torso_cap_l_arm_off,models/players/stormtrooper/caps.tga
torso_body,models/players/stormtrooper/torso_legs.tga
hips_cap_l_leg_off,models/players/stormtrooper/caps.tga
hips_cap_r_leg_off,models/players/stormtrooper/caps.tga
the only references you ABSOLUTELY need to construct a head.skin for this model are as follows....(we will only cover the bare essentials here....if anyone feels the need to add to this, feel free.....as i have yet to figure out alot of this.....and will post everything i DO NOT know at the end of this post as well)
head,models/players/jedi_stm/helmet.tga
that's it.....simple huh.....that's why i chose this particulat model for the tutorial be careful though, as in other models, you may have a head image, as well as a face image, even some with teeth images.....any references you find that deal directly with images that would make up the head need to be copied into your wordpad file, and then saved as heada1.skin.....it is an ABSOLUTE MUST that you type the .skin extension.....(also notice that the stormtrooper folder link was renamed jedi_stm....as that is what we named our folder)
for the torso a1.skin file you will need the following references.....
torso,models/players/jedi_stm/torso_legs_.tga
torso_armor_neck_augment,models/players/jedi_stm/torso_legs.tga
torso_body,models/players/jedi_stm/torso_legs.tga
_arm,models/players/jedi_stm/torso_legs.tga
l_arm_sleeve,models/players/jedi_stm/armor.tga
l_arm_cap_torso_off,models/players/stormtrooper/caps.tga
l_hand,models/players/jedi_stm/torso_legs.tga
l_hand_plate,models/players/jedi_stm/torso_legs.tga
l_hand_cap_l_arm_off,models/players/stormtrooper/caps.tga
l_arm_cap_l_hand_off,models/players/stormtrooper/caps.tga
l_arm_shoulder,models/players/jedi_stm/torso_legs.tga
r_arm,models/players/jedi_stm/torso_legs.tga
r_arm_shoulder,models/players/jedi_stm/torso_legs.tga
r_arm_sleeve,models/players/jedi_stm/armor.tga
r_arm_cap_torso_off,models/players/stormtrooper/caps.tga
r_hand,models/players/jedi_stm/torso_legs.tga
r_hand_plate,models/players/jedi_stm/torso_legs.tga
r_hand_cap_r_arm_off,models/players/stormtrooper/caps.tga
r_arm_cap_r_hand_off,models/players/stormtrooper/caps.tga
torso_cap_hips_off,models/players/stormtrooper/caps.tga
torso_body_neck_augment,models/players/jedi_stm/torso_legs.tga
torso_cap_head_off,models/players/stormtrooper/caps.tga
torso_cap_r_arm_off,models/players/stormtrooper/caps.tga
torso_cap_l_arm_off,models/players/stormtrooper/caps.tga
once again we merely copied the references that constructed the torso.....notice that in any reference to the caps image i left the folder named stormtrooper.....practically every model in the game loads this image file, and loads it from the stormtrooper folder.....if you want to copy this image into your folder, and change the reference to it, feel free.....but i usually leave it where it is and save myself the trouble.....the stormtrooper is once again basic in components that make up it's torso, as usually the torso, arms, hands, and legs are all separate images.....now we save this as torsoa1.skin....and continue on to the legs.....
the files you need to construct the lower.skin file will look like this....
hips,models/players/jedi_stm/torso_legs.tga
hips_body,models/players/jedi_stm/torso_legs.tga
l_leg,models/players/jedi_stm/torso_legs.tga
l_leg_knee,models/players/jedi_stm/torso_legs.tga
r_leg,models/players/jedi_stm/torso_legs.tga
r_leg_knee,models/players/jedi_stm/torso_legs.tga
hips_cap_l_leg_off,models/players/stormtrooper/caps.tga
hips_cap_r_leg_off,models/players/stormtrooper/caps.tga
these are the references we need for the legs.....save this as the lowera1.skin.....
so we now have the model. glm, the model_default.skin, (the before mentioned red and blue skins as well, but i would either delete them, or take them apart into corresponding separate component skins as listed above, and then delte them) and our new heada1.skin, torsoa1.skin, and lowera1.skin......now create icons that correspond to each skin.....ie icon_heada1.skin and so on and so forth.....so that your folder should now look like this......(including the images you have not deleted that made up the red and blue .skin files.....i would keep them for the moment just because they would give you an easy way to make two more torso/head/lower skins as a chance to really test your category with the ability to swap parts.....this will become even easier as all you will have to do is go back into your .skin files and swap the image links.....
let's go right back to the lower.skin we just created for an example....
hips,models/players/jedi_stm/torso_legs_blue.tga
hips_body,models/players/jedi_stm/torso_legs_blue.tga
l_leg,models/players/jedi_stm/torso_legs_blue.tga
l_leg_knee,models/players/jedi_stm/torso_legs_blue.tga
r_leg,models/players/jedi_stm/torso_legs_blue.tga
r_leg_knee,models/players/jedi_stm/torso_legs_blue.tga
hips_cap_l_leg_off,models/players/stormtrooper/caps.tga
hips_cap_r_leg_off,models/players/stormtrooper/caps.tga
by simply renaming the image link you now have a second lower.skin....call it lowerb1.skin.....make a icon_lowerb1.skin.....are we getting the idea yet.....)
back to the new file list:
animevents.cfg
armor.jpg
armor_blue.jpg
armor_red.jpg
armor_spec.png
helmet.jpg
helmet_blue.jpg
helmet_red.jpg
helmet_spec.png
icon_blue.jpg
icon_red.jpg
icon_default.jpg
model.glm
model_default.skin
heada1.skin
torsoa1.skin
lowera1.skin
shoulder.jpg
torso_legs.jpg
torso_legs_blue.jpg
torso_legs_red.jpg
torso_legs_spec.png
sounds.cfg
now of course we will also need the animevents file and the sounds file(shown above and in practically every folder).....you can try to create your own playerchoice.txt file.....but i simply copied one from the jedi_hm folder.....(as that was the only way to get the full range of color options.....which, though i do not know how to fully implement that yet, looks better ....i'll get back to that when i add my "i do not know how to do this" section)
so after adding the playerchoice.txt file(which is a text file) and any other icons or skins or even images you'd like to add we come to the two possible ways to getting this to show up in the game.....
first it should be in a folder named similar to models/players/jedi_stm(as in models/players has to be in the path.....then copy the strings folder from assets0.pk3.....at which point you will edit the menus.str file.....which is also merely a text document with an essential extension....it has to be saved with the .str extension.....
the existing references in the menus.str is what names and loads the categories in the SP selection screen.....
here is an example from human male....
REFERENCE JEDI_HM
NOTES "For character menu"
LANG_ENGLISH "Human Male"
you will need to edit the reference to match your folder reference
REFERENCE JEDI_STM
NOTES "For character menu"
LANG_ENGLISH "Stormtrooper"
now here is where we have a choice....you now have two folders....one models, which contains players/jedi_stm.....one named strings.....which has four language folders(please note the only menus.str file in the English language folder NEEDS to be altered to gain the resulting class name in SP) and contains our altered menus.str.....so you can pack this up into a .pk3 file named whatever you like and but it in your base folder with the rest of your .pk3's.....this will allow for the class to show up in SP....BUT it will show up as unnamed.....(the name for the species will be blank, but you can click on the blank space to advance to the other species)....
however there is an alternative.....you can add your newly created folder into the models/players/ folder in the assets1.pk3.....and you can edit the menus.str file within your assets0.pk3/strings file without extracting the strings folder.....
the easiest way to do all the packaging work, for me anyway, was an evaluation copy of WinRAR, as it will open, view, edit, compile and recomile .pk3's with no problems whatsoever......
i think that should cover everything....if not, if there is anything you still do not understand, feel free to ask any questions
now for the I DO NOT KNOWS.....
anything related to the transparent .PNG skins or their corresponding icons.....i thought it was merely a lack of understanding, but it turns out it's that and the fact that no image program in existence seems capable of opening these things properly....
the extra instructions in the selectable skins included with the game.....do not know what all of them are about....i only covered the essentials......the best i can figure, they are instructions to turn parts of the model off or on as they are needed or not needed for the skin in question.....
if anyone feels the need to add anything to this, please do.....i could use some help here too people.....so if you figure something out PLEASE add it......if you have any questions, as i may not have been completely clear on everything, feel free to ask.....but i would REALLY like anyone who discovers anything new or not covered to add it, as it would allow this rather small amount of information, to possibly grow into something useful......
and lastly, it was a reborn race mod from J2000 on pcgamemods.com that inspired me to rip apart all of the files in this game and figure them out.....so thanks.....
also, please note that even though the image links may be listed as .tga, the game has no problems recognizing the jpg's as that is what most of the games skins are.....except for the mystical and mysterious .png files that allow for color change in SP.....
This looks awesome, eidospsogos. I'll try and make an attempt at this this weekend. I really appreciate you posting this! :)
hey....no problem.....but if you try with the stormtrooper i have been told of a bug with the pauldron and the head.....
add this to the head.skin for the stormtrooper if you create it.....following the other entry listed above
torso_pauldron,*off
Very, very nice! This will definitely come in handy.
Kewl' tutorial! :D
It has definately cleared some things out :)
Originally posted by eidospsogos
this will allow for the class to show up in SP....BUT it will show up as unnamed.....(the name for the species will be blank, but you can click on the blank space to advance to the other species)....
I think I found what causes that. If you have any other mods that have an edited menus.str file, you'll need to either remove that mod or edit the new race's name into that mod's menus.str file as well for the name to show up.
at the time i was attempting (the actual adding of the class and not just the construction of parts) i had only one extra .pk3 in my base folder.....to me it seemed as though the game was completely ignoring the new strings folder in your new .pk3(the fact that strings folder is one .pk3 while the models folder is in another might have something to do with it.....as well as the fact that even though there is a new file there in your new .pk3, the original one is still intact in it's proper place, and holds no reference to any such new class.....it is likely the original .str is interfering).....so i simply added my new stuff to the original game directory, as it replaced nothing.....and only slightly altered the menus.str......if anyone has any luck getting the class name to show up while simply packing it all into a .pk3 and not altering the original game .pk3's let me know how.....for all i know i could have made a typo the one time i tried it that way and just didn't know it
I've gotten it to show up using a separate pk3 as mentioned above. The problem I had was that I also had a saber pack with menus.str in it. I removed that pack temporarily and the name for the new race showed up fine. I went back and edited the name into the saber pack's menus.str and the name is now showing up with both of them active. I'm not sure what else may cause it not to show up, but I am doing a bit of toying around. If I come across anything else, I'll post it.
Awesome! I got things working. For the menu names, I made a .pk3 specifically for the menu.str file, and added all the entries I needed for the models and sabers. The names then show up correctly. Thanks for all the help!
That's actually a pretty good idea. It would beat the heck out of editing every menus.str I have. Good thinking!
Well, I've figured out how to get the additional menu icons to display correctly.
1. Add an alpha channel to your icon. Alpha over everything you DON'T want to be tinted by the selectable color. The more recent versions of Photoshop can't really do this without a plugin. The Plugin can be found here. (
http://www.lucasforums.com/showthread.php?s=&threadid=116358)
2. Create a new shader file in your shader directory and add the following code for each new icon:
models/players/jedi_hm/icon_torso_g1
{
nopicmip
nomipmaps
{
map models/players/jedi_hm/icon_torso_g1
rgbGen identity
}
{
map models/players/jedi_hm/icon_torso_g1
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbGen vertex
}
}
You'll obviously have to change the path names for the individual icon paths. :)
thanks for updating the tutorial.....was planning on doing it myself after getting the appropriate plugin for photoshop....at the time this all began i was unaware of the inability of photoshop to open .png files.....so before attempting to add alpha channels etc....you might want to find the thread in here that leads you the plugin to display .pngs properly in photoshop....after that the problem is no longer there......
Originally posted by eidospsogos
if anyone knows how to delete posts feel free, to delete the multiple and useless ones.....
Click the "Edit" button, and there should be a "delete" checkbox at the top of the page...
thanks.....that couyld not have been more obvious, don't know how i missed it.....
and razorace if you want to add that update to the same tutorial in the modeling section please do....otherwise i will copy and paste it and give you credit.....
of course i must admit, that i cheated in this area....i just copied the playerchoice.txt from an existing player class folder, so the menu was just re-directed to an existing shader.....
That will work only for the color selector icons. The actual body part icons will still need new shaders unless you replace the current icons for the current player classes (not a good idea).
Anyway, the standard shader you will need to add for whatever new skins you do is as follows:
models/players/jedi_hoth/male_torsopc
{
{
map models/players/jedi_hoth/male_torsopc
blendFunc GL_ONE GL_ZERO
rgbGen lightingDiffuseEntity
}
{
map models/players/jedi_hoth/male_torsopc
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbGen lightingDiffuse
}
}
Please note that this shader only needs to be applied to surfaces that have color selectable areas on them.
To set up the color selectable areas (I perfer to simply call them the "tinted" areas), you simply need to cover the areas with the alpha channel of your skin textures. You'll have to save them to the .png or tga (png is prefered for JKA; they're smaller)
Yes, this is the opposite of what is done for the icons (where the alpha covers everything EXCEPT the tinted areas).
as far as i know, and this is a reply to the shader discussion, the icons that i made for my SP class changed colors, when the appropriate color block was selected, however the body parts themselves did not.
i assumed that was due to the way the whole thing was setup.
as in a.) the parts of the icons that are NOT alpha transparent change colors. (which worked with the my test class), but b.) the parts of the skin that ARE alpha transparent change colors when there coreepsonding icons are selected, which i had no way of testing at the time due to the inability to actually create an alpha transparency level.
so, as of right now, i am not willing to say the shortcut i took will not work. but you may be right, i will know by friday evening(since the weekends are the only chance i have to mess with this stuff)
yeah. i know that part. have always known the way it worked in theory, just without the plugin i had now way to apply the theory.
my post was referring to the copying of a playerchoice.txt from another folder. say the jedi_hm for instance. that was how i got the color menu to show up in my SP class. and it did change the color of the icons. i simply haven't been able to test and see whether or not i would change the color of my skins yet or not, as i have been unable, until the plugin was recently found, to do any work with alpha transparencies on the skin.
that's cool....thanks for the info....
I've also discovered the a quick and easy system to make your your color selectable areas definite and with the correct color. I suppose I could write a tutorial for that too if you guys want.
sounds good to me. i've gotten sidetracked with modeling for the moment, and coming back to an easy fully implementable system would be great. thanks for picking up where i left off.
Well, I've messed with the color selection system some more and there's a sticking point for doing color selection for the Twi-Lek female player class.
For some crazy reason, Raven made the base color a light green instead of white. This means that you have to use the same light green to have the color selectable tints look correct for any new body parts. It's very annoying to try to match of the skin tones.
As such, I suggest you go back to your source files and use the original green color. From there I can help you getting it to work into the game.
I'm going to try converting the base color to white to make things much easier to add to for OJP but that will mean that everyone will have to d/l the twi-lek skins with white as the base color
Razor Ace
For the life of me, I cannot get the class name to appear.
Also If I do not take out all the other pk3's from my base folder, the icons and other things don't even show up for selection.