AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D2] SIPool - Aim to improve performance when spawn SI (Experimental)[2024.04.18] (https://forums.alliedmods.net/showthread.php?t=346270)

Paimon 02-18-2024 22:07

[L4D2] SIPool - Aim to improve performance when spawn SI (Experimental)[2024.04.18]
 
2 Attachment(s)
Description:

This plugin is a library that allows you to create special infected bot by SIPool.

The plugin's aim is that when your server needs to create special infected bots very frequency.
Such as create 28 SI bots in 0 seconds, CreateFakeClient() will consume lots of cpu and network resources.
But use SIPool can avoid lots of CreateFakeClient() operation because the plugin use pool to manage the SI bots that already created in the past and avoid them being kicked by the director.
When you try to request the bot, SIPool will pick an available bot from pool unless the pool is empty.

And after my test(28 SI with 0 seconds), the result showed that:
NO SIPool, the server's tickrate decrease from 100 to 80 LESS when CreateFakeClient() from a for() loop;
WITH SIPool, the server's tickrate decrease from 100 to 90 MORE when RequestSIBot() from a for() loop;

And the plugin still needs to test, only myself can not make the plugin be pefect, so any advice and criticize reports are wanted.

Q: How does SIPool work?

SIPool will prevent the engine from kicking dead SI(Special Infected) bots and keep them death until next spawn,
for example, a charger bot dead, SIPool will change it's status to ACTIVE to avoid it being kicked,
and add it to charger pool, next time you RequestSIBot for a charger,
SIPool will pick an available client from charger pool and make it respawn,
teleport to target position, then return it's index to the plugin which calls RequestSIBot.

Q: Why can SIPool enhance the performance?

I think the main reason is that SIPool avoid lots of CreateFakeClient operation.
SIPool makes the SI bot to be a player in coop mode, just like versus, dead SI won't be kicked but wait for respawn,
so no new client connect and boardcast to everyone in server, these will save lots of cpu and network resources.

Usage:

See si_pool.inc and sptest.sp.

Support:

Harry's L4D Infected Bots(SIPool fork)

Update:
2024.04.18#145
Fixed array index out of bounds.
Update L4DInfectedBots(SIPool fork) to 2.9.5

2024.04.01#124:
Fixed all bugs mentioned here(Issue#5)
The fixed bugs will list as follows:
1. Server crash when changelevel
2. SI crouch after spawn
3. Add tank to pool
4. Server full for connecting player(may be fixed)
5. Index out of bounds
6. Better way to manage SIPool

Spoiler


Source:

You can ALWAYS find latest source at my GitHub:
Paimon-Kawaii - L4D2-Plugins/InProgress/SIBotPool :wink:

Download:

NekoYa4r 02-19-2024 05:23

Re: [L4D2] Special Infected Pool (Experimental)
 
Wow, will this plugins conpatible with Infected bot harry fork? Because i'm currently running a 16 slots coop server and it spawn a lot of SI at the same time therefore my server tickrate is really unstable.

Paimon 02-19-2024 05:59

Re: [L4D2] Special Infected Pool (Experimental)
 
Quote:

Originally Posted by NekoYa4r (Post 2818249)
Wow, will this plugins conpatible with Infected bot harry fork? Because i'm currently running a 16 slots coop server and it spawn a lot of SI at the same time therefore my server tickrate is really unstable.

Unfortunately, currently none of the plugin is conpatible with SIPool because all the old plugins need to rewrite with SIPool in order to get the function work.

WhiteSails 02-19-2024 07:22

Re: [L4D2] Special Infected Pool (Experimental)
 
Author, can you speak Chinese?

Paimon 02-19-2024 08:08

Re: [L4D2] Special Infected Pool (Experimental)
 
Quote:

Originally Posted by whitesails (Post 2818253)
author, can you speak chinese?

可以,请问有什么问题么?

Paimon 02-20-2024 01:11

Re: [L4D2] Special Infected Pool (Experimental)
 
Updated.

Paimon 02-20-2024 02:09

Re: [L4D2] Special Infected Pool (Experimental)
 
4 Attachment(s)
Quote:

Originally Posted by NekoYa4r (Post 2818249)
Wow, will this plugins conpatible with Infected bot harry fork? Because i'm currently running a 16 slots coop server and it spawn a lot of SI at the same time therefore my server tickrate is really unstable.

I have made a SIPool fork for harry's L4D Infected Bot and I have put it here.
For current only support L4D2 because SIPool only support L4D2 now.

Only test at my server(30 SI 0 seconds with single survivor), the test result is that:
At the moment SI spawn, 95 more tickrate the server has at round start.
With the round continue, lots of SI got lagged and killed by plugin, 85 more tickrate the server keeps.
For the average performance, the server should keep 90 tickrate if SIPool works as expect.

NekoYa4r 02-20-2024 06:32

Re: [L4D2] Special Infected Pool (Experimental)
 
Quote:

Originally Posted by Paimon (Post 2818297)
I have made a SIPool fork for harry's L4D Infected Bot and I have put it here.
For current only support L4D2 because SIPool only support L4D2 now.

Only test at my server(30 SI 0 seconds with single survivor), the test result is that:
At the moment SI spawn, 95 more tickrate the server has at round start.
With the round continue, lots of SI got lagged and kill by plugin, 85 more tickrate the server keeps.
For the average performance, the server should keep 90 tickrate if SIPool works as expect.

SIPool need to redownload because I have updated it.

PHP Code:

L 02/20/2024 18:30:44SourceMod error session started
L 02
/20/2024 18:30:44Info (map "c2m1_highway") (file "D:\Dedicated\L4D2\left4dead2\addons\sourcemod\logs\errors_20240220.log")
L 02/20/2024 18:30:44: [SMUnable to load plugin "l4dinfectedbots.smx"Native "SIPool.Instance" was not found 


Paimon 02-20-2024 08:36

Re: [L4D2] Special Infected Pool (Experimental)
 
Quote:

Originally Posted by NekoYa4r (Post 2818306)
PHP Code:

L 02/20/2024 18:30:44SourceMod error session started
L 02
/20/2024 18:30:44Info (map "c2m1_highway") (file "D:\Dedicated\L4D2\left4dead2\addons\sourcemod\logs\errors_20240220.log")
L 02/20/2024 18:30:44: [SMUnable to load plugin "l4dinfectedbots.smx"Native "SIPool.Instance" was not found 


Fixed.
Please redownload SIPool and l4dinfectedbots.smx

ggyylike 02-21-2024 05:44

Re: [L4D2] Special Infected Pool (Experimental)
 
Quote:

Originally Posted by Paimon (Post 2818311)
Fixed.
Please redownload SIPool and l4dinfectedbots.smx


sourcemod-1.10.0-git6502
sourcemod-1.11.0-git6954
[SM] Unable to load plugin "l4dinfectedbots.smx": Native "SIPool.Instance" was not found

After using two versions, the error still appears. Please ask the author to fix it. Thanks.

用了两个版本还是显示错误,还请作者修复,谢谢。

VYRNACH_GAMING 02-21-2024 05:54

Re: [L4D2] Special Infected Pool (Experimental)[2024.02.20]
 
Code:

Compiling si_pool.sp...
SourcePawn Compiler 1.12.0.7017
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2021 AlliedModders LLC

si_pool.sp(24) : error 417: cannot read from file: "paiutils"

1 Error.

tried building but it's missing paiutils. Is this a missing include?

VYRNACH_GAMING 02-21-2024 06:07

Re: [L4D2] Special Infected Pool (Experimental)[2024.02.20]
 
since I couldn't build the plugin, I tried running with the smx plugin directly and all my servers kept crashing with:
Code:

Host_Error: SV_CreatePacketEntities: GetEntServerClass failed for ent 2.?
https://crash.limetech.org/2pazd3qn5zom

Is this because another plugin is not compatible and must be removed to us this?

Paimon 02-21-2024 07:58

Re: [L4D2] Special Infected Pool (Experimental)
 
Quote:

Originally Posted by ggyylike (Post 2818365)
sourcemod-1.10.0-git6502
sourcemod-1.11.0-git6954
[SM] Unable to load plugin "l4dinfectedbots.smx": Native "SIPool.Instance" was not found

After using two versions, the error still appears. Please ask the author to fix it. Thanks.

用了两个版本还是显示错误,还请作者修复,谢谢。

I tried at my server and this error doesn't appear. Maybe you used old version.
If error still appeared after redownload, try compile it yourself.

我在服务器上测试后没有得到这个错误日志,也许你用的是旧版,建议重新下载。
如果还是有这个问题,你可以试着用源码编译一下。

Paimon 02-21-2024 08:00

Re: [L4D2] Special Infected Pool (Experimental)[2024.02.20]
 
Quote:

Originally Posted by VYRNACH_GAMING (Post 2818366)
Code:

Compiling si_pool.sp...
SourcePawn Compiler 1.12.0.7017
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2021 AlliedModders LLC

si_pool.sp(24) : error 417: cannot read from file: "paiutils"

1 Error.

tried building but it's missing paiutils. Is this a missing include?

paiutils.inc is in my github.

Paimon 02-21-2024 08:04

Re: [L4D2] Special Infected Pool (Experimental)[2024.02.20]
 
Quote:

Originally Posted by VYRNACH_GAMING (Post 2818367)
since I couldn't build the plugin, I tried running with the smx plugin directly and all my servers kept crashing with:
Code:

Host_Error: SV_CreatePacketEntities: GetEntServerClass failed for ent 2.?
https://crash.limetech.org/2pazd3qn5zom

Is this because another plugin is not compatible and must be removed to us this?

Sorry but I didn't understand what happened, the crash log seems have nothing to do with the plugin.

VYRNACH_GAMING 02-21-2024 09:41

Re: [L4D2] Special Infected Pool (Experimental)
 
Quote:

Originally Posted by ggyylike (Post 2818365)
sourcemod-1.10.0-git6502
sourcemod-1.11.0-git6954
[SM] Unable to load plugin "l4dinfectedbots.smx": Native "SIPool.Instance" was not found

After using two versions, the error still appears. Please ask the author to fix it. Thanks.

用了两个版本还是显示错误,还请作者修复,谢谢。

I'm facing the same issue. When I try to reload it manually, it seems to be working but no SI spawns.
But the main issue is still the crash I always get when the server changelevel. I saw someone got a similar issue as reported in DHooks. Posted my case here: https://forums.alliedmods.net/showth...85#post2818385
I'm using SourceMod 1.12.0.7017

VYRNACH_GAMING 02-21-2024 10:00

Re: [L4D2] Special Infected Pool (Experimental)
 
Quote:

Originally Posted by VYRNACH_GAMING (Post 2818386)
I'm facing the same issue. When I try to reload it manually, it seems to be working but no SI spawns.
But the main issue is still the crash I always get when the server changelevel. I saw someone got a similar issue as reported in DHooks. Posted my case here: https://forums.alliedmods.net/showth...85#post2818385
I'm using SourceMod 1.12.0.7017

As soon as I remove si_pool.smx from my server, I do not get the crash when changing map anymore. Crash seems to be related to safehouse item restoration?
https://i.imgur.com/chZRvUK.png

Paimon 02-24-2024 10:25

Re: [L4D2] Special Infected Pool (Experimental)
 
Quote:

Originally Posted by VYRNACH_GAMING (Post 2818388)
As soon as I remove si_pool.smx from my server, I do not get the crash when changing map anymore. Crash seems to be related to safehouse item restoration?
https://i.imgur.com/chZRvUK.png

Fixed.
Try new version of SIPool and L4DInfectedBots(SIPool fork).

Paimon 02-24-2024 10:27

Re: [L4D2] Special Infected Pool (Experimental)[2024.02.24]
 
Version 2024.02.24 Updated.
Please redownload SIPool and L4DInfectedBots(SIPool fork)

Paimon 04-01-2024 11:40

Re: [L4D2] Special Infected Pool (Experimental)[2024.02.24]
 
Version 2024.04.01 Updated.
Please redownload SIPool.

M_Reimu_Abyss 04-12-2024 07:19

Re: [L4D2] Special Infected Pool (Experimental)[2024.04.01]
 
SM 1.12-7092
Metamod 1.12.0
L4DToolZ_mo v1.0.1

[SM] Unable to load plugin "l4dinfectedbots.smx": Native "SIPool.Instance" was not found
我安装了si_pool和你提供的l4dinfectedbots多特插件,日志提 示了这个

ReCreator 04-13-2024 10:45

Re: [L4D2] Special Infected Pool (Experimental)[2024.04.01]
 
Is there any possibility to torn back l4d1 support, or makilng l4d1 version?

eyal282 04-14-2024 14:18

Re: [L4D2] Special Infected Pool (Experimental)[2024.04.01]
 
Can you at least support Left4Dhooks?

NekoYa4r 04-17-2024 01:24

Re: [L4D2] Special Infected Pool (Experimental)
 
Quote:

Originally Posted by Paimon (Post 2818297)
I have made a SIPool fork for harry's L4D Infected Bot and I have put it here.
For current only support L4D2 because SIPool only support L4D2 now.

Only test at my server(30 SI 0 seconds with single survivor), the test result is that:
At the moment SI spawn, 95 more tickrate the server has at round start.
With the round continue, lots of SI got lagged and killed by plugin, 85 more tickrate the server keeps.
For the average performance, the server should keep 90 tickrate if SIPool works as expect.

Can you make the lastest Harry's Infected Bot version 2.9.5??? Thanks a lot :)

Paimon 04-17-2024 22:57

Re: [L4D2] Special Infected Pool (Experimental)[2024.04.01]
 
Quote:

Originally Posted by M_Reimu_Abyss (Post 2820846)
SM 1.12-7092
Metamod 1.12.0
L4DToolZ_mo v1.0.1

[SM] Unable to load plugin "l4dinfectedbots.smx": Native "SIPool.Instance" was not found
我安装了si_pool和你提供的l4dinfectedbots多特插件,日志提 示了这个

l4dinfectedbots编译有问题,等我用新版再改一份。

Paimon 04-17-2024 23:00

Re: [L4D2] Special Infected Pool (Experimental)[2024.04.01]
 
Quote:

Originally Posted by ReCreator (Post 2820912)
Is there any possibility to torn back l4d1 support, or makilng l4d1 version?

Sorry but currently no plan, support l4d1 needs rework sipool and find signatures used in l4d1, but I was not working on l4d1 for a long time.

Paimon 04-17-2024 23:05

Re: [L4D2] Special Infected Pool (Experimental)[2024.04.01]
 
Quote:

Originally Posted by eyal282 (Post 2820960)
Can you at least support Left4Dhooks?

NO, Left4DHooks use L4D2_SpawnSpecial() which is a call for ZombieManager::SpawnSpecial().
Unless Left4DHooks add a pre forward which can rewrite the result and block original calls.

Paimon 04-18-2024 00:18

Re: [L4D2] Special Infected Pool (Experimental)[2024.04.01]
 
Quote:

Originally Posted by NekoYa4r (Post 2821052)
Can you make the lastest Harry's Infected Bot version 2.9.5??? Thanks a lot :)

SIPool Version 2024.04.18 Released. Download HERE.
L4DInfectedBots(SIPool fork) updated to 2.9.5, see HERE.

Silvers 04-18-2024 09:43

Re: [L4D2] Special Infected Pool (Experimental)[2024.04.01]
 
Quote:

Originally Posted by eyal282 (Post 2820960)
Can you at least support Left4Dhooks?

What do you mean, how is this incompatible?

Quote:

Originally Posted by Paimon (Post 2821107)
NO, Left4DHooks use L4D2_SpawnSpecial() which is a call for ZombieManager::SpawnSpecial().
Unless Left4DHooks add a pre forward which can rewrite the result and block original calls.

"L4D_OnSpawnSpecial" is a pre hook in Left4DHooks which can be blocked.

Paimon 04-18-2024 22:50

Re: [L4D2] Special Infected Pool (Experimental)[2024.04.01]
 
Quote:

Originally Posted by Silvers (Post 2821139)
What do you mean, how is this incompatible?



"L4D_OnSpawnSpecial" is a pre hook in Left4DHooks which can be blocked.

Only block is not enough because SIPool.RequestSIBot return a client index.
If the result of "L4D_SpawnSpecial" can not be rewitten, SIPool will only block the bot being kicked.

NekoYa4r 04-19-2024 07:04

Re: [L4D2] Special Infected Pool (Experimental)[2024.04.01]
 
Quote:

Originally Posted by Paimon (Post 2821109)
SIPool Version 2024.04.18 Released. Download HERE.
L4DInfectedBots(SIPool fork) updated to 2.9.5, see HERE.

My server crash immediatly after someone connected to server, when i remove sipool and your infected bot everything back to normal, here is the plugin logs!!!
PHP Code:

L 04/19/2024 17:49:14SourceMod error session started
L 04
/19/2024 17:49:14Info (map "c2m1_highway") (file "D:\Dedicated\L4D2\left4dead2\addons\sourcemod\logs\errors_20240419.log")
L 04/19/2024 17:49:14: [DHOOKSFATALFailed to find return address of original function. Check the arguments and return type of your detour setup.
L 04/19/2024 17:49:53SourceMod error session started
L 04
/19/2024 17:49:53Info (map "c2m1_highway") (file "D:\Dedicated\L4D2\left4dead2\addons\sourcemod\logs\errors_20240419.log")
L 04/19/2024 17:49:53: [CRASHAccelerator failed to upload crash dumpThe requested URL returned error500 (22)
L 04/19/2024 17:50:26Error log file session closed.
L 04/19/2024 17:50:37SourceMod error session started
L 04
/19/2024 17:50:37Info (map "c2m1_highway") (file "D:\Dedicated\L4D2\left4dead2\addons\sourcemod\logs\errors_20240419.log")
L 04/19/2024 17:50:37: [DHOOKSFATALFailed to find return address of original function. Check the arguments and return type of your detour setup.
L 04/19/2024 17:51:48SourceMod error session started
L 04
/19/2024 17:51:48Info (map "c2m1_highway") (file "D:\Dedicated\L4D2\left4dead2\addons\sourcemod\logs\errors_20240419.log")
L 04/19/2024 17:51:48: [CRASHAccelerator failed to upload crash dumpThe requested URL returned error500 (22)
L 04/19/2024 17:52:15Error log file session closed.
L 04/19/2024 17:52:27SourceMod error session started
L 04
/19/2024 17:52:27Info (map "c2m1_highway") (file "D:\Dedicated\L4D2\left4dead2\addons\sourcemod\logs\errors_20240419.log")
L 04/19/2024 17:52:27: [DHOOKSFATALFailed to find return address of original function. Check the arguments and return type of your detour setup.
L 04/19/2024 17:53:41SourceMod error session started
L 04
/19/2024 17:53:41Info (map "c2m1_highway") (file "D:\Dedicated\L4D2\left4dead2\addons\sourcemod\logs\errors_20240419.log")
L 04/19/2024 17:53:41: [CRASHAccelerator failed to upload crash dumpThe requested URL returned error500 (22)
L 04/19/2024 17:54:42Error log file session closed


Paimon 04-19-2024 11:00

Re: [L4D2] Special Infected Pool (Experimental)[2024.04.01]
 
Quote:

Originally Posted by NekoYa4r (Post 2821183)
L 04/19/2024 - 17:52:27: Info (map "c2m1_highway") (file "D:\Dedicated\L4D2\left4dead2\addons\sourcemo d\logs\errors_20240419.log")
L 04/19/2024 - 17:52:27: [DHOOKS] FATAL: Failed to find return address of original function. Check the arguments and return type of your detour setup.
[/PHP]

Seems detour setup failed, this could log errors, please provide "errors.log".

NekoYa4r 04-19-2024 12:03

Re: [L4D2] Special Infected Pool (Experimental)[2024.04.01]
 
Quote:

Originally Posted by Paimon (Post 2821201)
Seems detour setup failed, this could log errors, please provide "errors.log".

I'm sorry but that's all the errors log i had, besauce Accelerator website is having problem now so i can't upload crash dump and show you more infomation :(


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

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