AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   [TF2] Panzer Tank standalone plugin (https://forums.alliedmods.net/showthread.php?t=284717)

nergal 07-02-2016 21:09

[TF2] Panzer Tank standalone plugin
 
TF2 didn't seem to have vehicles (to me at least), so instead of messing around with sensitive code that would likely crash everything, I decided to make a vehicle plugin from scratch.

commands list
PHP Code:

"sm_ontank" basically "picks" the tank class for you
"sm_offtank" takes you off the tank class, especially after you die.
"sm_forcetank" admin command (root flag) - forces a chosen person or @all/@red/@blue/@bots/@etc... as a tank or notthis command toggles the status of players. If you force a player who's already a tank, they'll just revert to normal.
"sm_reloadtankcfg" lazy command to reload the CFG generated by the plugin

And what better vehicle to create in a shooter game than a Tank?

Tank Features:
-Gas power (toggleable from cvar)
~gas can be replenished by medigun or from dispenser
~when gas is depleted, tank player cannot move at all!

-Ability to run over people and objects (the code for this is deprecated and i've since made a better system but the purpose of this plugin is to simply release it)

-Equipped with an SMG and Right-Click/MOUSE2 launches a rocket which has a 4 second cooldown.
-Engineers can fix the tank and reload its SMG turret using their wrench!
-Immune to backstabs until very low health.
-SMG and rockets from the tank have no damage fall off!
-Tanks have are vulnerable to explosives but shrug off bullet and fire damage.

For team oriented gamemodes such as VSH/FF2, the plugin also allows you to block certain teams from becoming tanks and you can limit the amount of tanks per team as well!


Here's a demonstration video made by a friend to showcase all of these features!

http://www.youtube.com/watch?v=nnwbu0Zvsh0


DOWNLOAD ==> https://drive.google.com/file/d/0B3F...ew?usp=sharing

PHP Code:

// ConVars for plugin "bethetank.smx"

// Acceleration in speed every 0.1 seconds (in Hammer Units/second) of Tank
// -
// Default: "3.0"
// Minimum: "0.000000"
// Maximum: "9999.000000"
sm_betank_acceleration "3.0"

// what flag admins need to bypass the tank class limit
// -
// Default: "a"
sm_betank_adminflag_bypass "a"

// (Dis)Allow Tank to be able to use Engineer teleporters
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_betank_allowtele "1"

// how much ammo Tanks will start with
// -
// Default: "1000"
// Minimum: "0.000000"
// Maximum: "99999.000000"
sm_betank_ammo "1000"

// (Dis)Allow Tanks to be playable for BLU team
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_betank_blu "0"

// how many Tanks blu team can have
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "16.000000"
sm_betank_blu_limit "0"

// Crush Damage (ignores uber) done by Tank while it's moving
// -
// Default: "30.0"
// Minimum: "0.000000"
// Maximum: "9999.000000"
sm_betank_crushdamage "30.0"

// Enable Player-Tank plugin
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_betank_enabled "1"

// Enable Tanks to be powered via 'gas' which is replenishable by dispensers+mediguns
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_betank_gaspowered "1"

// how much health Tanks will start with
// -
// Default: "1000"
// Minimum: "1.000000"
// Maximum: "99999.000000"
sm_betank_health "1000"

// how much metal to heal/arm Tanks by Engineers
// -
// Default: "25"
// Minimum: "0.000000"
// Maximum: "999.000000"
sm_betank_healthfrommetal "25"

// how much metal to heal/arm Tanks by Engineers mult
// -
// Default: "4"
// Minimum: "0.000000"
// Maximum: "999.000000"
sm_betank_healthfrommetal_mult "4"

// (Dis)Allow Engies to be able to repair+arm Tanks via wrench
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_betank_hpfromengies "1"

// x coordinate for the Gas Meter HUD
// -
// Default: "2.0"
sm_betank_hudx "2.0"

// y coordinate for the Gas Meter HUD
// -
// Default: "2.0"
sm_betank_hudy "2.0"

// Initial Speed (in Hammer Units/second) of Tank
// -
// Default: "40.0"
// Minimum: "0.000000"
// Maximum: "9999.000000"
sm_betank_initialspeed "40.0"

// Max Forward Speed (in Hammer Units/second) of Tank
// -
// Default: "100.0"
// Minimum: "0.000000"
// Maximum: "9999.000000"
sm_betank_maxspeed "100.0"

// (Dis)Allow Tank Rockets to have no Damage Fall-Off and no Damage Ramp-up
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_betank_nofalloffrockets "1"

// (Dis)Allow Tank Turret to have no Damage Fall-Off and no Damage Ramp-up
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_betank_nofalloffturret "1"

// (Dis)Allow Tanks from being able to rocket jump from MOUSE2 rockets
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_betank_norocketjump "1"

// (Dis)Allow Tanks to be playable for RED team
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_betank_red "1"

// how many Tanks red team can have
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "16.000000"
sm_betank_red_limit "1"

// Max Backwards Speed (in Hammer Units/second) of Tank
// -
// Default: "80.0"
// Minimum: "0.000000"
// Maximum: "9999.000000"
sm_betank_reversespeed "80.0"

// Time in seconds for Rocket Gun to be able to shoot another rocket, set to 4 by default to match with reload sound
// -
// Default: "4.0"
// Minimum: "0.000000"
// Maximum: "9999.000000"
sm_betank_rocketcooldown "4.0"

// Base Damage for Rockets shot by Player-Tank
// -
// Default: "100.0"
// Minimum: "0.000000"
// Maximum: "9999.000000"
sm_betank_rocketdamage "100.0"

// radius of rocket shot from Main Gun
// -
// Default: "1.0"
// Minimum: "0.000000"
// Maximum: "9999.000000"
sm_betank_rocketradius "1.0"

// Speed of Rockets shot by Player-Tank
// -
// Default: "4000.0"
// Minimum: "0.000000"
// Maximum: "9999.000000"
sm_betank_rocketspeed "4000.0"

// If tanks are gas powered, how much gas they will start with
// -
// Default: "100.0"
// Minimum: "0.000000"
// Maximum: "9999.000000"
sm_betank_startingfuel "100.0"

// Base Damage for the SMG Turret shot by the Player-Tank
// -
// Default: "1.0"
// Minimum: "0.000000"
// Maximum: "9999.000000"
sm_betank_turretdamage "1.0" 

N-JOY

Rd1981 07-03-2016 23:08

Re: [TF2] Panzer Tank standalone plugin
 
Love it maybe add the actual commands to activiate like sm_ontank sm_offtank sm_forcetank I had to edit the sp file to figure it out.

Cpt.Haxray 07-04-2016 00:27

Re: [TF2] Panzer Tank standalone plugin
 
Yeah, adding the commands to actually use/turn into a tank would be nice.

nergal 07-04-2016 00:29

Re: [TF2] Panzer Tank standalone plugin
 
Quote:

Originally Posted by Rd1981 (Post 2433139)
Love it maybe add the actual commands to activiate like sm_ontank sm_offtank sm_forcetank I had to edit the sp file to figure it out.

you're right! how could I (stupidly) forget!

Added!

TitanTF 07-05-2016 14:18

Re: [TF2] Panzer Tank standalone plugin
 
its laggy when i move my view?

nergal 07-05-2016 22:44

Re: [TF2] Panzer Tank standalone plugin
 
Quote:

Originally Posted by TitanTF (Post 2433831)
its laggy when i move my view?

what do you mean? Elaborate.

Randommagic 10-03-2016 12:44

Re: [TF2] Panzer Tank standalone plugin
 
Is this plugin not public anymore? The download link requires me a permission.
It would be an awesome and enjoyable mod for the server :bacon:

FlaminSarge 10-03-2016 19:00

Re: [TF2] Panzer Tank standalone plugin
 
The animations for the tank model should really be updated to handle move_x and move_y to point the tank in the direction it's moving. I'll try to find a good example model for this.

Benoist3012 10-05-2016 06:06

Re: [TF2] Panzer Tank standalone plugin
 
Quote:

Originally Posted by FlaminSarge (Post 2458966)
The animations for the tank model should really be updated to handle move_x and move_y to point the tank in the direction it's moving. I'll try to find a good example model for this.

The utils extension available on the forum has everything to do it.

FlaminSarge 10-07-2016 21:32

Re: [TF2] Panzer Tank standalone plugin
 
That's not what I mean; the model itself needs to have the animations set up for move_x and move_y, and then TF2 will natively handle it properly.
If you were to use Utils (which really should be renamed to ModelUtils or AnimUtils or something), the tank's yaw depends on the player's aim, and you'd have to overwrite the player's aim poseparams every frame or something. And even then, the barrel would aim straight forward (relative to the tank body) at all times, rather than turning independently of the tank.


All times are GMT -4. The time now is 22:34.

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