PDA

View Full Version : [L4D(2)] Take Over Bot


Matthias Vance
01-16-2009, 19:30
Plugin features:

Take over survivor bot when you die.
Added a CVAR (tob_respawn_time) that enables you to configure the respawn time


Note:

You should put the .txt file in your gamedata directory!
Taking over infected bots is not possible at this moment, since we cannot SDKCall Director functions (L4D)


LS,

Here is my first public plugin that I release on this forums.

It basically lets you take over a survivor bot when you die and before it does that it will give a message to the player. It also lets you spectate the bot a few seconds before.

Kind regards,

Matthias Vance

KawMAN
01-16-2009, 19:38
sb_takecontrol <bot_name>, where <bot_name> is zoey louis francis or bill. This cmd have cheat flag but work fine.

Matthias Vance
01-16-2009, 19:39
I don't want players to be able to use commands, this will give the first player that dies control of the available bot.

KawMAN
01-16-2009, 19:41
Maybe you sholud change sdk call to Fake Client Command

new String:command[] = "sb_takecontrol";
new flags = GetCommandFlags(command);
SetCommandFlags(command, flags & ~FCVAR_CHEAT);
FakeClientCommand(client, "sb_takecontrol bill");
SetCommandFlags(command, flags);

RAAP
01-16-2009, 20:10
Will this work in both VS and COOP???

Matthias Vance
01-17-2009, 06:49
Maybe you sholud change sdk call to Fake Client Command

I don't like using commands for stuff that's totally unnecessary. I consider it as a hack. Thanks for sharing your opinion though.

Will this work in both VS and COOP???

Yes it will! :D, there is one problem though .. if all survivors die (on either VS or COOP), and there is one bot left, nobody will be able to take this bot because the round will end.

KawMAN
01-17-2009, 07:49
Yes it will! :D, there is one problem though .. if all survivors die (on either VS or COOP), and there is one bot left, nobody will be able to take this bot because the round will end.

try to change sb_all_bot_team to 1

Matthias Vance
01-17-2009, 07:53
try to change sb_all_bot_team to 1

That's actually a good idea, but it affects other situations. I will look into it after this weekend!

DevilsReject
01-18-2009, 15:52
why cant this be made to work with the add bots plugin and then have it made so that real people could take over those bots?
can you combine the 2? or mod this one so that people could join and take over bots?

Matthias Vance
01-18-2009, 16:33
Yeah I could make that work. Will look into this during the following week!

Regards,

Matthias

DevilsReject
01-18-2009, 16:56
where does each file go?
.smx goes in plugins the txt file goes where? and the sp file goes where

djromero
01-18-2009, 17:18
where does each file go?
.smx goes in plugins the txt file goes where? and the sp file goes where

The .sp is the source code of the .smx, so you don't need to put it anywhere.

Just copy the .smx inside the ../sourcemod/plugins folder, and the .txt inside the ../sourcemod/gamedata folder.

Jay Dogg
01-22-2009, 19:56
I cant seem to get this to work can someone help me. Lets start off with there are to downloadable .smx files which one do I need. One is 2.9kb and the other is 3.5kb both named the same thing. Im putting the .smx file (I tried it with both .smx files one at a time) in l4d/left4dead/addons/sourcemod/plugins and Im putting the .txt file in l4d/left4dead/addons/scourcemod/gamedata. Im running a few plugins like L4DSwitchPlayers and infectedspawn + one or two more which are working fine and have .smx in the same dir.
Am I missing something any help would be great

Matthias Vance
01-23-2009, 09:51
There is only 1 smx file, the one that I included in my first post.

However, when you click "Download Plugin", the webcompiler will compile the sp file for you. Both will result in the same plugin.

Regards,

Matthias

Dark-Reaper
01-28-2009, 15:15
I don't know if I have to install it or not, It would be very helpful in coop, but in VS, it will be totally unfair, because if there is two survivors, two bots, and two infected players, infected will have to kill 4 players, not 2, because game ends if all human players die, could you make it only for coop game ?

DevilsReject
01-28-2009, 18:58
how about you only use it in co-op its not automatic you have to make the players.
just dont use it in vrs

Dark-Reaper
01-29-2009, 07:51
how about you only use it in co-op its not automatic you have to make the players.
just dont use it in vrs

