-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic Ai Updates #1842
Merged
Merged
Basic Ai Updates #1842
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
refactors bots into basic bots. i decided to do medibots first because they were the most complex bots and wanted to get them out of the way first. if this pr gets merged then i will be rolling out the rest of the bot refactors over the next months medibots can now wear any type of hats! some of these hats can trigger unique new recorded voicelines and interactions! ![chickembot](https://github.com/tgstation/tgstation/assets/138636438/09d4519d-0a34-4b7f-898b-260f894bfdce) ![hatbot](https://github.com/tgstation/tgstation/assets/138636438/088e0618-108d-4fb4-a29b-771cfa027fb3) converts medbots into basic medbots. they are now a bit more responsive than before but overall they should act similarly to how they did. also adds the basic bot ai framework which has all the generic bot behaviors that the next bots may or may not need to have in their ai. i tried my best to improve their code and turned some of their bitflags into define bitfields. this pr may need a careful review because i did it from scratch as the old bot project branch was too outdated for me to use :cl: refactor: medbots are now basic bots. please report any bugs add: medbots can wear hats! /:cl:
Should fix advanced medkit medibots healing and also give back the healing bonus to brute medkit medibots. Medibots should no longer leave their healing pose in the middle of healing either. Player medibots can't overheal. It also readds any removed lines. And they can use robot emotes again. Fixes #80135 Fixes! :cl: fix: Medibots made from advanced medkits works again fix: Medibots made from brute medkits have their bonus healing again fix: Medibots can use robotic emotes again /:cl: --------- Co-authored-by: Jacquerel <[email protected]>
this pr refacotrs cleanbots into basic bots. also adds a new skillchip for janitrs. this skillchip will allow janitors to communicate with cleanbots and order them around, like pointing at something and telling them to clean it. also now the cleanbot has an inbuilt mop which it will use to smack mice and cockroaches refactors cleanbots into basic bots and fixes them getting stuck sometimes while patrolling. also janitors being able to order them around can make them a bit more useful as tools for the janitor :cl: refactor: cleanbots are refactored into basic bots. please report all bugs fix: fixes cleanbots getting stuck sometimes while patrolling add: janitors get a new skillchip which allow them to communicate with cleanbots /:cl:
this pr integrates the bot path huds to ai controllers and move loops to allow basic bots to display their paths in the hud. also closes #80280 and closes #80330 basic bots now can display their path on huds :cl: add: basic bots can now display their paths on huds fix: medbots can research healing again /:cl:
i forgto to set this in my last prs closes #80204 also closes #80252 ais can summon bots :cl: fix: AIs can summon bots again fix: cleanbots can clean floors directly underneath them and prioritize floors nearest to them fix: medbots drop empty medkits now /:cl:
On one compile of MetaStation, I saw that there's 45 basic mobs on the station, 256 on lavaland (the number growing from tendrils), and 59 in all other z levels combined. While we do expect Lavaland to be visited every round, at least it won't be running during the times when no one is there, but even more importantly, space exploration is something not done every round, so we don't have any reason to waste our resources on AIs that will never be interacted with. Simple animals had an easy solution to this: If no one is on the Z level, their AI turns off If someone is on the Z level, they are idle unless needed. The last simple animals that exists right now are bots, megafauna, geese, gondolas, and some minor ones like mimic, zombie, dark wizard, soulscythe, etc. Point is, we're very much nearly done going through all simple animals, so this code is being wasted just to ensure things like cleanbots won't work if no one is on the z level, something I doubt happens often, so I took their code and made it work for basic mobs instead. I could've done both but I thought it would look very bad, and maybe this is a good incentivize to get more basic mob conversions. There's one major change here and it's that we're missing the "Idle" mode, some basic mobs like the Lavaland village seems to be made with intent that they'll be running even if players aren't around, so this sets up a future PR that makes idle AI easier to add, and I want to make sure those cases are taken into account. We don't need to always be processing these basic mobs, and sets us in the future to hopefully also implement idle AIs. :cl: balance: Basic mob AIs with no mobs on the Z level now stop. /:cl: --------- Co-authored-by: san7890 <[email protected]>
…simple mob to basic mob conversion. (#82539)
turns hygenic bots into basic bots. also now PAIs and people can play as hygeinebots. and they can wear hats transforms hyginebots into basic bots. their old AI used to handle all the logic. i moved some of the logic to the mob itself so players can also clean (or burn) things. also this pr will add pathing limits to bots, in the case the jps movement thinks it can reach something, but actually cant, in which case the bot will give up the chase :cl: refactor: hygeinebots are now basic bots. please report all the bugs fix: fixes hygenebots not being able to patrol add: hygeinebots can now be controlled by Players /:cl:
## About The Pull Request this makes ai controllers use cell trackers and signals to determine when to idle ## Why It's Good For The Game might be better than looping over all clients for every controller ## Changelog :cl: code: The way mobs idle has been refactored, please report any issues with non-reactive mobs /:cl:
…ctors ai cooldowns a bit (#82640) Nother bit ripped out of #79498 [Implements a get_cooldown() proc to get around dumb manual overrides and empower me to optimize the findtarget logic](tgstation/tgstation@7047d29) [Adds modify_cooldown, uses it to optimize find_potential_targets further](tgstation/tgstation@4ebc8ce) No sense running the behavior if we're just waiting on its output, so let's run it once a minute just in case, then push an update instantly if we find something [Optimizes connect_range and promxity_monitors](tgstation/tgstation@bcf7d7c) We know what turfs exist before and after a move We can use this information to prevent trying to update turfs we don't care about. This is important because post these changes mobs with fields will be moving a lot more, so it's gotta be cheap [Implements a special kind of field to handle ai targeting](tgstation/tgstation@80b63b3) If we run targeting and don't like, find anything, we should setup a field that listens for things coming near us and then handle those things as we find them. This incurs a slight startup cost but saves so much time on the churn of constant costs Note: We should also work to figure out a way to avoid waking ais if none is near them/they aren't doing anything interesting We don't need to do that immediately this acts as somewhat of a stopgap (and would be good regardless) but it is worth keeping in mind) I am unsure whether this is worth it anymore since #82539 was merged. As I say it was done as a stopgap because ais didn't know how to idle. If not I'll rip er out and we'll keep the other refactoring/optimizations. Cleaner basic ai code, maybe? faster basic ai code, for sure faster proximity monitors (significantly)
This was referenced May 6, 2024
Closed
Closed
DexeeXI
reviewed
May 6, 2024
@@ -130,7 +130,7 @@ | |||
if(length(item.viruses)) | |||
for(var/datum/disease/advanced/D as anything in item.viruses) | |||
item.remove_disease(D) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace cleanup. no functional changes.
This was referenced May 6, 2024
Closed
This was referenced May 7, 2024
This was referenced May 7, 2024
This was referenced May 8, 2024
This was referenced May 9, 2024
This was referenced May 11, 2024
Closed
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About The Pull Request
Why It's Good For The Game
Changelog
🆑
/:cl: