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

[Css] Modify weapons without plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 09-04-2011 , 05:22   [Css] Modify weapons without plugin
Reply With Quote #1

Sorry if this have posted before. (I didn't search/looked)

Each weapon features are written in ...css\cstrike\scripts\*.ctx files. (weapon_usp.ctx weapon_awp.ctx, etc. etc.)
Before edit, need convert these files with hl2scripter tool to *.txt file (I added *.txt files in zip if you are lazy)
*alternative batch file Decrypt weapon files (CTX)

- To get weapon changes work on server, DON'T CONVERT *.txt files back *.ctx !!
This lead sv_consistency fault and kick players out server because files not match with server files.

Second thing to get these weapon changes work on server, you need reboot server.
Everytime you need edit weapon features and take effect = > reboot.


Weapon file looks like this. *UPDATED 15/9/2011
weapon_usp.txt
PHP Code:
WeaponData
{
    
"MaxPlayerSpeed"        "250"
    "WeaponType"            "Pistol"
    "FullAuto"                
0
    
"WeaponPrice"            "500"
    "WeaponArmorRatio"        "1.0"
    "CrosshairMinDistance"        "8"
    "CrosshairDeltaDistance"     "3"
    "Team"                 "ANY"
    "BuiltRightHanded"         "0"
    "PlayerAnimationExtension"     "pistol"
    "MuzzleFlashScale"        "1"
    
    "CanEquipWithShield"         "1"
    
    
    
// Weapon characteristics:
    
"Penetration"            "1"
    "Damage"            "34"
    "Range"                "4096"
    "RangeModifier"            "0.79"
    "Bullets"            "1"
    "CycleTime"            "0.15"
    
    
// New accuracy model parameters
    
"Spread"                    0.00200
    
"InaccuracyCrouch"            0.00525
    
"InaccuracyStand"            0.00700
    
"InaccuracyJump"            0.28725
    
"InaccuracyLand"            0.05745
    
"InaccuracyLadder"            0.01915
    
"InaccuracyFire"            0.03495
    
"InaccuracyMove"            0.01421
                                
    
"SpreadAlt"                    0.00180
    
"InaccuracyCrouchAlt"        0.00525
    
"InaccuracyStandAlt"        0.00700
    
"InaccuracyJumpAlt"            0.29625
    
"InaccuracyLandAlt"            0.05925
    
"InaccuracyLadderAlt"        0.01975
    
"InaccuracyFireAlt"            0.02504
    
"InaccuracyMoveAlt"            0.01505
                                 
    
"RecoveryTimeCrouch"        0.23371
    
"RecoveryTimeStand"            0.28045
    
    
// Weapon data is loaded by both the Game and Client DLLs.
    
"printname"            "#Cstrike_WPNHUD_USP45"
    "viewmodel"            "models/weapons/v_pist_usp.mdl"
    "playermodel"            "models/weapons/w_pist_usp.mdl"
    "shieldviewmodel"        "models/weapons/v_shield_usp_r.mdl"    
    "SilencerModel"            "models/weapons/w_pist_usp_silencer.mdl"
    "anim_prefix"            "anim"
    "bucket"            "1"
    "bucket_position"        "1"

    "clip_size"            "12"
    
    "primary_ammo"            "BULLET_PLAYER_45ACP"
    "secondary_ammo"        "None"

    "weight"            "5"
    "item_flags"            "0"

    
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
    
SoundData
    
{
        
//"reload"            "Default.Reload"
        //"empty"                "Default.ClipEmpty_Rifle"
        
"single_shot"        "Weapon_USP.Single"
        "special1"            "Weapon_USP.SilencedShot"
        "special2"            "Weapon_USP.DetachSilencer"
        "special3"            "Weapon_USP.AttachSilencer"
    
}

    
// Weapon Sprite data is loaded by the Client DLL.
    
TextureData
    
{
        
"weapon"
        
{
                
"font"        "CSweaponsSmall"
                "character"    "A"
        
}
        
"weapon_s"
        
{    
                
"font"        "CSweapons"
                "character"    "A"
        
}
        
"ammo"
        
{
                
"font"        "CSTypeDeath"
                "character"        "M"
        
}
        
"crosshair"
        
{
                
"file"        "sprites/crosshairs"
                "x"            "0"
                "y"            "48"
                "width"        "24"
                "height"    "24"
        
}
        
"autoaim"
        
{
                
"file"        "sprites/crosshairs"
                "x"            "0"
                "y"            "48"
                "width"        "24"
                "height"    "24"
        
}
    }
    
ModelBounds
    
{
        
Viewmodel
        
{
            
Mins    "-7 -4 -14"
            
Maxs    "24 9 -2"
        
}
        
World
        
{
            
Mins    "-1 -4 -3"
            
Maxs    "17 5 6"
        
}
    }

Quote:
"MaxPlayerSpeed" "250"
Maximum run speed when hold this weapon on hand

"WeaponType" "Pistol" // Pistol, Rifle, SniperRifle, SubMachinegun, Machinegun, Shotgun, Grenade, C4, Knife
Don't know much, but when you set "C4" on weapon, Counter-Terrorist can't pick it up.

"FullAuto" "0"
Is weapon fully automatic.

"WeaponPrice" "500"
How much this weapon cost when buy in buy_zone

"Team" "ANY" // ANY, CT, TERRORIST
Set which team can buy this weapon from buyzone. This not change player weapon buy menu VGUI!!
They need use console command buy deagle to get weapon what not appear in buy menu.

"Bullets" "1"
How many bullets/pellets come from gun barrel when shoot, example pistol 1 bullet and shotgun 6 pellets.

"CycleTime" "0.15"
Rate of fire, 60/0.15 = 400 RPM

"clip_size" "20"
How much ammo in weapon clip.
glitch
- weapon_usp damage not change when set silencer
- Max value to show clip size = 232, after then it start over
- When increase shotguns clip size and shoot clip empty, not reload anymore full clip size. And noisy reload error when big clip
- First round/pistol round, can't buy another type weapon than pistol from buy menu, even player have money. But works when use console command buy m4a1

(... I edit this post all time)

Thanks for these two topic
[CSS] 100 balles
[IDEA] Ammo (configurable)
*edit
more links
Steam forums CS:S Balanced Weapons Mod


*UPDATE
css_weapons_txt.zip contains old weapons files after OB, before 15/9/2011.
css_weapons_txt_1592011.zip contains new weapon files 15/9/2011
Attached Files
File Type: zip css_weapons_txt.zip (28.3 KB, 3638 views)
File Type: zip css_weapons_txt_1592011.zip (32.2 KB, 6877 views)
File Type: txt weapon_usp.txt (2.6 KB, 1727 views)
__________________
Do not Private Message @me

Last edited by Bacardi; 12-18-2013 at 03:30. Reason: not anymore orangebox
Bacardi is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 09-05-2011 , 18:00   Re: [Css] Modify weapons without plugin
Reply With Quote #2

does this mean you cna change the view model and world model? or just event wise configs, etc: if you change the bullets to 20 on the m4a1 will it show the shooting of 20 bullets at once?
Mitchell is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 09-06-2011 , 08:08   Re: [Css] Modify weapons without plugin
Reply With Quote #3

Quote:
Originally Posted by Mitchell View Post
does this mean you cna change the view model and world model? or just event wise configs, etc:
Can change, you get lot troubles then.
- sv_consistency fault
- model attachment position, wrong place
- client game crash / server crash
But always can try, need proper models to get work. (Don't know much this)
I tried quick replace with HL2 weapons but not work properly...

Quote:
Originally Posted by Mitchell View Post
if you change the bullets to 20 on the m4a1 will it show the shooting of 20 bullets at once?
Is this hard to understand ??
Quote:
"Bullets" "1"
How many bullets come from gun barrel when shoot, example pistol 1 and shotgun 6
Think it like shotgun shell
__________________
Do not Private Message @me
Bacardi is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 09-08-2011 , 21:37   Re: [Css] Modify weapons without plugin
Reply With Quote #4

Quote:
Originally Posted by Bacardi View Post
Can change, you get lot troubles then.
- sv_consistency fault
- model attachment position, wrong place
- client game crash / server crash
But always can try, need proper models to get work. (Don't know much this)
I tried quick replace with HL2 weapons but not work properly...
Thanks ill try with recompiled model.
Quote:
Originally Posted by Bacardi View Post
Is this hard to understand ??

Think it like shotgun shell
What i mean is that if you shoot with the "Bullet" set to "5" would it shoot 5 bullets at once or just normal gun shots?
Mitchell is offline
zeroibis
Veteran Member
Join Date: Jun 2007
Old 09-15-2011 , 02:08   Re: [Css] Modify weapons without plugin
Reply With Quote #5

In theory we should be able to change the models if we force the user to download them and precach them. Hopefully we can get someone that knows how to make models to test this. At minimum it would be interesting if we could use this to reskin weapons on the server side. The ability to do this will enhance customizability on servers by leaps and bounds!
__________________
zeroibis is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 09-15-2011 , 09:52   Re: [Css] Modify weapons without plugin
Reply With Quote #6

Quote:
Originally Posted by zeroibis View Post
In theory we should be able to change the models if we force the user to download them and precach them. Hopefully we can get someone that knows how to make models to test this. At minimum it would be interesting if we could use this to reskin weapons on the server side. The ability to do this will enhance customizability on servers by leaps and bounds!
Pretty sure it's going to be the same as the CTX Editor, sadly. The models flash back and forth (thanks to our best friend called prediction).
KyleS is offline
zeroibis
Veteran Member
Join Date: Jun 2007
Old 09-15-2011 , 16:23   Re: [Css] Modify weapons without plugin
Reply With Quote #7

Too bad we can not have it predict the custom model...
__________________
zeroibis is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 09-15-2011 , 16:45   Re: [Css] Modify weapons without plugin
Reply With Quote #8

Quote:
Originally Posted by zeroibis View Post
Too bad we can not have it predict the custom model...
Sounds like a valid feature request, try SPUF.
KyleS is offline
NiceAndSimple
Member
Join Date: Jan 2012
Old 06-09-2012 , 02:26   Re: [Css] Modify weapons without plugin
Reply With Quote #9

Quote:
- To get weapon changes work on server, DON'T CONVERT *.txt files back *.ctx !!
This lead sv_consistency fault and kick players out server because files not match with server files.
How the fuck do we get them back then?
NiceAndSimple is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 06-09-2012 , 03:25   Re: [Css] Modify weapons without plugin
Reply With Quote #10

Quote:
Originally Posted by NiceAndSimple View Post
How the fuck do we get them back then?
What do you mean ?

You not change or edit original weapon *.ctx files, leave those alone. Don't mess them.

You can convert *.ctx files to *.txt version, server will read those too.
And edit weapon *.txt files what ever you like, need re-launch server then to take affect.

Want them back ? Just delete all or specific ...css\cstrike\scripts\weapon_name.txt file and reboot.
Pretty simple.
Bacardi is offline
Reply


Thread Tools
Display Modes

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 09:41.


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