🆑 CabinetOnFire
fix: Fixes bug where sig_remove_from_blackboard would try to numerically
index a regular list
/🆑
fixes a runtime thats been spamming every round recently.
The cause of the bug seems to stem from that in
sig_remove_from_blackboard we try to recursively get all the contents of
the blackboard to check if the datum that was deleted is in there.
The issue is, we assume any nested list is associative. and try to get
its associated value. In most cases this is fine (If you index a normal
list with a non-number it just silently returns null)
however, if its a list of numbers, you end up trying to index the list
with random numbers, which in most cases results in a big fat runtime.
## About The Pull Request
This Pull Request adds a new logging system that uses a timeline to
track and visualize important events for specific datums.
This is done via a new window in which you can select a datum for
tracking, which adds it to the timeline. If this datum implements the
EVLOGGING macros, it can track important events onto this timeline. As
an example, we can log whenever an AI is deciding to make a new path, if
it decides to generate a new decisionmaking plan, it finishes an action,
or it decides to target someone/something.
We can select these events to see more information, and optionally get a
snapshot of important variables at the time this event was logged (like
the blackboard and current plan for AI controllers).
You can also filter out specific events / track info, which is done via
categories. Each event / piece of track info is given a category and if
you disable a category all events / track info in that category is
hidden. This lets you filter out things you might not care about.
<img width="2346" height="1209" alt="image"
src="https://github.com/user-attachments/assets/0763077c-e349-4c7c-b017-23d29e1d089b"
/>
_whoever thinks we didnt need advanced cleanbot logging is a noob_
In the video below I showcase how this works;
https://file.house/7nsOiqdvmSTxlsk3fs-e8g==.mp4
A cleanbot is roaming the halls, I turn on the event logger, click the
"pick target" button and click on the datum I'd like to track (the
cleanbot). This results in the cleanbot now tracking its events. I spawn
some dirt and the cleanbot decides to clean it, and I go through the
events; You can see theres different events being listed, such as when
the cleanbot starts targetting the dirt, when it cleans plan, when it
makes it JPS path and every time it moves over it.
The macros I've currently implemented are as follows:
**EVLOG_TEXT(DATUM, CATEGORY, INFO)**
Only adds text to the event logger window, no world-visuals
EVLOG_LOCATION(DATUM, CATEGORY, INFO, TURF)
Adds text to the event logger and adds an image to where that turf is.
EVLOG_TURFS(DATUM, CATEGORY, INFO, TURFS)
Adds text to the event logger and adds an image to each turf in the
TURFS list
EVLOG_LINES(DATUM, CATEGORY, INFO, TURF_A, TURF_B)
Adds text to the event logger and adds a line from turf_a to turf_B
EVLOG_PATH(DATUM, CATEGORY, INFO, TURFS)
Adds text to the event logger and visualizes a path from A to B (same
way as the pathfinding debugger, of which I moved the visualization
before to SSPathfinder)
In terms of performance, the logger is a singleton, and events are ONLY
logged if
1. The logger is running
2. The datum has the DF_EVLOGGING flag.
This means most of the time, logging an event is a single var lookup
(Since the runner is off by default). The DF_EVLOGGING flag is off by
default as well and has to be enabled by the event logger, or set
temporarily by a dev in code.
This system can easily be extended with more event types / visualization
types as well. (I'm thinking of datumizing the ones I have now)
The TGUI is still a bit of a mess, I would love some pointers because
I'm not really good at react so I just kind of hit it with a hammer
until it did what I wanted 😎
Also, all of this is based on VisLogging from Unreal Engine, so it will
have some likeness https://unreal-garden.com/tutorials/visual-logger/
## Why It's Good For The Game
This system allows us to debug more complex systems (like basic AI) in
an understandable and clear way. While the implementation cases are not
super common right now, extending this system could make debugging these
systems much more comprehensible, and hopefully lets more developers
help us with improving these systems. (plus, we LOVE timelines)
## Changelog
🆑 CabinetOnFire
refactor: Implements "Event Logging" an improved way for programmers to
debug specific datums.
/🆑
---------
Co-authored-by: Lucy <lucy@absolucy.moe>
## About The Pull Request
Fix 1: argument 4 on a new mimic is delete parent, not not having googly
eyes, so the issue there is clear
fix 2: `remove_thing_from_blackboard_key()` had no handling for the list
not yet being up, so it crashes thinking it's been called where
`clear_blackboard_key()` should've been.
fix 3: same as 1 but on wand of nothing, replaced copypaste with just
calling the function
## Why It's Good For The Game
fixes#95981
fixes an animated wand of animation animating a wand of animation
runtiming
Also the same problem with the wand of nothing
## Changelog
🆑
fix: animating a wand of animation works, and that animated wand of
animation animating a wand of animation does not runtime
/🆑
## About The Pull Request
this makes it so `SSai_controllers` and its subtypes use a `currentrun`
loop, instead of directly looping thru
`GLOB.ai_controllers_by_status[planning_status]`
## Why It's Good For The Game
most other processing subsystems do this, why shouldn't we?
it should ensure all ai controllers get to process, even if the server's
under load.
## Changelog
no player-facing changes, prolly
## About The Pull Request
ports https://github.com/DaedalusDock/daedalusdock/pull/1144
ports https://github.com/DaedalusDock/daedalusdock/pull/1147
full credit to @Kapu1178 for the juice
instead of `reacher.CanReach(target)` we now do
`target.CanBeReachedBy(reacher)`, this allows us to give special
behavior to atoms which we want to reach, which is exactly what I need
for a feature I'm working on.
## Why It's Good For The Game
allows us to be more flexible with reachability
## Changelog
🆑
refactor: refactored how reaching items works, report any oddities with
being unable to reach something you should be able to!
/🆑
## About The Pull Request
i played a round earlier today and noticed the AI were a bit slow to
react, investigated it a bit and discovered it was because they werent
transitioning from the idle to active states properly, this fixes that.
## Why It's Good For The Game
fixes AI controllers not exiting the idle state
## About The Pull Request
``client_contents`` contains all mobs with clients, just like you'd
expect. This includes observers, which results in any observer going
over lavaland at full speed disturbing all the mobs on it. locate() is
only marginally more expensive than length on a (most likely) 0-1 length
list, so potential perf impact shouldn't be of any concern.
Closes#90003
## Changelog
🆑
fix: Fixed basic mobs not idling due to nearby ghosts
/🆑
## About The Pull Request
Fixes a handful of minor misc issues detected while trying to break
#89591
These are basically summed up as:
- check_teleport_valid (used in a couple of places) never actually
nullchecked the destination then runtimes later if it is null. We'd
rather it just returns false if you're trying to teleport to nowhere I
think.
- Warp Cubes (a mining item) did something similar if one of them ended
up in nullspace somehow.
- AI controllers in nullspace would runtime repeatedly while trying to
check their Z level, we never want an AI controller to be awake in
nullspace so we'll just tell them to shut off in there.
Sometimes items and mobs go to nullspace for holding reasons, but I
don't think any of these were commonly encountered issues.
## Changelog
🆑
fix: The Warp Cube will now fail if it tries to teleport you to nowhere,
instead of turning you blue and then failing
/🆑
I don't know if the other ones were actually player facing they just
runtimed
## About The Pull Request
Fixes a handful of minor misc issues detected while trying to break
#89591
These are basically summed up as:
- check_teleport_valid (used in a couple of places) never actually
nullchecked the destination then runtimes later if it is null. We'd
rather it just returns false if you're trying to teleport to nowhere I
think.
- Warp Cubes (a mining item) did something similar if one of them ended
up in nullspace somehow.
- AI controllers in nullspace would runtime repeatedly while trying to
check their Z level, we never want an AI controller to be awake in
nullspace so we'll just tell them to shut off in there.
Sometimes items and mobs go to nullspace for holding reasons, but I
don't think any of these were commonly encountered issues.
## Changelog
🆑
fix: The Warp Cube will now fail if it tries to teleport you to nowhere,
instead of turning you blue and then failing
/🆑
I don't know if the other ones were actually player facing they just
runtimed
## About The Pull Request
every process cycle we were checking the state of our movement targets.
when i benchmarked this it was taking up 7% of the entire process cost.
now instead, we check it only when the target or the pawn moves. after
like 25 minutes of profiling, this costs almost nothing because the
amount of calls has been cut significantly. also movement targets werent
properly being cleaned up on delete, causing some hard delete issues
## Why It's Good For The Game
fixes harddel issues and some more performance boost with how
controllers set up movement targets
## About The Pull Request
ai controllers that have exhausted all their current behaviors now stop
processing until the next cycle, so we no longer need to do these checks
on every process fire. idle behaviors are now instead handled by a new
low priority subsystem. these are the costs before/after roughly 25
minutes into the round

## Why It's Good For The Game
improves ai performance
## Changelog
🆑
/🆑
# Conflicts:
# code/datums/ai/_ai_controller.dm
## About The Pull Request
every process cycle we were checking the state of our movement targets.
when i benchmarked this it was taking up 7% of the entire process cost.
now instead, we check it only when the target or the pawn moves. after
like 25 minutes of profiling, this costs almost nothing because the
amount of calls has been cut significantly. also movement targets werent
properly being cleaned up on delete, causing some hard delete issues
## Why It's Good For The Game
fixes harddel issues and some more performance boost with how
controllers set up movement targets
## About The Pull Request
ai controllers that have exhausted all their current behaviors now stop
processing until the next cycle, so we no longer need to do these checks
on every process fire. idle behaviors are now instead handled by a new
low priority subsystem. these are the costs before/after roughly 25
minutes into the round

## Why It's Good For The Game
improves ai performance
## Changelog
🆑
/🆑
## About The Pull Request
mobs would disregard you for a bit if they went through a do_after, such
as goldgrub digging or medbots healing. this fixes that
## Why It's Good For The Game
fixes ai controllers resetting their targets post do_afters
## Changelog
🆑
fix: fixes ai controllers resetting their targets post do_afters
/🆑
## About The Pull Request
penguins are now able to fish! they will drill water holes in ice using
their beaks and catch fish from there. also expands the fishing ai a bit
to make it a bit more customizable. animals will now fish only when
they're hungry, otherwise there will be a cooldown between every fishing
attempt, defaulted to 45 seconds but can be edited depending on the mob.
## Why It's Good For The Game
makes the fishing behavior alot more generic, before it was only
compatible with lobstrosities but this makes it so it can be applied to
any mob. also reduces lobstrosity fishing frequency by a tad bit as they
were too spammy before.
## Changelog
🆑
add: penguins will now fish from water holes
/🆑
## About The Pull Request
ai controllers that have exhausted all their current behaviors now stop
processing until the next cycle, so we no longer need to do these checks
on every process fire. idle behaviors are now instead handled by a new
low priority subsystem. these are the costs before/after roughly 25
minutes into the round

## Why It's Good For The Game
improves ai performance
## Changelog
🆑
/🆑
## About The Pull Request
ai controllers that fail planning no longer process until theyre able to
plan again. this makes it so /process is called less thus you'll have
less AI competing against one another for cpu. also converts idle
behaviors into singletons
## Why It's Good For The Game
AIs that dont have a plan dont do anything during processing so its
better to just make them sit out the cycle instead of draining cpu
## Changelog
🆑
/🆑
## About The Pull Request
reduces the cost of the planning subsystem. instead of calculating
able_to_plan on every fire for every mob, we only calculate it when a
mob queues/dequeues a behavior. also converts behavior lists into lists
rather than lazylists to reduce the amount of checks we do on process.
these are the differences after ran on tracy.

## Why It's Good For The Game
reduces the cost of ai planning subsystem
## Changelog
🆑
/🆑
## 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>
3591 individual conflicts
Update build.js
Update install_node.sh
Update byond.js
oh my fucking god
hat
slow
huh
holy shit
we all fall down
2 more I missed
2900 individual conflicts
2700 Individual conflicts
replaces yarn file with tg version, bumping us down to 2200-ish
Down to 2000 individual conflicts
140 down
mmm
aaaaaaaaaaaaaaaaaaa
not yt
575
soon
900 individual conflicts
600 individual conflicts, 121 file conflicts
im not okay
160 across 19 files
29 in 4 files
0 conflicts, compiletime fix time
some minor incap stuff
missed ticks
weird dupe definition stuff
missed ticks 2
incap fixes
undefs and pie fix
Radio update and some extra minor stuff
returns a single override
no more dupe definitions, 175 compiletime errors
Unticked file fix
sound and emote stuff
honk and more radio stuff
## About The Pull Request
every process cycle we were checking the state of our movement targets.
when i benchmarked this it was taking up 7% of the entire process cost.
now instead, we check it only when the target or the pawn moves. after
like 25 minutes of profiling, this costs almost nothing because the
amount of calls has been cut significantly. also movement targets werent
properly being cleaned up on delete, causing some hard delete issues
## Why It's Good For The Game
fixes harddel issues and some more performance boost with how
controllers set up movement targets
## About The Pull Request
ai controllers that have exhausted all their current behaviors now stop
processing until the next cycle, so we no longer need to do these checks
on every process fire. idle behaviors are now instead handled by a new
low priority subsystem. these are the costs before/after roughly 25
minutes into the round

## Why It's Good For The Game
improves ai performance
## Changelog
🆑
/🆑
## 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>
## About The Pull Request
ai controllers that fail planning no longer process until theyre able to
plan again. this makes it so /process is called less thus you'll have
less AI competing against one another for cpu. also converts idle
behaviors into singletons
## Why It's Good For The Game
AIs that dont have a plan dont do anything during processing so its
better to just make them sit out the cycle instead of draining cpu
## Changelog
🆑
/🆑
## About The Pull Request
reduces the cost of the planning subsystem. instead of calculating
able_to_plan on every fire for every mob, we only calculate it when a
mob queues/dequeues a behavior. also converts behavior lists into lists
rather than lazylists to reduce the amount of checks we do on process.
these are the differences after ran on tracy.

## Why It's Good For The Game
reduces the cost of ai planning subsystem
## Changelog
🆑
/🆑
## About The Pull Request
this is a revival of #82635 . i got permission from potato to reopen
this, he did almost all the work. i only just solved the conflicts and
fixed all the bugs that were preventing the original from being merged
(but it should be TMed first)
## Why It's Good For The Game
slightly improves the performance of basic mob AI
## Changelog
🆑
LemonInTheDark
refactor: able_to_run and incapacitated have been refactored to be event
based
/🆑
---------
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: ZephyrTFA <matthew@tfaluc.com>
* fixes ai controllers incorrectly idling when changing z level (#85904)
## About The Pull Request
ai controllers would have the wrong status when moving z levels
## Why It's Good For The Game
fixes ai controllers incorrectly idling when changing z level
## Changelog
🆑
fix: fixes ai controllers incorrectly idling when changing z level
/🆑
* fixes ai controllers incorrectly idling when changing z level
---------
Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
## About The Pull Request
ai controllers would have the wrong status when moving z levels
## Why It's Good For The Game
fixes ai controllers incorrectly idling when changing z level
## Changelog
🆑
fix: fixes ai controllers incorrectly idling when changing z level
/🆑
## About The Pull Request
idled basic mobs now instead of completely shutting off, will be
delegated to a much lower priority subsystem to do their planning.
## Why It's Good For The Game
Mobs can now perform their functions without needing players to be
nearby in a way that doesnt starve other subsystems. this allows animals
such as goldgrubs to eat ores, lobstrosities to fish, seedlings to tend
plants (and many others) without needing any players nearby
## Changelog
🆑
fix: idle basic mobs will now plan behaviors rather than completely shut
down
/🆑
* basic vibebot (and small rework) (#84143)
## About The Pull Request
this refactors vibebots and reworks them to be a little more useful.
vibebots can now play a range of MIDI songs. they will seek out
depressed players and play an upbeat tune for them and celebrate with
them to cheer them up and increase their mood a little bit. if its ur
birthday, it will play a happy birthday tune for u. emagged vibebots are
ruthless, they will look for sad people and go play grim music for them
to ruin their day even more and decrease their moods.
## Why It's Good For The Game
refactors vibebots into basic bots and gives them a bit more character
## Changelog
🆑
refactor: vibebots are not basic bots
add: vibebots will now seek out the depressed and cheer them up
/🆑
* basic vibebot (and small rework)
---------
Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
## About The Pull Request
this refactors vibebots and reworks them to be a little more useful.
vibebots can now play a range of MIDI songs. they will seek out
depressed players and play an upbeat tune for them and celebrate with
them to cheer them up and increase their mood a little bit. if its ur
birthday, it will play a happy birthday tune for u. emagged vibebots are
ruthless, they will look for sad people and go play grim music for them
to ruin their day even more and decrease their moods.
## Why It's Good For The Game
refactors vibebots into basic bots and gives them a bit more character
## Changelog
🆑
refactor: vibebots are not basic bots
add: vibebots will now seek out the depressed and cheer them up
/🆑
* basic honkbots (#81920)
## About The Pull Request
this refactors honkbots into basic mobs. its mostly a faithful 1:1
refactor but i couldnt keep my hands to myselves so i gave them some new
behaviors.
honkbots now love playing with clowns, they will go seek out for clowns
and celebrate around them. also, if the honkbot finds a banana peel or a
slippery item near it, it will actively drag people onto them
honkbots will now go out of theirway to mess with secbots and annoy them
## Why It's Good For The Game
refactors hinkbots into basic bots and also undoes some of the silliness
i did in the previous basic bot prs. i also added lazylist support to
remove_thing_from_list.
## Changelog
🆑
refactor: honkbots are now basic mobs, please report any bugs
add: honkbots will try to slip people on banana peels
/🆑
* basic honkbots
---------
Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>