Raised This Month: $51 Target: $400
 12% 

[TF2] Baseball Hell (8/16/14, v.1.62.6.1)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
DatKami
Junior Member
Join Date: Aug 2014
Plugin ID:
4307
Plugin Version:
1.62.6.1
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
Servers with this Plugin:
 
Plugin Description:
A fast paced, laggy projectile based gameplay modifier that promotes baseball, cleaver, and grenade spamming.
Old 08-11-2014 , 17:32   [TF2] Baseball Hell (8/16/14, v.1.62.6.1)
Reply With Quote #1

[TF2] Baseball Hell
Version 1.62.6.1


What is Baseball Hell?
This gameplay modifier, when enabled, transforms the batlefield by giving every player fast-moving, one-hit-kill weapons. There are 7 modes:

Scout Play, All Weapons - All players are set to scout, and are given modified versions of the Loch-n-Load, the Flying Guillotine, and the Sandman.
If all optional plugins are installed, the scout gains infinite jump.
Scout Play, Bat Only - Same as above, but only the bat is issued. Fight in the spirit of our predecessors!
All Play, All Weapons - Players can be any class they want to be, and are given all the weapons. The scout loses his double jump, and sentries can not target.
All Play, Bat Only - Same as above, but only the bat is issued.
New: Flak Cannon - Scouts have detonators, and can detonate them to facilitate air battle! Near shots will harm the scout who shoots them, and premature detonations can cause a scout's untimely demise.
New: Huntsman - Snipers have rapid fire huntsman, that shoot faster than the Sandman's natural rate! The drawback is they move slower than baseballs, even when fully charged, and can not be shot while jumping.
New: Rocketman - Scouts have a variant of the Valve Rocket Launcher, removing gravity from the equation when dogfighting. Near shots will harm the scouts who shoots them, and rockets have a very small radius of splash damage.

Regardless of mode, respawn time is disabled all classes push the cart at 2x the speed, and all classes move as fast as the Scout.

Functionally, each of the weapons in all weapon modes are functionally the same. The option is there because options are fun!

Why?
Old console command functionality let sandman users spam baseballs at ridiculous speeds for annoying effect. When it was combined with the old console command that let you double jump infinitely, the skies lit up and TF2 became a dogfight.

Baseball Hell works to revive this, and more!

ConVars:
baseballhell_version - This version of Baseball Hell.
baseballhell_enabled (default:0) - Set this to 0/1. When enabled, the appropriate modifications are made and the players are issued new weapons. When disabled, slays everyone and resets the server to normal.
baseballhell_mode (default:SCOUT_PLAY_ALL_WEAPONS) - Choose from 7 settings, SCOUT_PLAY_ALL_WEAPONS, SCOUT_PLAY_BAT_ONLY, ALL_PLAY_ALL_WEAPONS, ALL_PLAY_BAT_ONLY, FLAK_CANNON, HUNTSMAN, or ROCKETMAN. Players are immediately set and issued new weapons.
baseballhell_delay_multi (default:1.0) - Set this from 1.0 to 10.0. The initial fire delay is .25 seconds per shot (in Huntsman the bow can fire as soon as .166 seconds); setting this multiplies that time by whatever you set. Use this to promote careful gameplay, or if the server can't handle the load of so many projectiles!

Required:
TF2Items Give Weapon

TF2Items (The above plugin also needs this)

Recommended:

Not Included:
Scout Multi Jump
Including this allows "Scout Only" modes to become insane by including infinite multi-jumps.

Console Warning Suppressor
Suppresses harmless, but annoying warnings related to invalid viewmodels, and if configured, invalid projectile attribution.

Installation:
Place baseballhell.smx into your addons/sourcemod/plugins/ folder.
Make sure you have TF2Items Give Weapon and TF2Items installed!

Optional Installations:
Place scoutmultijump.smx into your addons/sourcemod/plugins/ folder.
Remove SetSpeed.smx from your addons/sourcemod/plugins/ if you have it.

Extract cleaner.zip to your addons/sourcemod/ folder.
Open up addons/sourcemod/configs/cleaner.cfg and add the following on new lines each:
Entity
Arrow alive for
secondsArrow
AddMultiDamage

Troubleshooting:
Q: Why are my viewmodels/worldmodels not correct?
A: TF2 weapon models are rigged differently, and are only meant for the class whom they belong to. This isn't a high priority fix, but I can attempt something later.

