Announcement

Collapse
1 of 2 < >

Privay Policy Update

We’ve updated the Tripwire Privacy Notice under our Policies to be clearer about our use of customer information to come in line with the EU General Data Protection Regulation (GDPR) rules that come into force today (25th May 2018). The following are highlights of our changes:


We’ve incorporated the relevant concepts from the GDPR including joining the EU and Swiss Privacy Shield framework. We’ve added explanations for why and how Tripwire processes customer data and the types of data that we process, as well as information about your data protection rights.



For more information about our privacy practices, please review the new Privacy Policy found here: http://tripwireinteractive.com/policies/privacy-notice
2 of 2 < >

Forum Rules

CHANGES
  • Items changed, or highlighted for future attention, on 20 July 2013 are highlighted in yellow.

Global Rules
  • Forum moderators may or may not be Tripwire Interactive staff members, but either way, please respect them, as they are the authority of the forums. Speaking to them with intentional spite will not be tolerated and may result in the loss of your forum privileges.
  • Any decisions made by any member of staff or moderator are final and not subject to discussion. Doing so may result in a ban from the site. The owners of Tripwire Interactive Forums reserve the right to remove, edit, move or close any thread for any reason, as well as to remove access to the forums for any individuals with or without warning for breaches of the rules.
  • If you have a complaint regarding another user, PM the appropriate moderators, or if you have an administrative issue, [RO]schneidzekk.

General Behaviour
  • Use the search function before posting. Chances are your question has already been answered.
  • Use a title that describes the content of your post. Don't use all caps or special characters to draw attention either in the title or the body of the post.
  • Up to 10 emoticons are allowed in a post
  • Political discussions are prohibited.
  • Flaming - We do not tolerate abusive, malicious, personal attacks. You will be banned if you persist in this behavior.
  • Trolls - Anyone deliberately antagonizing other forum users by posting 'flame bait' type messages is not welcome. You will be banned (possibly without warning depending on the severity of the issue) if you persist in this behavior.
  • Personal insults (directed at anyone) will result in a ban. If the behavior is not corrected, it will be made more permanent.
  • Constructive criticism is welcome. However keep in mind we (and other forums goers) may not agree with you. If you can't keep the conversation civil, you will be removed from the forums.
  • The use of hyperbole, one liners, and images as part of a forum debate is likely to get you infracted. You have many ways to participate and be a constructive part of this community, even when you disagree.
  • To make the highlighted bits above 100% clear to everyone, the following WILL NOT BE TOLERATED:
    1. Personal attacks, insults, antagonism of any forum-goers, moderators or Tripwire Interactive staff.
    2. Name Shaming and Public "Witch Hunts" are also not allowed.
    3. Breaches of confidentiality and privacy of any sort.
    4. Any form of racism, bigotry or attacks on race, creed or color.
    5. Linking to posts on other forums related to ANY of the above, whether you are the originator or not, without exception.

  • There has been too much in the way of abhorrent personal behaviors in the past. These will cease. It doesn't matter who started it or who reacted to it - it will all result in moderator action. If you have to indulge your hatreds, for whatever reason, go do it elsewhere - and do not try and drag our forum-goers over to enjoy your hatreds.
  • We understand that people have strong feelings about our games, what we do for a living and how we respond (or don't) to comments on the forums. We all aren't going to agree about everything. So, BE CIVIL in your disagreements!

DO NOTs
  • DO NOT Transmit any message, information, data, text, software or graphic files, or other materials ("Content") that is unlawful (including illegal drug usage), harmful, threatening, abusive, harassing, defamatory, vulgar, obscene, libelous, hateful or racially, ethnically, sexually or otherwise objectionable. This includes publicizing private information, such as individual's real names, IP addresses and anything else that might be used to identify them to the freakier members of the internet. This also means you may NOT publically share private communications (PM, email or anything else) without the original poster's permission.
  • DO NOT Post or transmit any Content that contains a virus, Trojan horse or other mischievous Content.
  • DO NOT Post or transmit any unsolicited advertising, promotional materials, "junk mail", "spam", "chain letters", "pyramid schemes" or any other form of solicitation.
  • DO NOT link to posts on any other forums, or any other form of media, that breaches our rules. It will be treated just the same as if you had posted it here.
  • DO NOT Double Post, cross Post, "necro post" or restart closed threads.
  • DO NOT Intentionally or unintentionally violate any applicable local, state, national or international law, rule or regulation.
  • DO NOT Upload or transmit any Content that infringes any patent, trademark, trade secret, copyright or other proprietary rights ("Rights") of any party.
  • DO NOT post cheats or exploits; THIS INCLUDES ALL/ANY REFERENCES TO HACKING, PIRATED SOFTWARE etc.
  • DO NOT complain about being banned from a server and DO NOT complain about other players on servers - that is between you and the admin, no need to get the community involved.

Username, Avatar and Signature Rules
  • Multiple registrations result in a ban.
  • No offensive user names
  • Avatars:
    Avatars are disabled.
  • All signatures should not exceed the following size limits, you can have both text and images
  • - For text signatures: 4 lines normal size, 8 lines small size and up to 100 chars per line. Font sizes above 2 are not allowed. (Blank lines count as lines.)
  • - For images in signatures: 1 image up to 400 pixels wide, 150 pixels tall and 100kb in size plus 2 lines normal size text and up to 100 chars per line
Netiquette: Written text has no inflection, and, as such, you should be careful how you write your messages as interpretation will vary from person to person. Please take advantage of the built-in emoticons to add such expression to your words. Please remember the golden rule: to treat other forum users the way you would like to be treated. Please use common courtesy, and enjoy using Red Orchestra's forums
Offensive material
The following is a list of some things that MAY be considered "offensive" by the moderators and the team. This is NOT an exclusive list and it does depend very much on context.

Crossing the line into "offensive" territory is likely to get you asked to change your name, sig or avatar or to withdraw/delete posts. This will be done politely by the moderators. If you refuse to comply further action WILL be taken once started, ultimately leading to banning from the forums.

A key point: please attempt to use your brains. What is mild humour to you may well be deeply offensive to others. While we have no intention of acting as politically-correct "thought police", we are on the lookout for those things that can cause offense and, in some cases, are actually still illegal in some jurisdictions.
  1. Names recalling notorious war criminals or personalities.
  2. Names recalling atrocities and war crimes in general, or units with particularly odious histories.
  3. Use of obscenities and expletives.
  4. Blatant racism, mysogynism or many other "ism"s.
  5. Use of symbolism and regalia recalling Nazism or Fascism; this does not include pics of soldiers who happen to have such symbols on their uniform, unless we feel this has been done to provoke. Please note that many Nazi symbols (including the Swastika) are still illegal in Germany and other countries and considered deeply offensive by many Europeans.
  6. Use of symbolism and regalia recalling Stalinism.
  7. On both the previous two, the moderators' views on the intention and impact of use of such symbols will be final - not yours. Please be understanding if you are advised to change something.
  8. In general, if a sig/avatar represents your allegiances in-game and is clearly "in part", it is likely to be fine; if the moderators feel you are trying to demonstrate unpalatable political allegiances, or to use it in an attempt to ridicule or provoke others you WILL be asked to change it. RO is NOT the place to make any extremist political statements of any kind.

Examples:
So people get the idea, some examples that would be considered offensive, numbered as above:
  1. "Hitler", "Beria"
  2. "NKVD Blocking Detachment", "Einsatzgruppen"
  3. This one should be pretty obvious...
  4. So should this - and it includes calling all Germans "Nazis" and all Soviets/Russians "Commies". It got boring 50 years ago, so stop it.
  5. Use of swastikas, fasces, SS-runes and so on for the Axis.
  6. There is actually very little overt symbolism from the Stalinist era; the hammer-and-sickle isn't offensive per se.

A simple rule-of-thumb: many Europeans find Nazi symbolism of any sort offensive; many Americans still find Soviet symbolism offensive. Engage your brain before using.




Final Note: this is NOT open to debate, so please do NOT start whining and moaning if a moderator asks you to change something. They will advise at first, giving reasons, then, if you take no notice, they will step up the pressure through to banning.
See more
See less

[Tutorial] Creating a Basic Mutator

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Tutorial] Creating a Basic Mutator

    Prerequisites: Killing Floor SDK (Steam->Library->Tools)

    Creating a Basic Mutator

    Step-by-step Instructions

    1. Create directory hierarchy

    Create a directory in .../steamapps/common/killingfloor with the same name you wish to give your mutator. Create a subdirectory inside this named Classes. You should now have a directory structure that looks like this:

    .../steamapps/common/killingfloor/ExampleMutator/Classes

    2. Create main mutator script file

    Inside the classes subdirectory create a file with a .uc extension with a name matching the mutator's main directory name, for example ExampleMutator.uc. The path of this file should look like this:

    .../steamapps/common/killingfloor/ExampleMutator/Classes/ExampleMutator.uc

    3. Tell compiler we want to include this mutator in the compilation

    In order to have the compiler actually compile your mutator you must add an entry for it in a file named killingfloor.ini, located in the game's system directory. Open this file, search for the section with several lines beginning with EditPackages=PackageName. Add an entry at the bottom of this list to include the name of your mutator package, which should look like this:

    EditPackages=ExampleMutator

    4. Add some code to the mutator script

    Code:
    class ExampleMutator extends Mutator;
    
    defaultproperties
    {
        GroupName="KFExampleMutator"
        FriendlyName="Example Mutator"
        Description="Mutator description here"
    }
    This is the bare minimum for compiling a mutator that can be seen in Killing Floor (actually, FriendlyName and Description aren't strictly necessary but why compile without them?). The GroupName property must start with the letters KF else it won't be seen by the game.

    5. Compile using UCC

    Compiling the mutator is as simple as calling ucc make, which can be found in the system directory (in fact the file is simply called ucc.exe and make is a command line argument). Note that if you have previously compiled the mutator you must remove its .u file from the system directory in order to recompile (otherwise the mutator will be ignored in the compilation process).

    If you cannot find ucc.exe you may not have the Killing Floor SDK installed. Find it on Steam in the 'tools' section.

    Additionally you may want to remove certain files and have the console wait before closing, so that you can view the compilation output (and thus determine if it failed and why). You could do all this by opening command prompt and typing the commands manually, but it's far simpler to use a batch file. Create a batch file (anywhere - the desktop is good for easy access) with a name such as ExampleMutator.bat and copy the following lines in:

    Code:
    del "C:\Program Files\Steam\steamapps\common\killingfloor\System\ExampleMutator.u"
    "C:\Program Files\Steam\steamapps\common\killingfloor\System\UCC.exe" make
    del "C:\Program Files\Steam\steamapps\common\killingfloor\System\steam_appid.txt"
    pause
    You may need to alter the paths if you have the game installed to a different hard drive or have a different directory structure. The third line removes a file generated by UCC which while exists will prevent connecting to servers (may not apply to all).

    Run the batch file and tada! If compilation was successful, you have just made your first mutator. If not, you have made a mistake.

    6. Functional mutator example

    Here is a functional, more interesting mutator to take a look at:

    Code:
    class ExampleMutator extends Mutator;
    
    function PostBeginPlay()
    {
    	SetTimer(1, true);
    }
    
    function Timer()
    {
    	local KFHumanPawn Player;
    	
    	foreach DynamicActors(class 'KFHumanPawn', Player)
    	{
    		if (Player.Health + 2 <= Player.HealthMax) Player.Health += 2;
    		else Player.Health = Player.HealthMax;
    	}
    }
    
    defaultproperties
    {
        GroupName="KFExampleMutator"
        FriendlyName="Example Mutator"
        Description="Mutator description here"
    }
    What does it do? It increases the health of each player by 2 points every second.

    7. Where do I go from here?

    Now that you understand how to compile a mutator, I'd recommend first taking a look at the official UnrealScript Language Reference which covers all aspects of the language itself. If you plan to write mutators which work online it's vital that you understand how the networking is handled, and I'd suggest reading the Unreal Networking Architecture article on this. If you want to know more about the engine (and particularly which classes are available to use) you can either browse through the script files yourself, or check out the BeyondUnreal Wiki.

    I'd recommend getting a good text editor with support for line numbers (I suggest Notepad++ for this) and a search tool for searching the entire library of script files for finding where specific classes and variables are defined (I'd recommend Windows Grep as it's powerful, fast, and free).
    Last edited by Benjamin; 05-25-2012, 05:32 AM.

  • #2
    should add a function to customize the regen amount, otherwise GOOD JOB.

    john was talking about doing this, and so was i, but now that it's been done, we dont have to

    keep up the good work.

    Comment


    • #3
      Well, I wanted to keep it as simple as possible - I did actually edit a regen mutator I made which allowed customizing the regen speed and amount. Thanks, I plan to do some more (such as covering how to run code client-side and what bAddToServerPackages is used for).

      I'm not exactly fluent when it comes to UnrealScript but I'd like to teach what I know and get other people interested. This forum needs more coders!

      Comment


      • #4
        how do i create a mutator to modify specimen properties? (e.g. increase patriarch health, etc. ) i know that for players modifyplayers is used but what about the specimens?

        Comment


        • #5
          You can simply change a 'defaultproperties' variable of the relevant class when the mutator is loaded (in the PostBeginPlay function), like so:

          Code:
          class'ZombieBoss'.default.HealthMax = 9999;
          This way when an enemy of this class is spawned (in this case the patriarch) it will use this value by default. Have a look in the KFChar folder for the specimen class files, and figure out what you can change by looking at the defaultproperties section. Also see this thread.
          Last edited by Benjamin; 06-30-2010, 08:31 AM.

          Comment


          • #6
            i tried your suggestion.

            "Error, Unrecognized member 'defaultproperties' in class 'Class'"

            speed doesn't seem to be in kfchar but rather in kfmod. also i tried both "class'ZombieClotBase'.default.GroundSpeed = 150;" and "class'ZombieClotBase'.default.GroundSpeed = 150;" in event PostBeginPlay() but they were still slow.

            Comment


            • #7
              Sorry, made a little mistake up there and it should have been 'default' instead of 'defaultproperties'.

              When changing a default variable make sure you change it for the most derived class (which in the case of a clot is ZombieClot).

              Try setting ZombieClot's default GroundSpeed variable instead.
              Last edited by Benjamin; 06-30-2010, 11:38 AM.

              Comment


              • #8
                Thanks I'll try that when I get home. I'm at work right now. Your antiblock mutator does not require to be downloaded by clients. Is it possible for me to make a mutator that modifies the specimens as mentioned above without the clients having to download the mutator? Are there lines of code I can add to ensure that they don't download it? I want the gameplay to surprise the players. Thanks.

                Comment


                • #9
                  Actually, it's simply a matter of not adding a particular line of code:

                  Code:
                  bAddToServerPackages=true
                  And also don't manually add it to server packages either!

                  Is it possible for me to make a mutator that modifies the specimens as mentioned above without the clients having to download the mutator?
                  Yes, since the server decides the attributes of the specimens you can alter these attributes just on the server and the changes will be replicated to clients. However, you have to do more than just alter defaultproperties. You see, the problem is that both the server and the client have their own copy of these attributes, and changes to the default values are not replicated, meaning if you change the default GroundSpeed variable on the server, the client will still think it's the original. You'll instead want to change the variables of each specimen as they spawn, which you can do by implementing the CheckReplacement function:

                  Code:
                  function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
                  {
                  	if (ZombieClot(Other) != None)
                  	{
                  		ZombieClot(Other).GroundSpeed = 10;
                  	}
                  	
                  	return Super.CheckReplacement(Other, bSuperRelevant);
                  }
                  However, there's another problem. Certain variable defaults are used during gameplay, which will reset sometimes (for instance uncrouching resets GroundSpeed to the default). I'd suggest that for such variables you simply set the default properties on both the server and the client.

                  Comment


                  • #10
                    I see. Does that mean I should use both the CheckReplacement function and change the default groundspeed as you've mentioned?

                    "I'd suggest that for such variables you simply set the default properties on both the server and the client."

                    CheckReplacement does this already right? Or do I have to do some other coding?

                    "or instance uncrouching resets
                    GroundSpeed to the default"

                    Since the specimens do not crouch, I don't have to worry about the groundspeed resetting, do I? I'm kind of lost as far as covering all bases to make sure it works.

                    Thanks for all these info Benjamin.
                    Last edited by krispyk; 06-30-2010, 09:45 PM.

                    Comment


                    • #11
                      Well, that was just an example. There are other reasons for the specimen speed being temporarily altered, such as when attacking a door. For what you want you'll need to have both the server and client execute the mutator functions, and alter the default properties.

                      If you want to know if and when certain variables are changed, run WinGrep and search for the desired variable with a "*.uc" file filter in the killingfloor directory.

                      Comment


                      • #12
                        Originally posted by Benjamin View Post
                        Well, that was just an example. There are other reasons for the specimen speed being temporarily altered, such as when attacking a door. For what you want you'll need to have both the server and client execute the mutator functions, and alter the default properties.

                        If you want to know if and when certain variables are changed, run WinGrep and search for the desired variable with a "*.uc" file filter in the killingfloor directory.
                        O.O This is more complicated than i thought as I don't know how to have the server and client execute the mutator functions. I thought CheckReplacement was the solution. I think I only know how to do so on the server side. I don't know how to reset the groundspeed back to what it was if the specimens try to break down the door. Groundspeed is very complicated and maybe not worth the trouble for a newbie like me. hehe. For specimen health, do I use checkreplacement or do I use the command you mentioned? (class'ZombieBoss'.default.HealthMax = 9999 This might be an easier mod to make than groundspeed.

                        Comment


                        • #13
                          For HealthMax I'd recommend changing the default value. It won't match up with the default value on the client, but that shouldn't be an issue since the client never has to deal directly with health variables. I can only think of one thing that'd be strange for clients, and that's that in the cutscene for the patriarch the original HealthMax value will show in the corner. If you don't want this just use CheckReplacement instead (but not both). I think you'll need to alter Health too.

                          As I said before, check out the Multiplayer Mutators tutorial, it explains how to run functions client-side.
                          Last edited by Benjamin; 06-30-2010, 10:42 PM.

                          Comment


                          • #14
                            Thanks for the reply. I've been learning a lot as of late and I'm almost finished with my mutator. Is it possible for a mutator to execute a function or a command depending on which wave it is? Thanks.
                            Last edited by krispyk; 07-01-2010, 04:07 AM.

                            Comment


                            • #15
                              Yeah, this is possible. For example, if you want to run per-wave code every timer call you can do something like this:

                              Code:
                              function Timer()
                              {
                              	local KFGameType KF;
                              	
                              	KF = KFGameType(Level.Game);
                              	if (KF == None || !KF.bWaveInProgress) return;
                              	
                              	if (KF.WaveNum == 1) {
                              		// Handle wave 1 stuff
                              	}
                              	if (KF.WaveNum == 2) {
                              		// Handle wave 2 stuff
                              	}
                              }

                              Comment

                              Working...
                              X