TF2: Roll the Dice
This plugin is purely a fun plugin. I had loads of fun playing on a TS server with a roll the dice plugin. Now I’ve ported it to TF2. It lets a user “roll the dice” by typing rtd in chat to win one of the effects listed below. After a player runs rtd they have to wait a period of time before they can do so again. Everything is configurable. The wait time, the duration of the effect, you can even disable an effect if you wish.
Effects are seperated between good and bad. They are:
- godmode – Invulnerability to bullets, falling, and map traps.
- toxic – Your horrible breath kills anyone near you.
- lucky sandvich – An instant health boost and the next shot will be a crit. Good luck!
- faster speed – Faster move speed.
- noclip – Fly through and walls and terrorize the other team.
- low gravity – Lower gravity than everyone else.
- unlimited uber – A couple seconds of uber to show the other team who’s boss.
- invisibility – Now you see me – now you don’t. Go invisible – even to sentries!
- cloak – Your spy watch won’t run out for the duration of this effect.
- crits – Constant crits without the requirement of hacks!
- infinite ammo – No need to reload – we’ve got you covered!
- scary bullets – Any players you hurt become scared like tiny babies.
- instant sentry – Point at a spot and call for a medic to spawn a sentry.
- homing projectiles – Rockets/arrows/flares will fly at enemies to save the bother the aiming.
- instant charge – Your sniper rifle and bow charge up instantly.
- dispenser pop-up – Point at a spot and call for a medic to spawn a dispenser. Stays after the effect has ended.
- infinite double jump – The scout is no longer limited by 2 or 3 jumps.
- instant kills – Bringin’ it back, any damage you cause is fatal!
- tiny player – You have shrunk! Use this advantage to sneak past the enemy.
- explode – Sorry, you exploded where you stood. Just bad luck.
- snail – Your move speed is slowed. Might win in a race against a cozy camper sniper.
- frozen – All movement is frozen and you become an ice sculpture.
- timebomb – You have seconds to live. Run towards the other team to deal damage when you die.
- spontaneous combustion – Surprise, you’re on fire!
- low health – All your health is gone. Where did it go?
- drugged – Flashes of color and tilted vision overtake your screen to distract you.
- blind – Who turned the lights out?
- stripped to melee – You lose your primary and secondary weapons.
- beacon – An energy ring and pinging sound let the enemy know where you are.
- taunt – You can’t stop taunting.
- nostalgia – Black and white vision.
- earthquake – A rumble shakes your screen and affects those around you.
- funny feeling – Increases your FOV to 160. Woooah..
- mystery sauce – You are covered in jarate and milk and bleeding out.
- big head – Hey big head!
The cvars available to you are:
- sm_rtd_enabled 1 // <0/1> Enable/Disable Roll The Dice.
- sm_rtd_timelimit 120 // – Seconds before a player can roll again.
- sm_rtd_mode 1 // <0/1/2> See below for a description.
- sm_rtd_duration 20.0 // – Seconds that rtd effects last.
- sm_rtd_teamlimit 1 // Team limit for mode 2.
- sm_rtd_chance 0.5 // – <0.0-1.0> Change of a good effect.
- sm_rtd_distance 275.0 // – Death radius for toxic kills.
- sm_rtd_health 1000 // – Amount of health given upon health award.
- sm_rtd_gravity 0.1 // Low gravity multiplier.
- sm_rtd_snail 50.0 // Speed for snail effect.
- sm_rtd_trigger “rollthedice,roll” // Chat triggers seperated by commas.
- sm_rtd_admin “” // Set the flag required to roll the dice. (must have all flags ‘o’ or ‘ao’)
- sm_rtd_donator “” // Set the admin flag required for donators. (must have all flags ‘o’ or ‘ao’) Activates the increased chance below.
- sm_rtd_dchance 0.8 // Chance for a good effect if you are a donator.
- sm_rtd_timebomb_tick 10 // Number of timebomb ticks (each a second long).
- sm_rtd_timebomb_damage 180 // Health damage to do to enemies when timebomb goes off.
- sm_rtd_timebomb_radius 600.0 // Radius for timebomb effect.
- sm_rtd_blind 255 // Blind amount. Set between 0 – 255.
- sm_rtd_beacon_radius 375 // Radius for beacon effect.
- sm_rtd_scary 3.0 // Seconds of stun that scary bullets will deal.
- sm_rtd_sentry_level 2 // Sentry level to be spawned during the sentry effect.
- sm_rtd_sentry_count 1 // Number of sentries that can be spawned during the sentry effect.
- sm_rtd_homing_speed 0.5 // Speed multiplier for homing rockets.
- sm_rtd_homing_reflect 0.1 // Speed multiplier increase for each reflection.
- sm_rtd_homing_crits 1 // 0/1 – Whether homing projectiles should be crits.
- sm_rtd_fov 160 // The value to change the FOV to on the funny feeling effect.
- sm_rtd_dispenser_level 3 // Dispenser level to spawn for effect.
- sm_rtd_dispenser_count 1 // Number of dispensers that can be spawned during the dispenser effect.
- sm_rtd_disabled “” // Enter the effects you’d like to disable, seperated by commas. Below are the effect keys:
godmode,toxic,goodhealth,speed,noclip,lowgrav ity,uber,invis,cloak,crits,ammo,scary,sentry, homing,charge,explode,snail,freeze,timebomb,i gnite,badhealth,drug,blind,melee,beacon,taunt ,nostalgia,earthquake,feeling,sauce,dispenser ,jump,instant,bighead,tinyplayer
- sm_rtd_buddah 1 // 0 – Normal godmode (no blast damage force) 1 – Buddah, takes self damage force.
- sm_rtd_sentry_keep 0 // 0/1 – Keep the sentry after the effect is over.
- sm_rtd_dispenser_keep 1 // 0/1 – Keep the dispenser after the effect is over.
- sm_rtd_bighead_scale 3.0 // Multipler to scale the player’s head for the ‘big head’ perk. 1.0 is regular size.
- sm_rtd_tinyplayer_scale 0.1 // Multiple to scale the player model for the ‘tiny player’ perk. 1.0 is regular size.
- sm_rtd_respawn_stuck 1 // 0/1 – Respawn if player is stuck after ‘noclip’ or ‘tiny player’ perks.
- sm_rtd_setup 1 // 0/1 – Enable or disable RTD rolls during setup.
- sm_rtd_debug_effects 0 // 0/1 – Enable or disable logging effects on roll.
A config file: configs/rtd_effects.cfg is now included to give you more control:
- Disable individual effects
- Set a specific duration for an effect. For example to make godmode shorter than other effects.
- Name or description
Regular chat command that players can use to roll the device. Checks for ! in front automatically. Set more triggers with sm_rtd_trigger.
Chat command that players can type to bring up a menu with each perk with it’s description.
- sm_forcertd <target/#userid> perk_index/perk_key
Example: sm_forcertd @me 0 or sm_forcertd @me godmode do the same thing.
Forces a player to RTD. Perk_index is a number, leave it blank to randomly choose. Perk indices can be found in configs/rtd_effects.cfg.
- sm_randomrtd <target/#userid>
Forces a random player to roll the dice.
Reloads rtd_effects.cfg so you do not have to restart the server.
Natives are available for other plugins in rtd.inc:
- forward Action:RTD_CanRollDice(client);
- native RTD_Roll(client, g_eCurrentPerk:nPerk=g_eCurrentPerk:-1);
- Example: Restricts players rolling the dice to only one team. Red or blue. Uses the cvar: sm_rtd_team 2 // 2 – red or 3 – blu to set the team. download source
Useful for gamemodes like VSH where you want only one side that can rtd.
Roll The Dice Modes:
There are three different modes (0/1/2) that govern when users can Roll The Dice during the game. Read each one and change sm_rtd_mode to the one you want:
- 0 : Roll the Dice free for all. Players can roll anytime they want, as long as they don’t exceed sm_rtd_timelimit.
- 1 : Legacy mode. Only one player can roll the dice at a time.
- 2 : Team limit mode. Only a certain amount of players can roll at a given time, on a given team. Set sm_rtd_teamlimit for your team limit amount. Default teamlimit value is 1.
- File: rtd • 72 kB • 37 Downloads