AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Bots vs. Humans (co-op) for TFC (https://forums.alliedmods.net/showthread.php?t=197129)

pizzahut 09-29-2012 08:48

Bots vs. Humans (co-op) for TFC
 
3 Attachment(s)
Bots vs. Humans plugin for FoxBot / Team Fortress Classic

Features

- Forces bots into one team, humans into another.
- Maintains a chosen bot-to-human ratio.

CVARs

bvh_enabled (default=1) // 1 = plugin enabled, 0 = disabled
bvh_ratio (default=4) // bot-to-human ratio, bot count = humans * ratio
bvh_bot_team (default=1) // Which team should bots join? (1=blue, 2=red, 3=yellow, 4=green)
bvh_human_team (default=2) // Which team should humans join? (1=blue, 2=red, 3=yellow, 4=green)

Requirements
============

FoxBot settings:

bot_bot_balance 0
bot_team_balance 0
min_bots -1
max_bots -1

NiHiLaNTh 09-29-2012 09:43

Re: Bots vs. Humans (co-op) for TFC
 
So, it's something like MvM mode in TF2?

ConnorMcLeod 09-29-2012 13:53

Re: Bots vs. Humans (co-op) for TFC
 
Any reason you don't use get_players ?

Also as there is a 1.0 looping task, i don't think that setting the same task to 1.0 on clcmd_spectate and on client_disconnect is worth.

pizzahut 09-29-2012 14:20

Re: Bots vs. Humans (co-op) for TFC
 
Quote:

Originally Posted by ConnorMcLeod (Post 1809028)
Any reason you don't use get_players ?

Thanks for the hint. :)

Quote:

Originally Posted by ConnorMcLeod (Post 1809028)
Also as there is a 1.0 looping task, i don't think that setting the same task to 1.0 on clcmd_spectate and on client_disconnect is worth.

It's a different task, I'm trying to minimise CPU load. I wanted the looping task to be a single task, set when a bot changes team (log event), but it didn't work out.

I could merge the two tasks I guess, into the looping one. CPU load would probably still be low enough.

ConnorMcLeod 09-29-2012 18:34

Re: Bots vs. Humans (co-op) for TFC
 
My bad about tasks :)

pizzahut 09-30-2012 09:05

Re: Bots vs. Humans (co-op) for TFC
 
4.1 Changes:
- Replaced looping bot check task in "plugin_init" with single task in "logevent".
- Removing existing bot check tasks prior to setting up a new one.
- Using "get_players".
- Check bots again later if at least one of the bots is in the wrong team or hasn't picked a class (is_something_wrong).

ConnorMcLeod 09-30-2012 10:25

Re: Bots vs. Humans (co-op) for TFC
 
Is there like in cs, vgui and old menu to select teams ?
If it's the case, jointeam command may only be sent from vgui menu (and when typed in player console).

pizzahut 10-01-2012 16:26

Re: Bots vs. Humans (co-op) for TFC
 
The old menu is gone since the year 2000 IIRC. There is no choice which kind of menu to use, so it's VGUI or console.

ConnorMcLeod 10-14-2012 03:04

Re: Bots vs. Humans (co-op) for TFC
 
Last thing, i think instead of client_cmd (which is delayed by latency and which gonna call again the plugin callback),
it would be better to use engclient_cmd (in that case you have to send each argument separately as strings) that directly sends the command to the game dll.
In that case, you could even send task_adjust_bot_count function without delaying it by 1.0, but anyway this task is ok.

pizzahut 10-29-2012 07:30

Re: Bots vs. Humans (co-op) for TFC
 
Can you put this plugin to old / unapproved, I think it needs some more work but I don't know when I come around to finish it.


All times are GMT -4. The time now is 13:07.

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