mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
ok-behavior-trees
21
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
df7832aa43 |
Replaced our NPC AI with Behavior Trees. (#96628)
This PR replaces our current NPC AI with a [behavior tree system](https://en.wikipedia.org/wiki/Behavior_tree_(artificial_intelligence,_robotics_and_control)). Behavior trees are a common way of creating AI in which you place nodes in a tree structure to define what actions an AI should take. AI controllers defined a list of /datum/ai_planning_subtree types in behavior_nodes. Each subtree was a self-contained unit that could call queue_behavior() to fire off /datum/ai_behavior actions. The controller iterated subtrees in order, each one deciding independently whether to queue something and deciding whether the next subtree would run. This has a few issues: 1. There's no real structure; you are just defining a list of things to try in order. 2. There was a loooot of subtrees that were basically the same as another but with some slight modification 3. It was hard to understand. Controllers now define a single json file describing a tree of nodes. The tree is composed of structural composites: Sequence - do A, then B, then C (and so on) Selector - try A, if it fails try B, then C (and so on) Parallel - run A and B simultaneously, with configurable failure/success policies and or looping behavior Subplan - loop a child continiously Along that we also have "Decorators". These are nodes that basically check a condition (E.g.; do we have a combat target). These decorators can be used to gate behavior and are re-useable across behavior trees. They also have a concept known as "Observers". Which lets them cancel lower priority behavior in case their condition changes (Which we check whenever a signal fires that fits that specific decorator). This makes the AI much more responsive to change in environment. For behaviors, we still use the ai_behavior datums. These are the actual behaviors such as "Move to X", "Attack X". The only major change is that these can no longer sleep() since they now run in the ai_controller. Lastly, we now also have subtrees, except now they are essentially pieces of behavior tree that can be re-used, or even overriden at runtime or as a variable. Allowing for making modular AI made out of several smaller trees. You can set variables on these nodes directly via the extension (see below), which should reduce the need to make subtypes of behaviors by a lot. All of these vars are saved on the JSON and will be applied at runtime. If you are using subtrees, you can also assign "bindings" to these variables, which will allow instances of the subtree to override those variables. Since a tree structure with variables becomes hard to parse in a JSON, I've made a VSCode extension to edit these JSONs: https://marketplace.visualstudio.com/items?itemName=BehaviorTreeG.behaviortreeg https://github.com/CabinetOnFire/BehaviorTreeG <img width="1795" height="1268" alt="image" src="https://github.com/user-attachments/assets/56aa2f0b-3cf9-449f-bca4-8281fca82db6" /> This extension allows you to edit the behavior tree JSONs, and browse through all the behaviors/decorators/subtrees we have If you'd like more info on how to build these AI check out the learn_ai.md. I will also make a tutorial to go over more depth on what the system offers because I kind of suck at doing technical write-ups. Targetting has been changed to. I've made a new acquire_targets behavior that takes a target_source (what am I targetting) and targetting_strategy (what does the candidate need to fulfill to be considered a target). This allows us to make composites targetting combinations to reduce the amount of specific find_and_set esque behaviors we had before. Not everything is ported to this system but that would be a longer term goal. I've added a new build_bt script that converts all the behavior tree JSONs into compiled versions. Why is this needed? Because I wanted to keep using defines in behavior trees, so we need a way to convert this into literal values before we send it to DM. This script runs on compile and should also run in CI (If I didn't fuck that up!). This saves to a new build/ folder. I've ported every single AI in the game to this system (except raptors, Kobsa is working on those so should be in soon!), so I do expect some bugs to come out of this. But I also fixed some issues that have probably been in the game for a long time such as: - Fixed penguins being unable to fish - Fixed bileworms not being able to devour people - Fixes goldgrubs not grubbing gold (they could not mine!) - Lizards actually eat food they find Either way, I'd reccomend a long TM on this. 1. (Hopefully) a better development experience for making AI 2. Less copy-paste for behaviors, we should be able to re-use more pieces to make behavior 3. Behavior trees is a more common pattern in making AI, so it should be easier to find resources to find out how to do things. 🆑 CabinetOnFire, Iamgoofball, SmartKar, Ben10omintrix refactor: Replaces our AI system with behavior trees, porting all datum/ai to it /🆑 I will add this PR with more details down the line. I think I got the big picture but its a big PR, so sorry if I missed something important. --------- Co-authored-by: Iamgoofball <iamgoofball@gmail.com> Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com> Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> |
||
|
|
2ede6af8bc |
Fix basic mobs triggering click cooldown erroneously. (#95906)
## About The Pull Request Basic Mobs used to always trigger cooldown on clicks. This resulted in missed attacks causing you to have a delay before you could attack again, this makes it really punishing to play as a basic mob. To resolve this I did a mini-refactor on basic mob's attack chain to allow for the return values to determine whether we go on cooldown or not. Preventing attacks that did nothing (due to not passing checks, or simply not having any behavior) from causing cooldown. This fixes #95605 ## Why It's Good For The Game being able to perform melee with the same rules as /human is only fair ## Changelog 🆑 DresserOnFire fix: Fixes a bug where player-controlled basic mobs would get a cooldown when their attacks miss refactor: basic mob attack chain can now decided whether an attack resulted in a cooldown or not. /🆑 |
||
|
|
9e72a43b0a | Increases raptor growth speed across the board by around 50% (#95628) | ||
|
|
1c6c506936 | Raptor Rework - Ranching and Companionship (#93564) | ||
|
|
3ea7b03369 |
Accentuate the positive with **Personality**: A (soft) mood rework (#92941)
Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com> |
||
|
|
d19b8de989 |
Most fleshy mobs are vulnerable to stamina and stuns (#90675)
## About The Pull Request This PR enables most mobs to take stamina damage, become slowed as a result of taking stamina damage. It also gives most mobs CANSTUN which not only allows them to enter stamcrit from taking stamina damage but also makes them vulnerable to mechanics like stun batons. Mobs which already took stamina damage (Spiders and Space Dragons) still work the same way. Mechanical or artificial mobs, mining mobs, simple xenomorphs, ghosts, and most kinds of mob closely associated with antagonists still don't take stamina damage. ## Why It's Good For The Game A new player armed with a disabler will probably try and use it on aggressive animals and be disappointed, but I don't think there is any _reason_ for them to be disappointed when it's already something they are doing merely to delay being attacked rather than to kill the target. It's not intuitive for these mechanics not to function against simple mobs when they do against humans, _especially_ the kinds of mobs which look like humans, and there isn't any technical reason why it _couldn't_ work against most mobs which it looks like they should work against. While this reduces the threat level of some mobs against Security players I think the greater interaction with the sandbox is beneficial. I'm hopeful it doesn't have that much effect on many of the most common places you encounter dangerous mobs like Space Ruins or Gateways as they are also places where you can't reliably recharge your energy-based stamina weapons as most that don't require energy do require getting into melee and endangering yourself. ## Changelog 🆑 balance: Most biological mobs are now slowed by taking stamina damage, and can be stunned. Mechanical mobs, mining mobs, and several other special kinds (chiefly those invoked by antagonists) are unaffected. If this seems to effect any mob it probably shouldn't, please report it as a bug. /🆑 |
||
|
|
20b9208300 |
fixes raptors breaking their troughs, removes troublesome raptors and you can now rename ur raptors (#88153)
## About The Pull Request after my PR removing most self-registering attack signals, raptors would sometimes break their troughs after interacting with it, this fixes that. Also, removes the troublesome trait from raptors. raptors with this trait would go out and harm other raptors everyonce in a while, but ive discovered that this can be annoying to deal with when you have many of them, so ive removed it and im going to replace it with something less annoying in the future. Also you can now give your raptors pet collars, effectively allowing u to rename them ## Why It's Good For The Game fixes raptors breaking their trough and provides some QOL to raptor ranching ## Changelog 🆑 fix: raptors no longer break their trough upon interacting with it balance: removed the troublesome trait from raptors, they now wont go out to attack their colleagues. add: you can now give pet collars to ur raptors to rename them /🆑 |
||
|
|
a99a1e6383 |
slightly redoes how animals hunt for food (#87166)
## About The Pull Request before, if u wanted to make ur animal hunt for food, u had to give them the find food subtree, the attacking subtree, and had to edit their targeting stratedgy to include items. this makes it so u only have to give them just 1 subtree which will handle everything it needs to. also makes it alot more customizable, u can now set a hunger cooldown for ur animals, and cute emotes for them to play after eating food ## Why It's Good For The Game makes it more convenient for future devs to include food hunting behaviors to their animals, while also making it more customizable ## Changelog 🆑 code: animals' food hunting behavior has been refactored, please report any bugs /🆑 |
||
|
|
34a15c690c |
Bring your pet to work day! (#86879)
## About The Pull Request Adds a new neutral station trait where people are able to bring their personal pets to show off to the rest of the crew (or to donate to the chef). Before joining, players will be able to customize their pets https://github.com/user-attachments/assets/5a5cda18-e551-4f87-b649-67a6940ffc6a u can set their name, gender, pet carrier color, and teach them give them a unique dance sequence trick. if players dont wish to opt in, they also have the choice not to ## Why It's Good For The Game adds a new station trait which people can RP around, whether its by competitively comparing pets, or resolving conflicts around pets being killed/kidnapped. Ive also GAGsified pet carriers, so people can now have the option to recolor those too ## Changelog 🆑 add: adds a new station trait, "bring your pet to work" day /🆑 |
||
|
|
2535df375d |
Carps, frogs and young lobstrosities now fear the fishing hat! (#85380)
## About The Pull Request Carps, frogs and young lobstrosities now fear legendary anglers wearing the legendary fishing hat and will flee. The item is skill-locked, so only those that have maxxed out the skill can wear it. Differently, adult lobstrosities and megacarps (and suicide frogs, which are used nowhere) do not flee but will still prioritize them over the rest. ## Why It's Good For The Game I'm putting some emphasis on the "fish fear me" _(lobstrosities and frogs aren't exactly fish but it'd been quite boring to only include carps)_ and also making the hat a bit more than just some cosmetic novelty. ## Changelog 🆑 add: Carps, frogs and young lobstrosities now fear people wearing fishing hats! Adults and megacarp favour the 'fight' part of the fear reflex however. fix: The hat stabilizer module now inherits the clothing traits of the attached hat. /🆑 |
||
|
|
761b14ef7c |
lavaland raptors (#82537)
## About The Pull Request adds raptors to lavaland. these are creatures that have been created through countless xenobiological experiments by nanotrasen to breed an animal that can withstand the harsh conditions of lavaland and aid miners. theres now a new ranch miners can access bottom right to the mining base  this ranch starts somewhat empty as most raptors have escaped containment and are now scattered all across lavaland, u can find them and return them to ur ranch. in order to tame a raptor, u first need to prove to it that ur a capable master. when u try to ride it, a little minigame prompt will pop up  in this game, the bird's icon rapidly changes direction and u have to quickly click the arrow thats OPPOSITE to the direction its facing several times before the direction changes. if you fail 3 times itll knock you off and run away, however if u win it will deem u a suitable master and listen to your orders. There's many different breeds of raptors you can find across lavaland, all with different capabilities: red raptors: these excel at combat and can be very useful for dealing with lavaland mobs or defending the node drone yellow raptors: are very speedy mounts, theyll get u from point A to point B in record time green raptors: they are the tankiest type of raptor and are very good miners. while mounted, they will clear any rock walls in their path purple raptors: can store items in them. they have a decent storage size allowing players to carry more items across trips white raptors: are able to heal other injured raptors. having one in ur party would be very useful as they can nurse the combat raptors back to full health when they need it blue raptors: produce very nutritious milk with healing capabilities. having 1 or 2 of these back at ur ranch would be very useful black raptors: by far the rarest breed, its very unlikely that ull be able to get one of these, but in the case u do, they have the combat capabilities of the red raptor, speed of the yellow raptor, and tankiness of the green raptor. Breeding different colored raptors together can net u an entirely new colored raptor. each breed has atleast 1 guaranteed combination of parents that it will result out of. you will also need to maintain a good friendship bond with ur raptors, this is done by feeding them, grooming them, and petting them. u can see the strength of ur bond by SHIFT clicking them. more hearts indicate a stronger bond  having higher friendship bonds means ur raptors will perform better in combat, and in the case of blue raptors, they will produce more milk. Maintaining friendship bonds with baby raptors and keeping them happy will also encourage them to grow faster U can also analyze raptors using the new raptor-dex device available at ur ranch  the inherit modifiers indicate how strong this raptor's offspring will be. raptors inherit attack and health stats from both their parents, breeding raptors with higher inherit modifiers means the offspring will be stronger. raptors will also inherit some traits from their parents that will change how they will act around u and around other raptors, some of them being: Playful: raptors will play with their masters and tease them motherly: raptors will care for baby raptors, this will encourage baby raptors to grow quicker depressed: means its hard to keep this raptor happy and friendship bonds will deteriorate faster if not given enough care. coward: makes them flee combat if severly injured, ditching u to the wolves trouble maker: makes them attack other raptors at the ranch. however, trouble maker raptors will not attack other trouble maker raptors, instead they will form posses and bully raptors together. it might be a good idea to isolate them from the other raptors raptors primarily consume ores. to feed raptors, you need to place ore into the food troughs at the ranch. they are too civilized to eat ores off the ground or directly from ur hand, they will only eat it if its in their trough  beautiful raptor sprites by spessmenart! (rest are codersprites) ## Why It's Good For The Game adds a new layer to lavaland mobs, and gives miners new interesting tools and ways to tackle the challenges of lavaland. ## Changelog 🆑 sheets, spacemenart, ben10omintrix, goofball, infrared baron, aofie add: adds lavaland raptors and the raptor ranch /🆑 --------- Co-authored-by: Iamgoofball <iamgoofball@gmail.com> |
||
|
|
4019835b3e |
Living Limb fixes (feat: Basic mobs attack random body zones again) (#82556)
## About The Pull Request Reworks Living Limb code to fix a bunch of runtimes and issues I saw while testing Bioscrambler. Specifically, the contained mobs are now initialised via element following attachment so that signal registration can occur at the correct time. This allows limbs to function correctly when added from nullspace via admin panel or bioscrambler. Secondarily (and more wide-ranging) at some point (probably #79563) we inadvertently made basic mobs only attack the target's chest instead of spreading damage. This is problematic for Living Flesh which can only attach itself to damaged limbs but was left unable to attack damaged limbs. I've fixed this in a way which is maybe stupid: adding an element which randomises attack zone pre-attack. Living limbs also limit this to _only_ limbs (although it will fall back to chest if you have no limbs at all). This is _technically_ still different, the previous behaviour used `adjustBruteLoss` and `adjustFireLoss` and would spread the damage across your entire body, but there isn't a route to that via the new interface and this seems close enough. ## Changelog 🆑 fix: Living Limbs created by Bioscrambler will be alive. fix: Living Limbs can once more attach themselves to your body. balance: Living Limbs will prioritise attacking your limbs. fix: Basic Mobs will once again spread their damage across body zones instead of only attacking your chest. /🆑 |
||
|
|
00525f97f4 |
Basic Mobs Can Now Get Wet (and can therefore clear the slimed status effect) (#81927)
## About The Pull Request
A year ago in #73601 (
|
||
|
|
2c21a73ed0 | [no gbp] gutlunch pop control (#79772) | ||
|
|
0f5d14e68b |
Mook village and basic mook refactor (#78789)
## About The Pull Request refactors mooks into basic mooks and re-adds them to the game ## Why It's Good For The Game this refactors mooks into basic mobs and re adds them to the game. mooks are now a part of lavaland. they come as a part of a random ruin which consist of a entire village of friendly mooks. Mooks will aid players but they will still attack ashwalkers because of some troubled history between them.  mooks are a very diseased specie. nanotrasen discovered a small tribe of mooks and cut a deal with their tribal chief to aid ss13 miners in exchange for medical supplies. tribal chief in his decked out home  male mooks go out and mine and haul ore off back to their village. they will deposit ores into a stand which is managed by another mook. they will all return to their village to rest once a lavastorm comes.  players can use this stand to withdraw any ore they like  female mooks will stay behind in the village to guard it from ashwalkers. they will also heal male mooks when they come back from a long day of work. the tribal chief is a bum and chooses not to go out and mine. he will stay behind in the village and issue commands to his people rather than work the village also has its own bard! he follows player visitors and plays nice music for them while they are in the village (although he is not very talented).  he is still a warrior at heart tho so he will be smashing his guitar over ashwalker skull  ## Changelog 🆑 refactor: mooks are now basic mobs. please report any bugs feature: added mook village to lavaland ruins! /🆑 |
||
|
|
72174845f5 |
Basic Watchers & Basilisks (#77630)
## About The Pull Request This one is a double feature because Watchers and Basilisks share the same typepath. You might see a couple more of those. As is tradition I decided to fuck with them rather than just port them. Here's what's up. **Basilisks**   - Have a new soulless sprite which looks less like a living blue hedge. - Walk at you and shoot you while you are not in range (just like before). - Become supercharged if they become "heated" by lava, lasers, or temperature weapons. This was a feature they also previously had but they would never encounter lava, so now it also works if you use the wrong gun on them. - Lose their supercharge if you cool them down. - Otherwise pretty normal mobs. **Watchers** https://www.youtube.com/watch?v=kOq_Bf78k5A Here's a traditional video of me intentionally getting hit by mechanics (trust me its definitely on purpose) - They glow emmissively a little bit so you can see them from further away. - Their eyes light up about 0.5 seconds before they are able to shoot at you. - No longer melee attack, instead try to stay out of melee. - Will occasionally put you into "Overwatch", meaning they will shoot you rapidly if you move or act while they're staring at you for a brief time period (after which you become immune for 12 seconds, and during which other watchers will play fair and stop shooting at you). - If they start taking damage they will also start using their "Gaze" attack, look away or suffer some kind of negative effect! - - Normal watcher gaze flashes and confuses you. - - Magmawing watcher gaze obviously burns (and briefly stuns) you. - - Icewing watcher gaze freezes you and throws you backwards. - Magnetically attract and eat diamonds. They also used to do this, but just if they happened to coincidentally walk past some. **Other accompanying changes** All basic mobs will now adopt the "stop gliding" trait if they get slowed down too much. I moved behaviour for "fire a projectile from this atom" into a helper proc because I was using it in three places and I will probably use it in more places. There are probably other places in the existing code which could be using this. I think I made the basic mob melee attack forecast default a little more forgiving, they were fucking me up too much and I am the playtester. ## Why It's Good For The Game Another one off the list. New tricks for old dogs. Framework for making mobs with ranged attacks "fairer" (you can see when they are ready to shoot you). More (hopefully) versatile AI behaviours which we will reuse later (I hope I'm not duplicating one someone already made). If our players "enjoy" them enough we can give more mobs "don't look at me" mechanics. Removes some soul sprites. ## Changelog 🆑 refactor: Basilisks and Watchers now use the basic mob framework. Please bug report any unusual behaviour. sprite: Basilisks have new sprites. add: Basilisks will go into a frenzy if heated by energy weapons or temperature beams as well as by lava. add: Watcher eyes will be illuminated briefly when they are ready to fire at you. add: Watchers can now briefly put you into "Overwatch" and penalise you for moving while they can see you. add: Wounded watchers will occasionally punish players who look at them. balance: Unusual watcher variants are more likely to appear. /🆑 |
||
|
|
16cecf864d |
Goliath basic mob (#76754)
## About The Pull Request Converts Goliaths to the basic mob framework and gives them some new moves because I can't leave things well enough alone. I am planning on touching all the lavaland fauna and then maybe even the icebox ones if I haven't got bored. The Golaith is the first because it is iconic. https://www.youtube.com/watch?v=JNcKvMwT4-Q Here's me getting killed by one as a demonstration. Despite my poor performance I would contend that they aren't a _lot_ more dangerous, but they are a little more dangerous. The chief difference here is that they have two new attacks which they will only use in response to being attacked. If fired at from range, they will target the attacker with a line of tentacles (it doesn't track you, so is easily sidestepped). If attacked in melee, they will surround _themselves_ with tentacles, on a longer cooldown. Something else you may notice in this video: I discovered that basic mobs are actually _too smart_ to be Lavaland fauna. Typically (unlike their old form) a mob on our new AI system is smart enough to attack someone _the moment they come into range_ rather than only checking on predictable ticks, which would make using the Crusher an essentially unviable prospect. To counteract this, Goliaths now have a delayed attack component which gives you a visual warning and short duration to get out of range before they swing at you. I will probably put this on all mining fauna that get reworked, it wouldn't be a terrible thing to put on other mobs to be honest. Other changes: The goliath stun is now a status effect with _buckles_ you to the tentacle as if grabbed, as well as its previous effects. While this seems purely worse, any nearby helpers can now help-click on you to instantly remove the debuff. Experiencing the effect of a Lobstrosity Rush Gland makes you immune to being grabbed by tentacles and an implanted one will automatically trigger and free you if you are hit, and the explosive effect of Brimdust also causes the tentacle to retract (although you'd need to take damage for this to happen). Using the tools of the land, you can make these creatures less threatening. The ability for a Goliath to chain-apply the ability has now also been reduced, it won't refresh its duration if you are hit when already buckled. When not occupied hounding miners, Goliaths will intermittently dig up the asteroid sand and eat any worms that this produces. I also made some new sprites for riding a Goliath because they've been broken since the Lavaland mob update and also kind of were ugly before then anyway:  Other code changes: - I made an element which only lets an attached object move every x seconds. This is because Goliaths are far too slow to use the speed system (the glide just looks bugged as hell) but one thing I am invested in when converting these is to make sure that they share the same behaviour when player or AI controlled. This is disabled while you're riding them because it was interminably slow. - The Goliath tentacle trail uses a supertype object now shared with the Meteor Heart which did something kind of similar. ## Why It's Good For The Game It begins the process of moving one of our larger subsets of NPCs onto the newer framework for NPC behaviour. It adds a little bit more life to an iconic but slightly uninteresting foe which mostly just walked at you slowly. This PR contains a few components I expect to apply more widely to other mobs in the future. ## Changelog 🆑 refactor: Goliaths now use the Basic Mob framework, please report any unusual behaviour. add: Goliaths learned a couple of new attacks which they will use in self-defence. balance: Help-clicking a miner grabbed by Goliath tentacles will immediately free them, as will the effect of several items you can scavenge from around Lavaland. image: New sprites for the Goliath saddle. /🆑 |
||
|
|
b7da743e7d |
[no GBP] Corrects the speed at which spiders stop being on fire (#73601)
## About The Pull Request As noted in #73584 spiders stopped being on fire faster when they were simple mobs than they do now, and I have restored this behaviour. While I was there I noticed that spiders were the only simple mobs which could catch fire so I just remove that behaviour. I also changed the boolean "flammable" into a flag, not sure if that's actually better but maybe it is? I tried a little to see if I could make this into a component but there's basically no way as all of this behaviour is inside a status effect. ## Why It's Good For The Game Restores original behaviour. Maybe in the future I'll (or someone else will) use this to make some other basic mobs able to be set on fire, no obvious reason they shouldn't be able to be. ## Changelog 🆑 fix: Spiders will stop being on fire marginally faster, as they used to. /🆑 |
||
|
|
d650a1a7cb |
Basic mobs don't become dense upon death (#72554)
## About The Pull Request In #72260 what was previously a var became a flag, which was a sensible change, however this inverted the default behaviour. In virtually all cases we want dead mobs to _stop_ being dense, this added a requirement for the flag to be present for that to happen and then didn't add the flag to any mobs. Rather than add this to every mob I inverted the function of the flag. My reasoning here is that _simple_ mobs seemingly never required this behaviour, basic mobs are probably going to need it rarely if ever, and including it in `basic_mob_flags` by default seems messy and easy to leave off when setting other flags (plus #72524 implies to me we want to avoid adding more default values). Setting this manually on each mob seems kind of silly as a requirement going forward and I can't think of a way we'd unit test for people forgetting. For the same reason I did the same thing with the `STOP_ACTING_WHILE_DEAD` flag I added to the AI controller in a recent PR, the flag should denote unusual behaviour not the default. ## Why It's Good For The Game It looks really odd when you're constantly shuffling places with dead mobs, they're not supposed to do that. It's tedious to add `STOP_ACTING_WHILE_DEAD` to every AI controller when that should be an obvious default assumption. ## Changelog 🆑 fix: Dead basic mobs are no longer "dense" objects and can be stepped on. /🆑 |
||
|
|
3daf3b0643 |
fixes silly stuff about basic mobs (#72260)
## About The Pull Request makes basic mob attacks call their default attacks when done by a player, rather than calling simple mob attacks makes basic mob attacks call simple animal attacks by default, until we remove simplemobs moves some stuff off to procs and flags, fixes some stuff ## Why It's Good For The Game im moving holoparasites to basic mobs and i literally cant give them secondary click attacks ## Changelog 🆑 fix: fixes moonicorns not applying pax /🆑 |
||
|
|
46cb925af0 |
Basic Mobs: the cooler simple mobs that run on datum AI. (With reworked cockroach AI as proof of concept) (#60694)
Simple_animals / mobs are the biggest lie in this code-base. They're far from simple and have an extreme god-object problem. Especially when you get to /hostile, where there is so many procs, vars, and what not, that you can't make any interesting additions without snowflaking the hell out of the code. This PR hopes to help kill this problem by introducing a new /living subtype, /living/basic. The idea of this refactor is to slowly start moving all old simple_animals to this new system, moving over behaviors like charging and more extravagant mobs like megafauna over bit by bit similar to how newfood was implemented. One of the other big goals of this refactor is to move many of the fringe simple animal behaviors into either AI datums, or components/elements. (Some of which still needs to be done in this PR). As a proof of concept, I created the base mob/living/basic, and moved cockroaches over to the system. Since cockroaches have both a passive, melee and ranged mob. This PR does slightly affect balance as the behavior isn't 1-on-1 due to it no longer running on the janky /hostile behavior, but I tried to keep the effects to a minimum, and the glockroach and hauberoach are not spawnable through many means as far as I know. |