Tripwire Interactive Forums

Go Back   Tripwire Interactive Forums > Killing Floor Forums > Killing Floor Modifications > Coding

Reply
 
Thread Tools Display Modes
  #1  
Old 11-22-2011, 02:15 PM
Marco Marco is offline
Senior Member
 
Join Date: May 2009
Location: Finland
Posts: 538
Default [Tutorial] How to make custom player skins

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 by Marco; 04-20-2012 at 02:05 PM.
Reply With Quote
  #2  
Old 11-22-2011, 02:55 PM
KF-Argentina KF-Argentina is offline
Senior Member
 
Join Date: Oct 2010
Location: Argentina
Posts: 226
Default

This looks pretty great and easy... but... aren´t you missing the animation set for the mesh? were does it loads?
Reply With Quote
  #3  
Old 11-22-2011, 03:05 PM
braindead's Avatar
braindead braindead is offline
Senior Member
 
Join Date: Aug 2009
Location: Merry Ol' England
Posts: 917
Default

You tie that in with the animation browser,



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 by braindead; 11-22-2011 at 03:51 PM.
Reply With Quote
  #4  
Old 11-22-2011, 05:54 PM
ro_sauce ro_sauce is offline
Senior Member
 
Join Date: Sep 2007
Posts: 3,113
Default

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 by ro_sauce; 11-22-2011 at 05:56 PM.
Reply With Quote
  #5  
Old 11-22-2011, 07:07 PM
braindead's Avatar
braindead braindead is offline
Senior Member
 
Join Date: Aug 2009
Location: Merry Ol' England
Posts: 917
Default

Quote:
Originally Posted by ro_sauce View Post
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
__________________
Reply With Quote
  #6  
Old 11-25-2011, 12:56 AM
Gartley's Avatar
Gartley Gartley is offline
Senior Member
 
Join Date: Dec 2010
Location: UK
Posts: 2,325
Default

Thanks for the clear tutorial Marco, much appreciated.

Now if we can find away to implement custom 3rd person anims we are golden for custom content.
__________________
Whisky's Workshop
"As you can see here, I'm -ALL ON MY F***ING OWN! Guys where the hell are you?!"
Reply With Quote
  #7  
Old 12-01-2011, 03:59 PM
Dave_Scream Dave_Scream is offline
Senior Member
 
Join Date: Jan 2010
Location: Russia, Rostov-on-Don
Posts: 160
Default

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 by Dave_Scream; 12-01-2011 at 04:15 PM.
Reply With Quote
  #8  
Old 12-01-2011, 05:44 PM
braindead's Avatar
braindead braindead is offline
Senior Member
 
Join Date: Aug 2009
Location: Merry Ol' England
Posts: 917
Default

Quote:
Originally Posted by Dave_Scream View Post
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.co...ad.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 by braindead; 12-01-2011 at 05:45 PM.
Reply With Quote
  #9  
Old 12-19-2011, 11:54 AM
Valken Valken is offline
Senior Member
 
Join Date: Aug 2011
Posts: 308
Default

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.
Reply With Quote
  #10  
Old 12-19-2011, 01:30 PM
FluX FluX is offline
Senior Member
 
Join Date: Oct 2010
Posts: 5,076
Default

Quote:
Originally Posted by Valken View Post
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.
__________________

www.fluxiservice.com - Friendly, supportive game server host awaiting your arrival.
>> My Custom Content Archive <<
Reply With Quote
  #11  
Old 12-20-2011, 04:43 AM
Valken Valken is offline
Senior Member
 
Join Date: Aug 2011
Posts: 308
Default

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.
Reply With Quote
  #12  
Old 12-20-2011, 07:30 AM
braindead's Avatar
braindead braindead is offline
Senior Member
 
Join Date: Aug 2009
Location: Merry Ol' England
Posts: 917
Default

Quote:
Originally Posted by Valken View Post
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.
__________________
Reply With Quote
  #13  
Old 12-20-2011, 10:03 AM
Valken Valken is offline
Senior Member
 
Join Date: Aug 2011
Posts: 308
Default

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.

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 by Valken; 12-20-2011 at 10:09 AM.
Reply With Quote
  #14  
Old 12-20-2011, 11:06 AM
Marco Marco is offline
Senior Member
 
Join Date: May 2009
Location: Finland
Posts: 538
Default

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).
__________________
Quote:
Originally Posted by HuNteR- View Post
Sadly no, we can't do anything about it, fools like Marco will always exist, and with no one with power pulling strings, its a lost cause.
Reply With Quote
  #15  
Old 12-20-2011, 11:27 PM
Valken Valken is offline
Senior Member
 
Join Date: Aug 2011
Posts: 308
Default

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.
Reply With Quote
  #16  
Old 01-08-2012, 11:21 AM
Gartley's Avatar
Gartley Gartley is offline
Senior Member
 
Join Date: Dec 2010
Location: UK
Posts: 2,325
Default

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.
__________________
Whisky's Workshop
"As you can see here, I'm -ALL ON MY F***ING OWN! Guys where the hell are you?!"
Reply With Quote
  #17  
Old 01-08-2012, 11:28 AM
braindead's Avatar
braindead braindead is offline
Senior Member
 
Join Date: Aug 2009
Location: Merry Ol' England
Posts: 917
Default

Quote:
Originally Posted by Gartley View Post
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 by braindead; 01-08-2012 at 11:29 AM.
Reply With Quote
  #18  
Old 01-08-2012, 11:44 AM
Gartley's Avatar
Gartley Gartley is offline
Senior Member
 
Join Date: Dec 2010
Location: UK
Posts: 2,325
Default

^^ bonus points for the speedy reply anyway.
__________________
Whisky's Workshop
"As you can see here, I'm -ALL ON MY F***ING OWN! Guys where the hell are you?!"
Reply With Quote
  #19  
Old 02-06-2012, 10:57 AM
FluX FluX is offline
Senior Member
 
Join Date: Oct 2010
Posts: 5,076
Default

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:
http://i739.photobucket.com/albums/x...acarnivore.gif

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

www.fluxiservice.com - Friendly, supportive game server host awaiting your arrival.
>> My Custom Content Archive <<
Reply With Quote
  #20  
Old 02-06-2012, 11:11 AM
Marco Marco is offline
Senior Member
 
Join Date: May 2009
Location: Finland
Posts: 538
Default

Quote:
Originally Posted by FluX View Post
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:
http://i739.photobucket.com/albums/x...acarnivore.gif

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]
}
__________________
Quote:
Originally Posted by HuNteR- View Post
Sadly no, we can't do anything about it, fools like Marco will always exist, and with no one with power pulling strings, its a lost cause.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:58 AM.


Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright ©2005 - 2014, Tripwire Interactive, LLC