smilz0 / left4bots Goto Github PK
View Code? Open in Web Editor NEWImprovements for the L4D2 survivor bots
Home Page: https://steamcommunity.com/sharedfiles/filedetails/?id=3022416274
Improvements for the L4D2 survivor bots
Home Page: https://steamcommunity.com/sharedfiles/filedetails/?id=3022416274
Reimplement the L4B V1 feature that makes the survivor bots shoot the tank's rock.
New related settings: 'shoot_rock_diffangle' and 'shoot_rock_ahead'.
https://github.com/smilz0/Left4Bots/blob/main/root/scripts/vscripts/left4bots_settings.nut
Allow the bots give weapons to the human players and human players swap weapons with bots.
New settings: 'give_bots_weapons' and 'userlevel_give_weapons'.
https://github.com/smilz0/Left4Bots/blob/main/root/scripts/vscripts/left4bots_settings.nut
This command will make the selected bot(s) stop their L4B2 AI stuff for 'hurry_time' seconds.
Useful in rush situations so they don't waste time after pickups, dead teammates to defib, etc.
Also change the default vocalizer binding of 'Hurry' to this instead of 'cancel defib'.
https://github.com/smilz0/Left4Bots/blob/main/COMMANDS.md
Set "movetype" makes bots do nothing,
NetProps.SetPropInt(self, "movetype", 0);
but set "m_fFlags" can solve the problem,
ATCONTROLS = 64; // Player can't move, but keeps key inputs for controlling another entity
NetProps.SetPropInt(self, "m_fFlags", NetProps.GetPropInt(self, "m_fFlags") | ATCONTROLS);
and also need this to prevent bot Teleport
Convars.SetValue("sb_unstick", 0);
New command for contextual help.
!l4b help
lists the available commands.
!l4b help <command>
prints detailed info about the given command.
https://github.com/smilz0/Left4Bots/blob/main/COMMANDS.md
Enable/Disable the conversion of the 'use' command to the 'carry', 'deploy' and 'scavenge' commands respectively, depending of the type of destination item of the 'use' command.
https://github.com/smilz0/Left4Bots/blob/main/root/scripts/vscripts/left4bots_settings.nut
Ability to change the TraceLine masks from the settings and add CONTENTS_WINDOW and CONTENTS_GRATE to the default pickups trace mask to make the bots stop trying to pickup weapons from behind the glass in Questionable Ethics custom campaign.
https://github.com/smilz0/Left4Bots/blob/main/root/scripts/vscripts/left4bots_settings.nut
Make the bots prioritize the melee over the shove and don't shove if the bot is already firing its gun (to confirm if the latter is really an improvement tho).
Added the old L4B1 setting to decide whether to load or not load the configured 'convars.txt' file.
https://github.com/smilz0/Left4Bots/blob/main/root/scripts/vscripts/left4bots_settings.nut
To search all the setting names containing the given string.
Example:
!4b findsettings log
scripted_user_func l4b,findsettings,witch
Reimplement the L4B V1 "throw" command that makes the target bot(s) throw their throwable items at the location you are looking at.
https://github.com/smilz0/Left4Bots/blob/main/COMMANDS.md
Using the 'scavenge' command without the start/stop parameter will order the selected bot to scavenge the gascan/cola bottles you are looking at. The bot can be any bot, including the bots that are not already scavenging automatically. The scavenge process must be started with bots scavenge start
before using this.
https://github.com/smilz0/Left4Bots/blob/main/COMMANDS.md
Reimplement the L4B V1 "give" command that allows you to receive one item from the bots.
https://github.com/smilz0/Left4Bots/blob/main/COMMANDS.md
Reimplement the L4B V1 feature that allows to automatically blocks the nav areas under the spitter's spit in order to avoid the bots from stepping into the spit (spit_block_nav setting).
https://github.com/smilz0/Left4Bots/blob/main/root/scripts/vscripts/left4bots_settings.nut
Reimplement the L4B V1 feature that allows the survivor bots to trigger the witch when they accidentally shoot her (trigger_witch setting).
https://github.com/smilz0/Left4Bots/blob/main/root/scripts/vscripts/left4bots_settings.nut
Option to disable the orders queue and make the bots execute only one order at a time. A new order will automatically cancel the previous ones (only for manually given orders).
https://github.com/smilz0/Left4Bots/blob/main/root/scripts/vscripts/left4bots_settings.nut
To order the selected bot(s) to ignite the barricade gascans.
Just like the 'scavenge' and 'deploy' commands, it is possible to use 'destroy' directly or 'use' (if 'smart_use_destroy' is 1).
NOTE: 'damage_barricade' must be set to 1 in order for this to work.
https://github.com/smilz0/Left4Bots/blob/main/COMMANDS.md
https://github.com/smilz0/Left4Bots/blob/main/root/scripts/vscripts/left4bots_settings.nut
For debugging purposes.
The commands make the bots start the pause and print their current L4B2 AI state to the console.
https://github.com/smilz0/Left4Bots/blob/main/COMMANDS.md
The addon settings are not saved to the settings.txt file after changing them via !l4b settings [setting] [value] and scripted_user_func l4b,settings,[setting],[value] commands.
Using the 'deploy' command while looking at an upgrade pack on the ground will make the selected bot go pick the item up and deploy it. If not looking at a deployable item, the bot will deploy the upgrade pack in his inventory (if any).
https://github.com/smilz0/Left4Bots/blob/main/COMMANDS.md
If using the "VScript Survivor Manager" add bots which has same Actor name, the vocalizer function will become confused.
A simple example, if my character is "Nick", and look at another "Nick" bot, the vocalizer order does not work.
The reason is that "concepts system" will only tell us Actor name of "who" and "subject", so I thought if I add "userid" for them, is that could solve the problem of the same Actor name?
Use DoEntFire("!self", "AddContext", "whoid:"+player.GetPlayerUserId(), 0, null, player);
to add the id, yeah, it does work, i can use GetPlayerFromUserID(id)
get player easily.
But at the same time I found, I don't know how to add "subjectid" for "subject". :(
So, to solve this problem, there are two points:
DoEntFire("!self", "ClearContext", "", 0, null, player)
.Do you think this idea is feasible?
If only the TLS team could add this just like they did with "TankActive" and "Chapter" in the last update. ;P
Reimplement the L4B V1 feature that makes the survivor bots shoot the smoker's tongue when it's strangling a teammate.
https://github.com/smilz0/Left4Bots/blob/main/root/scripts/vscripts/left4bots_settings.nut
Reimplement the L4B V1 feature that allows to redirect the friendly fire received by a survivor who is being ridden by a jockey to the jockey (jockey_redirect_damage setting).
https://github.com/smilz0/Left4Bots/blob/main/root/scripts/vscripts/left4bots_settings.nut
To be able to change the think interval of the L4BThinker.
Also change the default value of 'bot_think_interval' to -1 (#49).
https://github.com/smilz0/Left4Bots/blob/main/root/scripts/vscripts/left4bots_settings.nut
Enabled by default. Disable to make the bots MOVE commands always lead to the destination item's position instead of the nearest nav area.
https://github.com/smilz0/Left4Bots/blob/main/root/scripts/vscripts/left4bots_settings.nut
Hi, I finish it, after some testing, I think there shouldn't be much of a problem.
This allows bots to aim without having to freeze them, so it doesn't affect movement. and bots can always look at the target without shaking their head.
left4bots_afterload_aim.zip
Reimplement the L4B V1 "swap" command that allows you to swap the item you are currently holding with a bot.
https://github.com/smilz0/Left4Bots/blob/main/COMMANDS.md
Add a 'defib' switch to the 'cancel' command.
Example:
ellis cancel defib
bots cancel defib
This replaces the old L4B1 command 'canceldefib'.
https://github.com/smilz0/Left4Bots/blob/main/COMMANDS.md
Describe the bug
Version 1 has a 'bot tempheal' command in addition to just 'heal'. I have looked and can't find a similar option in version 2
To Reproduce
Steps to reproduce the behavior:
'bot tempheal'
scripted_user_func l4b,bots,tempheal
Expected behavior
Bot uses a temporary heal item
Add 0x8 (CONTENTS_GRATE) to the trace mask for the pickup items to fix the problem with the bots trying to get the weapons on Questionable Ethics campaigns before pouring the gascan to the thing.
Move the dest pos of each BotMoveTo() to the nearest nav area. This also fixes a problem on Questionable Ethics with the items inside the holes on the wall and the bots incorrectly pathing behind the wall to get the item. Also reduces the chance of getting stuck in general.
To allow the bots to deal damage and ignite the barricade gascans (damage_barricade = 1) and other items like normal gascans, propane tanks, fireworks, etc. (damage_other).
https://github.com/smilz0/Left4Bots/blob/main/root/scripts/vscripts/left4bots_settings.nut
Reimplement the L4B V1 feature to make the survivor bots carry the gnome and other carriable items by ordering them to 'use' the item.
https://github.com/smilz0/Left4Bots/blob/main/root/scripts/vscripts/left4bots_settings.nut
Reimplement the L4B V1 feature that allows to make the survivor bots trigger the car alarms like the humans (trigger_caralarm setting).
https://github.com/smilz0/Left4Bots/blob/main/root/scripts/vscripts/left4bots_settings.nut
Reimplement the L4B1 feature that allows to define settings and convars changes to apply only when at least one tank is on the map.
Reimplement the L4B V1 "die" command (and the related "die_humans_alive" setting) that allows any admin to make the target bot(s) die.
https://github.com/smilz0/Left4Bots/blob/main/COMMANDS.md
https://github.com/smilz0/Left4Bots/blob/main/root/scripts/vscripts/left4bots_settings.nut
To order a bot to carry a carriable item (gnome, gascan, cola bottles, oxygen tank, propane tank, fireworks) you are looking at.
The bot will carry the item until you cancel the order.
https://github.com/smilz0/Left4Bots/blob/main/COMMANDS.md
They switch back to their preferred weapon after picking the weapon you order them to use.
This is just an alias of <botsource> cancel all
. Adds another option for cancelling orders.
coach move
coach cancel
coach cancel all
All do the same thing.
bots move
bots cancel
bots cancel all
Same but for all the bots at once.
https://github.com/smilz0/Left4Bots/blob/main/COMMANDS.md
Reimplement the L4B V1 "tempheal" command that makes the target bot(s) use their pain pills/adrenaline.
https://github.com/smilz0/Left4Bots/blob/main/COMMANDS.md
When you tell a bot to pick up a weapon with the 'use' command, the bot will temporarily modify his weapon preferences in order to keep that weapon for the duration of the current chapter.
With the 'usereset' command you make the bot go back to his preferred weapons.
https://github.com/smilz0/Left4Bots/blob/main/COMMANDS.md
Reimplement the L4B V1 "deploy" command that makes the target bot(s) deploy their upgrade packs.
https://github.com/smilz0/Left4Bots/blob/main/COMMANDS.md
Change the vocalizer.txt binding file in order to let the user map 2 different commands on the same vocalizer line, one for the line without the bot selection and one with the bot selection... pretty much like L4B1 does with the "Lead On" line.
As the title says, I made a script file and everything is in it:
left4bots_afterload.zip
On my laptop, it does reduce a lot of "SCRIPT PERF WARNING --- "" ran long at 1.650392ms" messages.
New search order:
1. settings_[map]_[difficulty]_[mode].txt
2. settings_[difficulty]_[mode].txt
3. settings_[map]_[mode].txt
4. settings_[mode].txt
5. settings_[map]_[difficulty].txt
6. settings_[difficulty].txt
7. settings_[map].txt
Search stops at the first file found.
Settings overrides and ontank settings should not be saved to the base settings.txt file.
When a human player joins and replaces a bot who was executing the 'wait' order, the human can't move.
Create the files 'settings_hard.txt' and 'settings_impossible.txt' if they do not exist.
Using the 'hurry' command will make the selected bot(s) stop their L4B2 AI for this amount of time.
https://github.com/smilz0/Left4Bots/blob/main/root/scripts/vscripts/left4bots_settings.nut
Reimplement the L4B V1 feature that makes the survivor bots signal useful items to pick-up through vocalization, chat and L4F Ping.
Related settings:
Reimplement the L4B V1 feature that allows to change the amount of damage dealt by the spitter's spit to the survivor bots (spit_damage_multiplier setting).
https://github.com/smilz0/Left4Bots/blob/main/root/scripts/vscripts/left4bots_settings.nut
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.