P: My server console is full of "Entity XXXX (class <projectile>) reported ENTITY_CHANGE_NONE ..." errors!
A: Whenever a player spawns, touches a resupply cabinet, they are assigned a new copy of their weapon. This error fires because a projectile was still in the world when the player gets the new weapon, and the projectile can no longer find the old weapon. This is fired most frequently when respawn times are disabled, because the chance of the projectile despawning before the player respawns is lower.

To remedy this, please install the console suppressor as per the instructions above.

P: My server console is full of "DataTable warning: tf_viewmodel: Out-of-range value (XXXX) ..." warnings!
A: This is a warning when switching weapons, or shooting the Loch-n-Load. These warnings are harmless, but annoying.

To remedy this, please install the console suppressor as per the instructions above.

P: My server console is full of "Arrow alive for..." warnings!
A: This is a warning when Arrows are not deleted properly.

To remedy this, please install the console suppressor as per the instructions above.

P: My client console is full of "EmitSound" errors!
A: This is a warning attributed with the Huntsman pulling too fast.

There is no fix for this, but should only fire every time a bow is pulled.

Derivation Credits / General Credits:
Randomizer (Special Ammo modification)
Set Speed (Non-Scout speed balancing)
Bitl & bl4nk (Various code snippets)
Vito (Help with debugging)
Forgeblazer (Idea for Rocketman game mode)
RavenShadow(Help with Set Speed implementation)

Changelog (GitHub):
Code:
8/16/2014(v1.62.6.1)
-Bug fixes
Fixed a situation where Sniper did not run at the right speed
Fixed a situation where players could regenerate ammo in normal play,
when Baseball Hell is disabled
-Coding
Weapon generation is more modular
Some lines are condensed
The code now includes SetSpeed functionality
ServerCommand invocations are now SetConVar invocations

8/15/2014(v1.61.11.1)
-Gameplay
Added the Flak Cannon, Rocketman, and Huntsman game modes.
-Bug fixes
All non-scout classes push the cart at 2x speed
-Coding
Some lines are slightly condensed

8/13/2014(v1.59.5.1)
-Bug Fixes
Sandman now fires at the correct speed at delay multiplier 1.

8/13/2014(v1.59.1.1)
-Bug Fixes
Sandman no longer burst fires
-Miscellaneous
Hints are announced to players whenever the game mode or the delay multiplier is changed

8/12/2014 (v1.58.2.1)
-Bug Fixes
Fixed cleaver not reloading properly

8/12/2014 (v1.58.1.1)
-Gameplay
Increased weapon switch speed
-Bug Fixes
Reduced DataTable warnings attributed to instant Loch-n-Load reload speed
Plugin now properly sets the correct convars on map change
-Performance
Removed redundant convar setting code
Limited weapon creation in the case of scout only modes

8/11/2014 (v1.57.1.1)
- This is the first public version. Everything before this is a dark hidden secret, like Coca-Cola formula.
Attached Files
File Type: smx baseballhell.smx (11.7 KB, 389 views)
File Type: sp Get Plugin or Get Source (baseballhell.sp - 388 views - 20.4 KB)

Last edited by DatKami; 08-16-2014 at 20:46. Reason: Published new version
DatKami is offline
DatKami
Junior Member
Join Date: Aug 2014
Old 08-13-2014 , 16:15   Re: [TF2] Baseball Hell
Reply With Quote #2

Does anyone know if the tf_projectile_stun_ball, or any other persistant projectile entity, can output whether it's disabled (on the ground and can't hurt anyone) or not? It'd be amazing to performance if I could get rid of lingering baseballs and cleavers.
DatKami is offline
DatKami
Junior Member
Join Date: Aug 2014
Old 08-15-2014 , 22:34   Re: [TF2] Baseball Hell
Reply With Quote #3

I've updated this game mod with three new modes: Flak Cannon, Huntsman, and Rocketman!

I'd really like some feedback on this mod! Especially helping me to reduce the amount of console errors, or just suggesting how I can make this mod better. I've been hard at work for about a week now, and am always open to new ideas.
DatKami is offline
RavenShadow
Junior Member
Join Date: Jan 2013
Old 08-15-2014 , 23:19   Re: [TF2] Baseball Hell
Reply With Quote #4

I'll look it over more when i get back from work today, but from what I saw when i glanced over it, most of the ServerCommands can be replaced with SetConVarInt.
Has for the ServerCommands that use the SetSpeed Plugin, I'll look at that later because I think there should be a way to just modify clients netprops for the speed without using other plugin on top of this one for it

Last edited by RavenShadow; 08-15-2014 at 23:22. Reason: Grammar
RavenShadow is offline
DatKami
Junior Member
Join Date: Aug 2014
Old 08-15-2014 , 23:34   Re: [TF2] Baseball Hell
Reply With Quote #5

I tried taking directly from the SetSpeed plugin, but I was unsuccessful in implementing what it does, so I used it directly for a quick fix. Moreover, this is my first mod; I'm very inexperienced and I'm surprised that I've gotten as far as I can with it.

As for the SetConVarInt, I'll look into it. It can't be hard, I just forgot about that command.
DatKami is offline
RavenShadow
Junior Member
Join Date: Jan 2013
Old 08-16-2014 , 12:53   Re: [TF2] Baseball Hell
Reply With Quote #6

After looking into SetSpeed, heres what would need to be added
PHP Code:
new bool:g_bSpeedSet[MAXPLAYERS+1] = false;
new 
Float:g_flSpeed[MAXPLAYERS+1] = 400.0;
public 
OnClientPutInServer(client)
{
    
g_bSpeedSet[client] = false;
    if(
client && client <= MaxClients && IsClientInGame(client))
       {
            
SDKHook(clientSDKHook_PreThinkSDKHooks_OnPreThink);    
       }
}
public 
SDKHooks_OnPreThink(client)
{
    if(
IsValidClient(client) && g_bSpeedSet[client]) SetSpeed(clientg_flSpeed[client]);
}
stock SetSpeed(clientFloat:flSpeed)
{
    
SetEntPropFloat(clientProp_Send"m_flMaxspeed"flSpeed);
}
stock ResetSpeed(client)
{
    
TF2_StunPlayer(client0.00.0TF_STUNFLAG_SLOWDOWN);

(I take no credit. this is code copy and pasted from setspeed)
Just replace the ServerCommands that you used for SetSpeed with this
g_bSpeedSet[client] = true;
and for the resetspeed one
ResetSpeed(client);
g_bSpeedSet[client] = false;

Tiny Edit:I'll poke at the item attribute move speed bonus later via tf2attributes and/or giveweapon/tf2items because using a PreThink hook for this gamemode is probably not a good idea
Tiny Edit numbah 2:Gahhhh woops didnt think though what i posted code wise fixed

Last edited by RavenShadow; 08-16-2014 at 13:05. Reason: Additional note and woops messed up copy and paste
RavenShadow is offline
DatKami
Junior Member
Join Date: Aug 2014
Old 08-16-2014 , 14:06   Re: [TF2] Baseball Hell
Reply With Quote #7

Thanks for that. I guess I was forgetting the prethink hook when I was trying to port over the functionality.

Also when it comes to adding movement speed attributes, that would be a great idea, if it weren't for the fact that if I ever needed to do an all class implementation, that requires me to assign 9 new weapon slots, holding weapons that need to be dynamically generated.

Why is this a problem? I found out a while ago that creating weapons fills up more edict slots or something, and that contributes to a faster server crash due to no free edict slots. I implemented the all class modes before I learned this.

What's so bad about the PreThinkHook? I'd like to use it if it gives me an edge over a faster server crash.

Last edited by DatKami; 08-16-2014 at 14:08.
DatKami is offline
RavenShadow
Junior Member
Join Date: Jan 2013
Old 08-16-2014 , 14:31   Re: [TF2] Baseball Hell
Reply With Quote #8

Only reason, I'd think its bad would be I thought it would lag people up more, but now that I think about it, its just a netprop so it shouldn't lag anyone on that
Also, I didnt know about the edict thing for TF2items. learn something new every day
RavenShadow is offline
DatKami
Junior Member
Join Date: Aug 2014
Old 08-17-2014 , 13:04   Re: [TF2] Baseball Hell (8/16/14, v.1.62.6.1)
Reply With Quote #9

I pushed the changes you suggested. Now I still need to figure out how to delete baseballs and cleavers, and how to change the cart speed...
DatKami is offline
ocwoody
AlliedModders Donor
Join Date: Nov 2010
Location: huh
Old 08-17-2014 , 14:48   Re: [TF2] Baseball Hell (8/16/14, v.1.62.6.1)
Reply With Quote #10

Nice job! I'll give this a try
ocwoody 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 19:37.


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