I thought this plugin lets automaticly a dead player take control of a bot. :|

Matthias Vance
01-29-2009, 15:00
It does. :)

Dark-Reaper
01-29-2009, 15:56
I just installed it and... nothing happens. :cry:

I put the .txt file into the " gamedata " folder, put the plugin into " plugins ", sm plugins refresh, but nothing happens. If I do sm plugins list, your plugin is listed.

OziOn
01-29-2009, 16:59
It doesn't seem to be working for me either. SourceMod v1.2.0-dev on Windows.

Dark-Reaper
01-29-2009, 18:15
It doesn't seem to be working for me either. SourceMod v1.2.0-dev on Windows.

Same for me, except the OS, it's Linux.

420sphincter
02-01-2009, 10:49
Im running this plugin on my linux server, and it seems that its not working properly, before it was, but now i dont think so....

Matthias Vance
02-03-2009, 01:56
Weird, I'll test it today and get back to you. :)

mattressfish
02-03-2009, 12:01
Yeah, I'd love to see this working!

Jay Dogg
02-07-2009, 16:54
I also running this on a linux server and cant get it to working too =( but would be a great plugin let me know when you get it fully working

Matthias Vance
02-08-2009, 02:17
I managed to quickly find the problem and fix it, it was a typo .. *blush*
Anyway, have fun!

Regards,

Matthias

Dark-Reaper
02-08-2009, 09:31
I managed to quickly find the problem and fix it, it was a typo .. *blush*
Anyway, have fun!

Regards,

Matthias

It works, thanks. :)

Matthias Vance
02-23-2009, 02:28
I am currently working on version 1.1, which will add support for:


Taking over Infected bots (This is not possible, since we can't SDKCall Director functions :cry:)
Add more configurable settings
Already dead players will also be able to take over a bot when one comes available
Fix a bug where a bot might leave the game when he dies


Regards,

Matthias

Dark-Reaper
02-23-2009, 10:22
I just found a huge problem.

We were 3 humans players ( take care the L4D Infected bots plugin was On ).

2 on survivors side ( me included ) the other guy on infected.

I was on the floor, almost dead, the advert appeared with " you will take the control etc... " And just after that the round was ended. BUT, I took the control ! I was still on survivors side, but one bot wasn't here, I was with the guy who was on infected side before, and one other bot.

That's so important to fix that 'cause it makes the server mad.

Matthias Vance
02-24-2009, 04:17
As I stated in my previous post, I'm already working on a fix for this, along with other improvements.

super_lol
02-25-2009, 09:36
the plugin doesnt work =(
when bot dies, he is leaving my server...

Matthias Vance
02-26-2009, 01:50
Did you even care to read what I posted? You can expect an update very soon.

Regards,

Matthias

mattressfish
03-03-2009, 17:46
Did you even care to read what I posted? You can expect an update very soon.

Regards,

Matthias
Any ideas on timeframe? Next day, next week, next month?

Matthias Vance
03-03-2009, 17:48
I'll release an update tomorrow that'll fix bots from getting kicked. I'm still working on a better take over system. Sorry for the delay, thanks for reminding.

Regards,

Matthias

Matthias Vance
03-04-2009, 14:58
I uploaded a preview of 1.1, read more about it in the first post.

BarkerJr
03-12-2009, 21:25
Just had three players in the server, one of which was idle. One of the active players died and got switched to the spectator team, rather than trading places with the idler.

Matthias Vance
03-13-2009, 04:47
Because of the way L4D works, players get switched to the spectator team first, before taking over a bot.

This plugin isn't about switching players with players.

BarkerJr
03-13-2009, 06:45
I guess the problem is that when the player died, it switched the player to spectator and put a bot in the player's place. The player had to reconnect to the server to play again.

Matthias Vance
03-13-2009, 06:56
I find this method of taking over bots too hacky. At this moment I just don't have the time to support such plugin. Therefore I'm discontinuing it.

Sorry for any inconvenience caused.

Regards,

Matthias

vegetablegod
05-05-2009, 14:49
Kinda sucks you have stopped supporting it. Works perfectly for me. Thanks for this!

olj
06-24-2009, 08:30
GREAT PLUGIN, working nice, mb someone will support it instead of original author and it will go to approved?

Matthias Vance
06-27-2009, 04:12
I received some e-mails asking me if I'd get back at this plugin, and .. here I am.

I need to know a couple of things before I file an Approve request:

What are the current problems?
Please describe them in detail.
How can the plugin be improved?


Regards,

Matthias

olj
06-28-2009, 07:23
Works nice for me. However, if there is only 1 person on survivors' team and he dies, the round will end despite if bots still alive and you take control of one of them. I dont know if it can be fixed though.

Matthias Vance
06-28-2009, 08:08
Okay, I'm going to get this re-approved then.

The situation with only one person on the Survivors team happens because the 'whole team' died, and then the round ends.

I might add something for that in the next release, not sure yet.

Roach
06-28-2009, 08:36
Reapproved because the Author is resupporting the plugin.

Visual77
06-28-2009, 11:02
Works nice for me. However, if there is only 1 person on survivors' team and he dies, the round will end despite if bots still alive and you take control of one of them. I dont know if it can be fixed though.

Have you tried adding sm_cvar sb_all_bot_team 1 to your server.cfg?

olj
06-28-2009, 22:28
Sorry, i think i mistaken. That happened few times though, but that depends on game settings i think. Tested it now all good.

Big Myke
06-28-2009, 22:34
Please list the cvars for this pluggin in your first post.

leonil7
08-02-2009, 07:55
great plugin. thanks! this will allow players to 'stay in the game' if they die esp if spawn areas are too far away. this is true for new add-on maps of lately.

take
08-05-2009, 07:27
Is it good if it does very to return from the spectator when striking it to rejoin, the chat or the client console?

olj
08-05-2009, 09:12
Is it good if it does very to return from the spectator when striking it to rejoin, the chat or the client console?

Stop using online translators.

crazydog
12-03-2009, 03:24
Can someone port this to L4D2? Shouldn't be too hard, just need the new signatures.

Matthias Vance
12-03-2009, 04:25
Yes, I'm already on it, I'll go search for the signatures this week (or next week).

AtomicStryker
12-03-2009, 10:49
Signatures are identical to l4d2switchplayers. Just rename its file and done.

Matthias Vance
12-03-2009, 11:06
Edited first post, uploaded updated gamedata to support L4D2.

marcovit
01-04-2010, 10:34
Found a bug, same one as for l4d and l4d2.

If player dies and the bot dies very quickly after it or at the same time, the player goes to spectator and is unable to join the game anymore untill he reconnects.

I got this bug more then enough times and i deleted it.. :cry:

Can u fix that?

Matthias Vance
01-04-2010, 10:44
I will look into it this week and fix the issue! Thanks for reporting this bug!

Kind regards,

Matthias Vance

crazydog
01-04-2010, 15:39
I've noticed a bug with this on scavenge...

This only happens sometimes:

When a round ends, and the teams switch, a 5th player can be added to the survivor team on the next round, removing them from the infected team. Required course of action is to switch them and kick the bot. The survivor they replaced is created as a duplicate survivor, so you end up with two of the same survivors after the switch + kick.

Matthias Vance
01-05-2010, 02:18
If player dies and the bot dies very quickly after it or at the same time, the player goes to spectator and is unable to join the game anymore untill he reconnects.

When a round ends, and the teams switch, a 5th player can be added to the survivor team on the next round, removing them from the infected team. Required course of action is to switch them and kick the bot. The survivor they replaced is created as a duplicate survivor, so you end up with two of the same survivors after the switch + kick.

I can easily fix both issues. All that needs to be done is add a couple of checks, which strangely, are commented out in this version. The code for this plugin is a bit messy (it has unimplemented commented-out stuff), so I'm going to clean it up, rewrite the code base.

You can expect a new release this week / very soon!

Kind regards,

Matthias Vance

marcovit
01-05-2010, 14:24
I can easily fix both issues. All that needs to be done is add a couple of checks, which strangely, are commented out in this version. The code for this plugin is a bit messy (it has unimplemented commented-out stuff), so I'm going to clean it up, rewrite the code base.

You can expect a new release this week / very soon!

Kind regards,

Matthias Vance

That would be awsome!

SeekerPD
01-12-2010, 09:05
Hi.
It seems that the admin is the only one who can take control over the bot (if I'm dead and the bot isn't)
But how let to other clients to take control over a playing bot?

Matthias Vance
01-12-2010, 09:11
This is incorrect. Any dead player will be assigned a living bot.

SeekerPD
01-12-2010, 10:29
It would be also great, if the plugin was providing a choice, because not everyone wants to play again after they died.

GanjaStar
01-14-2010, 17:48
this is great, to prevent rage quting i usually switched the dead guy to the bot using the switch palyers plugin, by moving them to spec, then back to survivors. but sometimes it would just put you back to the dead guy again.


this saves me time and works 100%

thx man.

darktuning
01-22-2010, 06:50
Hello!!

First sorry for my bad english i'm french lol
I have a problem with your plugin, it is very awesome but on my windows server, it restart the first map again and again but if i delete your plugin, my server run fine...
When i say the first map, i want to say that if i launch c1m1_hotel, the server in the console launch after the c1m2, and restart the c1m1 after so the players are "blocked" on the c1m1 map...

What can i do to run your plugin on my server and all goes fine?

See my installed plugins :
http://img19.**************/img19/6909/consolex.jpg

Mrcolin
02-13-2010, 12:53
L 02/13/2010 - 18:52:54: [SM] Plugin encountered error 25: Call was aborted
L 02/13/2010 - 18:52:54: [SM] Native "SetFailState" reported: [MV] Could not find the correct signatures.
L 02/13/2010 - 18:52:54: [SM] Displaying call stack trace for plugin "mv_l4d_takeoverbot.smx":
L 02/13/2010 - 18:52:54: [SM] [0] Line 48, /home/groups/alliedmodders/forums/files/4/5/9/7/0/38263.attach::OnPluginSt
art()

In console log

(L4D2 - Windows - SourceMod Version: 1.3.1)

banz
02-25-2010, 08:11
L 02/13/2010 - 18:52:54: [SM] Plugin encountered error 25: Call was aborted
L 02/13/2010 - 18:52:54: [SM] Native "SetFailState" reported: [MV] Could not find the correct signatures.
L 02/13/2010 - 18:52:54: [SM] Displaying call stack trace for plugin "mv_l4d_takeoverbot.smx":
L 02/13/2010 - 18:52:54: [SM] [0] Line 48, /home/groups/alliedmodders/forums/files/4/5/9/7/0/38263.attach::OnPluginSt
art()

In console log

(L4D2 - Windows - SourceMod Version: 1.3.1)


Did you put the .txt file in gamedata folder?

ionxp
02-25-2010, 08:28
this plugin makes you start as survivor always in versus

ionxp
02-26-2010, 06:48
with sb_takecontrol it's possible sometimes for your server to shut down if you're the only onw in your team regardless if all_bot is set

GanjaStar
02-26-2010, 18:08
with sb_takecontrol it's possible sometimes for your server to shut down if you're the only onw in your team regardless if all_bot is set

hm, that explains why it ocasionally hapens on my server.

guylden
03-08-2010, 09:57
hi, i found this error on my log :

L 03/08/2010 - 11:56:56: SourceMod error session started
L 03/08/2010 - 11:56:56: Info (map "c1m2_streets") (file "errors_20100308.log")
L 03/08/2010 - 11:56:56: [SM] Native "GetClientTeam" reported: Client 8 is not in game
L 03/08/2010 - 11:56:56: [SM] Displaying call stack trace for plugin "mv_l4d_takeoverbot.smx":
L 03/08/2010 - 11:56:56: [SM] [0] Line 165, C:\SRCDS\l4d\left4dead\addons\sourcemod\scrip ting\mv_l4d_takeoverbot.sp::timer_ChangeTeam( )
L 03/08/2010 - 11:56:56: [SM] Native "GetClientTeam" reported: Client 5 is not in game
L 03/08/2010 - 11:56:56: [SM] Displaying call stack trace for plugin "mv_l4d_takeoverbot.smx":
L 03/08/2010 - 11:56:56: [SM] [0] Line 165, C:\SRCDS\l4d\left4dead\addons\sourcemod\scrip ting\mv_l4d_takeoverbot.sp::timer_ChangeTeam( )
L 03/08/2010 - 11:56:56: [SM] Native "GetClientTeam" reported: Client 4 is not in game
L 03/08/2010 - 11:56:56: [SM] Displaying call stack trace for plugin "mv_l4d_takeoverbot.smx":
L 03/08/2010 - 11:56:56: [SM] [0] Line 165, C:\SRCDS\l4d\left4dead\addons\sourcemod\scrip ting\mv_l4d_takeoverbot.sp::timer_ChangeTeam( )
L 03/08/2010 - 11:56:56: [SM] Native "GetClientTeam" reported: Client 2 is not in game
L 03/08/2010 - 11:56:56: [SM] Displaying call stack trace for plugin "mv_l4d_takeoverbot.smx":
L 03/08/2010 - 11:56:56: [SM] [0] Line 165, C:\SRCDS\l4d\left4dead\addons\sourcemod\scrip ting\mv_l4d_takeoverbot.sp::timer_ChangeTeam( )


if someone can help me

advarp
03-14-2010, 21:21
Plugin features:

Take over survivor bot when you die.
Added a CVAR (tob_respawn_time) that enables you to configure the respawn time




Hi,

1) it seems you are transferred to spectator and then automatically put in a bot's place in 5 secs however if you click a mouse button you immediately take its place. Can this be prevented so ppl can take a 5 secs break no matter if theyre clicking or not (some cvar perhaps)?

2) the text displayed gets lost if theres somethign else there - is it possible to display this in the hintbox?

3) A matter of admin: Your plugin shows up with no title etc when listed - see above. If you use mydata instead of data you get the nice title of your plugin displayed.


] sm plugins list
...
21 "mv_l4d_takeoverbot.smx"
...


Thank you

Marchello
05-06-2010, 06:09
So here's the cituation:
one bot is incapacitated (coach), and so is another player (nick).
When the player dies he takes over an incapacitated bot, but no one have helped him so he died. Later on someone revived (with defi) nick, but player didn't take over him. So a bot continued playing. So it'd be really nice if there was like a checking every minute and if there's a free bot so a free player will take over it.

birno
05-06-2010, 14:18
Yeah, thats would be good, but its an unapproved plugin now. :(

ShadowStriker
06-03-2010, 16:11
Can you make it to where if a player leaves after another player has died, the dead player can take control of the bot that the other player leaves? Cause I tested that and it didn't work.

λlsnana(H λ l f l i f e)
06-07-2010, 08:12
Will this work in both VS and COOP???

Yes..

dirka_dirka
06-07-2010, 12:23
Yes..
someone likes bringing things back from the dead.. nice timely answer seeing as that question was asked about 18 months ago.

Matthias Vance
06-07-2010, 12:37
someone likes bringing things back from the dead.. nice timely answer seeing as that question was asked about 18 months ago.

That, and the question was already answered 2 posts after.

sn0wsh00
12-24-2010, 12:40
Sorry for bringing this thread back from the dead, but I really wanted to say that this mod is still probably the best "take over a bot when you die" plugin I've used. It still works perfectly even after all those updates to L4D2. So sad that this plugin had to become unapproved :cry:

exstream
09-11-2013, 11:58
updated game data:)

RavenDan29
09-14-2013, 06:48
Sorry for bringing this thread back from the dead, but I really wanted to say that this mod is still probably the best "take over a bot when you die" plugin I've used. It still works perfectly even after all those updates to L4D2. So sad that this plugin had to become unapproved :cry:

This is the reason the author asked for it to be unapproved I would think the project got overtaken (forgive the punn) http://forums.alliedmods.net/showthread.php?t=127987&highlight=takeover+bot

Crazygamer34894
10-28-2014, 08:26
Yeah I could make that work. Will look into this during the following week!

Regards,

Matthias

eziosid
04-03-2018, 08:40
L 04/03/2018 - 00:16:04: [SM] Exception reported: [MV] Could not find the correct signatures.
L 04/03/2018 - 00:16:04: [SM] Blaming: mv_l4d_takeoverbot.smx
L 04/03/2018 - 00:16:04: [SM] Call stack trace:
L 04/03/2018 - 00:16:04: [SM] [0] SetFailState
L 04/03/2018 - 00:16:04: [SM] [1] Line 48, mv_l4d_takeoverbot.sp::OnPluginStart
L 04/03/2018 - 00:16:04: [SM] Unable to load plugin "mv_l4d_takeoverbot.smx": Error detected in plugin startup (see error logs)

i put game data file to Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\gamedata but got this