#(Hexivoid) Target Priorities
143 messages · Page 1 of 1 (latest)
(Hexivoid) Target Priorities
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>
Is there a target change event I could listen to, compare targets, and cancel?
There is now ref #commit-log
SentinelChaseNewTargetEvent
a native target priority system would be nice-to-have for sure, but complicated to implement cleanly
would require essentially a total redesign of the current target listing tooling
it's currently a very nonlinear check to try to take advantage of every performance opti it can, since the target check methods are called very often
Implementing a proper priority system would require not only breaking that opti, but also calling the target checks more often to try to select the "best" target rather than just a target
Would my best solution be to then temporarily remove lower priority targets when a target is set/chase is started and add them back afterward?
Also is there something wrong with the Citizens jd?
I believe if you just chase(your preferred target here) that should suffice on its own, Sentinel generally should retain its current chased target until it loses it
with the exception of targets-of-opportunity
0.o apparently there is?
I think so? 0.o
ohhh yeah i see why too
error with javadoc from the new Citizens build, ima go poke fullwall in our dev channel about it
Can you link me to the code/conditions that ends a chase?
I assume no possible path, distance out of range, entity no longer exists...
Anything else?
There isn't a formal list also a lot of the causes are indirect
Anything that makes a target not a target anymore counts
say for example a player goes into gamemode creative
there isn't an explicit, if current target is creative, end chase - it's more abstracted than that
also worth noting that Sentinel config options are relevant
eg with some settings enabled, the target being on the other side of a wall can be enough to break the chase (because the NPC doesn't know where to go because it can't see where the target went)
Does setting chase set Citizens' navigator target?
You were talking about .chasing, right?
declaration: package: org.mcmonkey.sentinel, class: SentinelTrait
sentinel.attackHelper.chase(xxx) does update the navigator immediately yes
no use the method not the raw field
I really need a search bar in the javadoc 😭
Lemme actually document that fact on those fields
yeah ;-;
There's something weird with the way the jenkins is generating javadocs
Is there a way you can dump them and I can self-host?
Oh the src contains descriptions and all?
in theory Sentinel compile should Just Work ™️ when you run it on maven
Err, Javadocs are generated from source code documentation
^^ Might be able to tell I have little to no experience with javadocs 😂
this lil comment block atop attack is the javadoc for that
Well you just taught me more about documentation than my intro to Java college class I paid $3k for did all that time ago
sgdkgsd
yeah college classes don't really teach much actual info
Some people think it's worthwhile for interpersonal networking and all
but learning? On a modern evolving field? lolno
Took two years of fillers about "theory" and "logic" for them to start teaching info that'll get me an internship
Hey my first real internship was at amex from a guy I met at college 😛
If my Sentinel has a squad target how does it treat multiple NPCs of that squad within its range?
Does it focus on the closest?
Or actually maintain chasing whichever the current individual NPC was?
closest is favored, unless a pre-existing target is already selected and still reachable.
Is there a way to stop/disable NPCs from speeding up (sprinting) once they start chasing?
Also mind pinging me once the jd's back? 🙂
change the speed field to 1
No change 😕
that's the only field read that can increase an NPC's speed in Sentinel
unless there's a bug with Citizens speed internally again
(if you're on an ancient minecraft version, idk)
Oops, was trying to set Citizens' speed insyead of Sentinel's
Works now
(Don't tell anyone I made that mistake)
Why is Citizens' default speed 1.5?
o
1 is walking speed, 1.5 is sprinting
🤔
Sentinel defaults to 1.5 because sprinting is usually desired behavior when in combat
what
I mean what's the point of having speedModifier when you have speed?
Disregarding Sentinel
The Citizens navigator speed value is an internal value, and speedModifier is the normal value
do not ever touch Citizens speed unless you have a very good reason to
Is this setting in the config related? ```# Whether to retain the existing target even when a better one exists.
This will persist per individual NPC, but is not user configurable per-NPC at the moment (API configurable only).
retain target: false```
yes
Is it possible to make Sentinels start chasing NPCs when they appear within its range?
Or is targeting only initiated once they come within eyesight?
This does seem pretty intensive...
er... by eyesight do you mean field-of-view? If so, disable realistic
if you mean to include targets behind walls, enable ignoreLOS (API only)
When does Sentinel check for targets?
I assume this is when tryAttack is run but I can't find what triggers it
I doubt it's periodic?
ittt's periodic yes
minecraft doesn't really provide a decent way to optimize over that
Oh is it indeed that?
Called every tick
tickRate defaults to 10
this btw is one of the reasons target matching is performance sensitive
If I increase this would I theoretically see a change in performance?
Oh you're answering my questions before I get a chance to ask them 😅
edit your config.yml if you want to try that
you can, but, yknow, measure first, and only touch it if it matters
note that it will have side effects - higher tick rate means slower updates means NPCs are slower to respond to changes
i can tell you from most experience thus far, Sentinel is well-optimized enough that the code in Sentinel doesn't hit as bad as the code in Citizens does
by which I mean - searching for targets takes a smaller % of CPU time than things like pathfinding towards the target once it's found
pathfinder is the biggest challenge with performance in Citizens stuff
What does Citizen's "new pathfinder" do differently that leads to such a decrease in performance?
I've noticed an obvious TPS decrease/lag pause when testing with a substantial amount of NPCs
The naming is weird
the non-new-pathfinder is Minecraft's vanilla built in entity pathfinding
Is one of them just MC's default paathfinder?
Literally ninja'ing each of my messages
the "new" pathfinder is just a (relatively) straightforward A* impl with some customization options
the default options are a bit harsh on perf but you can tweak them in the Citizens config
Is the new pathfinder's primary change that it could path in straight lines?
there's a hidden pathfinder option that's still in-the-works that uses multithreading n wotnot to try to make an actually high-performance option
no
Doesn't have to move diagonally one block at a time?
That's the only change I've visually noticed
Broadly, the "new" one is just better at pathfinding than vanilla's, but at the cost of perf
and way more customizable
Seems the new one can't handle a lot of corners though
try pathing an NPC up stairs, or near slabs or carpet, or etc. Vanilla struggles with seemingly simple cases of non-cubic block types
"new" can also climb ladders and open doors and stuff