Raised This Month: $32 Target: $400
 8% 

Decreasing rocket and stickybomb ammo


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jillchang
Senior Member
Join Date: Mar 2014
Old 02-04-2017 , 22:34   Decreasing rocket and stickybomb ammo
Reply With Quote #1

Can't seem to get my configs right. Trying to reduce ammo for stickybomb and rockets, and even tried all weapons.

Code:
"custom_weapons_v3"
{

    "*"
    {
        "*"
        {
            "1"                "77 ; 0.75"
            "2"                "79 ; 0.75"
            "3"                "25 ; 0.75"
        }
    }
    "*"
    {
        "812"
        {
            "1"                "77 ; 1.0"
            "2"                "79 ; 1.0"
        }
    }
    "*"
    {
        "833"
        {
            "1"                "77 ; 1.0"
            "2"                "79 ; 1.0"
        }
    }

}
Any idea what I'm doing wrong?
Jillchang is offline
Mitchel256
Junior Member
Join Date: Oct 2016
Old 02-05-2017 , 16:16   Re: Decreasing rocket and stickybomb ammo
Reply With Quote #2

Are you trying to reduce the amount of ammo they have per "clip", or the ammo that they have in reserve?
Mitchel256 is offline
Jillchang
Senior Member
Join Date: Mar 2014
Old 02-05-2017 , 19:52   Re: Decreasing rocket and stickybomb ammo
Reply With Quote #3

well can you give me examples of both or whichever one is possible?
I would try to do both, but the ammo they have in reserve being reduced is more important.

Thanks for the help!
Jillchang is offline
Mitchel256
Junior Member
Join Date: Oct 2016
Old 02-05-2017 , 20:33   Re: Decreasing rocket and stickybomb ammo
Reply With Quote #4

For the ammo in reserve, go into the TF2 .vpk files, then the scripts folder, and then the playerclasses folder, and pull out out all of the .ctx files (except for the civilian file), then put them in the scripts/playerclasses folder of your server. If your server doesn't have a scripts folder, or a subordinate playerclasses folder, then create them. You'll have to decompile the .ctx files into .txt files if you want to edit them. I use a program called "vice", which is available somewhere out there. Once you decompile the .ctx files, delete them and edit the .txt files. Each class has a section of their file that contains "tf_ammo_primary" and "tf_ammo_secondary". Those are the values you want to change. It'll be secondary for Demo's stickybomb launcher, and primary for Soldiers rockets. Unfortunately, as far as I know, you cannot reduce the number of shots a class has in their "clip", which I posted about (https://forums.alliedmods.net/showthread.php?t=293368).

Hope this helped. All blame for how convoluted this is lies with VALVe for causing this game to consist of spaghetti code when they should be using .txt files for weapons. The items_game.txt that the game now relies on for numerous things is almost completely unnecessary, but it has become increasingly evident over the years that the people at VALVe are fucking clueless and amateur designers. This has led to the necessity of plugins like TF2Items to do simple edits, when we should only have to edit a single .txt file to change a weapon's entirety on a server, from its model to stats to description. It honestly makes me want to rip my hair out.
Mitchel256 is offline
Jillchang
Senior Member
Join Date: Mar 2014
Old 02-06-2017 , 03:17   Re: Decreasing rocket and stickybomb ammo
Reply With Quote #5

Wait so no way to do it with tf2items?
Jillchang is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 02-06-2017 , 18:15   Re: Decreasing rocket and stickybomb ammo
Reply With Quote #6

Attribute 77 / 79 are definitely what you want, they need to be set to a float that is less than 1.0 (e.g. 0.5 will be half the normal ammo, 0.25 a quarter, etc). Are you sure your config file is being used at all? Is the TF2Items Manager plugin loaded? Have you checked the error logs?
__________________
asherkin is offline
Jillchang
Senior Member
Join Date: Mar 2014
Old 02-06-2017 , 19:22   Re: Decreasing rocket and stickybomb ammo
Reply With Quote #7

Hello asherkin, I will double check and get back to you. Thanks for helping out.
Jillchang is offline
Reply



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 18:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode