Raised This Month: $344 Target: $400
 86%   Almost there!

[L4D2] Smart AI Tank [Jul.-31-2021]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
BRU7US
Member
Join Date: Jul 2020
Location: Tatarstan, Kazan
Plugin ID:
7215
Plugin Version:
1.0.1
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    This plugin improves AI Tank behaviour. [July-31-2021]
    Old 07-23-2020 , 09:34   [L4D2] Smart AI Tank [Jul.-31-2021]
    Reply With Quote #1

    About:

    This plugin improves AI Tank behaviour. Now he ignore the Survivors who using mounted machinegun.

    Now Tank find as target nearest survivor.

    He don't let you cut his back by melee.

    Also by Cvars he can ignore or choose as victim vomited and incapacitated survivors.

    If you set Cvar to choose as victim incapacitated survivors then AI Tank will be chasing nearest incapacitated survivors only on Hard and Expert difficulties because he can kill them fast.

    If you set Cvar to choose as victim incapacitated and vomited survivors then AI Tank will be also chasing nearest survivor who been incapacitated or vomited.

    This plugin supports only Left 4 Dead 2!


    CVars:

    Saved to l4d2_smart_bot_tank.cfg in your server's \cfg\sourcemod\ folder.

    PHP Code:
    l4d2_sbt_high_difficulties_finish_off_incapacitated
    //Values: 1 / 0.
    //Description: Enable/Disable finishing off survivors who gets incapacitated on Hard/Expert difficulties.
    //Note: This CVar doesn't work on Easy and Normal difficulties.

    l4d2_sbt_targets_vomited_survivor 
    //Values: 1 / 0.
    //Description: Enable/Disable targeting survivors who gets vomited. 

    Known Bugs:

    None at the moment.


    Requirements:

    1. SourceMod 1.10

    2. Left4DHooks Direct

    3. Put l4d2_minigun_victim.txt to gamedata folder.


    Supported Gamemodes:

    Now this plugin working correctly only in CO-OP.


    Special Thanks:

    axelnieves2012 for this plugin which served as the idea for my plugin.

    BHaType for his code which allows the tank to ignore the machine gun.


    P.S.

    This is my first public plugin and topic in this forum. Sorry for mistakes if there are any.

    UPDATES
    July 31, 2021:
    - Updated l4d2_minigun_victim.txt (Thanks to BHaType)
    - Fixed problem when Tank always chose as its victim a respawned player who died while being vomited even he isn't was vomited.

    September 11, 2020 - Changed HookEvent declaration to the new style. (Thanks to rtokuda)
    Attached Files
    File Type: txt l4d2_minigun_victim.txt (1.0 KB, 387 views)
    File Type: sp Get Plugin or Get Source (l4d2_smart_bot_tank.sp - 229 views - 12.1 KB)
    File Type: smx l4d2_smart_bot_tank.smx (7.8 KB, 387 views)

    Last edited by BRU7US; 07-31-2021 at 06:20. Reason: Updated
    BRU7US is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 07-23-2020 , 10:56   Re: [L4D2] Smart AI Tank
    Reply With Quote #2

    This has conflicting ideas with Target Override plugin. Sure I didn't add blocking minigun by patching the game but the linked plugin I guess should have covered for both games not just L4D2. I don't see the point of duplicating Target Override with fewer options just to patch minigun and add 1 small feature.
    __________________
    Silvers is offline
    BRU7US
    Member
    Join Date: Jul 2020
    Location: Tatarstan, Kazan
    Old 07-23-2020 , 11:34   Re: [L4D2] Smart AI Tank
    Reply With Quote #3

    Quote:
    Originally Posted by Silvers View Post
    This has conflicting ideas with Target Override plugin. Sure I didn't add blocking minigun by patching the game but the linked plugin I guess should have covered for both games not just L4D2. I don't see the point of duplicating Target Override with fewer options just to patch minigun and add 1 small feature.
    Ok, Thanks for this information!
    BRU7US is offline
    gatitojamon
    Junior Member
    Join Date: Jul 2020
    Old 07-24-2020 , 15:34   Re: [L4D2] Smart AI Tank
    Reply With Quote #4

    nice plugin!
    gatitojamon is offline
    BRU7US
    Member
    Join Date: Jul 2020
    Location: Tatarstan, Kazan
    Old 07-25-2020 , 05:23   Re: [L4D2] Smart AI Tank
    Reply With Quote #5

    Quote:
    Originally Posted by gatitojamon View Post
    nice plugin!
    Thanks!
    BRU7US is offline
    rtokuda
    Senior Member
    Join Date: Dec 2019
    Old 09-09-2020 , 16:13   Re: [L4D2] Smart AI Tank
    Reply With Quote #6

    Compile with 7 errors :

    PHP Code:
    // by the SourceMod Dev Team


    //// l4d2_smart_bot_tank.sp
    //
    // E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(44) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
    // E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(45) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
    // E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(46) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
    // E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(47) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
    // E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(48) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
    // E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(49) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
    // E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(50) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
    // Code size:            12880 bytes
    // Data size:             4056 bytes
    // Stack/heap size:      16384 bytes
    // Total requirements:   33320 bytes
    //
    // 7 Warnings.
    //
    // Compilation Time: 0,41 sec
    // ----------------------------------------

    Press enter to exit ... 
    rtokuda is offline
    BRU7US
    Member
    Join Date: Jul 2020
    Location: Tatarstan, Kazan
    Old 09-11-2020 , 10:42   Re: [L4D2] Smart AI Tank
    Reply With Quote #7

    Quote:
    Originally Posted by rtokuda View Post
    Compile with 7 errors :

    PHP Code:
    // by the SourceMod Dev Team


    //// l4d2_smart_bot_tank.sp
    //
    // E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(44) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
    // E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(45) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
    // E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(46) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
    // E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(47) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
    // E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(48) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
    // E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(49) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
    // E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(50) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
    // Code size:            12880 bytes
    // Data size:             4056 bytes
    // Stack/heap size:      16384 bytes
    // Total requirements:   33320 bytes
    //
    // 7 Warnings.
    //
    // Compilation Time: 0,41 sec
    // ----------------------------------------

    Press enter to exit ... 

    Thanks for this. Try a new version!
    BRU7US is offline
    xiao333yue
    New Member
    Join Date: Jul 2021
    Old 07-29-2021 , 06:41   Re: [L4D2] Smart AI Tank
    Reply With Quote #8

    Click image for larger version

Name:	N01PH46L7~T3)_%Z$(~)A1V.png
Views:	123
Size:	66.7 KB
ID:	190591


    Failed to compile your source code. The above is the wrong picture. I hope it can be fixed. Sorry, my English is not very good.
    xiao333yue is offline
    BRU7US
    Member
    Join Date: Jul 2020
    Location: Tatarstan, Kazan
    Old 07-29-2021 , 07:42   Re: [L4D2] Smart AI Tank
    Reply With Quote #9

    Quote:
    Originally Posted by xiao333yue View Post
    Attachment 190591


    Failed to compile your source code. The above is the wrong picture. I hope it can be fixed. Sorry, my English is not very good.
    It seems like your compiler doesn't have access to write a compiled .smx file on your disk "D". Try to download a compiled .smx file from my first post.
    BRU7US is offline
    xiao333yue
    New Member
    Join Date: Jul 2021
    Old 07-29-2021 , 22:13   Re: [L4D2] Smart AI Tank
    Reply With Quote #10

    Click image for larger version

Name:	K{BHF9WL{8[_IX_5ALTV]37.png
Views:	94
Size:	18.5 KB
ID:	190608
    Quote:
    Originally Posted by bru7us View Post
    it seems like your compiler doesn't have access to write a compiled .smx file on your disk "d". Try to download a compiled .smx file from my first post.
    Operation error, this is the error log

    Last edited by xiao333yue; 07-29-2021 at 22:15.
    xiao333yue is offline
    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 16:13.


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