Raised This Month: $63 Target: $400
 15% 

[L4D2] ABM: A MultiSlots / SuperVersus Alternative (Updated: 11-13-17)


Post New Thread Reply   
 
Thread Tools Display Modes
LiQuiD_FeAR
Junior Member
Join Date: Jan 2010
Old 12-17-2016 , 23:16   Re: [L4D2] ABM: A L4D2 5+ Player Enhancement for Campaign
Reply With Quote #11

so is 8 players max or can it do 5v5 versus games?
LiQuiD_FeAR is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 12-17-2016 , 23:35   Re: [L4D2] ABM: A L4D2 5+ Player Enhancement for Campaign
Reply With Quote #12

I don't see anything new in this release. It does what every other bot spawn plugin does. What would be the reason to choose this over SuperVersus or Bebop?
__________________
Spirit_12 is offline
NgBUCKWANGS
Senior Member
Join Date: Dec 2014
Old 12-18-2016 , 00:30   Re: [L4D2] ABM: A L4D2 5+ Player Enhancement for Campaign
Reply With Quote #13

Quote:
Originally Posted by LiQuiD_FeAR View Post
so is 8 players max or can it do 5v5 versus games?
The max is whatever L4DToolZ allows you but it was made with campaign in mind and not Vs. I did try it out in Vs but I was looking for game breaking bugs which I did not find. Just thinking about how bots are distributed, I know you won't get the 5v5 in Vs and this plugin doesn't check the gamemode you're in. It might be a good idea not to rely on this for Vs just yet.

Quote:
Originally Posted by Spirit_12 View Post
I don't see anything new in this release. It does what every other bot spawn plugin does. What would be the reason to choose this over SuperVersus or Bebop?
One of the reasons I ended up writing this was because of how hard it was to find the right MultiSlots. I kept changing the MultiSlots on my servers in search of the perfect one. If it wasn't one problem it was another and until I dived into it, did I realize how hard it is to get even half right. e.g., MultiSlots didn't manage models so Model 5+ could be anything and if you go idle, your model could change. This alone is what I've discovered introduces bugs with the defib and witches.

Another version I swore worked better had a problem where even if it was just 4 people, on map change some of us would spawn in with 100 health when we should have been black and white. The latest problem with MultiSlots that bothered me was the teleporting on first spawn after 10 seconds and teleporting everytime I returned from idle after 10 seconds. It was jarring and I got tired of trying to find the right one that worked the way I thought it should work.

I went into this with the idea that if adding a 5th player introduces a bug and if I can fix that bug, I should. If that meant handling models, I'll do it. If it meant handling the teleportation and respawning of players, so be it. I was pretty determined to see it through to be the kind of plugin I was searching for and I think I'm pretty damn close to what I set out to do. You can customize what the 5+ players come in with btw, whether you want them as the role of medic, sniper, etc.

So far, it works the way I envisioned and it's nothing new, so you're right. It's just different and if it's not for everyone that's OK. I'm learning and this is my first official SourcePawn work that started with a completely blank sp file. It compiles just fine and after dozens of games there are no errors in my logs. As the old saying goes, it if ain't broke, don't fix it. If you have the handling of 5+ players on your servers the way you want, you don't need this, otherwise give it a try?
NgBUCKWANGS is offline
NgBUCKWANGS
Senior Member
Join Date: Dec 2014
Old 12-18-2016 , 00:39   Re: [L4D2] ABM: A L4D2 5+ Player Enhancement for Campaign
Reply With Quote #14

Quote:
Originally Posted by LiQuiD_FeAR View Post
so is 8 players max or can it do 5v5 versus games?
After considering this, I'd like to support it. I bet I can. In fact, if you look at the OnClientPostAdminCheck function you'll see how I distribute new bots and I've hardcoded team 2 (survivors) under new bots. So, you'll only ever get survivors for players 5 through 32. When I figure out how to actually check the game mode (to see if the gamemode Vs, scavenge, etc), I'll just add a bot to the team with less bots. To do this I just need to figure out how to check the game mode. I'm sure I'll find it

