Raised This Month: $305 Target: $400
 76%   Almost there!

[L4D2] Improved and Perfected SurvivorAI Autotrigger


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Xanaguy
Senior Member
Join Date: Jan 2017
Plugin ID:
6258
Plugin Version:
1.0
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Finally, the survivor bots can now proceed through every official maps.
    Old 09-13-2018 , 04:54   [L4D2] Improved and Perfected SurvivorAI Autotrigger
    Reply With Quote #1

    This plugin was originally crafted by AtomicStryker, that covered only the main 5 campaigns.

    Then when I was looking for recommended plugins on the "Competitive-Bots+" workshop item discussion, I found ijj's variant that covered more campaigns. But it still wasn't enough for every map to be completed from start to finish.

    So I took it upon myself to complete all the necessary maps, triggers, and teleport spots to ensure that the bots will always traverse to the saferoom. Here it is.

    General changes made that were different from ijj's variant:

    - Added missing, vital triggers for all official maps, both event and teleportation, Bots should be able to complete all maps from start to finish.
    - Fixed Tank encounter on The Sacrifice - Docks. (The original coding had the checks and effects backwards).
    - Overhauled Textual notifications to chat to be less plain.

    Upgrades:

    - Bots are now guaranteed to call Whitaker in the gun shop.

    - While this isn't really too much of a change, it still helps for that one guy: After taking Lux's advice and Timocop's implementation, memory leaks have been removed.

    - 2/3/2019:

    - Added support for many addon campaigns.

    - Added failsafe for The Sacrifice - Docks.

    - Reinstated The Sacrifice - Port since it works for mutations that can only be played in single-player ("maxplayers" **MUST BE "1"! NO GREATER!**)

    - AutoTrigger will now activate when it is just bots alive on the survivor team, even if every human player was killed in action.

    - 6/9/2019:

    - Included full support of Yama. (Listed in the compatible campaigns)

    - 10/7/2020:

    - Extended compatibilities to many custom campaigns. Exact list is unknown.

    - Fixed an incorrect entity name for DayBreak - Chapter 1

    - The alarmed doors will now unblock the nav on open on DayBreak - Chapter 2

    - There is a slight delay before closing the doors behind the survivors after they teleport on DayBreak - Chapter 5. This will allow the finale to initiate properly.

    - 10/8/2020:

    - Fixed some issues reported by Crasher. (I was not able to verify everything, details in the reply)

    - 10/9/2020:

    - Changed a check for bots to a proper check.

    List of supported campaigns:
    1. Fatal Freight
    2. Precinct 84 ( 2018 )
    3. Road To Nowhere 2
    4. Suicide Blitz II
    5. Urban Flight
    6. Wan Li
    7. Welcome to Hell
    8. Yama
    Attached Files
    File Type: sp Get Plugin or Get Source (AutoTrigger.sp - 2703 views - 159.4 KB)

    Last edited by Xanaguy; 10-10-2020 at 00:14. Reason: Rephrased explanation for The Sacrifice - Port in the change log.
    Xanaguy is offline
    Iizuka07
    Member
    Join Date: Aug 2018
    Old 09-13-2018 , 07:49   Re: [L4D2] Improved and Perfected SurvivorAI Autotrigger
    Reply With Quote #2

    pretty nice since I use competitive bots +. This will be fun

    Thanks for your work
    __________________
    死が待っている
    Iizuka07 is offline
    DreadedGhoul575
    Senior Member
    Join Date: Apr 2016
    Old 09-26-2018 , 16:35   Re: [L4D2] Improved and Perfected SurvivorAI Autotrigger
    Reply With Quote #3

    Bots get stuck on chapter 2 on Dead Center unfortunately, even with the scavengebots mod.
    DreadedGhoul575 is offline
    Xanaguy
    Senior Member
    Join Date: Jan 2017
    Old 09-26-2018 , 22:11   Re: [L4D2] Improved and Perfected SurvivorAI Autotrigger
    Reply With Quote #4

    Quote:
    Originally Posted by DreadedGhoul575 View Post
    Bots get stuck on chapter 2 on Dead Center unfortunately, even with the scavengebots mod.
    Got a feeling that the bots may end up getting stuck in the gunshop where they were supposed to call Whitaker which does happen often enough to warrant a fix. Very well. I'll get right on it.

    Edit 1: If your problem happens when they were supposed to get in the supermarket, then the trigger should have happened when the bots neared the truck, then it would have been about 60 seconds until the truck cleared.
    Edit 2: Scavenge bots only works for Finales and the Scavenge Game Mode, not stuff like the cola delivery.

    Last edited by Xanaguy; 09-26-2018 at 23:33.
    Xanaguy is offline
    cravenge
    Veteran Member
    Join Date: Nov 2015
    Location: Middle of Nowhere
    Old 09-28-2018 , 04:18   Re: [L4D2] Improved and Perfected SurvivorAI Autotrigger
    Reply With Quote #5

    Nice work for completing this, Xanaguy.

    Quote:
    Originally Posted by DreadedGhoul575 View Post
    ...
    If you want bots to get something other than gascans by themselves, the same function from the plugin you mentioned can be copied and rewritten to check for that "something" instead.

    Last edited by cravenge; 09-28-2018 at 04:20.
    cravenge is offline
    Xanaguy
    Senior Member
    Join Date: Jan 2017
    Old 09-28-2018 , 16:51   Re: [L4D2] Improved and Perfected SurvivorAI Autotrigger
    Reply With Quote #6

    Quote:
    Originally Posted by cravenge View Post
    Nice work for completing this, Xanaguy.
    Thanks! I'm planning on adapting the scavenge bots to the cola event in Dead Center, but I've seem to have ran into a snag that I can't resolve alone. Maybe together we can come up with a working plugin.
    Xanaguy is offline
    Lux
    Veteran Member
    Join Date: Jan 2015
    Location: Brexit
    Old 09-30-2018 , 04:20   Re: [L4D2] Improved and Perfected SurvivorAI Autotrigger
    Reply With Quote #7

    Quote:
    Originally Posted by Timocop View Post
    You should avoid all "script" cmds, they leak very badly and fill up ram because they create a new instance all the time. Use the logic_script entity instead, they wont leak.

    Heres my stock i made:
    PHP Code:
    /**
    * Runs a single line of vscript code.
    * NOTE: Dont use the "script" console command, it startes a new instance and leaks memory. Use this instead!
    *
    * @param sCode        The code to run.
    * @noreturn
    */
    stock L4D2_RunScript(const String:sCode[], any:...)
    {
        static 
    iScriptLogic INVALID_ENT_REFERENCE;
        if(
    iScriptLogic == INVALID_ENT_REFERENCE || !IsValidEntity(iScriptLogic)) {
            
    iScriptLogic EntIndexToEntRef(CreateEntityByName("logic_script"));
            if(
    iScriptLogic == INVALID_ENT_REFERENCE || !IsValidEntity(iScriptLogic))
                
    SetFailState("Could not create 'logic_script'");
            
            
    DispatchSpawn(iScriptLogic);
        }
        
        static 
    String:sBuffer[512];
        
    VFormat(sBuffersizeof(sBuffer), sCode2);
        
        
    SetVariantString(sBuffer);
        
    AcceptEntityInput(iScriptLogic"RunScriptCode");

    __________________
    Connect
    My Plugins: KlickME
    [My GitHub]

    Commission me for L4D
    Lux is offline
    Xanaguy
    Senior Member
    Join Date: Jan 2017
    Old 09-30-2018 , 16:45   Re: [L4D2] Improved and Perfected SurvivorAI Autotrigger
    Reply With Quote #8

    Updated: Thanks Lux and Timocop. This plugin should be fully aced now.
    Xanaguy is offline
    DreadedGhoul575
    Senior Member
    Join Date: Apr 2016
    Old 10-04-2018 , 07:05   Re: [L4D2] Improved and Perfected SurvivorAI Autotrigger
    Reply With Quote #9

    Quote:
    Originally Posted by Xanaguy View Post
    Got a feeling that the bots may end up getting stuck in the gunshop where they were supposed to call Whitaker which does happen often enough to warrant a fix. Very well. I'll get right on it.

    Edit 1: If your problem happens when they were supposed to get in the supermarket, then the trigger should have happened when the bots neared the truck, then it would have been about 60 seconds until the truck cleared.
    Edit 2: Scavenge bots only works for Finales and the Scavenge Game Mode, not stuff like the cola delivery.
    Yeah, it's near the truck, where nothing happened. I'll try again and see if it works this time.

    Shame bots can't pickup the cola.

    Edit: Just tested and it does work; before they were stuck and the autotrigger didn't move them, great job with this.
    My last one to test is chapter 3 on Swamp Fever, since by default, bots won't activate the bridge to lower, and I wanna see if this autotrigger makes them do this, without by default cheating and going through the bushes by teleporting/cheating.

    Edit 2: Chapter 3 on Swamp Fever works, good job with this.

    Last edited by DreadedGhoul575; 10-04-2018 at 18:07. Reason: Bots can now complete Chapter 2 on Dead Center and Chapter 3 on Swamp Fever works with bots now.
    DreadedGhoul575 is offline
    Xanaguy
    Senior Member
    Join Date: Jan 2017
    Old 10-04-2018 , 13:32   Re: [L4D2] Improved and Perfected SurvivorAI Autotrigger
    Reply With Quote #10

    Quote:
    Originally Posted by DreadedGhoul575 View Post
    Yeah, it's near the truck, where nothing happened. I'll try again and see if it works this time.

    Shame bots can't pickup the cola.

    Edit: Just tested and it does work; before they were stuck and the autotrigger didn't move them, great job with this.
    My last one to test is chapter 3 on Swamp Fever, since by default, bots won't activate the bridge to lower, and I wanna see if this autotrigger makes them do this, without by default cheating and going through the bushes by teleporting/cheating.
    Itíll work. Though they may just try to teleport through the bushes anyways, at least then, the panic event will start. Thatís all that matters.
    Xanaguy 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 02:19.


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