Description
A rewrite based on both asherkin's and Damizean's plugin.
Features
Spoiler
Now everything is in two config files (sourcemod/configs/dodgeball_redux/ rocketclasses.cfg & dodgeball.cfg )
Every class has the same speed and number of jumps(1)!
Restrict to flamethrower (it gives the default to every class, so you can play as engi, soldier, etc.) The plugin will let a pyro keep his/her flamethrower but will block some flamethrowers that cause problems. (Because of the sound glitch or the taun-kill).
During the round, another camera is created, and when a rocket is fired, this observer point it's attached to it.
Players don't push them self with each other.
The plugin detects if the current map is a dodgeball one.
Added sounds! "RoundStart" "OnDeath" "OnKill" (with a delay) and "LastAlive"
There are multiples rockets and multiples rocket classes, you can change speed, turnrate, damage etc.
There are new things like model, model size (model increase on deflect, pretty cool), trail and a big explosion (taken form YADBP)
New sounds! For rockets you can set the spawn, alter, deflect (by team) beep (with interval) bounce and the "super shot" sound. Also I added a list of sounds on start, on death, on kill and when a player is the last one alive.
Added a new type of reflect: Aimed or "super shot". If you deflect the rocket while aiming exactly at an enemy, the target system will be ignored and the rocket will go to that player faster than normal.
An speedometer that shows rocket's speed, reflects, owner and target.
The plugin will add an annotation over the rocket so you can see it from far away.
You can limit the number of rockets to the number of players on the team with less people alive.
When the round finishes every rocket lefts is disintegrated, the same for the flamethrowers when the player dies.
The rocket bounces a set amount of times on walls & floors (credito to asherkin).
1v1 Mode when there is only one player on each team, with multiple lives and songs.
Configs
Spoiler
PHP Code:
"dodgeball"
{
//Speed of every player (for reference, pyro's base speed is 300).
"PlayerSpeed" "300.0"
//Force player to use pyro
"OnlyPyro" "0"
//Shows an annotation to the client over the rocket when it targets him
"ShowAnnotation" "1"
//When the rocket gets this close to the player, the annotation dissapears. If the rocket spawn/is defelcted this close from the player, the annotation won't be shown.
"HideAnnotationDistance" "600.0"
//Hides the annotation after certain time.
"HideAnnotationTime" "1.5"
//Show the hud?
"ShowHud" "1"
//X position of the hud, from 0.00 to 1.00 or -1.0 for center.
"Xpos" "0.0"
//Y position of the hud (first line), from 0.00 to 1.00 or -1.0 for center.
"Ypos" "0.0"
//Color of the hud
"color" "63 255 127"
//When a player makes an "aimed shot" or a super shot this line will appear on his hud.
"supershottext" "Super Shot!"
//Color super shot line
"supershotcolor" "255 0 0"
//Print kills in chat
"printkills" "1"
//Use hints intead of hud when there is only one rocket
"preferhint" "1"
//Used as owner of the rocket when they spawn
"servername" "The Server"
//Here we define the spawner's limit (and will be overwritten if the map has a spawner config).
"spawner"
{
//Maximum number of rocket that can exists at the same time.
"MaxRockets" "2"
//Dynamically limits the maximum number of rockets, to the number of players on the team with less people alive
"LimitRockets" "1"
//Time after a rocket is destroyed or spawned after trying to spawn another
"SpawnDelay" "2.5"
//This are the classes' chances, they use the section's name to define them.
//The numbers don't have to complete a specific number, so feel free to use them however you want.
//for example 3 and 1 it's like 75% and 25%, but 9 and 1 will be like 90% and 10%
"chances"
{
"Homing Rocket" "5"
"Air Strike" "3"
"Bouncy Rocket" "2"
"Nuke" "1"
}
}
//Color-coded rockets
//This will make a line in the hud for every rocket and it will have it's own color
//Because of hud limitations the plugin will only track up to 5 rockets (there is only 6 hud channels and one is used for the super shot)
//If there are more than 5 rockets, only one, or AllowMultiRocketColor is off, this will be ignored.
"multirocketcolor"
{
"AllowMultiRocketColor" "1"
"rocket1"
{
//Name of the rocket's color
"colorname" "Red"
//RGB of that color
"color" "255 0 0"
//Material of the trail to use, WITHOUT extension (.vmt/.vtf); will be precached and added to the download list.
//If multirocket color is used, the plugin will ignore the rocket's own trail and will use this one
"trail" "materials/sprites/laser"
//Apply color to rocket's model?
"applycolormodel" "1"
//Apply color to rocket's trail? (maybe you make 5 separates trails with their own color)
"applycolortrail" "1"
//Creates a Light (using the RGB color9 attached to the rocket
"uselight" "1"
}
"rocket2"
{
"colorname" "Blue"
"color" "0 0 255"
"trail" "materials/sprites/laser"
"applycolormodel" "1"
"applycolortrail" "1"
"uselight" "1"
}
"rocket3"
{
"colorname" "Green"
"color" "0 255 0"
"trail" "materials/sprites/laser"
"applycolormodel" "1"
"applycolortrail" "1"
"uselight" "1"
}
"rocket4"
{
"colorname" "Yellow"
"color" "255 255 0"
"trail" "materials/sprites/laser"
"applycolormodel" "1"
"applycolortrail" "1"
"uselight" "1"
}
"rocket5"
{
"colorname" "Magenta"
"color" "255 0 255"
"trail" "materials/sprites/laser"
"applycolormodel" "1"
"applycolortrail" "1"
"uselight" "1"
}
}
//This is a mode on dodgeball that will activate when there are only one person left on each team.
//When this mode starts, a music will be played.
//Finally, each player will have a set amount of lives, and it will lose one everytime a rocket hits him.
//The lives will be shown as an annotation over the player's head, and in the hud. A beep sound will play to the player on his last live.
"1v1mode"
{
//Enables the 1v1 mode
"Allow1v1" "1"
//Seconds before starting 1v1 mode
"StartAt" "5.0"
//Lives configuration
"Lives"
{
//Amount of lives that each player gets
"Lives" "3"
//This sounds will be played to a player with just one life left. Leave Empty to disable.
"BeepSound" "buttons/blip1.wav"
//The beep sound will be played this often
"BeepDelay" "1.5"
}
//This music will start when the mode starts, keep in mind that every rocket will be deleted and the rocket will go out in 10 seconds after this.
//So it's a good idea to use a song with a nice/epic part on 0:10
"Music"
{
"1" "ui/gamestartup1.mp3"
//"2" ""
}
}
//Sounds used in this game-mode, the plugin will pre-cache them and add them to the download table.
//The plugin will use all of them randomly and this sounds are independent from the rockets.
"sounds"
{
//When the round starts (NOT when the preparation period ends).
"RoundStart"
{
"1" "vo/announcer_dec_missionbegins10s01.mp3"
"2" "vo/announcer_begins_10sec.mp3"
}
//Played to a player that just died.
"OnDeath"
{
"1" "vo/announcer_dec_failure01.mp3"
"2" "vo/announcer_dec_failure02.mp3"
"3" "vo/announcer_am_lastmanforfeit01.mp3"
"4" "vo/announcer_am_lastmanforfeit02.mp3"
"5" "vo/announcer_am_lastmanforfeit03.mp3"
"6" "vo/announcer_am_lastmanforfeit04.mp3"
}
//Played to a player after a kill.
"OnKill"
{
"delay" "5.0" //Time after a kill that the plugin won't reproduce any "OnKill" sound.
"1" "vo/announcer_dec_kill01.mp3"
"2" "vo/announcer_dec_kill02.mp3"
"3" "vo/announcer_dec_kill03.mp3"
"4" "vo/announcer_dec_kill04.mp3"
"5" "vo/announcer_dec_kill05.mp3"
"6" "vo/announcer_dec_kill06.mp3"
"7" "vo/announcer_dec_kill07.mp3"
"8" "vo/announcer_dec_kill08.mp3"
"9" "vo/announcer_dec_kill09.mp3"
"10" "vo/announcer_dec_kill10.mp3"
"11" "vo/announcer_dec_kill11.mp3"
"12" "vo/announcer_dec_kill12.mp3"
"13" "vo/announcer_dec_kill13.mp3"
"14" "vo/announcer_dec_kill14.mp3"
"15" "vo/announcer_dec_kill15.mp3"
}
//Played to the last client alive on every team.
"LastAlive"
{
"1" "vo/announcer_am_lastmanalive01.mp3"
"2" "vo/announcer_am_lastmanalive02.mp3"
"3" "vo/announcer_am_lastmanalive03.mp3"
"4" "vo/announcer_am_lastmanalive04.mp3"
}
}
//Here we manage the flamethrower restriction
//I'm trying to find a solution for these 3 problems
//Remove the flamethrower looping sound
//Remove the rainblower taunt kill
//Allow deflects with phlogistinator (maybe a weapon attribute)
"blockedflamethrowers"
{
"1" "40" //The Backburner (Bugged loop sound)
"2" "215" //The Degreaser (Bugged loop sound)
"3" "594" //The Phlogistinator (You can't deflect with the Phlogistinator you silly )
"4" "741" //The Rainblower (Taunt Kill)
"5" "1146" //Festive Backburner (Bugged loop sound)
}
"rocketclasses"
{
//The plugin will NOT use this class, this is used to define the default values.
//This values will be used if they aren't specified on a class
//DO NOT EDIT except if you know what you are doing.
"default"
{
//Material of the trail to use, WITHOUT extension (.vmt/.vtf); will be precached and added to the download list.
"Trail" ""
//Model of the rocket, WITH extension (.mdl) ; will be precached and added to the download list.
"Model" ""
//Model size of the rocket when it spawns
"ModelSize" "1.0"
//Animate the model
"Animated" "0"
//Size increment after a deflect
"DeflectSizeInc" "0.0"
//Base damage of the rocket (since it will be crit, it will deal more damage).
"BaseDamage" "200"
//Damage Increment on deflect
"DeflectDamageInc" "10"
//Base Speed of the rocket. TF2's rocket has a default speed of 1100.0
"BaseSpeed" "1100.0"
//Speed Increment on deflect
"DeflectSpeedInc" "50"
//Turn rate per tick
"TurnRate" "0.05"
//Turn rate Increment on deflect
"DeflectTurnRateInc" "0.005"
//Delay in seconds after being deflected
"DeflectDelay" "0.1"
//Select a the closest target on deflect. If it's 0 it will be random.
"TargetClosest" "1"
//Allow "aimed" shots, if the player is aiming directly to another player, the rocket will go to that player.
"AllowAimed" "1"
//Speed of an aimed shot. The plugin with use this factor with the acumulated speed.
"AimedSpeed" "2.0"
//Max time this rocket can bounce on walls (use zero if you don't want this feature). Keep in mind that the counter resets on deflect.
"MaxBounce" "10"
//Delay in seconds after the rocket just bounced before the rocket start turning to it's target again.
"BouceDelay" "0.1"
//If 1 the rocket will keep trying to go in the original direction (this means it could bouce multiple times until it goes aways from the floor. If 0 the rocket will relaly bounce and ignore the rocket's direction before the bounce.
"BounceKeepDirection" "0"
//Sounds used by the plugin, they all will be precached and added to the download list.
//Use paths without sound/
//Played to everyone when the rocket spawns.
"PlaySpawnSound" "1"
"SpawnSound" "weapons/sentry_rocket.wav"
//Played to a player that is locked by the rocket.
"PlayAlertSound" "1"
"AlertSound" "weapons/sentry_spot.wav"
//Played to everyone when a team deflects. I added this for a custom "ping-pong" sound later.
"PlayDeflectSound" "0"
"BlueDeflectSound" "items/cart_explode_trigger.wav"
"RedDeflectSound" "items/cart_explode_trigger.wav"
//Played from the rocket to everyone every BeepInterval.
"PlayBeepSound" "0"
"BeepSound" "weapons/sentry_scan.wav"
"BeepInterval" "1.0"
//Played to everyone when the rocket bounces.
"PlayBounceSound" "1"
"BounceSound" "mvm/melee_impacts/bottle_hit_robo01.wav"
//Play sounds on super shot
"PlayAimedSound" "1"
//Sound for everyone when there is a super shot
"AimedSound" "weapons/airstrike_fire_03.wav"
//Sound for the super shot's target
"AimedSoundTarget" "weapons/airstrike_fire_crit.wav"
//Sound for the player who did the super shot
"AimedSoundOwner" "weapons/loch_n_load_shoot_crit.wav"
//Big explosion with effects, shockwave, and a damage radius.
"explosion"
{
//Create big explosion when the rocket explodes?
"CreateBigExplosion" "0"
//Damage of the explosion
"Damage" "200"
//Push strength of the explosion
"PushStrength" "1000"
//Radius of the explosion
"Radius" "1000"
//After this distance of the explosion, both damage and push strength will go down
"FallOfRadius" "600"
//Sound played when the big explosion is triggered
"Sound" "mvm/mvm_bomb_explode.wav"
}
}
//Here we define all the classes, everything that you don't define here will have the default values
"Classes"
{
//Remember that the section name, will be the name used by the plugin in the spawner's chances.
"Homing Rocket"
{
}
"Air Strike"
{
"Model" "models\weapons\w_models\w_rocket_airstrike\w_rocket_airstrike.mdl"
"TurnRate" "10"
"ElevationRate" "0.45"
"ElevationLimitMax" "0.75"
"ElevationLimitMin" "-1"
"DeflectDelay" "0.25"
}
"Bouncy Rocket"
{
"SpawnSound" "weapons/grenade_launcher_shoot.wav"
"TurnRate" "0.04"
"ElevationRate" "-0.4"
"ElevationLimitMax" "1"
"ElevationLimitMin" "-1"
"MaxBounce" "200"
"BouceDelay" "0.0"
"BounceKeepDirection" "1"
}
"Nuke"
{
"Model" "models/buildables/sentry3_rockets.mdl"
"Animated" "1"
"BaseDamage" "200"
"DeflectDamageInc" "100"
"BaseSpeed" "500.0"
2020-11-22 (v0.3.2)
*Added two new rocket clases in the default configuration as an example.
*Now nuke explosions kills show up as kills in the feed.
*Added killstreaks for kills with the rockets (including nuke kills).
*You now can reflect with mouse1 (looks a little bit weird).
*Fixed a bug when two people die together on a 2v1 and the 1v1 mode started next round.
*Fixed a bug where the hud kept showing the multicolor part for only one rocket when hints where enabled.
*Fixed a bug where the rocket annotation was being satying unattached to the rocket in the middle of the map.
*Added config parameter for annotation lifetime of the rocket "HideAnnotationTime".
*Added config parameter for the server name "servername" (used as the owner of the rocket when it spawns in the hud/chat).
2020-11-21 (v0.3.1)
*Now you can use hints instead of the HUD when there is only 1 rocket with "preferhint" on.
*Added support for animated custom models using "Animated" tag on rocket class.
*Added support for workshop maps
*Lives notification only stays around for a little bit for alive players (uses SpawnDelay as time)
2020-11-20 (v0.3.0)
*Fixed pushback and hanged steamtools for SteamWorks (credit to rowedahelicon)
*Added !1v1 and !no1v1 command for admins so they can (de)activate 1v1 on the current map (Credit to Dodgeball Saint)
*Added "StartAt" inside 1v1 config to indicate how many seconds before stating 1v1
*Added chat message for kills (configurable with "printkills" at rootlevel in the config) with killer, target, speed and deflects.
*Added explanation in the config file on how to disable beep sound on last life (leave the BeepSound field empty). Nothing changed at code-level.
*Added extra sounds for the super shot: "AimedSoundTarget" and "AimedSoundOwner"
2015-03-26 (v0.2.4)
*Fixed 1 rocket hud not working.
2015-03-20 (v0.2.3)
*Dropped support for the single-rocket version.
*New config file, with multiples rocket, clases, multi-colroed rockets, sounds and 1v1 mode, etc.
*Basically a new plugin rewritten on sourcemod 1.7!
2014-12-31 (v0.1.4)
*Now the plugin blocks the sapper
2014-12-28 (v0.1.3)
*New sm_db_rocket_delay cvar that controls the delay in seconds after a reflection or a bounce in a wall.
*New sm_db_info_x and sm_db_info_y that control the position of the info hud (It controls the first line, everything else is placed relatively to it).
*Fixed some little things in the code.
*Added a sound precache per map
2014-12-04 (v0.1.1)
*Fixed the last player bug
*Added 2 new cvars.
*sm_db_maxbounce that let you select how many times the rocket can bounce.
*sm_db_block_flamethrower if true it will block the Rainblower and the Degreaser.
*Now it will apply the attribute to flamethrowers instead of replacing them.
2014-11-21 (v0.1.0)
* Initial release.
Installation instructions
Place the dodgeball_redux.smx in your sourcemod/plugins/ folder.
Place configs files on sourcemod/configs/dodgeball_redux/
Also you can add map-specific spawners on sourcemod/configs/dodgeball_redux/maps/tfdb_mapname.cfg
You need the tf2items extension and the steamworks extension for this plugin. It also requires tf2attributes.
IMPORTANT: If you don't like a feature, you can easily disable it from the config file, read it all before asking in for help.
Credit
Both asherkin and Damizean for their original plugins.
Also thanks to Powerlod, Chdata, and everyone who helped/gave me feedback!
Note: I'll keep updating this plugin with anyrequest comes up and also I'll keep improving it's code.
Sorry for my bad English and my code.
Why would you take so many of the configurations from the original out?
Multiple rocket types
Multiple rockets
Sounds
Because this started as a custom plugin for my server. We never play with multiples rockets and the nuke is fun at first but I never use it. This plugins uses 2 sounds (for spawn and for alert).
I know that "yet another dodgeball plugin" had a lot of customization but the code it's really messy because of that. This plugin is for those who want a simple plugin with one rocket and the featured I added.
I wont add more "classes" but I think that I will add multiple rockets some time, and maybe a cvar to control models and sound.
I know that "yet another dodgeball plugin" had a lot of customization but the code it's really messy because of that.
I've checked the code for the old Dodgeball plugin and have been able to easily change things that I need. It's pretty clean for a config parser. I do like the changes you implemented into this however I don't suggest removing features at the same time.
I've checked the code for the old Dodgeball plugin and have been able to easily change things that I need. It's pretty clean for a config parser. I do like the changes you implemented into this however I don't suggest removing features at the same time.
As I said:
Note: I'll keep updating this plugin with anyrequest comes up and also I'll keep improving it's code.
I'm not that good coding so I will add those features back. I just wanted to make a fully functional plugin first, and get some feedback.
Tell me exactly what features do you want the most and I'll work on it!
i JUST LOVE mods where the graphic/banner takes up more space/margins than my screen can show
This kind of thing is ok I think, but you should improve it some.
Like, use tf2attributes/tf2items to manage changing weapons so players can use their existing items. Also, adding in some customization to the rockets is good.. At least some rocket types like models/scales/etc.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
Will it count kills and projectiles reflected on strange flame throwers?
No right now, because the way it works. It strips the player from every weapon and it gives him a normal flamethrower.
I will modify it to do what friagram said, I will just edit the current player's weapon.
By the way, is there any way to prevent the player for taunt-killing with the rainblower? I also want to prevent the looping sound bug of the degreaser but I don't know if there is any way to do it, without changing the player's weapon.
Also, the rocketbounce plugin don't work really well with this dodgeball, I'm looking into it too.
No right now, because the way it works. It strips the player from every weapon and it gives him a normal flamethrower.
I will modify it to do what friagram said, I will just edit the current player's weapon.
By the way, is there any way to prevent the player for taunt-killing with the rainblower? I also want to prevent the looping sound bug of the degreaser but I don't know if there is any way to do it, without changing the player's weapon.
Also, the rocketbounce plugin don't work really well with this dodgeball, I'm looking into it too.
That option for not removing the weps would be awesome
The people that plays on my servers like that it's currently counting kills and reflects
any idea how to change this?
new Handle:hItem = TF2Items_CreateItem(FORCE_GENERATION | OVERRIDE_CLASSNAME | OVERRIDE_ITEM_DEF | OVERRIDE_ITEM_LEVEL | OVERRIDE_ITEM_QUALITY | OVERRIDE_ATTRIBUTES);
and use Pyro primary weapon from loadout set and also "preserve-attributes" "1"?
and for prevent use of others weapons try it TF2_RemoveWeaponSlot(client, TFWeaponSlot_Secondary);
PS: about taunt kill you can reduce damage given by it.