Commit Graph

91 Commits

Author SHA1 Message Date
Ben10Omintrix
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
/🆑
2024-10-15 13:18:37 +13:00
Ben10Omintrix
6897f33767 AI controllers interactions refactor (#86492)
## About The Pull Request
refactors all behaviors to work through clicking. also removes some now
redundant behaviors. in the future ill try to generalize more of these
behaviors

## Why It's Good For The Game
makes AI controllers work through clicks which may help with swing
combat implementation

## Changelog
🆑
refactor: basic mob AI interactions has been refactored. please report
any bugs
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-10-03 03:44:41 +02:00
grungussuss
4db6e82e3a Cats can meow and purr (#86841)
## About The Pull Request


https://github.com/user-attachments/assets/a2572845-b345-423d-ab46-d677af5bc7bb


https://github.com/user-attachments/assets/7095c897-06eb-4a62-ab23-ce966930c974

additionally

- [x] make petting cats have them purr work.
## Why It's Good For The Game
it's cute
## Changelog
🆑 grungus
add: cat mobs can *meow and *purr
sound: sound for meow and purr emotes
code: added support for passing emotes into the pet_bonus element
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-10-02 11:22:13 +13:00
grungussuss
58501dce77 Reorganizes the sound folder (#86726)
## About The Pull Request

<details>

- renamed ai folder to announcer

-- announcer --
- moved vox_fem to announcer
- moved approachingTG to announcer

- separated the ambience folder into ambience and instrumental
-- ambience --

- created holy folder moved all related sounds there
- created engineering folder and moved all related sounds there
- created security folder and moved ambidet there
- created general folder and moved ambigen there
- created icemoon folder and moved all icebox-related ambience there
- created medical folder and moved all medbay-related ambi there
- created ruin folder and moves all ruins ambi there
- created beach folder and moved seag and shore there
- created lavaland folder and moved related ambi there
- created aurora_caelus folder and placed its ambi there
- created misc folder and moved the rest of the files that don't have a
specific category into it

-- instrumental --

- moved traitor folder here
- created lobby_music folder and placed our songs there (title0 not used
anywhere? - server-side modification?)

-- items --

- moved secdeath to hailer
- moved surgery to handling

-- effects --

- moved chemistry into effects
- moved hallucinations into effects
- moved health into effects
- moved magic into effects

-- vehicles --

- moved mecha into vehicles


created mobs folder

-- mobs --

- moved creatures folder into mobs
- moved voice into mobs

renamed creatures to non-humanoids
renamed voice to humanoids

-- non-humanoids--

created cyborg folder
created hiss folder
moved harmalarm.ogg to cyborg

-- humanoids --




-- misc --

moved ghostwhisper to misc
moved insane_low_laugh to misc

I give up trying to document this.

</details>

- [X] ambience
- [x] announcer
- [x] effects
- [X] instrumental
- [x] items
- [x] machines
- [x] misc 
- [X] mobs
- [X] runtime
- [X] vehicles

- [ ] attributions

## Why It's Good For The Game

This folder is so disorganized that it's vomit inducing, will make it
easier to find and add new sounds, providng a minor structure to the
sound folder.

## Changelog
🆑 grungussuss
refactor: the sound folder in the source code has been reorganized,
please report any oddities with sounds playing or not playing
server: lobby music has been repathed to sound/music/lobby_music
/🆑
2024-09-23 22:24:50 -07:00
Jacquerel
828d807464 Canonise passive carp (#85939)
## About The Pull Request

The other day someone posted a story on the tgstation forums about being
spawned as a sentient "passive carp" from slime gold cores and then
biting someone to death which mildly annoyed me because "passive carp"
is a mob which exists purely for a shuttle event, to make them less
dangerous when passing through the area.

And _also_ because once sapient the passive carp was, of course, not
passive at all. If it was a passive carp they wouldn't have had to
appeal a note, because they wouldn't have been able to bite that guy.

There were two solutions for this.
The obvious one is "remove this mob from the gold slime core pool".
The one I chose instead was "give this mob more divergent behaviour".

Now instead of "passive carp" it is called a "false carp", which is a
carp-like creature that is incapable of harming humans (it has the
pacifist trait and does no damage).
It is spawned from the _friendly_ gold core reaction instead of the
hostile one.
It will be chill until someone attacks it or it sees someone attack
another false carp, then all of them will run away from that person.

Additionally I fixed a bug where its teeth reappeared in some animation
states.
And another bug where crab AI just didn't work.

## Why It's Good For The Game

If you see a mob called "passive carp" it should do what it says in the
name.

## Changelog

🆑
balance: Pacifist carp can now be spawned from the friendly gold core
reaction, and no longer appear from the hostile one.
fix: The teeth of toothless carp will not occasionally reappear
fix: Crabs will now run from attackers larger than them and attack
things smaller than them, as intended.
/🆑
2024-08-21 10:34:42 +02:00
Ben10Omintrix
be240083a4 fixes wolf ai getting stuck (#85654)
## About The Pull Request
wolf AI tend to get stuck processing this behavior infinitely 

## Why It's Good For The Game
fixes wolf ai getting stuck sometimes

## Changelog
🆑
fix: wolf AI will no longer get stuck
/🆑
2024-08-14 12:35:29 +02:00
Ghom
d4bd72800d [NO GBP] Lil' fix to fishing hat PR. (#85459)
## About The Pull Request
I didn't remove or change a few copypasted lines. @Jacquerel.

## Why It's Good For The Game
They won't flee otherwise.

## Changelog
N/A
2024-07-31 14:27:37 +00:00
Ghom
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.
/🆑
2024-07-31 14:38:37 +01:00
Ghom
32aa798d36 [NO GBP] Fixes hoverboard being able to be used in space. (#84533)
## About The Pull Request
Apparently I've left out that `isopenspaceturf(A)` returns false on
normal (not multi-z) space turfs because they're of a different path.
This should fix the fact you can use hoverboards as a substitute
jetpacks, which wasn't intended. You can still use them in space if
there's lattice/catwalk underneath, or another kind of turf on the
z-level below however.

## Why It's Good For The Game
Unintended bit from the skateboard buff PR I had made months ago.

## Changelog

🆑
fix: Hoverboards properly dysfunction in space without any kind of
support underneath them.
/🆑
2024-07-07 15:18:08 -04:00
Ben10Omintrix
6da03cfb66 minor raptor tweaks (#83407)
## About The Pull Request
i think i made these a bit too strong, this hopefully balances them out
a bit. they were initially accidentally given alot of armor against
ranged attacks, this is now removed. also ive reduced their base hp by a
bit. im open to other suggestions and feedback

## Why It's Good For The Game
they were stronger than i intended. this keeps their usefulness for
battling tendrils, or ore vents but also prevents using them to cheese
several megafauna

## Changelog
🆑
balance: you can now polymorph into raptors
balance: raptors overall have less health and no longer have armor
against ranged attacks
/🆑
2024-05-24 16:12:49 +01:00
Ben10Omintrix
2f3978773e [no gbp] raptors with the playful trait now play with their owners (#83294)
## About The Pull Request
i forgot to add this behavior to playful raptors, currently this trait
does nothing. raptors will now play with their owners and tease them if
they are nearby

## Why It's Good For The Game
adds more personality to raptors with the playful trait. also this
behavior can now be given to any other tameable mobs

## Changelog
🆑
fix: playful raptors now correctly play with owners
/🆑
2024-05-19 21:29:59 -06:00
Ben10Omintrix
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

![ranch](https://github.com/tgstation/tgstation/assets/138636438/20d9e358-15a5-48e2-aee3-9364ca139e43)
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

![minigame](https://github.com/tgstation/tgstation/assets/138636438/dcc13102-7100-40c8-ae7a-089cd4daf868)
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

![hearts](https://github.com/tgstation/tgstation/assets/138636438/5662c5a7-2df3-4f98-99f4-a11faa17b569)
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

![pokedex](https://github.com/tgstation/tgstation/assets/138636438/82b92c0c-b7db-4a0d-997e-384a69c0ecbe)
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

![trough](https://github.com/tgstation/tgstation/assets/138636438/70723cc7-5743-4ace-9955-4307879e7a83)

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>
2024-05-16 19:54:00 -07:00
Ben10Omintrix
dc202e7642 fixes a few problems in ai targetting (#82998)
## About The Pull Request
fixes #82964 , fixes #82866

## Why It's Good For The Game
fixes several problems with ai targetting. this pr resolves civil war
that was brewing between several mobs. also fixes a major problem where
mobs would only search for targets and not perform any other behaviors.
also fixes a small problem where mobs would constantly stop and start
while chasing targets
## Changelog
🆑
fix: mobs in the same faction will no longer be at odds against one
another
fix: mobs can now perform behaviors alongside searching for targets
fix: mobs will no longer be starting and stopping when chasing targets
/🆑
2024-05-02 20:03:19 -06:00
Ben10Omintrix
f27d66020f fixes brimdemon AI (and some other mobs) (#82831)
## About The Pull Request
i noticed brimdemons werent attacking when i tried investigating the
problem i saw it extends to other mobs

## Why It's Good For The Game
brimdemons, as well as other mobs, will behave normally

## Changelog
🆑
fix: brimdemons (and other mobs) will act normally
/🆑
2024-04-22 21:20:30 -06:00
LemonInTheDark
1e78db8471 Refactors how basic ais do their success/failures (#82643) 2024-04-22 05:23:04 -07:00
Profakos
b20c982404 Converts slimes to basic mobs (#82176)
## About The Pull Request

After months of preparation, and further months of work, I am finally
done. Please bear with me, as this is a massive refactor, but I have
already atomized everything I could. This is now ready for review.

General

- 	The hilbert hotel slimes are now a subtype instead of a varedit.
- The `use_mob_ability` subtree now also accepts non cooldown abilities.
If set_behaviours is set up properly, mobs won't keep continously
triggering it as if it were a 0 second cooldown action. The alternative
would have been turning the slime abilities into cooldown abilities.
- Wrestling off a slime now signs up to the `COMSIG_ATOM_ATTACK_HAND`
signal, instead of being part of attack_hand.
- Adds datum/ai_controller/controller as a fourth, optional argument to
`/datum/ai_behavior/find_hunt_target/valid_dinner()` to make it possible
to access blackboard keys.
- Slimes no longer attack windows if they would accidentally move into
them (when the conditions are met), since random walk behaviour ignores
tiles they can't go in. It was also not worth to keep. Did you know this
was the sole override of `ObjBump()`?
- Examine was made less snowflaky/bespoke. Also added a new element:
`/datum/element/basic_health_examine`, which is a simple bespoke element
that prints out a custom message based on how damaged the basic mob it
is attached to is.
- Slimes only perform knockdown instead of paralysis, as they can attack
more often now, and paralysis is not that fun.
- LAssailant has been removed due being archaic code. To befriend a
slime, you have to spawn a monkey with the slime console, or feed them a
sheet of plasma. Simple grabbing the monkey or stuffing them in
disposals do not work anymore. Slime console spawned monkeys will have a
visible status effect, with pheromones coming off them to make this
clearer.

Actions
- 	Feeding, reproduction and evolution is no longer a verb.
- Slime feeding is no longer an action button. You have to use right
click, or as previously, mousedrop. Slimes can always unbuckle from mobs
they are attached to.

Hunger 

- Instead randomly changing the starvation and max nutrition values
while growing up, evolution costs 200 nutrion. This makes the code more
readable, and behaviour more predictable, while still giving the
intended time between evolving and splitting. As a result, I could also
turn these into defines.
- Added a component that handles doing an effect over time while buckled
to a mob, until the mob dies or you get unbuckled.
- Slimes gained nutrition is no longer randomly multiplied by the damage
config value, but rather gain nutrition equal to twice the damage dealt.
You'll have to eat one monkey to evolve, just as before.
- Slimes do not heal passively. They only heal from eating. It was a
rather miniscule value that did not have much effect.
- Slimes generate electricity from hunger threshold, instead of the
random amount of hunger threshold + 100.

Environment

- Slimes take 15 damage from cold every second, instead of using a
complex formula (that also decreased the damage up to a point?).
- Slimes still heal from burn damage, but this is now set on the damage
coefficient list.
- Slimes instead of getting stunned by the cold, freeze in an ice cube.
BZ instead of setting them unconscious, calls the stasis status effect,
allowing you to safely stash your hungry slimes for later. They also no
longer slow down from the cold, as they are already slowed down by the
damage they get. Conversely they no longer get a speed up from a random
amount of temperature. I could be convinced to readd this either as part
of the basic sensitive component, or a similar one.

AI
- Removed the attacked_stacks system. Slimes will just perform regular
retaliation if you hit them in a harmful manner.
- Slimes now use the pet orders component. They will interrupt their
feeding when given a command by their master.
- Slimes have their own subtrees. I tried to replicate as much as I
could from the old code, dividing ancient code artifacts and intentional
stuff, so there might be some weirdness.
- Slime speech has been almost fully reduced to basic blorbing, as you
can not even understand them anymore, and most of them require the slime
to loop through all of their surroundings.
- Discipline does not have stacks either. Disciplined baby slimes have a
chance to clear their attack and hunt blackboard keys. All slimes will
stop feeding on the target otherwise.
- Since discipline is not a stack, rabidity instead gets removed at a
10% chance per disciplining.
- 	Slimes faces are a bit more randomly picked now.

## Why It's Good For The Game

- We want to convert all simple animals to basic mobs. Old slime code
was also very strange, and had some systems that have been replicated by
components.
- Slimes fully paralyzing you is not fun at all. Knockdown should give
you a fighting chance when a slime would like to eat you.
- Slimes slow down from the heavy damage they get from the cold, so I
don't think they need extra slowdown, nor do they need to speed up from
warmth, as they are already fast.
- Slimes turning into an icecube instead of becoming paralyzed from the
cold is more fun for the slimes, as they can break out for a few
moments. It is also funny.
- Slimes entering proper stasis from BZ is not just a visual indicator
of a slime that is safe to approach, but also keeps the slimes's hunger
value in check, allowing it to not starve while stopped. They can also
look around and blorble, instead of staring at a black screen, if player
controlled.
- The attack_stack and discipline_stack behaviours were rather
overcomplicated, and the xenobio mains I talked with didn't even know it
was a thing, so I argue it needed simplification.
- The bespoke friendship system of slimes was also too complicated.
Slimes slowly gained levels of trust, and at certain levels commands
costed friendship, and other levels, they did not. The binary friend/not
friend system that everything else in the game uses is much more
sensible.
- Using right click for feeding is much more sensible than using an
action, and then picking someone from a dropdown.
- Slime speech was very soulful but not only did it loop through
everything in sight, you couldn't even understand it unless you spoke
slime. Maybe it can be readded later in a different form.
- Slime's passive healing was miniscule, and having them rely on feeding
is more interesting.

also
fixes #81463

## Changelog

🆑
refactor: Slimes are now basic mobs. Please report any strange
behaviours!
balance: Slimes only stun you for two seconds when they shock you, the
rest of the duration is a knockdown.
balance: Slimes are not stunned from the cold, but rather, get frozen in
a freon icecube. BZ also puts them in complete stasis, instead of making
them unconscious. Their speed is likewise unchanged by temperatures.
balance: Slimes do not passively heal, they instead rely on feeding.
fix: Slimes can use the buckling screen alert to unbuckle and stop
feeding, along with clicking on the mob they are riding
/🆑
2024-03-27 16:40:52 -06:00
Bloop
4a989723e1 [NO GBP] Fixes even more AI related CI runtimes (#80262)
## About The Pull Request

Consider this a continuation of
https://github.com/tgstation/tgstation/pull/80202


![firefox_P62DdMv946](https://github.com/tgstation/tgstation/assets/13398309/1a784a27-e5c9-42d1-b160-7eb9251b3997)

~~It seems I missed a few.~~

Edit: Modified per request to handle this more broadly. If a pawn gets
`qdel`'d, the ai controller should be set to off and get removed from
the list of active controllers, and all their actions should be
canceled.

Also adds some qdeleted checks to `finish_action()`, which can still run
after the pawn gets qdeleted as part of the `CancelActions()` chain.

## Why It's Good For The Game

Less spurious CI failures.

## Changelog

Nothing player facing really.
2023-12-17 05:04:28 -05:00
Bloop
18047d74fe Fixes a bunch of AI related CI runtimes (#80202)
## About The Pull Request

<details><summary>A bunch of the numerous CI issues </summary>


![image](https://github.com/tgstation/tgstation/assets/13398309/70b0419e-0ac4-4a59-8acb-02511f8d6987)


![image](https://github.com/tgstation/tgstation/assets/13398309/4303923d-aaea-438f-9eb2-d27b510c7bc6)

</details>

You can view the full list of them here
https://github.com/Skyrat-SS13/Skyrat-tg/actions/runs/7148986054/job/19470671408.

What seems to be happening is, the `ai_controller` `fire()`s, and at
some point the the `pawn` var has become null from qdeletion. Many of
the `SelectBehaviors()` procs make use of that var, and then try to
access it without any safeties whatsoever.

I believe it is mainly happening because of long `do_after()`s and other
procs that sleep.

This PR just adds those safeties. I probably didn't get them all, but
this should fix the ones I have seen in CI. There may be a better
solution to cover all future cases of this but I will wait on feedback
to proceed. See below comments:

---

I don't know if you would rather this to always be checked at the
controller level instead (or in `able_to_plan()` perhaps?) but I could
do that if it's wanted. I wasn't sure if there were certain things that
depended on `SelectBehaviors()` running for cleanup so I opted against
that.

On that note, shouldn't we just be qdeleting the `ai_controller` when
the pawn gets qdeleted? Is that not already happening? And if not, is
there a reason for it? That would probably be the best way to handle
it...

## Why It's Good For The Game

I would like to stop seeing so many random CI failures, wouldn't you?

## Changelog

🆑
fix: fixes some AI runtimes that were caused by the pawn becoming null
/🆑
2023-12-10 18:22:56 -07:00
Ben10Omintrix
ce6f2724cd basic cats and mini kitchen helpers (#79800)
## About The Pull Request
this pr transforms cats into basic pets! cats now have some new
behavior. they can carry fish and hunted mice in their mouths to deliver
it to kittens, and kittens will eat them.


![catmouse](https://github.com/tgstation/tgstation/assets/138636438/8f146be4-c7b2-41d3-8301-734be49b5efc)

![catfish](https://github.com/tgstation/tgstation/assets/138636438/f8df54f2-9183-406d-afbd-f90f415f7f3d)

if a kitten sees you holding food, it will point at you and meow loudly
until u give it the food.
becareful when putting male cats near each other, there is a small
chance they get into a heated argument and meow loudly at each other
until one of them flees.
also added a new small cat house for cats. cats will use these homes if
u build one near them (using 5 wood planks)


![cathouse](https://github.com/tgstation/tgstation/assets/138636438/9515a78c-fdfe-461b-bad2-6b497117c694)

Chefs can craft the cake cat and breadcat. these are useful cats because
they can help the chef around in the kitchen. they will turn stoves and
grills off when food is ready, so they dont burn. and the cake cat will
help the chef decorate his donuts

## Why It's Good For The Game
refactors cats into basic mobs and gives them a deeper ai

## Changelog
🆑
refactor: cats are now basic pets. please report any bugs.
add: the cake cat and bread cat can now help the chef around in the
kitchen
/🆑
2023-11-28 21:51:37 -07:00
Bloop
e1b958c41f Removes final remnants of 'targetted' (#79626)
## About The Pull Request

Finishing what https://github.com/tgstation/tgstation/pull/79513/
started, removes 'targetted' typo from code. Also updates the basic mob
guide with the new updated var names.

## Why It's Good For The Game

Typos bad. Accurate guides good.

## Changelog

🆑
code: gets rid of the rest of the instances of 'targetted' typo from
code
/🆑
2023-11-11 07:46:02 -05:00
LemonInTheDark
9696dd1a1d Targeting Datums Renamed (and global) (#79513)
## About The Pull Request

[Implements the backend required to make targeting datums
global](6901ead12e)

It's inconsistent with the rest of basic ai for these to have a high
degree of state, plus like, such a waste yaknow?

[Implements
GET_TARGETING_STRATEGY](d79c29134d)

Regexes used:
new.*(/datum/targetting_datum[^,(]*)\(*\)* -> GET_TARGETING_STRATEGY($1)

Renamed all instances of targetting to targeting (also targetting datum
-> targeting strategy)

I've used GET_TARGETING_STRATEGY at the source where the keys are
actually used, rather then in the listing. This works out just fine.

## Why It's Good For The Game

Not a misspelled name through the whole codebase, very slightly less
memory load for basically no downside (slight cpu cost maybe but not a
significant one.

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2023-11-09 14:44:24 +00:00
Ben10Omintrix
42c8e1adf9 new wizard ability and basic leaper refactor (#79237)
## About The Pull Request
refactors leapers into basic mobs and adds a new ability for wizards.
for 2 points wizards can buy their own leaper pet. they will get a
contract which lets them pick their pet's name and color

![thefrogs](https://github.com/tgstation/tgstation/assets/138636438/8df9b893-d07d-4e51-a9fa-644830cc7a81)

after they sign the contract they will get a frog statue which is used
to contain the leaper. players can use this statue to release or recall
the leaper into the statue. when its in the statue it will slowly regain
health or even revive from the dead, but if it gets gibbed then the
statue will be useless.

also adds a new ai behavior for leapers which lets them go swim in water
(and splash around) for a period of time. i gave this behavior to frogs
and crabs too

when riding the leaper, the players will get access to all its
abilities, it now has new abilities, it can create frog minions that
suicide bomb the enemies and it can also create a shower of poisonous
structures.


https://github.com/tgstation/tgstation/assets/138636438/931aa7b4-09f0-493f-bdb6-f3bdd0915b22

also when riding the leaper, players can point at walls near it so it
will destroy it. alternatively players can give commands to their
leapers to use abilities and to follow them if they are not riding it.
wizards cant be force dismounted from their frogs, and only wizards can
ride the frogs.

this also removes leapers from cytology as they now are much more
dangerous and have a new home


## Why It's Good For The Game
refactors leapers into basic mobs, and gives more gameplay opportunities
for wizards
## Changelog
🆑
refactor: leapers have been refactored into basic mobs please report any
bugs
add: wizards can now summon a leaper pet
removal: removes leapers from cytology
/🆑
2023-11-06 00:05:29 +00:00
Profakos
bc18450afe Converts traders to basic mobs (#79187)
## About The Pull Request

This PR converts the two trader mobs into basic mobs, these being the
basic debug trader that buys ectoplasm and sells ghost burgers, and Mr
Bones, who buys empty milk cartons and bones, and sells bone relate
paraphernalia.

Traders now use dynamic appearance generation. The old sprites still
exist as hallucinations, and as shop signs.

Trader UI is now summoned via `COMSIG_ATOM_ATTACK_HAND`, which properly
cancels the attack chain, so there is no longer need to put it on
Interact.

I kept most of the original behaviour, but moved them off into a
component. I have also cached all the images generated for the radials,
I hope I have not overengineered it. I have also created a new datum,
which stores the trader's wares, needs, and speech patterns.

Admins can put the component along with the trader data on any living
mobs with an AI controller, turning them into traders. Keep in mind that
most AI has random idle movement, meaning they have a chance to walk
off, closing your trader radial.


![image](https://github.com/tgstation/tgstation/assets/2676196/a2b216e9-f9bf-46e1-83fa-3a41c8447176)

The trader AI consists of the following, first, when a trader sees
someone, they will deploy their shop, if one does not already exists.
The shop consists of a chair, and a holographic sign. If you attack
them, they will chase you with their weapons, and then return to their
chair when victorious. If the chair is somehow destroyed, they will
create a new shop when they see a new potential customer.


![image](https://github.com/tgstation/tgstation/assets/2676196/ad5fcd5a-996c-490f-938b-6bc11c91c4ee)

Mr Bones uses a variant of the AI, where they will run at you, and
deploy their shop when they reach you. I call this the jumpscare
variant. Below you can see me getting actually jumpscared because Mr
Bones has stepped on a yelling frog when I opened the maintenance door.


![image](https://github.com/tgstation/tgstation/assets/2676196/f47a5baa-e32d-4454-97f9-d90d027003d2)

I have also made an element that toggles an ai controlled combat mode
when it gains a target, and when it loses it. I am using it to make
Traders unable to trade while they are trying to kill a robber. To aid
this, I a have made
`/datum/ai_controller/proc/sig_remove_from_blackboard` send the
`COMSIG_AI_BLACKBOARD_KEY_CLEARED` signal, in case the trader kills a
mob that deletes itself on death. This means I could remove a signup
`/datum/component/appearance_on_aggro` was doing towards Qdeleting.

Below you can see Mr Bones shooting me with candy corn.

![image](https://github.com/tgstation/tgstation/assets/2676196/489e1072-e15a-412c-a8eb-9a3f0cca7bf6)


![image](https://github.com/tgstation/tgstation/assets/2676196/8f74b50f-ea35-467c-bb07-2ef38f84c453)

Traders actually only shoot you until you are conscious, so I survived
here in crit. Most mobs don't have crit state, so they just die, so I am
sticking by this voice line.

Thank you @CoiledLamb  for help with the sale sign!

## Why It's Good For The Game

Two more mobs off the list. The AI and Componentized behaviours allows
us to set up new kind of traders.

## Changelog

🆑
refactor: Traders are basic mobs now. Please alert us of any strange
behaviours!
code: If there is only one option, radial lists will autopick it. This
behaviour can be turned off via a new argument.
/🆑
2023-10-31 01:49:56 +00:00
lizardqueenlexi
b65f729901 Nanotrasen basic mobs. (#78917)
## About The Pull Request

First and foremost, converts all Nanotrasen simplemobs into basic mobs.

To avoid messy and redundant code, or god forbid, making Nanotrasen mobs
a subtype of Syndicate ones, I've made Syndicate, Russian, and
Nanotrasen mobs all share a unified "Trooper" parent. This should have
no effect on their behaviors, but makes things much easier to extend
further in the future.

While most of this PR is pretty cut-and-dry, I've done a couple notable
things. For one, all types of ranged trooper will now avoid friendly
fire, instead of shooting their friends in the back. Even the Russians
have trigger discipline.

I've also created a new AI subtree that allows mobs to call for
reinforcements. I've hopefully made this easy to extend, but the
existing version works as follows:

- A mob with this subtree that gains a target that is also a mob will
call out to all mobs within 15 tiles.
- If they share a faction, mobs receiving the call will have the target
added to their retaliate list, and have a new key set targeting the
calling mob.
- If they have the correct subtree in their AI controller, called-to
mobs will then run over to help out.

Sadly, this behavior is currently used only by a few completely unused
Nanotrasen mobs, so in practice it will not yet be seen.

Finally, I've fixed a minor issue where melee Russian mobs punch people
to death despite holding a knife. They now use the proper effects for
stabbing instead of punching.
## Why It's Good For The Game

Removes 8 more simple animals from the list.

As said above, making all "trooper" type mobs share a common parent cuts
down on code reuse, ensures consistency of behavior, and makes it much
easier to add new troopers not affiliated with these groups. I expect
that I'll make pirates share this same parent next.

The new "reinforcements" behavior, though extremely powerful, opens up
exciting new opportunities in the future. There aren't many existing
behaviors that allow basic mobs to work _together_ in interesting ways,
and I think adding some enemy teamwork could be fun.
## Changelog
🆑
refactor: Hostile Nanotrasen mobs now use the basic mob framework. This
should make them a little smarter and more dangerous. Please report any
bugs.
fix: Russian mobs will now actually use those knives they're holding.
/🆑
2023-10-24 23:20:27 +00:00
lizardqueenlexi
0c17553a96 Basic Constructs: Artificer (#79015)
## About The Pull Request

Really getting into the meat of the constructs now. Artificers have
become basic mobs.

On the whole, this was a pretty rote conversion, with no significant
gameplay changes other than the switch to using healing hands rather
than a unique heal ability. The player experience as an artificer is
more or less identical.

The _interesting_ part comes with the AI for the seldom-used "hostile"
variant. Hostile artificers, being squishy and laughably weak, are now a
dedicated "medic" role for constructs. They will perform triage, always
seeking the most wounded construct (or shade!) to give healing to. They
will not attack at all, but they _will_ flee with great speed if
attacked and not busy healing. If they are healing another construct,
they will remain even if they are beaten to death.

I've added some more AI functionality that may come in handy in the
future, and done some refactoring to keep things from getting out of
hand:
- A planning subtree for finding targets that will always select the
most heavily wounded living target that the mob can see (or rather, the
one with the least health). Useful again for medical triage, or for
making a particularly cruel mob that always attacks whoever is easiest
to kill. I plan to use this for NPC wraith constructs when I convert
them.
- Targeting datums can now check a blackboard key to see if they should
only target wounded mobs. This is particularly useful for "medic" type
mobs such as this one.
- I've refactored the "minimum stat" behavior of targeting datums to be
stored in a blackboard key. This removes the need to have unique
subtypes for each different minimum stat we might want. Which... for the
most part, weren't even used, leading to proliferation of several
completely identical targeting datums in a bunch of different files.
Hopefully this change will make things cleaner.

In addition, this PR fixes a pair of bugs from #78807 that I didn't
catch:
- Healing constructs can now actually heal shades. Turns out I forgot to
add the correct biotype.
- Healing hands, when set to print the target's remaining health, no
longer does so as a visible message.

The one thing I didn't do that I kind of wanted to is make NPC
artificers heal themselves when wounded and not busy doing something
else, but it ended up being kind of annoying to make a mob willingly
target itself. NPC artificers never had this behavior before, so I
consider it okay, but maybe I'll circle back to it later.
## Why It's Good For The Game

Another basic conversion, another 5 items off the checklist. Very little
should change in-game, though I think the new NPC AI could make for
interesting challenges in ruins or bitrunning or something.
## Changelog
🆑
refactor: Artificer constructs have been converted to the basic mob
framework. This should change very little about them, but please report
any bugs. NPC artificers are now smarter, and will focus on healing
nearby wounded constructs - if you see them, take them out first!
/🆑
2023-10-19 23:03:27 -06:00
Jacquerel
41699c260e Goats will randomly attack you (#78930)
## About The Pull Request

We accidentally lost this behaviour when we converted goats to basic
mobs.
_Formerly_ (and now again) goats had a 0.5% chance per second to simply
decide to attack you for no reason at all.
While attacking you they also have a 10% chance per second to get bored
of doing that and stop.

Additionally, we were outputting a fluff message every time you attacked
a goat which would spam chat if you were trying to fist fight each
other. I added a 20 second cooldown onto it.

As is often the case, implementing this led me down a bit of a rabbit
hole.
We were previously bypassing faction checks via a mixture of flags on AI
behaviours and blackboard keys.
I have moved this _entirely_ to the blackboard now, rather than making
targetting subtypes just to skip faction checks.

This entails having one blackboard key which is "by default do we care
about factions?" and another which is "are we currently ignoring
factions for some other reason?"
Retaliatory AI will generally enable the second flag, so you can get
pissed off at someone you would usually not mind hanging out with if
they start something with you. Certain mobs which want to hunt other
mobs but not be hunted in return just ignore factions entirely all the
time and use the former.

The upshot of this is that the default behaviour for expected default
retaliatory AI shouldn't require you to set any specific kind of
targetting datum and will Just Work.

In a similar vein because I was touching largely the same mobs I made
the "flee when injured" component apply its "don't flee because not
injured" flag instantly upon application rather than needing to manually
set it in the blackboard definition, so that also Just Works.

## Changelog

🆑
fix: Pete's anger management training has worn off, and he will once
again sometimes pick a fight with you for absolutely no reason.
qol: Attacking a goat will not spam messages so frequently.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-10-13 00:27:21 -06:00
Jacquerel
504e6acfa3 Basic Mob Gorillas (#78918)
## About The Pull Request

Now we can make basic mobs with hands easily so I did, they don't
actually use their hands for anything with AI.
In the future we can come back and share the monkey AI where they pick
up items to hit people with, but frankly few weapons are more deadly
than a gorilla's fists.

IIRC I didn't really change their behaviour much, this is mostly just a
straight conversion. Main difference is that they will prioritise eating
nearby bananas and fruit salads over punching people.

When I make these conversions nowadays I need to decide between "does
this attack at the speed that it did as an NPC mob or the speed it did
as a player?"
I am arbitrarily deciding that gorillas are usually not players and
electing for the former, but tell me if you disagree.

I also made "show basic inhand sprites" into a component shared by
Gorillas, Drones, and Dextrous Guardians (all also now available to
become basic, once I get around to it),

And I added an AI behaviour to run a basic emote. This is similar but
different to "random speech", which kind of sucks and needs rewriting
anyway.
Gorillas don't speak, only ooga.

## Why It's Good For The Game

https://www.youtube.com/watch?v=npuuTBlEb1U

## Changelog

🆑
refactor: Gorillas now use the basic mob framework. Please report any
unusual side effects.
/🆑
2023-10-11 16:58:29 -06:00
Ben10Omintrix
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.

![mookvillage](https://github.com/tgstation/tgstation/assets/138636438/ad1c5d63-c168-475a-a85d-b727dff43e7b)

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

![tribalchief](https://github.com/tgstation/tgstation/assets/138636438/cc0e0a11-9bf0-4322-b3ae-c7be43092ee8)

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.

![mookstand](https://github.com/tgstation/tgstation/assets/138636438/c7adbf4e-6322-4347-acfc-4e8d45aff798)

players can use this stand to withdraw any ore they like

![mookui](https://github.com/tgstation/tgstation/assets/138636438/a1318be8-50f7-49b2-827c-97bafdb2488a)

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).

![mookbard](https://github.com/tgstation/tgstation/assets/138636438/5123e492-6657-4755-9dc7-ab94d4beb554)

he is still a warrior at heart tho so he will be smashing his guitar
over ashwalker skull

![mookshmash](https://github.com/tgstation/tgstation/assets/138636438/bf211bf0-e963-4dbb-b004-e653e06e3974)




## Changelog
🆑
refactor: mooks are now basic mobs. please report any bugs
feature: added mook village to lavaland ruins!
/🆑
2023-10-10 22:41:32 -06:00
Jacquerel
ed907096e3 Fixes fleeing behaviour (#78821)
## About The Pull Request

This PR does three things:
- Fixes fleeing, I broke it in a recent PR so mobs would walk to a
location then sort of stand there doing nothing. This is due to using
`>=` instead of `>`.
- Makes lobstrosities stop running and charge at you more responsively
(when they detect they can charge).
- Inverts the `BB_BASIC_MOB_FLEEING` blackboard key to
`BB_BASIC_MOB_STOP_FLEEING` so that the default behaviour is "to perform
the behaviour that you put on the mob" instead of to not do that.

## Why It's Good For The Game

Makes commonly used behaviour work properly.
Removes footgun we hand to ai developers.

## Changelog

🆑
fix: Cowardly mobs will consistently run away from you instead of
getting tired and just sort of standing there after an initial burst of
movement.
/🆑
2023-10-08 23:27:31 -06:00
Ben10Omintrix
032419f30f ice demon basic mobs (#78539)
## About The Pull Request
ice demons are now basic mobs. they still have their behavior where they
can teleport around the player, run away from him and shoot him. they
now also have a new ability they will only use when they are on their
last legs, they will spawn weak and slow afterimage clones of
theirselves to attack the player. damaging these clones will also damage
the original ice demons. ice demons can also now be very easily
countered as they are very afraid of fires. they will run away from you
if they see u holding a lit torch/flare/welding tool and while running
away they will freeze the floors around them to try to slip u to stop u
from chasing them. ice demons now also get a new unique trophy! this
trophy will summon 2 friendly spirits that will help you kill ur target,
but these spirits will dissappear after a very short while.


https://github.com/tgstation/tgstation/assets/138636438/6a48fb15-f447-441a-91c6-48ca120dc22c



## Why It's Good For The Game
## Changelog
🆑
refactor: ice demons have been refactored into basic mbos. please report
any bugs
add: ice demons now have a unique trophy
/🆑
2023-10-08 03:04:35 +01:00
san7890
82904b766c Refactors Sloths into Basic Mobs (#78752)
## About The Pull Request

Hey there,

This just refactors sloths to the basic mob framework. Nothing new
should be added beyond them seeming a bit more sluggish and being a bit
smarter about the fights they pick/running away.
## Why It's Good For The Game

Three more subtypes off the list, we are now sub-200 simple animals left
to refactor. If people want to play catch with their sloth it should be
much easier to fit that in now.
## Changelog
🆑
refactor: Sloths are now basic mobs, however their overall sluggish
behavior shouldn't have changed much- let us know if anything is broken.
/🆑
2023-10-07 04:41:00 +01:00
Jacquerel
5e2c8459dd Basic Heretic Mobs: The Rest of Them (#78757)
## About The Pull Request

Raw Prophet and Armsy had fun stuff going on and merited their own PRs,
but the rest of these guys are basically just statblocks with abilities
so I converted them all at once.

Rust Walkers are present in a ruin and so have new AI which will
actually use their abilities. They rust the area around where they spawn
and throw their rust blast at people.

I also gave Flesh Stalkers AI even though nobody has put them in a map
because I thought it would be cool. This adds an AI behaviour where if
they're not doing anything else they will turn into an animal and chill
until someone's been around them for a bit, before attacking. They will
also use EMP almost immediately upon performing their ambush, which
kills the lights in that room. Spooky!
To support this I needed to make some changes to let AI continue
processing and targetting correctly while shapeshifted.

I didn't give Maids or Ash Spirits AI because they'd be really boring.

Other changes:
I made the maid in the mirror flicker when it takes examine damage
because the `visible_message` says it does but despite having the power,
nobody made it actually flicker...

## Why It's Good For The Game

No more simple mob heretic summons.

## Changelog

🆑
refactor: Rust Walkers, Ash Spirits, Flesh Stalkers, and The Maid in the
Mirror now use the basic mob framework. Please report any unusual
behaviour.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-10-06 16:06:22 -06:00
Jacquerel
f861532d24 Basic Legion & Hivelord (#78624) 2023-09-27 18:41:07 -04:00
Jacquerel
517d33e6f0 Basic blob mobs (#78520)
## About The Pull Request

I remembered today that blob code is ass, especially blob spores.
There's still a lot to improve but I cleaned up _some_ of it by
converting these mobs.
Now they use a newer framework and more signal handling as compared to
circular references.

I _expect_ the behaviour here to largely be the same as it was or
similar. I haven't added anything fancy or new.

This is a reasonably big PR but at least all of the files are small?
Everything here touched every other thing enough that it didnt make
sense to split up sorry.

Other things I did in code:
- Experimented with replacing the `mob/blob` subtype with a component.
Don't know if this is genius or stupid.
- AI subtree which just walks somewhere. We've used this behaviour a lot
but never given it its own subtree.
- Blob Spores and Zombies are two different mobs now instead of being
one mob which just changes every single one of its properties.
- Made a few living defence procs call super, because the only thing
super does was send a signal and we weren't doing that for no reason.
Also added a couple extra signals for intercepts we did not have.

## Changelog

🆑
fix: Blob spores will respond to rallies more reliably (it won't runtime
every time they try and pathfind).
fix: Blobbernaut pain animation overlays should align with the direction
the mob is facing instead of always facing South
refactor: Blob spores, zombies, and blobbernauts now all use the basic
mob framework. They should work the same, but please report any issues.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
2023-09-26 15:28:26 -06:00
tattle
2a73427ee0 Add new sounds for animals, basic animals make sound on audible emote (#78499)
## About The Pull Why It's Good For The Game Request
More sound immersion. Also just makes sense for sounds to play when an
animal is both saying something and using an audible emote.

Crab click: https://freesound.org/people/JarredGibb/sounds/263882/
Chitter: https://freesound.org/people/ForSoundDesign/sounds/687302/
Chicks: https://pixabay.com/sound-effects/chicks-very-young-56075/
Chicken: https://freesound.org/people/Breviceps/sounds/456803/


https://github.com/tgstation/tgstation/assets/66640614/29cd4e8e-b9c3-4f71-be0d-8c3f3de40eba


https://github.com/tgstation/tgstation/assets/66640614/9a24c1a8-0707-43ad-adec-b7ce1eddb5f6


https://github.com/tgstation/tgstation/assets/66640614/21cc37ae-c49c-461a-83c5-271f6d577fc6

## Changelog
🆑 tattle
qol: Basic animals now make sounds for audible emotes
sound: Added new sound effects for chicks, chickens, crabs, and insects
/🆑

Co-authored-by: tattle <article.disaster@gmail.com>
2023-09-25 15:55:16 -06:00
jimmyl
cf5360acd8 [no gbp] fixes blackboard speech error (#78551)
## About The Pull Request

i changed initial to list()

## Why It's Good For The Game


![image](https://github.com/tgstation/tgstation/assets/70376633/4c289c2e-8974-4c4e-9d91-f2502134165d)

## Changelog
i dont think runtimes are playerfacing

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2023-09-25 09:23:47 -04:00
jimmyl
5db7992b09 basicmob clowns (#78448)
## About The Pull Request

this is a mostly 1 to 1 port of simpleanimal clowns to basicmob clowns
this means they have 1 more brain cell
and they waddle



https://github.com/tgstation/tgstation/assets/70376633/0c5f01c7-fea2-4d8c-9fc1-764c1557e1b8



## Why It's Good For The Game


![image](https://github.com/tgstation/tgstation/assets/70376633/f92c85ea-33f2-4cf3-858f-103c0958ff97)

## Changelog
🆑
refactor: clowns are basicmobs now
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-09-23 14:46:11 +00:00
Jacquerel
b2ecd81be4 Basic Mob Brimdemon (#78424)
## About The Pull Request

Fixes #71330

The brimdemon was basically already perfect (well, it has a novel means
of attacking) so I didn't get too fancy with this one, it's _largely_
just a straightforward conversion.
Following this change it's a little slower to back off, but better at
lining up with people in order to blast them. Additionally, its beam is
now a mob ability so you can give it to other mobs if you so desire.

Because I can't help doing a _little_ tinkering, Brimdemons now explode
2.5 seconds after they die, after a brief warning animation.

## Why It's Good For The Game

Simple mobs must die

## Changelog

🆑
add: Brimdemon corpses release an explosion shortly after death, just to
keep you on your toes.
refactor: Brimdemons now use the basic mob framework which (should)
improve their pathfinding somewhat. Please bug report any unusual
behaviour.
admin: The brimdemon's beam ability can be given to any mob, for your
Binding of Isaac event
/🆑
2023-09-22 19:12:43 -06:00
Jacquerel
257923e090 Synchronise AI and Player basic mob melee behaviours (#78337)
## About The Pull Request

I like for things that mobs do to be consistent regardless of whether
they are controlled by a player or by the AI.
One big offender of this is the melee behaviour cooldown. Basic mobs
piloted by AI have arbitrary melee attack cooldowns which are not
reflected when they are controlled by players who can generally attack
much faster (but in _two_ instances, slower).
To remedy this I added `melee_attack_cooldown` as a var on
`living/basic` (sinful) and the ai now uses NextMove to not click too
often, meaning that players can only bite things as often as the AI can
and also that if you VV the cooldown it can speed the AI up (or slow it
down) as well as a player.
This also gets rid of a lot of subtypes of that datum, as we mostly made
them to change the cooldown.

I also hunted down a few places where there was behaviour placed inside
an AI behaviour which wasn't easily replicable by a player piloting the
same mob, preferably a player should be able to do everything that the
AI can.
Fixing this was largely a simple case of moving code from
`ai_behaviour/melee_attack/perform` to `basic/mob_subtype/melee_attack`
and also adding an element for one thing shared by three different mobs.

Strictly speaking I didn't need the element that much because a player
is perfectly capable of clicking on something they attack to drag it,
but it's nice for it to be automatic?

## Why It's Good For The Game

If you see a mob do something then you should also be able to do it.
Mobs shouldn't have significantly different capabilities when controlled
by a player (aside from usually being smarter).

## Changelog

🆑
balance: Player-controlled basic mobs attack as fast as those mobs can
when controlled by the AI
balance: Player-controlled Faithless can paralyse people they attack,
like the AI does
balance: Player-controlled Star Gazers (if an admin felt like making
one) apply the star mark on attack and deal damage to everything around
them, like the AI does
/🆑
2023-09-18 18:10:05 +02:00
Ben10Omintrix
e44fea3964 fix basic mobs retaliate target not filtering targets (#78359)
## About The Pull Request
basic mobs retaliate targeting would try to target players that they
cant attack anymore,

## Why It's Good For The Game
fixes basic mobs retaliate targeting would try to target players that
they cant attack anymore,

## Changelog
🆑
fix: basic mobs retaliate targetting now selects targets they can attack
/🆑
2023-09-17 18:39:08 -06:00
Jacquerel
e11b69f2e6 Removes watcher overwatch ability (#78292)
## About The Pull Request

Removes the "overwatch" ability from Watchers, allowing them to use
their "look away" ability at any health threshold instead (but only if
it's been fighting you for at least 5 seconds or if you attack it).
Drops the cooldown on the gaze a little bit to compensate.

Also fixes some weird behaviour I noticed while testing:
- It won't cancel its own ability by trying to back away from you.
- It will look at you when it shoots you.

## Why It's Good For The Game

I was cooking too hard with this one.
- Two abilities overcomplicates what are supposed to be a pretty simple
mob you fight in packs.
- It wasn't obvious what you were actually supposed to do when
targetted.
- Doing it wrong could be very punishing in groups.
- Doing it _right_ was still kind of unexciting.

This is an ability to give to an elite, not a random trash mob.

## Changelog

🆑
balance: Watchers will no longer put you at gunpoint.
/🆑
2023-09-15 16:28:07 +02:00
Jacquerel
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**

![image](https://github.com/tgstation/tgstation/assets/7483112/9e4b0115-65dd-4df7-b62a-21c7be8549bf)

![image](https://github.com/tgstation/tgstation/assets/7483112/59162e68-7d73-4659-9531-5078ff751228)

- 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.
/🆑
2023-08-16 13:04:41 -06:00
Jacquerel
29c3d38c7e Give basic mob ranged attacks a cooldown (#77575)
## About The Pull Request

Atomised change from a different PR I am working on.
This changes the basic mob ranged attacks element into a component so
that it can also track an attack cooldown on the mob, preventing it from
firing until the cooldown is complete.
This was possible with simple mobs but wasn't kept going forwards when
converting things to basic ones.

## Why It's Good For The Game

Ideally player and mob behaviour should be unified as much as is
realistically possible. Currently mobs which are designed to fire a
powerful weapon slowly can blast as rapidly as the click cooldown if
placed under control of a player, which is not ideal.
This isn't currently aligned for melee attacks either but I will look at
that later.

## Changelog

🆑
fix: Player-controlled basic mobs with ranged attacks can now only fire
about as fast as AI-controlled ones.
/🆑
2023-08-13 14:39:47 -06:00
san7890
8e08a38cfb Unit Tests for AI Planning Subtrees not having required element/component (#77539)
## About The Pull Request

Hey there,

I've personally fallen for this stupid thing twice (in #77503 and #75627
(d3575161ca)), so I decided to spend a few
hours to crack out a unit test to ensure that I (and no one else) falls
for this stupid thing again.

Let me know if there's a smarter way to code something like this, but I
couldn't figure out a better way to accomodate the current framework and
be as agnostic to certain oddities as possible.
## Why It's Good For The Game
Catches stuff like this:

```txt
[2023-08-11 21:10:04.019]     FAILURE #1: The mob Garden Gnome does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #2: The mob the morph does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #3: The mob the guard spiderling (946) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #4: The mob the ambush spiderling (255) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #5: The mob the scout spiderling (375) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #6: The mob the flesh spiderling (337) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #7: The mob the hunter spiderling (869) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #8: The mob the nurse spiderling (629) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #9: The mob the tangle spiderling (19) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #10: The mob the broodmother spiderling (855) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #11: The mob the viper spiderling (519) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #12: The mob the tarantula spiderling (963) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
 -     FAILURE #13: The mob the spiderling (100) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45
```

(ignore the part about gnomes and morphs, this was an earlier version of
the unit test. everything else was relevant and is fixed)
## Changelog
🆑
fix: Growing spiders will now retaliate against you like they were
always meant to.
/🆑
2023-08-12 23:08:43 +01:00
Jacquerel
ddfdc70d73 Basic Lobstrosity (#77253)
## About The Pull Request

I'm slowly chipping away at mining mobs. These ones also got some new
sprites because the old ones were a bit weird except when facing South.

![image](https://github.com/tgstation/tgstation/assets/7483112/015b8819-bab8-471a-86ae-70b1597ae327)
Arctic Lobstrosities are now hairy to give them a little more visual
distinction from Lavaland ones.

In terms of behaviour, they're now a little faster and can charge you
from further away.
They will _only_ attack players who are incapacitated in some way
(primarily from being hit by their charge, but could be from a Goliath
or something too) and will otherwise keep their distance until they can
charge again. They move slower for a short duration after charging
though, so you have time to slap them a bit.

If a Lobstrosity downs you then it will try to snip off one of your
arms, then retreat in order to eat it.
Obviously nobody likes losing an arm, but this does give you an
opportunity to get away while it is distracted? Funnily enough the way
our health system works means that sometimes losing that arm actually
takes you out of soft crit so you can stumble back to the station for a
replacement (or try to wrestle yours back?)

All of these things are achievable also by a player if you make one
sapient, they will pull arms off mobs they attack which are in crit and
can eat arms if they see them lying around if they want.
I added an element to let you dismember people with your bare hands,
maybe someone evil can use it to add a beheading attack some day.

Here's a video of their new behaviours:
https://www.youtube.com/watch?v=9eKxsH7hD7Q

## Why It's Good For The Game

Gives mobs more character.
Reduces our list of frozen simple mobs.
Replaces some ugly side sprites.
Medbay enrichment?

## Changelog

🆑
refactor: Lobstrosities are now basic mobs and have different AI
behaviour. Please report anything which seems like it shouldn't be
happening.
add: Lobstrosities will now only opportunistically attack things they
have knocked over with their charge, and are otherwise timid.
add: Lobstrosities are hungry for fingers and will steal one of your
arms if they defeat you in combat, although this gives you time to crawl
away.
sprite: New sprites for Lobstrosities.
/🆑
2023-08-01 17:26:32 -06:00
zeckle/licks-the-crystal
d0dffe7ca6 Fixes a large amount of spelling and grammatical errors in the Exploration Drones section. Also fixes an angry pine tree quip. (#77095)
## About The Pull Request
Title

## Why It's Good For The Game
It bothered me

## Changelog

🆑 Licks-The-Crystal
spellcheck: Corrected a large quantity of spelling, grammatical and
phrasing errors with Exploration Drone content.
/🆑

---------

Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2023-07-31 12:18:45 +00:00
Ben10Omintrix
cc64ed0ca4 convert the bear to a basic mobster (#77143)
## About The Pull Request
the bear now a basic and he have a new behaviers. the bear now can go to
climbed the trees! he will looked for a tree to climbing and if he
founded a tree he will go climb him. also the bear now love honey he
will look for a bee hives to stole the honey from it so botanists must
be care. the bear will drag the honey behind him so u must chased him to
get the honey back again

## Why It's Good For The Game
the bear is a basic now so he and have more behavier for more depth
mechanis

## Changelog
🆑
refactor: the bear is a basic now. please report any bugs
add: the bear will climb trees and search honey
/🆑
2023-07-28 19:34:39 -06:00
Ghom
d9677e39be Converting crabs to basic mobs (#77109)
## About The Pull Request
Exactly what it reads on the tin. As a bonus, they will flee from
attacking targets, hunt tiny critters (crabs are now small-sized) and
actually move sideways (it's an element that covers both client and
basic movement)


## Why It's Good For The Game
Another simple to basic mob refactor.

## Changelog

🆑
refactor: Crabs refactored into basic mobs. They now hunt tiny critters
and flee from attackers.
fix: Fixed crabs not crab-walking.
/🆑
2023-07-26 17:52:18 -06:00
scriptis
f46c2ff75c add pony (#76955) 2023-07-21 04:08:06 -04:00
Ben10Omintrix
b06e940341 makes the pinguin a basic animal (#76790)
## About The Pull Request
the penguin now is a basic animal and also now he can go and layed
penguin eggs to make penguin babys also the baby have a new behavier he
will now go and looked for his mom and when he found his mom he will
went to her and be happy when he close to his mom or if he mom is died
he will went to her body and he will be sad and also i putted this
behavier in the baby chicken. also now the pinguen mom will go and
looked for her eggs and when she find a egg she will putted it in the
middile of her legs and walked with it
![penguin with a
eggs](https://github.com/tgstation/tgstation/assets/138636438/e5f3d741-edc0-438f-b1b3-9e4ed2280532)


## Why It's Good For The Game
the pinguen now is a advance ai
## Changelog
the pinguen now have a more advance    

🆑
refactor: the penguin is a basic animal
add: the penguin now layed eggs
add: the penguin and the chicken babys will go look for adult penguin or
chicken and be happy when he is near the adult
/🆑
2023-07-18 13:03:00 -06:00