Post tutorial Report RSS Ladypain guide to Sof skinning

This is a tutorial for how to make custom skins in Soldier of Fortune.

Posted by on - Basic Players Modelling

Tutorial created by Ladypain. Mirrored here for archival purposes.

LadyPain Skin Readme
====================

An example of the kind of readme you might get with a new skin.


Installation :

Extract ladypain.zip to your sof\user\ directory

If you have a.ifl or b.ifl already in your sof\user\ghoul\enemy\female\ directory then add a_pain.tga to a.ifl and b_pain.tga to b.ifl

or

If you do not then rename the included lp_a.ifl and lp_b.ifl to a.ifl and b.ifl

If you have everbody.gpl in your sof\user\ghoul\pmodels\ directory then add ladypain in the last (no team) section of names.

or

If you do not then rename the included lp_everybody.gpl to everybody.gpl

Play.
And that seemed to work. Incidentally the ifl files are a list of textures that can be requested, the gpl file is a list of characters that can be referenced. But more on that in the maker's point of view.

As a user the most important thing to notice is your user directory. Files in there override the base/ files (original files) so you can replace or augment files using the user directory. It's via that system that the new skins work. But be warned, don't release your files as a.ifl, b.ifl and everybody.gpl or you'll be hated. Let them add their own entries or rename your files (have another look at my readme). Otherwise you run the risk of over-writing their skin collection and getting lynched.

And that's about it for the User.



The Maker's Point of View

Ready to get complicated?

For this I'll be taking you through the directories you'll be editing files in, and step by step through the files you'll be editing yourself.

/user/ghoul/enemy/female/ or /user/ghoul/enemy/meso/

The files you really want to pay attention to in here are the tga files and the ifl files.

TGA : TGA is the targa graphics format. A high colour image, the graphics in other words. This is actually what the skin looks like. They come in two flavours, the ones starting in a_ (arms, also ear and what appears to be the neck) and the ones starting in b_ (body, torso, legs, feet etc). You will notice there are no faces. More on that later.

IFL : IFL is a Raven specific file (Image File List?). It's just a text file to tell the truth. It's purpose is a list of texture files that can be referenced by the engine. a.ifl references the a_ files and likewise, b.ifl references b_ files. For example :
a_nycskinchick.tga
a_nycwomanb.tga
a_nycwomanw.tga
a_sibguard2.tga
a_sibscientist2.tga
a_xtaylor.tga
a_tokassassin.tga
a_tokwoman1.tga
a_tokwoman2.tga
a_dcfemale.tga
a_irqwoman1.tga
a_irqwoman2.tga

This is the a.ifl file for the female directory. It references all the arm textures available for the game. Now, for my test skin I included :
a_pain.tga
Another interesting thing to note here is I have purposefully made the location of this reference seperate in my file to the one I have distributed. It is NOT order specific.

/user/ghoul/pmodels/

In here there are, again, two file formats you should concentrate on.

GPL : (Ghoul Players List?) Taking the simplest first we look at the GPL. It's a basic list of character names. Or rather, names of GPM files. (so if your character uses the ladypain.gpm files you would add ladypain to the GPL list). Again, I do not think this is an order specific file.

GPM : (Ghoul Player Model?) This is a complex file, it deals with the player model in depth. In order for you to better understand this we need to look at Raven's "bolt on" models. The players you see in the game are not comprised of one mesh (model). If someone has a ponytail that is using the ponytail bolt on, for example. Now we have that sorted lets look at the file. I'll use a combination of the buddy.gpm (included in the sdk) file combined with my own ladypain.gpm.


//First entry points to the working directory for the player model
// (this should generally be "enemy/meso" or "enemy/female")
enemy/meso

This is fairly self explanatory. I have already mentioned the /user/ghoul/enemy/female or meso directories above. This entry in the GPM file tells us the gender of the model as well as which directory to use. So the ladypain.gpm first entry is :
enemy/female
Simple.


//Second entry points to .ghb file to be used by menus
// (meso_menu1-10 and fem_menu1&2 are available in the pakfile)
meso_menu5

(Editor's note, from this point in any text in italics is tentative and unconfirmed. They are my presumptions on how to describe what is described within) Not related to the way the model plays in the game. This describes the way the model moves in the menu. You will notice some of the players have their shotguns hefted over their shoulder, some are striding forward pistol in hand, etc. These ghb files are descriptions for the ghoul engine describing movement, and this entry points to an animation file to use when displaying in the menu). The ladypain.gpm entry is as follows
fem_menu2
A fairly safe bet with the female models, it's one or the other. Also my skin is based on the IcePick model so I copied the refernce from IcePick. (Editor's note, the gpm files are, as a rule, named after the character they represent. When in doubt copy from a similar model's gpm file)


//Third entry points to .ghb file to be used in the game
// (meso_player and fem_play are available in the pakfile)
meso_player

As I said before the ghb files are animation descriptors for the ghoul engine so this entry describes how the model will move in the game. Women move in a different way to men and also people may release new animations for their own models later, so this is nescessary. My entry is of course :
fem_play
She's a female player model, simple enough.


//Fourth entry points to set of .gsq files to be used in the game
// (this will determine most of the model parts turned on/off in game--can
// be adjusted further down)
playerbulbul

Now then, this is fun. The .gsq files appear to be default listings of the type of bolton's a player can carry (a model with a face mask doesn't need a ponytail as an example). There's a vast array of gsq files and none of them appear to contain very much, but seeing as you can tweak your bolt ons later in the gpm it's not too much of a problem. My entry for ladypain.gpm :
playerbulti
Copied from IcePick's entry. Again, this is an area where you might want to copy the nearest equivalent. For you interest the file playerbulti.gsq contained the following line only :
#playmoves
And most of the gsq files contain just that. I'm guessing it's a standard definition.


//Fifth entry is the teamname of this model
// ("Noteam" designates that model isn't on any team)
"Noteam"

Ok, simple enough. Define new teams by entering something new here You could have all your skins in the same team menu by putting your name here, but for my test file I put :
"Noteam"
Noteam puts it with Mr Mullins and all the other non-aligneds.


//Sixth entry points to the directory in which pain and death sounds are found
// (the following directories are available in the pakfile:
// "enemy/dth/skin"--used for New York single player levels
// "enemy/dth/russ"--used for Siberia/Kosovo single player levels
// "enemy/dth/arab"--used for Iraq/Sudan single player levels
// "enemy/dth/jpn"--used for Japan single player levels
// "enemy/dth/rad"--used for Castle single player levels
// "enemy/dth/fem"--used for females in single player)
"enemy/dth/skin"

Nice system here, you can have them with the right attributes for the type of model you're making. You can also create your own. Examine the directories listed above for the filenames of the sound effects. My test entry :
enemy/dth/fem
A nice standard generic sound set, as copied (naturally) from IcePick's gpm. Are we spotting a pattern yet?


//Seventh entry points to set of faces to be used by player model
// (this can be set to "" if you don't want to make use of facial expressions--the
// ninja player model is set this way)
// (these face sets are available in the pakfile:
// f_amu_--General Amu
// f_w_2,3,4,6,8,10,11,12,15,16,17_--most of the caucasion faces in the single player game
// f_b_2-7_--most of the African and African-American faces
// f_h_6_--a serbian face
// f_hb_1_--a bearded face
// f_j_3,4,&8_--Asian faces
// f_john_--John Mullins
// f_m_1&5_--Middle Eastern faces
// f_sam_--Sam
// f_taylor_--Taylor)
"f_w_3_"

This is a really important entry. If you want to do your own skins you'll need to look at this. f_w_3_ as specified in the example from Raven points only to a group of files, not a single file. The files it points to are :
f_w_3_b.tga
f_w_3_d.tga
f_w_3_f.tga
f_w_3_m.tga
f_w_3_n.tga
f_w_3_p.tga

Used for facial animations so if you want to animate your character now you can. Mind you you could just copy your skin 6 times for a quick and dirty skin solution. Or you can use one of Raven's pre-defined skins, they're good too. My entry of course is :
f_w_17_
And can you guess what file it was copied from? Yup, IcePick's file.


//Eighth entry is a list of skins to set for the model
// (each list member has three parts: the material to set the skin for, the name of
// the skin, and the model part to set the skin for. The materials on the meso player
// model are:
// H--head material
// HD--hood material, for hooded coat
// F--face material
// MD--mask material, for chemical suit
// A--arm material
// B--body material
// C--cap material (generally just used for severed limbs)
// GZ--gore zone material (generally just used for bullet-hole textures)
// The female player model has the same materials, except for HD and MD.
//
// If the seventh entry was set validly, it will override any face skin set here.
// These are the static faces available in the pakfile (for use when you set the 7th entry to ""):
// f_afrrocket
// f_dekker
// f_irqrocket
// f_irqwoman1
// f_irqwoman2
// f_ninja
// f_raider2-5
// f_sibtroop
// f_sibtroop2
//
// The model part can be the name of any mesh on the model, or can be set to 0 if you
// want the material on the entire model changed to the specified skin.)
{
a a_kosmechanic 0
b b_kosmechanic 0
f f_w_3_n 0
h h_w_3_s 0
h h_raider2 _mohawk
}
OUCH! Have we got that people? Ok. Let's go. Your model can, as I mentioned before, be customized to the last detail, this describes what skins to set where (so if you only want to change part of a Raven skin you can use all their files but only change one material. Say you wanted to just change the face you'd just enter :
f (your file prefix, say, f_custom_) 0
And it's yet more useful. Let's look at the entry above, line by line.

a a_kosmechanic 0 : sets the arm texture to a_kosmechanic.tga
b b_kosmechanic 0 : sets the body texture to the b_kosmechanic.tga texture, now we have someone who looks more or less like a mechanic
f f_w_3_n 0 : sets the face to one of the standard caucasian skins
h h_w_3_s 0 : sets the rest of the head (the sides and the back) to the specified texture.
h h_raider2 _mohawk : now this is the fun bit, it also specifies the head, but it doesn't cover all of the head. the _mohawk means it should just use this texture for the mohawk's colouring. Good huh?

The test example I used was :
{
a a_pain 0
b b_pain 0
f f_w_17_n 0
h h_w_17_c 0
}

Looking at this you can see I changed the body and arm textures (I needn't have changed the arm textures as they're identical to IcePick's but I did) but left the face unchanged. I could have just as easily left the second line the same as IcePick's entry ( b b_sibguard2 0 ) and the skin would have looked identical, as I copied the graphic.


//Ninth entry is a list of bolt-ons for the model
// (each list member has four parts: the name of the .gbm file which descibes the item being
// bolted on, the name of the bolt on the player model, the name of the bolt on the item, and the
// scale to be applied to the item.)
{
boltons/funface.gbm abolt_head_t to_abolt_head_t 1.187857142857
}

Again this seems rather self-explanatory. The filename , where to put it (think of these two entries like the tags in quake 3) and how big to make it. You might want to play with the scales to make sure it works. LadyPain's entry?
{
boltons/menumpistol.gbm wbolt_hand_r to_wbolt_hand_r 1.0
}

This puts the surpressed smg into LadyPain's hand in the menu, but obviously not in the game.


//Tenth entry is a list of extra part toggles
// (each list member has two parts: the name of the mesh on the player model, and a 1-or-0 value
// which specifies whether the part should be on (1) or off (0).)
{
_mohawk 1
_crewhead 0
_beardhead 0
_beardface 0
_lbang 0
_rbang 0
_ponytail 0
_helmethead 0
_helmetface 0
_lear 0
}

This section is again fairly self explanatory. The names are lists of extra pieces of the model which can be visible or not during play. LadyPain's entry :
{ _LBANG 0
_RBANG 0
_MEDMHAIRMHEAD 0
_CREWHAIR 1
_LEAR 0
_REAR 0
_DRESSHIPS 0
}

And that's what gives her her rather fetching crew-cut.

And that's about it for the gpm file Tired yet? I'm not done.

Here's a highly tentative list of boltons and what they do

Hair :
_baldhead - a bald head, obviously
_medmhairhairmmhead - a medium head of hair? This one has me stumped cause there's just so much in the name
_crewhair - a crew cut
_mohawk - a spiked mohawk
_ponytail - a ponytail
_lbang - a bang on the left of the head (a bang is a bunch of hair at the front, fashion thing)
_rbang - same as above but on the right

Heads and Faces :
_crewhead - head for a crewcut
_beardhead - head sporting a beard (for full beards like Sam's?)
_beardface - face sporting a beard
_helmethead - head with a helmet on (like the clean suits in siberia?)
_helmetface - face with a helmet on _lear - left ear
_rear - right ear

Others :
_dresships - dress/lab-coat (like the scientists in siberia)
_comface - Boom mike like John and Hawk wear?


Now the skins for all of these are a bit odd. The hair addons like ponytails, mohawks, etc seem to be defined in the head textures but not all of them, hence defining them seperately (see above). The ears are definied in the arms textures? Helmet head and face textures are defined seperately? And as for the dress and the boom mike.... I'm working on it.

Do you want the good news or the bad news? The good news is that for just distributing a skin? That's all you need. The bad news is, that's not all of it by a shot and a half.

You may notice (provided you can be bothered to trawl through the above) that skins created with this method WORK but do not have any entries in the "biography" section of player selection. Too true, mate. There's a reason for this, but it doesn't hinder mod makers, so I'll explain it anyway.

/user/strip/

The files in the strip directory are string files, referenced by menus, that contain the text to display. The important one here is menu_player_names.sp. This file contains all the information on player models for the player menu. Let's look at a sample entry and go from there, shall we? Let's pick... John! But first, this :
VERSION 1
ID 207
REFERENCE MENU_PLAYER_NAMES
DESCRIPTION "Player names and descriptions for the menu"
COUNT 166

Yeah, guess what. It's a header file. The important one here is COUNT. It tells you how many files are in the list. So if you're adding new entries, remember to up this number. Now on to John and the Gory details (isn't Soldier of Fortune all about Gory details anyway?) :
INDEX 36
{
REFERENCE NAME_MULLINS
TEXT_ENGLISH "John Mullins"
TEXT_GERMAN "John Mullins"
TEXT_FRENCH "John Mullins"
}
INDEX 37
{
REFERENCE AKA_MULLINS
TEXT_ENGLISH "N/A"
TEXT_GERMAN "Keine Angaben"
TEXT_FRENCH "Aucun"
}
INDEX 38
{
REFERENCE INFO_MULLINS
TEXT_ENGLISH "Mullins is the most deadly consultant in the world. Quick, intelligent, and personable, Mullins has the ability and the cool to complete even the most dangerous tasks assigned to him. In a world where failure means death, Mullins is the one to count on when the chips are down."
TEXT_GERMAN "Mullins ist der tödlichste Söldner der Welt. Seine Schnelligkeit, Intelligenz und Persönlichkeit verleihen ihm die Fähigkeit und Coolness, selbst die grausamsten Aufgaben zu erledigen. In einer Welt, in der Misserfolg den Tod bedeutet, gehört Mullins zu denjenigen, auf die man sich verlassen kann, auch wenn die Zeichen noch so schlecht stehen."
TEXT_FRENCH "Mullins est le consultant le plus mortel du monde ! Vif, intelligent et bien fait de sa personne, Mullins est capable de remplir les missions les plus dangereuses qui lui sont confiées. Dans un monde où l'échec est sanctionné par la mort, Mullins est l'homme de la situation."
}

The first entry is the NAME entry, the second is the ALIAS or AKA entry, and the last one is the blurb. Easy enough to understand, although the hard bit is going to be translating to german and french

But I added all that and it didn't do anything! I hear you cry. Well DUH. That's because what you just did was fill in the text that is referenced by the engine, not the menu itself.

/user/menus/players(integer)/

in the above path the integer relates to the player added. The reason for this is that any player adds itself in its own players/ directory, for instance on my install John Mullins can be found in players(31)/ and looks like this :
(stm)

(vbar tint vbargray)

(font type small tint header atint header)^MENU_PLAYER_NAMES_TEAM^ ": "
(font type small tint normaltext atint normaltext)^MENU_PLAYER_NAMES_NONE^ (hbr)

(font type small tint header atint header)^MENU_PLAYER_NAMES_NAME^ ": "
(font type small tint normaltext atint normaltext)^MENU_PLAYER_NAMES_NAME_MULLINS^ (hbr)

(font type small tint header atint header)^MENU_PLAYER_NAMES_AKA^ ": "
(font type small tint normaltext atint normaltext)^MENU_PLAYER_NAMES_AKA_MULLINS^ (hbr)

(font type small tint header atint header)^MENU_PLAYER_NAMES_INFORMATION^ ": "
(font type small tint normaltext atint normaltext)^MENU_PLAYER_NAMES_INFO_MULLINS^ (hbr)

(/stm)

In the above file all instances of ( or ) should be read as < or > but I've changed them here because your browser would have read them as < > if you're viewing it on the web

You should notice that NAME AKA and INFORMATION above refer to the strip file. It's that simple. Now it might be possible to make a seperate strip file and I'm looking into it

And for now that's all I have, but there might be more later. Bare in mind the above how-to was written based on two-hour's experience and as I play around with new ideas, you'll see new information.

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: