[Tutorial] How to make custom player skins

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Marco

Active member
May 23, 2009
645
232
43
Finland
I'll post here how you can make your custom player skins that can be used on a server.

#1: You need a mod that lets you select custom player skins:
ServerPerksV5
Custom character enabler

#2: You need to learn the basics in setting up and compiling mods in Killing Floor.

#3: Name your mod in following format: <CharacterName>Mod (i.e: you have a skin called 'Trader', the mod's name must be TraderMod).

#4: Create a class with the name of the character (i.e: Trader.uc).

#5: Script it (with the 'Trader' as example):
Code:
class Trader extends PlayerRecordClass;

#exec obj load file="TraderAnims.ukx" // Load up all needed animations or texture files using these lines.

simulated static function xUtil.PlayerRecord FillPlayerRecord()
{
	local xUtil.PlayerRecord PRE;

	PRE.Species = Class'PoliceSpecies'; // Species (can be used to replace sounds or misc stuff)
	PRE.MeshName = string(Mesh'TraderM'); // Name of the mesh.
	PRE.BodySkinName = string(Shader'TraderSkin'); // Body skin name (Material #0)
	PRE.FaceSkinName = string(Material'TraderFaceSkin'); // Face skin name (Material #1)
	PRE.Portrait = Texture'TraderPortrait'; // Portrait texture
	PRE.TextName = "This lady has seen her better days."; // Description text.
	PRE.VoiceClassName = string(Class'KFVoicePack'); // Voice pack
	PRE.Sex = "F"; // M = Male, F = Female
	PRE.Menu = "SP"; // Not needed to modify.
	PRE.Skeleton = string(Mesh'TraderM'); // Unused in KF
	PRE.Ragdoll = "British_Soldier1"; // Should be this only.
	return PRE;
}
Now if you use ServerPerks, you have to edit ServerPerksV5.ini and add line:
CustomCharacters=Trader

- If you want to add custom taunts, you will also need to create a VoicePack class (and specify it in VoiceClassName above):
Code:
class TraderVoicePack extends KFVoicePack;

defaultproperties
{
	NumInsults=3
	InsultAbbrev(0)="Insult Specimens"
	InsultAbbrev(1)="Insult Players"
	InsultAbbrev(2)="The taunt text shown in voice menu"

	InsultString(0)="Insult Specimens"
	InsultString(1)="Insult Players"
	InsultString(2)="The broadcasted taunt message..."

	InsultSound(0)=Sound'KF_MaleVoiceOne.INSULT.Insult_Specimens'
	InsultSound(1)=Sound'KF_MaleVoiceOne.INSULT.Insult_players'
	InsultSound(2)=Sound'TheTauntSoundFX'
}

- If you want to replace pain/death sounds, you'll also need to create a Species class (and fill as 'Species' in above):
Code:
class TraderSpecies extends PoliceSpecies;

defaultproperties
{
	MaleSoundGroup="TraderMod.TraderSoundGroup"
	MaleVoice="TraderMod.TraderVoicePack"
	FemaleVoice="TraderMod.TraderVoicePack"
	FemaleSoundGroup="TraderMod.TraderSoundGroup"
}
Also a SoundGroup:
Code:
class TraderSoundGroup extends KFMaleSoundGroup;

defaultproperties
{
	DeathSounds(0)=Sound'TraderDeath1'
	DeathSounds(1)=Sound'TraderDeath2'
	DeathSounds(2)=Sound'TraderDeath3'
	DeathSounds(3)=Sound'TraderDeath4'
	DeathSounds(4)=Sound'TraderDeath5'
	PainSounds(0)=Sound'TraderPain1'
	PainSounds(1)=Sound'TraderPain2'
	PainSounds(2)=Sound'TraderPain3'
	PainSounds(3)=Sound'TraderPain4'
	PainSounds(4)=Sound'TraderPain5'
	PainSounds(5)=Sound'TraderPain6'
}

And thats how it's done. Hope this was of any help.
 
Last edited:

braindead

FNG / Fresh Meat
Aug 22, 2009
918
346
0
Merry Ol' England
You tie that in with the animation browser,

animpic.jpg


just enter this into the default animation and save your package. it is automatically loaded when your player mesh is selected.


Edit:

p.s Thank you so much Marco (Flux) for getting this in game. I have really been wanting this since the game first came out!!
On with the character mods (rubs hands together :p )
 
Last edited:

ro_sauce

FNG / Fresh Meat
Sep 26, 2007
3,135
329
0
bwhgaming.com
here's how to do it by code (if you dont have the psa/psk in a package, and are importing manually)

this is what i use:

Code:
#exec OBJ LOAD FILE=KF_PalaceTextures1.utx

#exec DECAANIM  IMPORT      ANIM=Dances ANIMFILE=models\dances.PSA COMPRESS=1

#exec ANIM SEQUENCE ANIM=Dances SEQ=s_cheer1 GROUP= RATE=20.000000 //the fps is 30, and i wanted 20 for this individual animation
#exec ANIM SEQUENCE ANIM=Dances SEQ=s_cheer2 GROUP= RATE=20.000000

#exec DECAANIM  DIGEST      ANIM=Dances VERBOSE USERAWINFO

#exec DECAMESH  MODELIMPORT MESH=Dancer MODELFILE=models\dancer.PSK
#exec DECAMESH  ORIGIN      MESH=Dancer X=0 Y=0 Z=0 YAW=0 PITCH=0 ROLL=0
#exec DECAMESH  scale       MESH=Dancer X=1.0 Y=1.0 Z=1.0
#exec DECAMESH  DEFAULTANIM MESH=Dancer ANIM=dances
 
Last edited:

braindead

FNG / Fresh Meat
Aug 22, 2009
918
346
0
Merry Ol' England
here's how to do it by code (if you dont have the psa/psk in a package, and are importing manually)

this is what i use:

Code:
#exec OBJ LOAD FILE=KF_PalaceTextures1.utx

#exec DECAANIM  IMPORT      ANIM=Dances ANIMFILE=models\dances.PSA COMPRESS=1

#exec ANIM SEQUENCE ANIM=Dances SEQ=s_cheer1 GROUP= RATE=20.000000 //the fps is 30, and i wanted 20 for this individual animation
#exec ANIM SEQUENCE ANIM=Dances SEQ=s_cheer2 GROUP= RATE=20.000000

#exec DECAANIM  DIGEST      ANIM=Dances VERBOSE USERAWINFO

#exec DECAMESH  MODELIMPORT MESH=Dancer MODELFILE=models\dancer.PSK
#exec DECAMESH  ORIGIN      MESH=Dancer X=0 Y=0 Z=0 YAW=0 PITCH=0 ROLL=0
#exec DECAMESH  scale       MESH=Dancer X=1.0 Y=1.0 Z=1.0
#exec DECAMESH  DEFAULTANIM MESH=Dancer ANIM=dances

Very helpful RO except this wouldn't help with Custom Characters. Which is what this thread is about.
That would be useful in an animated object tutorial though
 

Dave_Scream

FNG / Fresh Meat
Jan 24, 2010
160
12
0
35
Russia, Rostov-on-Don
vkontakte.ru
Hi,
First question:
I make StigMod\Stig.uc as explained in tutorial, but when try to compile, ucc says that no StigMod.uc file founded. Maybe I need StigMod\StigMod.uc instead of Stig.uc ?

Second question:
I have Animations StaticMeshes and Textures for new skin.

here they are:
http://depositfiles.com/files/3pxky9y01

skin name is Stig.
What I must write to StigMod\Stig.uc file?
Where in Stig.uc I can specify what skin animation file to use?
 
Last edited:

braindead

FNG / Fresh Meat
Aug 22, 2009
918
346
0
Merry Ol' England
Hi,
First question:
I make StigMod\Stig.uc as explained in tutorial, but when try to compile, ucc says that no StigMod.uc file founded. Maybe I need StigMod\StigMod.uc instead of Stig.uc ?

Second question:
I have Animations StaticMeshes and Textures for new skin.

here they are:
http://depositfiles.com/files/3pxky9y01

skin name is Stig.
What I must write to StigMod\Stig.uc file?
Where in Stig.uc I can specify what skin animation file to use?

Hey Dave

Are you making a new version of the stig? if not, you can download it here and add it to the custom character list

http://forums.tripwireinteractive.com/showthread.php?t=51161

I only used the stig in the pic to show how to add default animations to a custom animation package.

p.s. In the download you will find all of the source files, to show you how to code your own custom character.
 
Last edited:

Valken

FNG / Fresh Meat
Aug 5, 2011
308
26
0
I tested this mod's custom characters and is there a bug in solo testing? IF I had add locked characters for instance - KF_Soviet, KF_German and Harchier_Spebbington, it shows up twice in the list, once at the top, then looks like alphabetical or in release order?

Can it just show up once? Or maybe its a solo bug?

Also, I Cannot add the stig since it does not have a upl file associated with it.
 

FluX

Grizzled Veteran
Oct 26, 2010
5,392
233
63
www.fluxiserver.co.uk
I tested this mod's custom characters and is there a bug in solo testing? IF I had add locked characters for instance - KF_Soviet, KF_German and Harchier_Spebbington, it shows up twice in the list, once at the top, then looks like alphabetical or in release order?

Can it just show up once? Or maybe its a solo bug?

Also, I Cannot add the stig since it does not have a upl file associated with it.
Which custom character mod are you using? For the stig i'll suggest speaking to Braindead of maybe making a .upl for you.
 

Valken

FNG / Fresh Meat
Aug 5, 2011
308
26
0
I am testing your mod and Marcos.

In Marcos mod, I added the lines:

CustomCharacters=KF_Soviet
CustomCharacters=KF_German
CustomCharacters=Harchier_Spebbington

Because these are locked in my KF and I just wanted to test it for fun. It shows up twice in the character selection.

If I do not add these lines, then it does not show up in character selection.

I then ADDED Mechacarnivore by renaming the upl file to Merchacarnivore.upl so it does not overwrite Security_Officer_Thorne.upl, then added the line

CustomCharacters=Mechacarnivore

It shows up but is also listed twice...once at the top of the character selection screen, then again in the middle of the screen.

For TheStig, there is no upl file so I guess I have to decompile the u file and make one per Marco's instruction.

Your mod is better in that it auto unlocks all the standard TWI characters so I don't even have to added it back to the game.

I'm playing around with the character function maybe it is best to not use Marco's and just use Flux's in place of it.
 

braindead

FNG / Fresh Meat
Aug 22, 2009
918
346
0
Merry Ol' England
I am testing your mod and Marcos.

In Marcos mod, I added the lines:

CustomCharacters=KF_Soviet
CustomCharacters=KF_German
CustomCharacters=Harchier_Spebbington

Because these are locked in my KF and I just wanted to test it for fun. It shows up twice in the character selection.

If I do not add these lines, then it does not show up in character selection.

I then ADDED Mechacarnivore by renaming the upl file to Merchacarnivore.upl so it does not overwrite Security_Officer_Thorne.upl, then added the line

CustomCharacters=Mechacarnivore

It shows up but is also listed twice...once at the top of the character selection screen, then again in the middle of the screen.

For TheStig, there is no upl file so I guess I have to decompile the u file and make one per Marco's instruction.

Your mod is better in that it auto unlocks all the standard TWI characters so I don't even have to added it back to the game.

I'm playing around with the character function maybe it is best to not use Marco's and just use Flux's in place of it.


You don't need a UPL file for this mod. The reason the stig doesn't work correctly with Marco's mut is because it is set up completely different than in the tutorial.

Howeve if this is only for solo play, there is actually a upl file in the stig download, in the main folder I think.
 

Valken

FNG / Fresh Meat
Aug 5, 2011
308
26
0
Hi BD,

I actually tried using the mutator for TheStig and it works alongside both Flux's and Marco's mod. The only trick is that it automatically selects the Stig at game start for me, and if I change over to any other character later, I cannot go back to the Stig.

I also tested with Marco's Bots and they can become the Stig too... So the way it is setup now, it is at game start only.

Maybe it needs to be redone so we can use Flux's and Marcro's new method. I test some other custom skins such as KFARG's and see if it works like TheStig or work with Flux's/Marco's.

I wish someone would make a list of custom skins that are compatible. :D

For Marcro - the mod works... its just duplicating the character portraits twice in the selection screen and it should also auto unlock all of TWI's stock model like Flux's mod.

I was thinking the duplicate display bug might be Xmas event related but I am sure Marco and Flux are able to figure out something.

I will comment on Flux's mod in his mod thread.
 
Last edited:

Marco

Active member
May 23, 2009
645
232
43
Finland
I do not plan to support use of locked characters (as it would be unfair for people who bought the DLC) so for futher versions I might change it so you can't make them show up at all.

As for custom characters like Stig, you see that there is a file called "StigMod.u" in System folder, add that name to CustomCharacters list removing "Mod" from the name, so it is alike:
CustomCharacters=Stig
That way you wont need any Stig mutator running for people to use it (no upl file needed for that, exept if you want bots to use it).
 
  • Like
Reactions: braindead

Valken

FNG / Fresh Meat
Aug 5, 2011
308
26
0
Hi Marco,

Thanks for the explanation. I will try TheStig again. As for the locked characters, I have unlocked most it except those so it is not a big deal for me.

The issue is that if you do not unlock the characters on the server, how will people who have purchased or unlock the characters legitimately (like Santa and Chickensuit) access those characters since the server using non-whitelisted mods will not grant access to steam to verify which characters are available?

I think a whitelisted version would be awesome but if it is not whitelisted, then we cannot access our perks or characters.
 

Gartley

Grizzled Veteran
Dec 27, 2010
2,340
349
83
UK
www.wildcardproductionstudios.co.uk
Just a quick one Marco, is there a way in which we can disable skins? Say we had a themed server and would like people to use a certain set of skins.

For example if we set up a pre heavy metal server and wanted to only have the first set of skins that shipped with the game.
 

braindead

FNG / Fresh Meat
Aug 22, 2009
918
346
0
Merry Ol' England
Just a quick one Marco, is there a way in which we can disable skins? Say we had a themed server and would like people to use a certain set of skins.

For example if we set up a pre heavy metal server and wanted to only have the first set of skins that shipped with the game.

Hey Gartley

Lol I was going to ask the same thing at one point but then found it myself. Just remove the characters from the Custom Character list.

ignore that, it may have been Flux' version I was thinking of
 
Last edited:

Marco

Active member
May 23, 2009
645
232
43
Finland
Ok I got a question. For #5, some models have more then just the two parts to texture. How can you set specific parts that aren't either the top or bottom part?

An example character:
[url]http://i739.photobucket.com/albums/xx36/SoullessGecko/Killing%20Floor/Mechacarnivore.gif[/URL]

The glowing part is a seperate piece and I would like to change it without changing/making a new animation package.

You can alter skins within Species class, for example:
Code:
static function bool Setup(Pawn P, xUtil.PlayerRecord rec)
{
	P.Skins.Length = 3;
	P.Skins[2] = SomeTexture;
	return Super.Setup(P,rec); // Base function sets Skins[0] and [1]
}
 
  • Like
Reactions: FluX