Last edited by NgBUCKWANGS; 12-18-2016 at 00:40.
NgBUCKWANGS is offline
NgBUCKWANGS
Senior Member
Join Date: Dec 2014
Old 12-18-2016 , 01:21   Re: [L4D2] ABM: A L4D2 5+ Player Enhancement for Campaign
Reply With Quote #15

This is the code I've added to support Vs and Scavenge and distributing bots evenly across teams. Before... this function just added new bots to team 2 (survivors) as I was considering campaign only in my development but I love abstraction and this in theory (I've only tested to make sure it didn't break campaign) works. I'm gonna leave this in but it might need a tweak or two. I don't unfortunately have enough friends that would enjoy wasting an evening on testing.

If anyone is interested in helping me make this solid, friend me on Steam at http://steamcommunity.com/id/buckwangs/

Code:
public OnClientPostAdminCheck(int client) {
	DebugToFile(1, "OnClientPostAdminCheck: %d", client);

	if (!GetQRecord(client)) {
		if (SetQRecord(client) >= 0) {
			PrintToServer("AUTH ID: %s, ADDED TO QDB.", g_QKey);

			int onteam = 2;
			bool isVs = false;

			if (StrEqual(g_GameMode, "versus") || StrEqual(g_GameMode, "scavenge")) {
				if (GetTeamClientCount(3) < GetTeamClientCount(2)) {
					onteam = 3;
					isVs = true;
				}
			}

			if (CountTeamMates(onteam, 0) == 0) {
				if (onteam == 2 && !isVs) {
					g_ExtPlayers++;
				}

				NewBotTakeOver(client, onteam);
			}
		}
	}
}
NgBUCKWANGS is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 12-18-2016 , 04:46   Re: [L4D2] ABM: A L4D2 5+ Player Enhancement for Campaign
Reply With Quote #16

This is a good effort for it being your first plugin, but there are multiple issues that you will encounter. The first one that I could see is the witch and defib bug. You are using models to distinguish that, but you only have 8 models. What about 8+ on survivor side? I know this is not often, but there have been times when I had 13 players doing a coop.

The other addition that I could think of is changing the number of SI and CI to match the player count. SuperVersus does that, so you can grab the code from there. In addition, you can also checkup Merudo's version of SuperVersus to see how gamemode is being detected.
__________________
Spirit_12 is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Black Hole
Old 12-18-2016 , 10:44   Re: [L4D2] ABM: A L4D2 5+ Player Enhancement for Campaign
Reply With Quote #17

On a side note and somewhat related to what Spirit said: Check game modes in OnPluginStart(), not in OnClientPostAdminCheck() because the plugin will check every time someone joins and SM checks the client if he/she has a flag on which may cause lag.

