AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Extensions (https://forums.alliedmods.net/forumdisplay.php?f=134)
-   -   [CS:S/CS:GO] Bot Attack Control (https://forums.alliedmods.net/showthread.php?t=220118)

GoD-Tony 07-07-2013 07:40

[CS:S/CS:GO] Bot Attack Control
 
1 Attachment(s)
Bot Attack Control

Allows plugins to control which players bots should attack. Useful for forcing bots to properly play "Free For All" type gamemodes. Supports CS:S and CS:GO.

Most of this is a port from LIn20Cible's research. Credit to him!

PHP Code:

/**
 * @brief Called when bots determine if a player is an enemy.
 *
 * @param bot        Client index of the bot.
 * @param player    Client index of the player.
 * @param result    Contains the original result. Can be changed.
 * @return             Plugin_Changed to use the result param, Plugin_Continue otherwise.
 *
 * @note            Called several times per tick with bots in the server.
 */
forward Action:OnShouldBotAttackPlayer(botplayer, &bool:result); 

Download: BotAttackControl-1.0.3.zip
Updated gamedata: botattackcontrol.games.txt

Source code: Mercurial | zip | bz2 | gz

Despirator 07-08-2013 14:13

Re: [CS:S/CS:GO] Bot Attack Control
 
finally :)

thetwistedpanda 07-08-2013 14:54

Re: [CS:S/CS:GO] Bot Attack Control
 
I love you; this will provide a wonderful method for a Nazi Zombies port.

Furibaito 07-08-2013 22:27

Re: [CS:S/CS:GO] Bot Attack Control
 
Whoa cool stuff!
Thanks for your amazing work GoD-Tony and LIn20Cible! :)

Franc1sco 07-11-2013 10:32

Re: [CS:S/CS:GO] Bot Attack Control
 
2 Attachment(s)
Very very usefull :D

Then using this extension, this plugin would be well coded for a FFA server, right?

GoD-Tony 07-11-2013 14:38

Re: [CS:S/CS:GO] Bot Attack Control
 
Quote:

Originally Posted by Franc1sco (Post 1988558)
Then using this extension, this plugin would be well coded for a FFA server, right?

Yup, simple as that.

Root_ 07-11-2013 15:17

Re: [CS:S/CS:GO] Bot Attack Control
 
Good job GoD-Tony :up:
Could you also add ability to decrease bot reaction? (aka delay when bot spotted an enemy and about to attack)

GoD-Tony 07-11-2013 15:34

Re: [CS:S/CS:GO] Bot Attack Control
 
Quote:

Originally Posted by Root_ (Post 1988777)
Could you also add ability to decrease bot reaction? (aka delay when bot spotted an enemy and about to attack)

If I remember correctly, that can be changed in the BotProfile.db file.

TnTSCS 07-11-2013 21:59

Re: [CS:S/CS:GO] Bot Attack Control
 
Do you know if that value can be changed dynamically with a plugin? is there some sort of prop that you've seen?

GoD-Tony 07-12-2013 05:08

Re: [CS:S/CS:GO] Bot Attack Control
 
Quote:

Originally Posted by TnTSCS (Post 1989034)
Do you know if that value can be changed dynamically with a plugin? is there some sort of prop that you've seen?

It looks like it has to be done with an extension. Is using botprofile.db + bot_add <profilename> not dynamic enough in this case?

While I don't mind adding it, I only ask because the gamedata for this feature would be a little hacky (many functions are inlined).

TnTSCS 07-12-2013 10:59

Re: [CS:S/CS:GO] Bot Attack Control
 
no no - don't worry about it - I just wanted to make sure it wasn't something I was missing... Thanks for the information

xyellowhdx 08-10-2013 16:14

Re: [CS:S/CS:GO] Bot Attack Control
 
Hi,
I tried to install Franc1sco's FFA bot.smx but, it don't work.
I install the extension,
When i try to load manually
[SM] Extension botattackcontrol.ext.2.css.so failed to load: /lib32/libm.so.6: version `GLIBC_2.15' not found (required by bin/libvstdlib.so)

What can i do to fix this?

GoD-Tony 08-10-2013 18:12

Re: [CS:S/CS:GO] Bot Attack Control
 
Quote:

Originally Posted by xyellowhdx (Post 2010160)
[SM] Extension botattackcontrol.ext.2.css.so failed to load: /lib32/libm.so.6: version `GLIBC_2.15' not found (required by bin/libvstdlib.so)

What can i do to fix this?

Either update your build of GLIBC or recompile against the older version you are using. Edit: See post below.

asherkin 08-10-2013 18:46

Re: [CS:S/CS:GO] Bot Attack Control
 
Quote:

Originally Posted by GoD-Tony (Post 2010242)
Either update your build of GLIBC or recompile against the older version you are using.

This is bad information, trying to update GLIBC is a guaranteed way to need to reinstall your OS. The issue is that the extension is trying to load libvstdlib.so instead of libvstdlib_srv.so.

xyellowhdx 08-10-2013 19:44

Re: [CS:S/CS:GO] Bot Attack Control
 
I can't change the OS, it's a server hosted by Crystal-serv.com.
So, what i need to do? i don't understand :)

Franc1sco 08-10-2013 20:23

Re: [CS:S/CS:GO] Bot Attack Control
 
Quote:

Originally Posted by GoD-Tony (Post 2010242)
Either update your build of GLIBC or recompile against the older version you are using. Edit: See post below.

happened the same to me in one of my servers and thought it was for that reason xd

Quote:

Originally Posted by xyellowhdx (Post 2010285)
I can't change the OS, it's a server hosted by Crystal-serv.com.
So, what i need to do? i don't understand :)

Try to download css/bin/libvstdlib_srv.so ,then rename to libvstdlib.so and upload to css/bin/

GoD-Tony 08-11-2013 03:37

Re: [CS:S/CS:GO] Bot Attack Control
 
Quote:

Originally Posted by xyellowhdx (Post 2010160)
What can i do to fix this?

Can you try this build instead?

xyellowhdx 08-11-2013 06:02

Re: [CS:S/CS:GO] Bot Attack Control
 
Quote:

Originally Posted by GoD-Tony (Post 2010490)
Can you try this build instead?

Thanks,
[SM] Loaded extension botattackcontrol.ext.2.css.so successfully.

Thanks all :)

senecas 09-03-2013 07:40

Re: [CS:S/CS:GO] Bot Attack Control
 
CS:GO Server Crash with this ext.

Today's Update + metamod 1.10 + sm 1.5 or 1.6 => crash

RedSword 09-03-2013 17:16

Re: [CS:S/CS:GO] Bot Attack Control
 
O.O

Thanks for importing this to AM.

GoD-Tony 09-04-2013 11:18

Re: [CS:S/CS:GO] Bot Attack Control
 
Quote:

Originally Posted by senecas (Post 2027483)
CS:GO Server Crash with this ext.

Today's Update + metamod 1.10 + sm 1.5 or 1.6 => crash

Still working for me on Windows. At which point does it crash your server? Windows/Linux?

senecas 09-04-2013 20:55

Re: [CS:S/CS:GO] Bot Attack Control
 
linux
crash after csgo latest update. only changing is csgo update.
Crash with this ext, If I remove it, it's Ok.

Can you check on linux server ?

something's wrong with this csgo update 1.30.2.1.
In my minigame server, atfer update,
mg_multigames_devine_or_guess map crash with ED_Alloc: no free edicts atfer bot or player joining.

senecas 09-10-2013 23:57

Re: [CS:S/CS:GO] Bot Attack Control
 
I Fixed it out...:)

cssdm_ffa_enabled 1 -> 0

That cvar make server-crashing when bot is damaged by teammate.

SM9 09-15-2013 17:57

Re: [CS:S/CS:GO] Bot Attack Control
 
Hello, I can't seem to get this working correctly.. I think I done it wrong :(

PHP Code:

public Action:OnShouldBotAttackPlayer(botplayer, &bool:result)
{
    
    for(new 
1<= MaxClientsi++)
    {
        if(
Client_IsValid(i))
        {
            if(
IsFakeClient(i))
            {
                
bot i;
            }
            else
            {
                
player i;
                
                if(
isSpawnKillProtected[player] == true){
                    
result false;
                }
                else
                {
                    
result true;
                }
            }
        }
    }


I'm trying to make all bots not attack players with the bool isSpawnKillProtected true. And when it goes false then attack again.

PHP Code:

EnableKillProtection(client
{
    if(
Client_IsValid(client))
    {
        if( !
IsFakeClientclient) )
        {
            
isKillProtected[client] =  true;
            
lastPlayerHealth[client] = Entity_GetHealth(client);
            
Entity_SetHealth(clientPROTECTED_HEALTHtrue);
            
            
CreateTimer(GetConVarFloat(zr_protect_time), Timer_DisableSpawnProtectionclientTIMER_FLAG_NO_MAPCHANGE);
        }
    }
}

DisableKillProtection(client)
{    
    
isKillProtected[client] =  false;
    
isSpawnKillProtected[client] = false;
    
Entity_SetHealth(clientlastPlayerHealth[client], true);
    
    
PrintHintText(client"[WARNING] Spawn Protection is now OFF!");



GoD-Tony 09-16-2013 01:10

Re: [CS:S/CS:GO] Bot Attack Control
 
Quote:

Originally Posted by xCoderx (Post 2035409)
Hello, I can't seem to get this working correctly.. I think I done it wrong :(

I'm trying to make all bots not attack players with the bool isSpawnKillProtected true. And when it goes false then attack again.

You shouldn't need a loop there. The forward will be called for all bots checking against all players. Also, don't forget to return Plugin_Changed if you're changing the result param:
PHP Code:

public Action:OnShouldBotAttackPlayer(botplayer, &bool:result)
{
    if (
isSpawnKillProtected[player] == true) {
        
result false;
    } else {
        
result true;
    }
    
    return 
Plugin_Changed;


In your EnableKillProtection function, are you forgetting to set isSpawnKillProtected to true?

SM9 09-16-2013 03:13

Re: [CS:S/CS:GO] Bot Attack Control
 
Quote:

Originally Posted by GoD-Tony (Post 2035499)
In your EnableKillProtection function, are you forgetting to set isSpawnKillProtected to true?

Woops, Good spot!

And it works perfectly now, thanks :)

Edit: Does this mean I can use "Bot" as a default index for any bots instead of running a loop in my functions or using "IsFakeClient" to determine bots from normal players?

alencore 11-15-2013 07:24

Re: [CS:S/CS:GO] Bot Attack Control
 
Wow finally css bots finally can do real FFA game play...thank you very much!

weeb1e 04-18-2014 20:21

Re: [CS:S/CS:GO] Bot Attack Control
 
There seems to be some kind of flaw with these hooks when used to limit a bot to a single target on CS:GO, the bot will fire at other players randomly even though the forward says it shouldn't.

I'm not sure if this has always been the case with CS:GO, or if valve changed something, such as adding another condition somewhere, after this was implemented.

El Diablo War3Evo 05-12-2014 15:32

Re: [CS:S/CS:GO] Bot Attack Control
 
Any way to port this to TF2?

Mitchell 05-13-2014 16:21

Re: [CS:S/CS:GO] Bot Attack Control
 
Quote:

Originally Posted by El Diablo War3Evo (Post 2136879)
Any way to port this to TF2?

I'm sure it would be technically possible, but tf2 bots do act differently, in fact their are two different types of bots, and the ones that actually move are considered tfbots
maybe look into the "bot_controller"
just catch it on EntityCreated
each bot should have one ( assumption )

SM9 09-25-2014 16:57

Re: [CS:S/CS:GO] Bot Attack Control
 
Its a shame it no longer works on CS:GO.. I was going to use it for a Zombie Mod which im working on.

Any chance somebody can update it?

GoD-Tony 09-26-2014 03:29

Re: [CS:S/CS:GO] Bot Attack Control
 
I'll take a look at it later, but it does require more than a simple gamedata update.

GoD-Tony 09-26-2014 05:31

Re: [CS:S/CS:GO] Bot Attack Control
 
Updated the first post with v1.0.1 which includes fixes for CS:GO and CS:S/Linux.

SM9 09-26-2014 11:43

Re: [CS:S/CS:GO] Bot Attack Control
 
Quote:

Originally Posted by GoD-Tony (Post 2203789)
Updated the first post with v1.0.1 which includes fixes for CS:GO and CS:S/Linux.

Thank you very much for the quick update :)

El Diablo War3Evo 09-27-2014 22:54

Re: [CS:S/CS:GO] Bot Attack Control
 
Quote:

Originally Posted by Mitchell (Post 2137385)
I'm sure it would be technically possible, but tf2 bots do act differently, in fact their are two different types of bots, and the ones that actually move are considered tfbots
maybe look into the "bot_controller"
just catch it on EntityCreated
each bot should have one ( assumption )

I have tried various ways with this over the past 3-4 months with not much success. The only thing I was able to do was create it and spawn bots to control, but their AI was terribly stupid.

So terrible, they only used their primary weapons.

alencore 12-15-2014 23:31

Re: [CS:S/CS:GO] Bot Attack Control
 
@El Diablo War3Evo ...you want FFA bots on tf2? try rcbot2 it has a command...rcbot_ffa 1 to enable ffa plus it totally supports tf2.
http://rcbot.bots-united.com/


@God_tony ...much tnx for the update. I got totally nervous when it won't work after updating all my files can't play CSS without this.

poel 04-16-2015 07:34

Re: [CS:S/CS:GO] Bot Attack Control
 
Hi,

I'm working on ZOMBIE RIOT server since few months on CSGO. And bot sucks really. I mean, I tried with your extension, and its the same settings. Bot are really stupid LOL (that's normal ^^)

But, Is it possible to change mouvement of csgo ? Because atm, they are walking, sometimes hiding etc... and its boring.
Can we do something against that ? Bot need to rush CT all the time, without any "stop" or shit like that ?

We made our own .nav files and bot still are stupid ^^".

Thks for help!

GoD-Tony 04-17-2015 01:51

Re: [CS:S/CS:GO] Bot Attack Control
 
Quote:

Originally Posted by poel (Post 2286878)
But, Is it possible to change mouvement of csgo ? Because atm, they are walking, sometimes hiding etc... and its boring.
Can we do something against that ? Bot need to rush CT all the time, without any "stop" or shit like that ?

You're probably looking for this thread.

Dr. Api 04-24-2015 18:02

Re: [CS:S/CS:GO] Bot Attack Control
 
Your link is not good, they just parsing navigation meshes. CSGO need extension for controlling bot, .nav is something else. You can nav_edit 1 and put nav_run, nav_donthide bots will still hide and walk.

poel 04-25-2015 12:46

Re: [CS:S/CS:GO] Bot Attack Control
 
Quote:

Originally Posted by Dr. Api (Post 2289848)
Your link is not good, they just parsing navigation meshes. CSGO need extension for controlling bot, .nav is something else. You can nav_edit 1 and put nav_run, nav_donthide bots will still hide and walk.

+1.


All times are GMT -4. The time now is 16:38.

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