Register
Topics without answer
Topic Replies Last Post
Who's Online
17 user(s) are online (17 user(s) are browsing Forums)

Members: 0
Guests: 17

more...
[WPC] Wolf Pack Clan Forum Index
   Killing Floor Modding
     [Tutorial] Custom Perks
Register To Post

Flat Previous Topic | Next Topic
Poster Thread
Whisky
Posted on: 2012/5/11 19:13

Joined: 2011/5/25
From: SouthWest UK
Posts: 2393
[Tutorial] Custom Perks
Ok. Now to try and continue the attempt to limit version miss matching and to help people out who wish to create custom perks or server admins who want to work custom weapons into their perks.

Note: This first post may look like a lot, but it's less than an afternoon's reading.

Part One : Prerequisites

Primers

Forum member Benjamin created some very useful tutorials. I suggest you read the first one at least as it covers the actual set up and compiling of mods/muts/packages.

Creating a Basic Mutator
Mutator Essentials
Multiplayer Mutators
Modifying Existing Weapons

CPlusPlus & UnrealScript

Unreal Script is an object based programming language derived from C++. I'm not going to teach you about C++, I'm no where near qualified (or patient) enough to do so.

http://www.cplusplus.com has all the info you need on C++ including tutorials. Take note of how object based programming works including inheritance and projected properties. In here are all the operators and statements you'll need for the maths and checks.

UnrealScriptReference Has pretty much all the info you need on the unreal script functions and more. You can also use http://wiki.beyondunreal.com/ as a resource.

This should be enough to get you started by the time you've had a skim over and maybe tried some of Benjamin's tutorials I'll have written up the next section of the tutorial.

Note: To the experienced programmers; Marco, ScaryGhost, Benjamin etc. If you spot any mistakes or omissions please do send me a message and I'll correct any mistakes I've made. Also feel free to send any suggestions.


Tutorial One – Setting Up & Testing

So now that we have covered some basics of C++/UnrealScript and compiling we need to set ourselves up to build our new perks. There are other ways of doing this but this is the way I prefer to do things.

First download and install ServerPerks from this thread. -Be sure to thank Marco while you are there. ;)

First create your mod folder; “WhiskyPerks” for this example and within that a folder called “classes”
Click to see original Image in a new window

Next navigate to .../KillingFloor/System and open the killingfloor.ini
In the EditPackages lines I add after ‘KFMutators’ the packages for ServerPerks and then your own.
Click to see original Image in a new window

Now going back to our mod folder we set up I’m going to create a simple perk extension that I will use for following tutorials. This is saved as a .uc file in the classes folder. Don't forget the file name has to be the same as the class name.

class WVetCommando extends SRVetCommando
    
abstract;
defaultproperties
{
    
VeterancyName="Whisky Commando"
}


This is all the code I’m going to use for the time being. What I’m doing here is extending off of the SRVetCommando which is the commando class that comes with ServerPerks. This will inherit all the functions and properties of its parent class with the exception of the Perk’s name, now “Whisky Commando” which overrides the parent class property.

Compile and if you’ve been following along you should have no problems. Next navigate to .../KillingFloor/System and open the ServerPerks.ini file (you can do this in game as well from the mutator window I just prefer doing it here) and add your new perk to the Perks= lines, in this case Perks=WhiskyPerks.WVetCommando.
Click to see original Image in a new window

Run the game and test. (Don’t forget to turn on ServerPerks from the mutator menu!)
Click to see original Image in a new window

And there we have it, our very own ‘custom’ perk in game. Admittedly this is only a name change but it is a start. Next tutorial will show you how to start customising bonuses and discounts.


----------------

Flat Previous Topic | Next Topic

Subject Poster Date
 » [Tutorial] Custom Perks Whisky 2012/5/11 19:13
     Re: [Tutorial] Custom Perks Whisky 2012/5/12 6:47
       Re: [Tutorial] Custom Perks Whisky 2012/5/12 6:50
         Re: [Tutorial] Custom Perks Anonymous 2012/5/14 15:26
         Re: [Tutorial] Custom Perks EpharGy 2012/7/4 7:40
           Re: [Tutorial] Custom Perks Whisky 2012/7/4 12:23
             Re: [Tutorial] Custom Perks EpharGy 2012/8/19 13:07
               Re: [Tutorial] Custom Perks Whisky 2012/8/19 16:20
                 Re: [Tutorial] Custom Perks EpharGy 2012/8/19 18:48
                   Re: [Tutorial] Custom Perks EpharGy 2012/8/20 19:41

Register To Post
 
[WPC] Discussions
Forum Topic Replies Views Last Post
[PUBLIC] General Chit Chat I keep seeing WPC and I miss it dearly. 0 8875 2020/4/24 6:52 Blitzkrieg
[PUBLIC] General Chit Chat Just passing by. 0 11899 2020/3/11 23:35 Weeperr
[PUBLIC] General Chit Chat I Miss You Guys 2 14246 2020/1/26 5:06 Webley
[PUBLIC] General Chit Chat Whats up Family 4 24182 2018/7/20 23:37 Helldome
[PUBLIC] General Chit Chat Hello from Solo    [1][2] 13 58638 2018/1/11 23:37 LordDean
[PUBLIC] General Chit Chat WHAT UP YALL    [1][2] 12 72012 2017/7/24 14:57 Zeeky
[PUBLIC] General Chit Chat lets see your gaming setup!    [1][2][3]..................[50] 498 468151 2017/5/7 22:52 Helldome
[PUBLIC] General Chit Chat Post you Art....    [1][2][3]...............[9] 84 134675 2017/5/7 22:51 Helldome
[PUBLIC] General Chit Chat Tribute to all WPC Members old and new!    [1][2][3][4] 32 164986 2017/5/7 22:46 Helldome
[PUBLIC] General Chit Chat HAPPY BIRTHDAY WOODY 4 41615 2016/12/25 21:56 RenownedWolfman
[PUBLIC] General Chit Chat Happy New Year! 5 44701 2016/12/25 21:55 RenownedWolfman
[PUBLIC] General Chit Chat Admin Applications? 3 38687 2016/12/16 5:26 theblade009
[PUBLIC] Applications & Recruitment CorkyT's Application 1 28001 2016/12/16 5:24 theblade009
[PUBLIC] General Chit Chat Happy Birthday Buzz!!!! 2 33455 2016/12/16 5:18 theblade009
[PUBLIC] General Chit Chat Wolf Pack Clan Application 9 52744 2016/12/16 5:17 theblade009
[PUBLIC] Games GTA 5 cars 1 29470 2016/2/20 0:33 Buzz
[PUBLIC] General Chit Chat HAPPY BIRTHDAY WEBLEY!! 1 34866 2016/1/17 15:09 Tic
[PUBLIC] General Chit Chat Merry Christmas !!!!! 1 34014 2015/12/25 22:07 Buzz
[PUBLIC] General Chit Chat HAPPY BELATED BIRTHDAY TO TIC!!!! 2 35075 2015/11/29 18:40 Oaksy
Killing floor Killing Floor 2 servers    [1][2] 11 72476 2015/11/29 17:17 Buzz