Jump to content

Home

Tutorial for Creating New SP Classes/Races as Promised


eidospsogos

Recommended Posts

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.....

Link to comment
Share on other sites

This thread should be stuck. Very helpful it has been.

 

Could you perhaps submit your files to http://www.lucasfiles.com , or put them up on your own website, eidospsogos?

 

However, I am having problems. Firstly, when I attempt to create a stormtrooper, the stormie simply does not show up at the slection screen. I do have an editted players.str or whatever file.

 

Secondly, I have another model that does show up. It is a cusom skin from JO, using the Galak model. The skins do not show up- the model appears to be Galak, somehow. I opened the model.glm file with WordPad ad found that that file contained filepaths to the galak skin files. I edited these to match the files I am using, but now the game will not load this model up. Evidently I seriously screwed it up while editting it.

 

But I'm gonna get this. :rock:

Link to comment
Share on other sites

okay, i am not sure how to reply to your problem.....because i have never had an issue with something not showing up at all....i have had them show up unnamed as i mentioned above....but just edited the original assets1.pk3 to fix that(and others have posted ways that they fixed the unnamed problem above)....the only thing that should keep the class from showing up i would think, would be improperly editing the menus.str file found in the assets0.pks/strings/English folder.....or not saving it in the proper format....as far as skins loading incorrectly, for me it was a trial and error process, using Modview to first test the results before preveiwing it in game.....if it loads correctly with modview, the game will load it......it will have to be in a models/players/"folder name" when packed into a pk3......other than that if you can be abit more specific maybe we can figure something out.....

Link to comment
Share on other sites

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.

 

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. :)

Link to comment
Share on other sites

well, as legible refers to clarity in handwriting, that should be no problem. otherwise, were i to put up a tutorial officially, i would probably write more formally. but as this was an attempt to throw a tutorial together very quickly for someone who specifically asked for one, i was not concerned with how correct the structure or format was.

 

this is not a work to be published, a paper for any compostional course.....or any college course for that matter, as that part of my life is long over.

 

it was merely put together as quickly as possible to help an appreciative fellow forum member.

 

hopefully others, including you, will find the information useful as well.

 

as far as revision for the sake of proper MLA compositional structure, as i have other things going on in my life that take precedence, a profession for one, and the practical application of the knowledge imparted so incoherently above, for another, i would not count on that happening any time soon

 

so, at some point in time, when i have a full and complete understanding of everything involved in doing what the tutorial only scratched the surface of, i may put up a tutorial, properly structured and all. but as the web is a source for free info, i am sure by that time someone else will have a.) taken everything above, with added info of their own, and put it into a tutorial

with their name on it, or b.)written one that covered the topic in a much more detailed and knowledgable manner.

 

as i am primarily a graphic artist and not a programmer, i was just putting up a quick way to work around the seeming block to artistry encountered by the new JA format. which turned out to be not much of a block at all once it was understood.

 

i am glad that everyone has found this material useful so far. and that someone would find it useful enough that they would suggest i put it up on a site.

 

but if you can bear with me when i am in a hurry, and post in flow of consciousness, it would be appreciated. as i do have a rather fast-paced life outside of cyber-space at times, and as i posted only in an attempt to help others.

Link to comment
Share on other sites

and boinga1, i am planning on releasing some files when i feel they are completed. i tend to be very detail oriented, and sometimes that causes me to work longer on things than need be. but i do plan on releasing a few when i feel i have accomplished what i originally set out to accomplish. thanks for the interest.

 

if you want some files just to study how the idea works, go here:

 

http://www.pcgamemods.com/se/172/

 

look for anything by J-2000 or anything with the word race in it....there are quite a few you could take apart and study.

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...