50DKP / FF2-Official

Freak Fortress 2 is a one versus all mod for Team Fortress 2. It is the successor to the Vs. Saxton Hale plugin.
https://forums.alliedmods.net/forumdisplay.php?f=154
GNU General Public License v3.0
53 stars 27 forks source link

Rewrite ability/subplugin system #54

Open 50Wliu opened 10 years ago

50Wliu commented 10 years ago

Planned for 2.0.0. Ideally:

More points will probably be added as I go along.

50Wliu commented 10 years ago

Updated with points from #48 and a conversation with Lawd (the weighdown one).

50Wliu commented 10 years ago

Added a point about a subplugin devoted to 3rd-party integration.

WildCard65 commented 10 years ago

Can I suggest a re-wording of the first point, like rework configs to be more readable and more understandable for server owners to know how to edit them as well as do section grouping like so(using code tag for spacing control):

args
{
    "1"    "<value here>"
    //etc
}
50Wliu commented 10 years ago

Sure.

WildCard65 commented 10 years ago

Another suggestion, follow similar subplugin system I'm doing in http://github.com/WildCard65/FF2-Alpha

50Wliu commented 9 years ago

Added a point for preserving backwards-compatibility for subplugins after some discussion on the forums.

ghost commented 9 years ago

You are using weighdown lines were removed

WildCard65 commented 9 years ago

that was intentional

50Wliu commented 8 years ago

Arguments for abilities can now actually be understood without having to memorize anything.

An example of the new rage_cloneattack:

"ability4"
{
    "name"              "rage_cloneattack"
    "custom model"      "1"
    "model"             "models/freak_fortress_2/seeman/seeldier_v0.mdl"
    "allow weapons"     "1"
    "class"             "3"
    "ratio"             "0.0"
    "classname"         "tf_weapon_bottle"
    "index"             "191"
    "attributes"        "68 ; -1"
        //68: -1x cap rate
    "ammo"              "0"
    "clip"              "0"
    "health"            "175"
    "die on boss death" "0"
    "plugin_name"       "ff2_1st_set_abilities"
}

The next step is allowing users to specify their own ability headers instead of being restricted to ability#, and then plugin_name/ability_name reorganization, and finally a reworking of the downloads section. I'm also planning to allow true/false booleans and maybe even more customization, for example specifying engineer for class.

50Wliu commented 7 years ago

So the initial rewrite of the config system has finally been completed. Obviously, it's experimental and almost guaranteed to change a bit more (especially the sounds and downloads sections). Building off of my last comment, here's a slightly-condensed version of Seeldier's new config:

"character"
{
    "name"              "Seeldier"
    "version"           "2"
    "class"             "3"
    "model"             "models/freak_fortress_2/seeman/seeldier_v0.mdl"
    "rage distance"     "600"
    "hidden"            "1"
    "health"            "((((760.8 + {players}) * ({players} - 1)) ^ 1.0341) + 2046) / 2.8"

    "description"
    {
        "en"    "Seeldier:\n''See!''\nSuper Jump: alt-fire, look up and stand up.\nWeigh-down: in midair, look down and crouch.\nRage (low-distance stun + attack of the clones): call for medic when the Rage Meter is full.\nYour companion is Seeman!"
        "ru"    "Seeldier:\n''See!''\nСупер Прыжок: альт.огонь, посмотри наверх и встань.\nСупер-падение: в воздухе смотри вниз и присядь.\nЯрость (оглушение вблизи+ атака клонов): сделай насмешку, когда Счетчик Ярости полон.\nТвой компаньон - Seeman!"
    }

    "weapons"
    {
        "196"
        {
            "classname"         "tf_weapon_shovel"
        }
    }

    "abilities"
    {
        "default abilities"
        {
            "bravejump"
            {
                "slot"          "1"
                "charge"        "1.5"
                "cooldown"      "5"
            }
            "weightdown"
            {
                "slot"          "3"
            }
            //...
        }
        "1st set abilities"
        {
            "spawn clones"
            {
                "custom model"      "1"
                "model"             "models/freak_fortress_2/seeman/seeldier_v0.mdl"
                "allow weapons"     "1"
                "class"             "3"
                "ratio"             "0.0"
                "classname"         "tf_weapon_bottle"
                "index"             "191"
                "attributes"        "68 ; -1"
                    //68: -1x cap rate
                "ammo"              "0"
                "clip"              "0"
                "health"            "175"
                "die on boss death" "0"
            }
        }
    }

    "sounds"
    {
        "sound/freak_fortress_2/seeman/seeldier_see.wav"
        {
            "catch phrase"  "1"
            "begin"         "1"
            "kspree"        "1"
            "death"         "1"
            "win"           "1"
            "lastman"       "1"
            "download"      "1"
        }
    }

    "downloads"
    {
        "models/freak_fortress_2/seeman/seeldier_v0"
        {
            "model"     "1"
        }
    }
}