Likewise:
PHP Code:
public void OnPluginStart()
{
    
char sGameMode[16];
    
FindConVar("mp_gamemode").GetString(sGameModesizeof(sGameMode));
    if (
StrContains(sGameMode"versus"false) == -&& StrContains(sGameMode"scavenge"false) == -1)
    {
        
SetFailState("[ABM] Plugin Runs In Competitive Modes Only!");
    }
    
    
// your codes here


Last edited by cravenge; 12-18-2016 at 10:45.
cravenge is offline
LiQuiD_FeAR
Junior Member
Join Date: Jan 2010
Old 12-18-2016 , 17:57   Re: [L4D2] ABM: A L4D2 5+ Player Enhancement for Campaign
Reply With Quote #18

I am currently using a modified version of superversus that I modified myself. I modified it to spawn 9 infected so there are 9 specials and 5 can be players vs 5 survivors. I would be interested in testing this in the near future with you and I've added you on steam under the alias BeAR Tear.
LiQuiD_FeAR is offline
NgBUCKWANGS
Senior Member
Join Date: Dec 2014
Old 12-18-2016 , 23:22   Re: [L4D2] ABM: A L4D2 5+ Player Enhancement for Campaign
Reply With Quote #19

Quote:
Originally Posted by Spirit_12 View Post
This is a good effort for it being your first plugin, but there are multiple issues that you will encounter.
Spirit 12, thank you very much for your wisdom, it is very appreciated. I think this plugin blew up in "features" because in my pursuit of it I felt responsible for the bugs I began to expose. I just turned the bug fixes that I could implement into "features" which is why it handles models, teleportation, respawning etc. My readme does point out the use of some extensions in which I cannot address yet. I will not only take into consideration your idea of boosting the SI and CI but I'll put it on the drawing board because it makes great sense. Thank you very much

Quote:
Originally Posted by cravenge View Post
On a side note and somewhat related to what Spirit said: Check game modes in OnPluginStart(), not in OnClientPostAdminCheck()...
Thank you cravenge. I've actually been told by a good friend "cravenge is a great guy, he'll help, you'll find him on the forums" well haha, you found me I have already implemented a complete solution somewhat similiar to yours but your version helped me cut down on the verbosity and I'm liking the end result.

PHP Code:
char g_GameMode[16];
bool g_IsVs false;

... 
OnPluginStart

FindConVar
("mp_gamemode").GetString(g_GameModesizeof(g_GameMode));
g_IsVs = (StrEqual(g_GameMode"versus") || StrEqual(g_GameMode"scavenge"));

... 
OnClientPostAdminCheck

int onteam 
2;
if (
g_IsVs && CountTeamMates(3) < CountTeamMates(2)) {
    
onteam 3;
}

... 
ChangeClientTeam(clientonteam) ... 
Thank you cravenge!

Quote:
Originally Posted by LiQuiD_FeAR View Post
I am currently using a modified version of superversus ... I would be interested in testing this in the near future with you and I've added you on steam under the alias BeAR Tear.
I accepted and look forward to breaking things when time permits
NgBUCKWANGS is offline
Edison1318
Senior Member
Join Date: Nov 2015
Location: Peaceful place of the in
Old 12-26-2016 , 02:08   Re: [L4D2] ABM: A L4D2 5+ Player Enhancement for Campaign
Reply With Quote #20

Quote:
Originally Posted by NgBUCKWANGS View Post
Spirit 12, thank you very much for your wisdom, it is very appreciated. I think this plugin blew up in "features" because in my pursuit of it I felt responsible for the bugs I began to expose. I just turned the bug fixes that I could implement into "features" which is why it handles models, teleportation, respawning etc. My readme does point out the use of some extensions in which I cannot address yet. I will not only take into consideration your idea of boosting the SI and CI but I'll put it on the drawing board because it makes great sense. Thank you very much



Thank you cravenge. I've actually been told by a good friend "cravenge is a great guy, he'll help, you'll find him on the forums" well haha, you found me I have already implemented a complete solution somewhat similiar to yours but your version helped me cut down on the verbosity and I'm liking the end result.

PHP Code:
char g_GameMode[16];
bool g_IsVs false;

... 
OnPluginStart

FindConVar
("mp_gamemode").GetString(g_GameModesizeof(g_GameMode));
g_IsVs = (StrEqual(g_GameMode"versus") || StrEqual(g_GameMode"scavenge"));

... 
OnClientPostAdminCheck

int onteam 
2;
if (
g_IsVs && CountTeamMates(3) < CountTeamMates(2)) {
    
onteam 3;
}

... 
ChangeClientTeam(clientonteam) ... 
Thank you cravenge!



I accepted and look forward to breaking things when time permits
Heh, it's actually so simple to check the gamemode.
__________________
EdisonGar
Edison1318 is offline
Send a message via Skype™ to Edison1318
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode