Goonstation Forums
[MERGED PR] Bot tweaks - Printable Version

+- Goonstation Forums (https://forum.ss13.co)
+-- Forum: Discussion (https://forum.ss13.co/forumdisplay.php?fid=6)
+--- Forum: Ideas & Suggestions (https://forum.ss13.co/forumdisplay.php?fid=8)
+---- Forum: Good ideas! (https://forum.ss13.co/forumdisplay.php?fid=19)
+---- Thread: [MERGED PR] Bot tweaks (/showthread.php?tid=15670)



[MERGED PR] Bot tweaks - github_bot - 01-09-2021

PULL REQUEST DETAILS



[FEATURE] [REWORK]
About the PR

Made some tweaks to bots.

Across all bots:
- Bot processing tier is variable, using spatial hashing to determine if anyone's nearby.
- - If nobody's near, the bot's processing tier drops to an idle state.
- - If someone's near, the bot bumps up its processing tier to appear more "responsive".
- - If its in the middle of something, its processing tier gets locked to something between the two until they're done.
- Bots get that neato floating chat thing whenever they speak.
- Bots also play a sound when they speak too.
- All bots (except minebot, the mule, and Buddies) use a Secbot-style mover datum to scoot places.
- - So most bots now slide right to their destination instead of slowly inching over.
- - It also considers space as a valid movable tile. Probably just gonna keep this as a Floorbot exclusive.
- Most "stop whatever you're doing and give up" stuff has been moved to a single proc.
- Anything that a bot's supposed to do while moving has also been moved to a single proc.
- Most timed actions now use an actionbar.
- All bots have their ID access properly initialized. Currently gives butt and duckbots captain access, but that'll change.
- Most bots make a noise when they die.
- Changed most cooldown-y things to use ON_COOLDOWN.
- Most bot move speeds are vars, too.

Medibots:
- They now use an actionbar to medicate
- The increased processing rate makes them finish medicating people much, much faster.
- The derelict shuttle bots are also much, much more dangerous, but also much more fair. And never seem to give up.
- Hostile medbots'll now ignore targets if they have their poison(s) of choice in them.
- This also means they won't waste their time pumping one person full of poison.
- Emagged medbots have a chance on-emag to set their poison to a bunch of ???pill chems, or rarely a little bit of traitor poison.

Skullbots
- They have the skeleton's voice. Clack.

Secbots
- They now speak their lines, in addition to just blurting them out.
- They shouldn't cheat anymore with their batons. One charge, one zap, stop breaking the law Beepsky!
- Redid the secbot PDA program. Now everything's on one menu, and it'll send you messages confirming the thing you did!
- They can be ordered to guard a specific area. They'll wander over there and then putter around until something stops them.
- They can also be ordered to lockdown an area. Works the same as Guard, but they'll attack anyone in the area not wearing a head or sec ID. They wont cuff them, though.
- Secbots can be set to not cuff people under a certain threat level, instead just stunning them and gloating.
- Restored Beepsky's profanity-filled arrest-phrase, but with all the bad stuff bleeped out.
- Secbots will instantly target anyone who attacks them, even if they're chasing someone else.
- In addition, if there are nearby secbots, they'll also aggro onto that bot's attacker.
- Beepsky will also send a PDA message to Sec that he's under attack.

Buttbots
- They now contain the butt and arm they're built with.
- They now scoot around aimlessly.
- They now fart, using copypasted emote fartcode.
- They release a little bit of oxygen when they fart
- Or farts if they're emagged.
- They remember whatever people say around them, then buttify random lines at their own pace.
- Emagged buttbots will chase people down to fart on them.
- They also don't stop farting and honestly I think I'm gonna tone it down a bit.
- Emagged buttbots also have a chance to superfart.
-They'll get plugged up, swell up with trapped wind, and then explode in a disgusting cloud of gas and gibs.
- If they happen to do this on a bible, they go straight to hell.
- They have a chance to gib on death, into either bloody or oily chunks.
- They have some settings to disable most of their "behaviors".

Duckbots
- They now mill around aimlessly
- Emagged duckbots will chase people around.
- They'll slowly "gestate" more eggs over time.
- Occasionally, they'll decide to wander over to a random spot on the station.
- Occasionally, *all* duckbots'll migrate to a random area on the station.
- This can be controlled through packets.
- While moving to their destination, they get all access because I don't know how to restrict them to assistant-only areas.

Floorbots
- They all use a shared list of in-use targets, claimed when seen and released when finished.
- They set a home tile, and scan for valid tiles outward from there until they run out of valid tiles
- Meaning they'll more reliably build (or destroy) tiles radiating out from a fixed point.
- They no longer cause *massive awful lag* if there's a large group of them destroying the floor.
- They should actually ignore inaccessible tiles more reliably.
- They eat loose floor tiles and metal sheets by default, and should seek those things out if they're near its home.
- These also happen instantly, as previously it just used a 0.5 second delay.
- Their repair and disrepair procs use actionbars now. Makes it a lot more obvious they're actually doing something.
- They're locked at a constant, mid-speed processing tier, as they're best designed to work in the background.

Cleanbots
- Also uses a shared list of claimed targets.
- They clear this every few minutes.
- Uses a similar search method as Floorbots.
- So they should keep to a specific area.
- They now use an actionbar for cleaning. It also makes a sloshy noise!
- They don't keep a list of tiles they've lubed. Instead, they just check if the floor is lubed and skip it if it is.

Firebots
- More aggressively seeks out people to spray.
- Increased the distance they'll try to spray at things to 3 tiles from 2.
- They'll try to spray burning people who cross their proximity.
- Their spray puddles now connect properly.
- They now check a list of burning things instead of scanning every tile in view for things
- Means they can see fire through walls, but honestly, its a firebot, looking for fire is kinda their thing

Buddies
- Now use an actionbar to cuff
- They now also announce their arrests to Research
- They cuff a bit faster, too. Zipties, after all.
- They continually shoot their toolgun at their target while they have one, regardless of processing.
- Just about every tool has had their delay reduced significantly. Now they're actually really dangerous!
- Flash modules flash every couple of seconds, and do the AoE flash if their target's out of range.
- They also kinda spam their equipped gun. It'll ruin someone's day, but they tend to run out of power very quickly.

Chefbots
- They now properly path to awful food things

Also dropped the ammofab's cost down to 1 TC. It's pretty frick, tbh.

Why's this needed?

The bots are in need of some love, and I have more than enough to share with them. They generally suffer from feeling slow and marginally useful, even though their existing functionality is actually pretty robust when it actually works. That, and they're due for some cleanup so it's easier to love them in the future.

Also, making them do things more often and move around quicker gives the illusion of decent, functioning AI.

Changelog


Code:
changelog
(u)Superlagg:
(*)Upgraded bot AI to be more responsive in general.
(*)Buddy combat AI has been upgraded to allow them to move *and* shoot.
(+)Secbots can be ordered to guard and lockdown specific areas.
(+)Floorbots now eat loose floor metal by default.
(+)Added actionbars to most times bot actions, like repairing floors and injecting people with drugs.
(+)Ammofab now costs 1 TC.


PULL REQUEST DETAILS


RE: [PR] Bot tweaks - CommaIndividual - 01-09-2021

Very nice


RE: [PR] Bot tweaks - GORE - 01-09-2021

This is great!


RE: [PR] Bot tweaks - Superlagg - 01-10-2021

Update:

Duckbots:
- Occasionally, they'll decide to wander over to a random spot on the station.
- Occasionally, *all* of them will migrate to a random area on the station.
- - This can be controlled through packets.
- While moving to their destination, they get all access because I don't know how to restrict them to assistant-only areas.

Medbots:
- Hostile medbots'll now ignore targets if they have their poison(s) of choice in them.
- - This also means they won't waste their time pumping one person full of poison.

Guardbots:
- They continually shoot their toolgun at their target while they have one, regardless of processing.
- Just about every tool has had their delay reduced significantly. Now they're actually really dangerous!
- - Flash modules flash every couple of seconds, and do the AoE flash if their target's out of range.