[GUIDE] Mann vs Machine Attributes - Full Version

Discussion in 'Tutorials & Resources' started by Turbo Lover, Jan 12, 2013.

  1. Turbo Lover

    aa Turbo Lover Fight me under Glasgow Central Station

    Messages:
    333
    Positive Ratings:
    317
    Yeah.

    Attributes:
    What are they?

    Attributes are what makes the Giant Robots move so slow, they're what makes the Giant Heavy do so much damage and they're what makes the Giant Demoknights gain 100% critical hits for 3 seconds when they kill you. They are what give different weapons their own stats.

    They are what the game engine reads to determine how something acts. What they will look like to you when you're using them, is a brief description of the attribute within quotes, e.g. "move speed penalty", "damage bonus", "critboost on kill"

    Why use them?

    These attributes, are fantastic tools to make your robot waves more unique, more challenging and more fun than your run-of-the-mill robot horde. The sheer number of options they offer you spice up your .pop file in ways just not possible by changing what class of robot spawns with what weapons.

    Whether you want a Scout that moves so fast that it can get to the bomb hatch in less than 5 seconds or a Giant Heavy that shoots Sandman baseballs instead of bullets, it can be done with attributes.

    How do I use them?

    To begin to explain this, let's take a look at THIS.

    The above link is a complete list of attributes within TF2 and includes information on what each attribute does, what weapons and classes can use it and examples of how to use it.

    To begin we'll give your robot a 50% damage bonus. Look at the list provided and the very first attribute listed should read "damage bonus" this is what we're going to put in the CharacterAttributes section of the robot template or TFBot, like so:
    Next, look to the text file and look at Attribute Format, which reads: Percentage. Attributes can have 4 different formats, Percentage, Inverted Percentage, Additive Percentage and Additive. Percentages and Inverted Percentages work as multipliers, multiplying the base stat the attribute modifies. This means to achieve a 50% bonus, we need to multiply the base stat by 1.5, and that is what we will put in our template:
    You've successfully given our robot a 50% damage bonus, but why stop there, let's give him a 50% faster firing rate. Look to the list and find "fire rate bonus" and put it in your .pop like before:
    Now take a look at what format it uses, Inverted Percentage, so to give ourselves a 50% faster firing rate, we need to multiply the base firing rate by 0.5:
    In layman's terms, a Percentage will give you a positive effect if the value is greater than 1, while an Inverted Percentage will give a positive effect for values below 1.

    To quickly go over the other two attribute formats, Additive Percentage is a percentage between 0 and 100 and is used to determine the chance of something happening. Additive is a flat value that will do one of two things. It will either turn an attribute on or off, 0 turning it off and any number above 0 turning it on, or specify a value for the attribute to use, e.g.:
    Should you forget any of this, the text file provided contains examples of every attribute in an easy-to-edit manner, which can be copied into your .pop file.

    You now have the tools and knowledge to go make some crazy robots, so what're you waiting for, go make some Sandman-ball-shooting Heavies.

    Notes

    I'd like to give my thanks to Abex for first compiling the list of attributes to be used in his Custom Weapon Tutorial and for giving me permission to modify the list so it would be more useful to make .pop files with.

    You can view the list of attributes online via Pastebin here or download the file itself here.
     
    • Thanks Thanks x 8
  2. henke37

    aa henke37

    Messages:
    1,837
    Positive Ratings:
    420
    It's not very additive if it doesn't result in a sum of at least two values. And I still don't like the term "inverted percentage". The labels really need to be redone from scratch.
     
    Last edited: Jan 12, 2013
  3. Turbo Lover

    aa Turbo Lover Fight me under Glasgow Central Station

    Messages:
    333
    Positive Ratings:
    317
    These labels aren't mine, these are the labels taken from Valve: http://wiki.teamfortress.com/wiki/Attributes