#Pathfinding Lag Fix | Pathfinding Lib | Smart Enemy Pathfinding

1 messages ยท Page 5 of 1

keen ruin
#

that's set to 21 which matches our result from EndFindPath

#

boy maybe I ought to be decompiling the release build

#

there's a lot of useless crap here

#

and not that many useful asserts

tardy pivot
#

lol

#

yeah release is a lot less code but fewer functions as many get inlined

keen ruin
#

yeahhh the inlining might not be so nice

#

but I'll see if I get anything more out of looking at this corners stuff in release at least

#

after it finishes analyzing

green gust
#

never finish analyzing

#

there's always moer to analyze

tardy pivot
#

i'm very confused about this ๐Ÿ˜…

keen ruin
keen ruin
tardy pivot
#

still in the non-internal one

#

i've created a custom structure to name things properly but that weird pointer operation is confusing

keen ruin
#

yeah it really is

#

unfortunate that it's there for you too

#

that parameter does look really odd though I'll try and look after I'm back

#

the integer values in my debug print I sent earlier are the results from that parameter though so it does seem to track since the IDs match up to the inputs

#

I wonder if it's allocating space for both refs and flags into one buffer?

tardy pivot
#

it seems that is to make sure the pointer is 8-bit aligned

#

not sure how much we should care about that

#

well anyways i'm about to go to bed too. from the look of things the only difference from what we are doing is the size of the arrays ๐Ÿค”

keen ruin
#

wow the amount of inlined crap in these functions in release is insane

#

I thought the debug stuff was excessive but 90% of these functions is inlined memory stuff

#

back to debug I go

tardy pivot
#

oh is it more readable in debug? all the memory stuff is really confusing in release yeah

keen ruin
#

looks like NavMeshPath::CalculateCorners is getting a different destination from the one that gets passed to CalculatePath:

CalculatePath:

[Info   :PathfindingLib] FindStraightPath from float3(-19.05093f, -219.5336f, 86.91694f) to float3(-28.71834f, -212.8252f, 63.75082f):
  path:
    0: 562954802036800
    1: 562954802036805
    2: 562954802036803
    3: 562954802036794
    4: 562954802036838
    5: 562954802036837
    6: 562954802036839
    7: 562954802036796
    8: 562954802036783
    9: 562954802036782
    10: 562954802036786
    11: 562954802036776
    12: 562954802036773
    13: 562954802036774
    14: 562954802036772
    15: 562954802036758
    16: 562954802036757
    17: 562954802036756
    18: 562954802036755
    19: 562954802036740
    20: 281479821131788
  straightPath:
    0: pos = float3(-19.05093f, -219.5336f, 86.91694f), flags = Start, ref = 562954802036800
    1: pos = float3(-25.335f, -219.5336f, 84.71749f), flags = 0, ref = 562954802036794
    2: pos = float3(-26.91203f, -219.5336f, 84.02847f), flags = 0, ref = 562954802036837
    3: pos = float3(-28.71834f, -212.8252f, 63.75082f), flags = End, ref = 281479821131788
#

ours:

[Info   :PathfindingLib] FindStraightPath from float3(-19.05093f, -219.5336f, 86.91694f) to float3(-28.21279f, -182.1419f, 73.91283f):
  path:
    0: 562954802036800
    1: 562954802036805
    2: 562954802036803
    3: 562954802036794
    4: 562954802036838
    5: 562954802036837
    6: 562954802036839
    7: 562954802036796
    8: 562954802036783
    9: 562954802036782
    10: 562954802036786
    11: 562954802036776
    12: 562954802036773
    13: 562954802036774
    14: 562954802036772
    15: 562954802036758
    16: 562954802036757
    17: 562954802036756
    18: 562954802036755
    19: 562954802036740
    20: 281479821131788
  straightPath:
    0: pos = float3(-19.05093f, -219.5336f, 86.91694f), flags = Start, ref = 562954802036800
    1: pos = float3(-25.335f, -219.5336f, 84.71749f), flags = 0, ref = 562954802036794
    2: pos = float3(-26.91203f, -219.5336f, 84.02847f), flags = 0, ref = 562954802036837
    3: pos = float3(-28.71834f, -216.0919f, 69.90083f), flags = 0, ref = 281479821131788
    4: pos = float3(-28.21279f, -182.1419f, 73.91283f), flags = End, ref = 281479821131788
#

now to figure out where that new destination comes from...

#

maybe it's mapping the destination position onto the final polygon Hmm

#

ah yes it does

#

I actually had the variable renamed where it does that but I forgor

#

quick fix

green gust
#

Quick fix

#

Truly

keen ruin
green gust
#

Yeah I know what's happening there, good job

keen ruin
green gust
#

Would've taken me about as long if it was me.
I would've just asked you to figure it out if I was the one dealing with the problem

keen ruin
#

the important parts are

NavMeshQuery::ClosestPointOnPoly(query, path->m_Polygons[pathSize - 1], &targetPositionOnNavMesh, &closestPointToDestination)

and the reassignment of m_TargetPosition

green gust
#

Mmm icic

keen ruin
#

it's a good thing NavMeshQuery is a struct or I would have to map another function address from native land

#

I would cry

tardy pivot
#

don't say it too loud. i bet, by the end of the API project, we'll have to map at least two other native functions ๐Ÿ™ƒ

tardy pivot
keen ruin
#

seems likely that that would cause a lot of unnecessary overhead, so I'm glad if all this reduces that

#

looks like the bug is fixed though yippee

#

I also discovered that I forgot to make StraightPathFlags be byte-sized, so I was printing bogus flags from the CalculatePath call

tardy pivot
#

i mean unless that implementation was really based on leaked code it probably was mostly guess work/outaded code instead of being reverse engineered from the engine

keen ruin
#

from what I remember reading when I initially found it, it was written by a Unity engineer

tardy pivot
#

O.o

keen ruin
#

it's very close to the go translation that we were looking at as well, which I believe to be based on the Unity source

tardy pivot
#

maybe then a recode based on what he wished was ๐Ÿคฃ

keen ruin
#

mmmm maybe

#

or what had to be done with what was exposed

tardy pivot
#

๐Ÿคท

tardy pivot
keen ruin
#

yeah lol

#

I got tired of digging around ghidra

tardy pivot
#

who needs sources to do "print debugging"? ๐Ÿ™ƒ

keen ruin
#

exactly

#

now I gotta uplift this to master oh boy

#

stash time

tardy pivot
#

wait... why did you use the smart-pathfinding branch instead of a new one from master?

keen ruin
#

because that's where I discovered the issue

#

so I already had repro there

green gust
#

Kinda funny that the person to immediately notice was the person who practically only plays vanilla so it was immediately obvious to them the bracken was freaking out

tardy pivot
#

uh? was it returning valid paths to all teleports?

keen ruin
green gust
#

Uhuh

keen ruin
# tardy pivot uh? was it returning valid paths to all teleports?

I was testing roaming on Mineshaft after adding the elevator wrapper into PathfindingLib and noticed the masked was stutter stepping constantly

it thought it could get to the main entrance while no players were inside, despite the fact that the elevator links didn't exist yet

#

it was generating a path to the closest position to the main entrance and then a final node at the main entrance as the last corner so the path was succeeding always

tardy pivot
#

uh? doesn't FindStraightPath return if the path is partial or not? do we never check the result?

keen ruin
#

no it doesn't

#

not afaik anyway

#

that's the job of A* not the retracing

#

it doesn't know whether the path polygons reach the destination

#

not the way that it calls it from CalculatePath

#

NavMeshPath.status comes from FinalizedSlicedFindPath or whatever

tardy pivot
#

uh i tought we were reporting infinity as the distance if the path was partial ๐Ÿค”

keen ruin
#

I've never checked the detail flags from EndFindPath, only the result, so no

#

the way it checks if it's partial is if the last corner is too far from the destination, which wasn't happening because the last corner was always the destination

tardy pivot
#

wow then it's intresting that the pathfinding was still working correctly

keen ruin
#

I mean it wasn't working correctly in a lot of cases

#

but in cases where the length of the paths was more important, it tended to work okay

#

i.e. roaming

#

Version 0.1.1

  • Fixed an issue that would cause partial paths passed to NavMeshQueryUtils.FindStraightPath to result in a final corner at the destination.
  • Changed the new overloads of NavMeshQueryUtils.FindStraightPath to use Vector3 instead of float3, as the Unity runtime assumes the memory layout matches Vector3 internally.
frail lagoon
tardy pivot
#

point two makes sense.. i was unsure when you converted all to float3, but you were so sure that i just tought you knew ๐Ÿ˜…

keen ruin
#

it made sense to me at the time teehee

#

as I was looking for the cause of this bug I saw where it does a direct memmove from the native buffer to the managed array so shrug why not treat ours the same

#

it probably doesn't matter in practice but hey, at least we're consistent now

tardy pivot
#

i mean they supposedly are the same struct with different methods attached

keen ruin
#

that's true

#

I didn't want to risk there being any hidden behavior there but given that I can see it using Vector3 as equivalent to Vector3f it's totally fine to use that

hexed moon
#

do you know if this mod causes masks to "stutter" when moving without a target?

#

sometimes i notice that masks take 1 step, top, and repeat unless they have LOS with a player and are chasing them

#

i don't really know what would be causing it but this was my best guess

crimson jolt
#

@hexed moon

#

it seems like that problme should have been fixed in 0.1.1 though

hexed moon
#

weird

#

i am using 0.1.1

#

i could check 1 more time

#

pathfinding stuff is all updated, it still happens

#

they also pathfind into corners but idk if thats what was specifically targeted in the fix

crimson jolt
#

@hexed moon does downgrading to pre-0.1.0 work instead?

hexed moon
#

lemme try that

#

with 0.0.14

hexed moon
crimson jolt
#

then it's probably caused by something else

#

how about disabling the mod completely? is there any difference?

hexed moon
#

i'll try

hexed moon
#

it is still happening with pathfinding lib and pathfinding lag fix disabled

#

so ig its something else

ashen harbor
hexed moon
#

no

#

at least not constantly

ashen harbor
#

Yeah no it's not a constant thing but I've definitely seen them do it in vanilla

hexed moon
#

if its just for a few sec or something thats fine

#

what im getting is masks doing it constantly when theyre not locked onto someone

#

and it's not this mod or maskfixes causing it

ashen harbor
#

Is it everywhere or on/in a specific moon/interior?

hexed moon
#

not 100% sure i tested it on Rampart because it has guaranteed mask spawns

#

and i didnt feel like adding imperium to spawn them

ashen harbor
#

Ah iirc I've seen them do it on Rampart frequently. I think they have some pathing issues on there

hexed moon
#

if its just that moon thats ok

#

theyre spawned by JLL spawners there anyway so i guess that would be a contributing factor

ashen harbor
#

I think it's primarily where they're set to spawn and how the navmesh works, JLL spawns them but they should just be the same as a naturally spawned masked

hexed moon
#

eh i guess its something to tell to luna

ashen harbor
#

Emphasis on should lol

#

Btw @keen ruin I'm not sure if the ragdoll fix mod actually works or not, we had a player body be in a desynced position for a client earlier and the client revived them in said desynced position with the defib from usual scrap and it caused an extra body to get left behind cus the rest of us didn't see the body there ๐Ÿค”

hexed moon
#

for all players

green gust
#

the desync is on defib's fault for the revive stuff

#

for 999 i use the host's position of the deadbody

keen ruin
#

if you mean that the client saw the body in a different position than everyone else, that doesn't surprise me at all

#

the body staying behind... that may be because the revive mod doesn't synchronize the disabling of the body, idk

#

revives are not in the base game, so almost every mod that makes players able to be revived has bugs

#

the only one I've found particularly reliable is the bunkbed one

keen ruin
ashen harbor
#

Ahhhhh

ashen harbor
surreal veldt
#

Sure, Iโ€™ll give it a try.

ashen harbor
ashen harbor
#

@keen ruin Out of curiousity since I know we spoke about the issue of how the NymphBracken's animation gets messed with, is there a setting that could be changed so her animation isn't overriden?

keen ruin
#

by what?

#

I don't override any animations

#

unless they are doing something silly with transpilers

ashen harbor
#

I mean didn't you look at the code before and mention why it gets messed with? I can't remember exactly what you said the issue was anymore lol

#

Oh right you mentioned it was cus it uses animancer I believe

keen ruin
#

oh uh

#

yeah I don't remember lol

#

I mean I remember mentioning that, but I don't remember why that was bad

#

probably a skill issue in how it syncs I guess

#

the only way I can think to fix that is to ask them to fix it

#

unless it's confirmed a conflict between PathfindingLagFix and that mod

ashen harbor
#

Yeah and unfortunately I believe the dev doesn't plan to mod Lethal anymore anytime soon so maybe a patch for it could be made

ashen harbor
keen ruin
#

hmm

#

well if it gets confirmed, I could look into whether there's anything I can do

#

but I would suspect it wouldn't be easy

#

my patches are very precise

#

if they are causing issues it would make me think that some transpiler's matching isn't flexible enough and I can't fix that

ashen harbor
#

she normally is supposed to do a skipping animation when roaming around, but with PathfindingLagFix her animation sorta derps out and I think it tries to mimic the way the bracken roams around lol

#

If it happens to be transpiler related wouldn't making the NymphBracken mods a soft dependency fix it?

green gust
#

There'd be a lot more involved, and I really don't see how pathfinding lag fix is breaking nymph bracken animations but if you can reproduce it then ig it does

#

You'd have to reproduce with only pathfinding lag fix though

keen ruin
#

^

#

without confirmation I don't want to spend time debugging this

#

but yeah, soft dep might help if it is that

ashen harbor
#

I also need to keep in mind you merged some things into PathfindingLib since we last talked about this so I will need to test with that off too if it repros

keen ruin
#

you mean test with only PathfindingLib and that replacement?

#

sure

#

but you can't run PathfindingLagFix without PathfindingLib if that's what you mean

ashen harbor
#

Yeah no that much I'm aware of

#

lol

keen ruin
#

I figured but I wasn't sure what you meant

ashen harbor
#

Okay so it seems the animation only bugs out with natural spawns ๐Ÿค” been trying to repro it by spawning her with Imperium and she doesn't break

#

That would have to be transpiler related then right?

green gust
#

no

ashen harbor
#

Huh

#

What would cause that?

green gust
#

when was the last time you produced her bugging out by spawning naturally

ashen harbor
#

Today

#

on Espira

green gust
#

use devtools to spawn her, that's as vanilla as you'll get

ashen harbor
#

I can also test using SimpleCommands

#

Okay well I got her just t pose walking this time, this was when readding LobbyImprovements and testing spawning her with SimpleCommands

#

It might be LobbyImprovements causing issues

#

Def not reprod animation bugs with LobbyImprovements off so SimpleCommands is spawning her in the vanilla way prob

#

yeah and her weird movement also happens when spawning with SimpleCommands just not with Imperium progress

#

@keen ruin and ba ba bing repro, with PathfindingLagFix on her animations bugged out but with it off they all went back to normal

keen ruin
#

hmm okay could you link that mod again?

ashen harbor
#

I used a combo of SimpleCommands to spawn her and Imperium to watch her path around

#

lol

#

Not sure why animancer dies from natural spawns with PathfindingLagFix though, has to be a weird transpiler thing since Imperium spawns fix it

keen ruin
#

imperium breaks it in vanilla so I wouldn't put much stock in that

#

I don't know why that's the case though

crimson jolt
#

i think you can fix it if you jump in place

#

or just exit/re-enter the building

#

it's been a known issue for months i just dont think imperium has been updated in forever

ashen harbor
#

Getting her to actually path around felt like it took much longer without PathfindingLagFix btw, I never realized how long the Bracken can just stop and stare for a while before it backs off in Vanilla lol

#

But yeah her animations would work fine if spawned with Imperium ((Maybe cus like you said it breaks some things)) where as a Natural Spawn with SimpleCommands would repro the animations being weird

green gust
#

in terms of speed im pretty sure it'd be faster in vanilla, but the speed would also be negligble

ashen harbor
#

Cus she just kept standing there staring at me

#

XD

#

even though my back was turned

keen ruin
#

generally I would expect the behavior with PathfindingLagFix to be the same as or faster than vanilla

#

not that I've tested that theory scientifically

#

unless the map has a ton of AI nodes, though, I would generally expect both to finish in one AI interval

keen ruin
#

as long as this was tested with a non-invasive debug mod though, then I am satisfied that I will probably be able to repro

#

preferably LethalDevMode

#

you don't really need more than that imo

keen ruin
#

sorry for the delay in looking into that issue, I'm mainly focusing my time on finding work at the moment so I haven't had a good time to dig into this yet

#

hopefully I can remember to take a look sometime this weekend

keen ruin
#

@ashen harbor not sure if I'm doing something silly but the sfw version doesn't appear to replace the bracken model at all

ashen harbor
keen ruin
#

oh boy

#

I see

ashen harbor
#

Can be tweaked through a config

#

ye

keen ruin
#

that's a bit of a pain in the ass

#

I see that's good

ashen harbor
#

Yeah by default she's on forest moons

#

So should spawn on Vow, March, and Adamance

#

also Rend, Dine, Titan

#

cus Winter outfit

green gust
#

and then it's probably not 100% chance

#

aint fun

keen ruin
#

what is its config called?

#

I don't see bito or nymph in gale

green gust
#

probably EnemySkinKit or EnemySkinRegistry

keen ruin
#

I didn't see anything related to the replacer in that config

ashen harbor
#

EnemySkinRegistry

#

LethalConfig integration

keen ruin
#

waaa why can't it be in the normal config file

ashen harbor
#

It has it's own ui is prob why

#

lol

keen ruin
#

this ui WAYTOODANK

#

it's so big

#

also @ashen harbor when you said this happens while she is roaming, you mean when you're not inside and she is going to the farthest position from main entrance?

#

it looks like she's kinda doing a two legged gallop with her hands behind her back

ashen harbor
keen ruin
#

is there something specific you do to get them to be overridden? or does it happen immediately upon spawning her?

#

and are you sure this wasn't caused by having imperium installed?

#

I was assuming you meant you reproed without it, but I'm not seeing the issue when spawning the bracken with LethalDevMode with PathfindingLagFix installed

ashen harbor
#

Weird, is it only the other version that breaks?

ashen harbor
#

I'll see if that's the case later, cus I wonder if the extra letters in the SFW version fix the run order

keen ruin
#

hmm I wouldn't think that would change the order, but I suppose I don't actually know

ashen harbor
#

I mean when I spawn her in and she paths away she literally T Poses

#

Going inside then outside fixed it

#

Well whatever is going on her animations fix after leaving and reentering the interior

#

@keen ruin It's definitely something with the NSFW version, I just tested the SFW one and the bugs don't happen

#

So that isolates it, idk why there's only the weird interaction with that version lol

#

My guess is some weird thing with the run order since the GUID between both is different

#

I just noticed this too with the NSFW one lmao, dunno why yinigma never updated the modversion in the dll after 1.1.1 for that one since they did with the SFW one

keen ruin
#

interesting, okay

#

I'll have a look at that version in a bit here

keen ruin
#

busy day unfortunately so I didn't get to it after all oopsie

ashen harbor
#

Lol all good

green gust
#

it's not good, it's time to execute zaggy

#

i miss zaggy

keen ruin
#

@ashen harbor bad news, I switched to the nsfw one and it still looks like it works fine lol

#

no t pose, walking with arms behind her back

#

I think I need you to send a minimal profile code to reproduce this

keen ruin
#

also any extra information you can provide, like which moon, seed, etc the issue occurred on

green gust
#

A video of reproducing it would be nice too

ashen harbor
#

I am once again wondering if somehow Biodiversity got cached and she was trying to use Aloe's anims lmfao, gonna do another test

#

Yeah it may have been that

#

She is fine for me now too

#

LOL

#

and I did just remove Biodiversity from my main pack

#

I just wonder if the stalking animation works properly, is there a good tool to freecam that isn't Imperium?

green gust
#

unity explorer

#

but i'd use imperium

#

and I doubt biodiversity will break another enemy's animations

#

i think nymph bracken's animation stuff is just not consistently working due to issues with its own code shrug

ashen harbor
#

It could probably use an update at some point anyways, Animancer is now V8

keen ruin
#

I would recommend just using UnityExplorer, it doesn't change any behavior

storm lava
#

This was happening to me a fwe months ago. I have zero clue what caused it

fast cypress
#

ping

#

it was already fixed

modern berry
#

hi,

im thinking this doesnt originate within pathfindinglagfix, but, pathfindinglagfix is breaking because of the issue.

this is from lines 137763 in that log

Stack trace:
EnemyAI+<CurrentSearchCoroutine>d__94.MoveNext () (at <31f0351006d541aeb5ae92a12fc7161b>:IL_04A8)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <e27997765c1848b09d8073e5d642717a>:IL_0026)

[00:28:33.8000994] [Error  : Unity Log] NullReferenceException
Stack trace:
PathfindingLagFix.Utilities.AsyncRoamingPathfinding+EnemyRoamingPathfindingStatus.StartJobs (EnemyAI enemy) (at ./Utilities/AsyncRoamingPathfinding.cs:58)
PathfindingLagFix.Patches.PatchEnemyAI.StopPreviousJobAndStartNewOne (EnemyAI enemy) (at ./Patches/PatchEnemyAI.cs:37)
EnemyAI+<ChooseNextNodeInSearchRoutine>d__96.MoveNext () (at <31f0351006d541aeb5ae92a12fc7161b>:IL_0022)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <e27997765c1848b09d8073e5d642717a>:IL_0026)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
EnemyAI:StartCalculatingNextTargetNode()
<CurrentSearchCoroutine>d__94:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)```

the game is stuck going from landed on the moon -> taking off to orbit (never reaches orbit), with the error for your mod spamming constantly.

from memory (as it was 2 hours ago now), there were beehives(with bees) or a masked, on the balcony of the ship outside as we took off, forget which, but neither were present after we took off.

in the past, we have had a dog on the balcony, unable to move, but its there in orbit (happened once), but we could reach orbit, and kill it without it moving, and game continued fine, this seemed different, and today we havent seen anything in orbit on the balcony.

the profile code

0197b426-2103-8925-ae6b-5e6e71442c54

just figured at the least, you might want to stop it breaking your mod, i would look into it further, but there was a tonne of log spam just before, and i dont know if that was breaking your mod.
ashen harbor
#

I've not had this issue

#

You probably should provide a mod list on top of the log

modern berry
modern berry
ashen harbor
#

I think Rats is broken right now iirc

#

There's a lot of questionable mods I see tbh

#

DoorFix for example

modern berry
#

well rip, cause i was quite enjoying that, thought it was working.

ashen harbor
#

I think ImmortalSnail also has issues

modern berry
ashen harbor
#

VoiceHud could be replaced with LethalFixes tbh

modern berry
ashen harbor
#

Idk why you have both

#

LethalFixes has it's functionality included

modern berry
#

does it? must be added after i installed both.

ashen harbor
#

It's even on by default

#

Coroner has been quite broken for a long time now and never got fixed, the dev went MIA after pushing the update in a bit of a broken state and never came back

#

Idk if GhostGirlFearReset is still needed/works

#

OpenMonitors I recall breaking for lots of people on V70

#

KeepEnemyPower I also dunno if it works anymore

#

Terbium causes some performance problems and Bongo has no plans to update it

#

You have WeatherRegistry so MeteoMultiplier is redundant

modern berry
#

well, it sounds like some of them i need to review, but i can say open monitors + keep enemy power seem to work for me.. we use keep enemy power to supress respawning of entities after we kill them, or we would be getting 5k scrap every moon just from killing things, once things are dead, they stay dead, might not work as intended though, i just know stuff isnt respawning.

ashen harbor
#

I have no idea what BetterDoorWarning is but I think LethalFixes also has something for that

#

BetterSpectator is quite old, I might suggest replacing that with Poltergeist

modern berry
#

already use poltergeist.

ashen harbor
#

CustomDeathPenalty could be replaced with NoCompanyPenalties depending on what you're using it for

#

VanillaMoonsLagFix is not needed

modern berry
#

thanks for the suggestions.

ashen harbor
#

you have ReverbTriggerFix

modern berry
#

you should really make a list of mods that are not needed, you probably repeat this to many people xD easier to point to a list, lmao

modern berry
modern berry
modern berry
ashen harbor
#

For me it desynced clients really badly

#

with tons of errors

modern berry
#

hmm, worrying :/

crimson jolt
#

since at least v56 im pretty sure

#

entrance doors no longer detect dead enemies

#

it was fixed in lethalfixes before that, then the fix was removed because it got fixed in vanilla

keen ruin
#

dunno what would cause destroyed or null AI nodes, other than perhaps some enemy not being set up properly and surviving the unloading of the moon scene

#
[00:28:33.1565023] [Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
RoundManager.UnloadSceneObjectsEarly () (at <31f0351006d541aeb5ae92a12fc7161b>:IL_0045)
RoundManager+<DetectElevatorRunning>d__152.MoveNext () (at <31f0351006d541aeb5ae92a12fc7161b>:IL_004F)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <e27997765c1848b09d8073e5d642717a>:IL_0026)
#

as I suspected

#

not exactly what I described, but enemies aren't being destroyed properly

#

the IL offset in the UnloadSceneObjectsEarly() method doesn't line up to any vanilla instructions though, so I'm assuming you have some mod that transpiles that method, alongside the mod to make transpiled methods still print IL offsets

#

closest line is if (array[i].thisNetworkObject.IsSpawned), so the best guess I have is that someone created an enemy that has a null thisNetworkObject for some reason (non networked enemy??)

cold peak
#

it's probably more of null enemy in the list

keen ruin
#

the list comes from a call to FindObjectsOfType, so I wanna say that should be ruled out, barring some optimization mod

modern berry
modern berry
# keen ruin dunno what would cause destroyed or null AI nodes, other than perhaps some enemy...

ive seen a dog in orbit, i dont know why a dog would survive to orbit last week, i have nothing modifying dogs, and as i say, the only potential culprits last night were bees/a masked reaching orbit, no reason why they should survive it (at least enough to prevent reaching orbit) suddenly either.

only enemies i added/updated in the last few weeks are

Rats - Lunxara suggested its broken so maybe thats the cause
Scopophobia - i swapped from the old version, to the new one recently released
SCP939 - havent heard anything bad about this, yet.

guess ill remove Rats and see if this never occurs again.

wanton salmon
#

I'll need help implementing compatibility for the library. I want to use it to find closest enemy by path distance. So far I seem to do something wrong because it doesn't want to work.

green gust
#

if you'd like i migrated my pathfindinglib code onto coderebirthlib under Utils/Pathfinding

#

You could either copy a lot of the code there or just use it, either way works

#

Or wait for zaggy to go through it with ya as well if he has time to help

keen ruin
#

feel free to hit me with any questions you may have, but yeah, Xu's code is probably the best reference at the moment (since PathfindingLagFix itself uses a mostly custom solution)

#

I gotta see about looking at a crash in the new and improved APIs with Matty sometime too, those should be much nicer to use for your needs

#

if needed, we could debug things together in vc here too, just lemme know if you wanna do that and I'll see if I'm free

tardy pivot
#

oh, we got a new crash report?
last time i remember we paused the api on masked riding elevators in a loop ๐Ÿค”

wanton salmon
#
public static bool Execute(NavMeshAgent agent, Vector3 targetDestination, ref bool validpath, out float PathLength)
        {
            NaturalSelectionLib.LibraryLogger.LogMessage("PathfindingLib present. Switching to using PathfindingLib");
            var pooledJob = JobPools.GetFindPathJob();
            pooledJob.Job.Initialize(agent.GetPathOrigin(), targetDestination, agent);
            JobHandle previousJobHandle = pooledJob.Job.ScheduleByRef();

            if (pooledJob.Job.GetStatus().GetResult() != PathQueryStatus.InProgress)
            {
                NaturalSelectionLib.LibraryLogger.LogMessage("Calculated path.");
                if (pooledJob.Job.GetStatus().GetResult() == PathQueryStatus.Success)
                {
                    PathLength = pooledJob.Job.GetPathLength();
                    validpath = true;
                }
                NaturalSelectionLib.LibraryLogger.LogMessage("Released PathfindingLib job.");
                JobPools.ReleaseFindPathJob(pooledJob);
            }
            else
            {
                NaturalSelectionLib.LibraryLogger.LogError("PathfindingLib calculations is in progress");
                PathLength = -777.77f;
                return false;
            }
            PathLength = -777.77f;
            return true;
        }

This is what the code I wrote looks like so far. What ends up hapenning is constant spam of inProgress logs but not once I saw the log of releasing the job.

tardy pivot
#

well you are creating a new job pool and job handle every cycle.
you're supposed to create them only once and keep polling the status untill it finished, then you can reschedule it

wanton salmon
#

I see

#

I am also looking to implement the method as an Enumerable.

#

The issue with that is I need to wait for it to end and output the result and doing so would either halt the rest of the method with while or the result would not be final.

tardy pivot
#

the pathfinding api is an async api. so it requires you to store the main components for polling/reuse in class/static variables

#

als also requires you to write your implementations with that in mind. aka poll if the result is ready and if not either do nothing this cycle or return the previous valid value until the api finishes

wanton salmon
#

I'll do the latter but I'll implement it as a separate a method separate from FindClosestEnemy.

keen ruin
#

I wanna have a look with you if I can still repro it, I'm sure it'll go quicker with two sets of eyes

tardy pivot
#

sure we can find an evening, we're both available.

wanton salmon
#

Got somewhat working version. It looks like it does something but it's not behaving how as expected. Enemies doesn't seem to want to switch enemies by distance. I get the logs of enemies receiving delegates but I get no logs whatsoever from the library itself.

keen ruin
#

from your library or mine?

#

I don't think PathfindingLib would be printing anything

wanton salmon
#

Mine

keen ruin
#

if you have your code on a public repo somewhere I can have a look and see if I spot any mistakes

green gust
green gust
green gust
#

i can keep scrolling up and finding more mistakes if you'd like

#

go to sleep bozo

keen ruin
#

D:

#

you're right

wanton salmon
# keen ruin if you have your code on a public repo somewhere I can have a look and see if I ...

The library: https://github.com/Fandovec03/NaturalSelectionLib/tree/PathfindingLib
Natural selection: https://github.com/Fandovec03/LC-NaturalSelection/tree/PathfindingLib/ExperimentalEnemyInteractions

I was basically following CodeRebirthLib implementation and based it off that.

GitHub

Personal Library with functions for getting, sorting and filtering enemies - GitHub - Fandovec03/NaturalSelectionLib at PathfindingLib

GitHub

Experimental repos for my enemy interactions mod. Contribute to Fandovec03/LC-NaturalSelection development by creating an account on GitHub.

wanton salmon
keen ruin
#

looks like me and Matty may have solved the crash with the experimental API for this

#

looking at your code, it seems like it could be significantly simplified, but I'll have to take a closer look

#

it's honestly hard for me to track all the pieces

#

once we know that the experimental API is stable though, your code can likely use that and be only a few lines

keen ruin
#

surprise!

PathfindingLib Version 1.0.0

  • New APIs:
    • SmartPathfinding: A static class with methods to register smart agents, elevators, and teleporters for the smart pathfinding system.
    • IElevator: An interface that can be implemented to allow enemies to navigate through them if they use SmartPathTask.
    • SmartPathTask: A class to calculate paths to multiple destinations either directly or through entrance teleports and elevators.
    • SmartRoaming: A static class that reimplements the vanilla AI search routine using SmartPathTask to allow enemies that choose to use it to roam through elevators.
  • Wiki pages will be added to the GitHub for usage instructions later!
#

@wanton salmon if you wanted to, I could go over the new API in voice while I figure out what to write into the wiki tutorials

ashen harbor
#

Peak update Zaggy, glad to see you finally got the issues fixed and got it out

keen ruin
#

me too! really the thanks go to matty again for pointing out that the crash we were stuck on could be a use-after-free instead of an out-of-bounds write

#

currently this feature doesn't do anything until mods use it, and all the existing functionality used by PathfindingLagFix and others should be totally unaffected

#

I'm gonna have to do some testing for my masked patch mod that makes use of SmartPathTask to determine if I'm happy enough with it to release it

#

oh hey Jacob, I was about to ping you lol

swift token
#

(not that I'vetouched him in ages but still)

ashen harbor
keen ruin
swift token
#

oo

#

i don't quite recall rn but i think it may have

#

i may have to revisit the little guy again

keen ruin
#

hell yea

#

I'm down to look at it with you whenever you do

#

that sounds fun

next shard
#

I shall add this to my elevator immediately beevil

keen ruin
next shard
#

Readin through API plink

keen ruin
#

I can send you my wip dll for the masked pathing so you can try it

next shard
#

Oh can they not path into it at the moment?

keen ruin
#

yeah not without an additional (unreleased) mod

#

the purpose of PathfindingLib is solely to implement the functionality, other mods have to make use of it

next shard
#

Ah fair, yeah

keen ruin
#

so installing PathfindingLib alone will change no behavior in the game at all

#

DMed you the masked mod so you can try it

wanton salmon
keen ruin
#

oh, have you not tested it with a synchronous path yet?

#

or do you mean the new method through PathfindingLib? if it worked with a synchronous path it will definitely work with an asynchronous one

wanton salmon
#

I tested both with PathfindingLib and using vanilla agents but it doesn't behave as I expected. For some reason it doesn't want to switch to closer enemies

wanton salmon
#

Seems to work now.

#

There was an error unrelated to the pathfinding calculation that caused to share single data containers and broke enemy behaviors.

ashen harbor
#

Ooh so Natural Selection update soon?

wanton salmon
ashen harbor
#

Ah so EEI is gonna be updated then

wanton salmon
#

yeah. I only found it because sandworms broke if more than one existed

ashen harbor
#

I look forward to you making use of PathfindingLib anyways

wanton salmon
#

Vanilla method seems to work as expected but the PathfindingLib returns default distance values.

#

I haven't switched to API yet so ig I could look into that

tardy pivot
keen ruin
#

definitely yeah

keen ruin
#

I was testing masked pathing yesterday to see if that feels like a big problem still, and I figured out that the global roaming wasn't working quite right because of the search width on the masked

#

I gotta do a bit more testing to see if changing that helps

#

problem is that making it so that the elevator can't be used soon after riding it will make it so that some ai nodes will be removed from the search

#

at least I believe so

tardy pivot
#

๐Ÿค” .

keen ruin
#

Pushed out a little fix for an issue that Fandovec encountered with allowing SmartPathTask to be garbage collected

#

I wanna say it shouldn't affect anything that's currently out there though

ashen harbor
#

@wanton salmon I'm hoping this will fix the lag when having EEI present, I didn't enable the experimental features earlier and we kept getting mad hitches

#

I had to pull it

karmic geode
#

hello! should i use beta or full version? a while back it was reccommended for me to use the beta version, but rn it seems full version was updated last so im not sure anymore stare

keen ruin
#

the stable version is the most up-to-date, yeah

#

I guess I forgot to deprecate the beta, whoops

#

actually, I guess the beta and the stable are the same at the moment, just updated at different times

#

but stable will be where bug fixes/minor features will go, beta is only updated when I need to test big changes

karmic geode
#

oki!! ty zagsterrr

swift token
#

zaggy did you ever post your masked mod implementing the new elevator stuff?

tardy pivot
#

if you mean the elevator itself. that's in PathfindingLib

if you mean an enemy using the elevator then the masked mod is still unreleased as there are still a couple of things to iron out

keen ruin
#

yeah, I want to test it a bit more

#

I'm probably not gonna be working on stuff for the next week or so, though

#

I'll be away from my PC tuesday through saturday

green gust
#

That's not a full week

#

U liiiied

keen ruin
#

I'll be busy otherwise too silly

#

not sure how much I'll be doing over the weekend

ashen harbor
#

@keen ruin

keen ruin
#

Zeranos?

ashen harbor
#

Yeah

#

It errored when I stopped the Elevator instead of letting it stop on it's own lol for some reason

hexed moon
#

this only occurs when the elevator is told to stop right? not when it actually stops?

#

its probably some thing from the regeneration process

#

pathfindinglib would make me assume it doesn't take kindly to the navmesh being deleted and regenerated

ashen harbor
#

Yeah probably, if you start the elevator and let it stop naturally I've never seen the error happen but it occured the second I pressed the button to stop it

tardy pivot
#

๐Ÿ‘€ why would you need to delete and regenerate the mesh??

ashen harbor
tardy pivot
#

from a quick look at the code i belive it's having troubles because the entrance teleports ( main/ fire escapes ) do not have an exit

ashen harbor
#

Fire Exits shouldn't generate tbh, when they do generate you just walk out and drop below the map

#

do not recommend exiting via fire exits

#

XD

tardy pivot
#

main has to exist tho

ashen harbor
#

But yeah I think Kite has a list of bugs that need fixed

#

Yeah

tardy pivot
#

and main is also an entrance teleport

ashen harbor
#

Ye

tardy pivot
#

so i guess this moon deletes and regenerates the interior every time the elevator is used?

ashen harbor
#

Yeah everytime you descend

tardy pivot
#

so the interior main door gets deleted

ashen harbor
#

It restores the gameplay of V4 essentially

tardy pivot
#

and the external main remains hanging

ashen harbor
#

Wonder if there's an easy solution Kite can do to prevent the Pathfindinglib errors

tardy pivot
#

keep internal main in place? tho i guess any entity pathing into main while there is no interior would be quite broken anyways

#

anyways Zaggy we should add code to handle runtime entrance teleport modification. there are already a lot of mods that re-link fires at runtime sadly ๐Ÿ˜ฉ

keen ruin
#

are there?

#

oh boy

#

Zeranos at least doesn't have usable entrance teleports, I don't know which mods would be modifying them during a round

hexed moon
#

Possibly mapimprovements or entrance blocker, though idk exactly what time they modify entrances at

keen ruin
#

@green gust @swift token

PathfindingLib Version 2.0.0

  • Added the IElevator.IsInsideElevator(Vector3) to determine if a point is inside the physical bounds of the elevator, which is required to be implemented for all registered elevators.
  • Added the SmartPathDestination.CanActivateDestination(Vector3) method which determines whether an agent at that position can activate/use the destination. This is intended to prevent agents from pressing the button to send an elevator to a floor without being inside first, preventing AI from getting stuck repeatedly hitting elevator buttons.
  • Allowed users of the SmartRoaming API to customize the distance that an agent is allowed to spend navigating to a node.
#

we version 2 already teehee

#

solely because of the first bullet point

#

I'm being a good boy and holding myself to semantic versioning

green gust
#

Semantic schemantic

#

I'll just never update crlib to v1.0.0 and that totally means I can fuck shit up all I like

keen ruin
#

lmao

#

I could have just said the new API was unstable but I was overly confident

swift token
#

i think (hopefully) office should already implement this and shouldn't throw errors but please lmk if it does

keen ruin
#

I just tested it so I think you're good

#

masked went outside no trouble

tardy pivot
keen ruin
#

teehee who knows

ashen harbor
#

lol

keen ruin
#

is that with snatchinbracken or whatever?

next shard
#

No ๐Ÿ’€

keen ruin
#

erm

#

well nothing I do should make the bracken able to grab you and move you if that's what the unexpected part is theinking

keen ruin
#

PathfindingLib Version 2.1.0

  • Fixed a crash on Bozoros caused by moving NavMeshLinks.

Changelog looks small but there were a fair number of changes to the native hooks I'm using, so if you encounter a crash, please grab the crash logs/dumps and profile code so I can have a look

karmic geode
#

Happy yall were able to find the issue stare

tardy pivot
keen ruin
#

a lot more lmao

keen ruin
#

I mistakenly pushed out a debug build last night, 2.1.1 is going out now to reduce the log spam ๐Ÿ˜…

tardy pivot
keen ruin
#

PathfindingLib Version 2.1.2

  • Fixed a crash with off-mesh links that are missing one or both endpoint transforms. This was causing a crash upon landing on Black Mesa.
keen ruin
#

new level of programmer art unlocked

#

don't look at my kerning

keen ruin
#

Pathfinding Lag Fix | Pathfinding Lib | Smart Enemy Pathfinding

#

also,

PathfindingLib Version 2.2.0

  • Added patches to prevent auto-updating OffMeshLinks and NavMeshLinks from causing stutter stepping when they move.
  • Made waiting for/in elevators not count towards the time spent walking towards a node in the smart search routine.
#

Please let me know if you encounter crashes, these new patches may cause issues with links, but they can be toggled off in the config if that happens

green gust
#

im crashing out im crashing out

#

oh u meant ingame

keen ruin
#

I'll crash out if it crashes too

echo timber
#

thank you so much i was about to pull my hair out if i couldnt figure out what caused the stutter stepping ๐Ÿ˜ญ

keen ruin
#

er, I would doubt this affects the case you had mentioned

#

unless you suspect that there are links nearby to wherever the enemies were stutter stepping

#

it's a common symptom

sturdy zealot
sturdy zealot
echo timber
#

well it worked for a moon and back to the same insane stutter stepping
it seems all ai/enemies and the player all dont register until a second or a few frames later
im just gonna have to remake my entire pack from scratch and bring over configs after i try mods one by one

green gust
keen ruin
#

I wouldn't figure it would make a whole lot of sense to allow masked to use those elevators, since the only place they could go is to the surface

karmic geode
sturdy zealot
karmic geode
#

So im not the only one having that same issue!!

sturdy zealot
green gust
#

get good

sturdy zealot
#

Discussion about that was pointless anyway

green gust
#

yeah so why randomly bringing this up in a different thread, stoopid

sturdy zealot
#

I'm bringing this up here because of

keen ruin
#

it's stutter stepping, not stuttering lol

sonic loom
#

would the new mod fix masked using the main entrance on art gallery

green gust
#

in what way is it broken

sonic loom
#

they just cant use it lol

green gust
#

that might be cuz wesley has it too far from any walkable surface for enemies, so it wouldnt fix it in that instance

#

they could use fire exits with zaggy's thing though

#

iirc

sonic loom
#

wait

#

would that mean they can use the fake rubber rooms fire exits

green gust
#

they need to pathfind there, meaning there'd need to be nodes at the other end that they pick up

#

so i doubt it too

keen ruin
next shard
#

To them it's just a decorative door

keen ruin
#

also I eep hopefully nothing explodes

vivid dock
#

I saw a nutcracker struggling to walk near a pillar of pool tile mansion interior. Maybe this update fix that?

keen ruin
#

seems doubtful, vanilla content doesn't have any moving links I know of except for the elevator and ship

green gust
#

idk if elevator does

green gust
#

i just spawned my enemy to test smthn, thats fun

keen ruin
#

huh

#

I don't think I changed that code

keen ruin
green gust
#

It could be smthn on my end, this is the dev version of crlib I was testing with

green gust
#

No moving surfaces because zeekerssโ„ข probably didn't know he could do that

#

Well, he did it with elevator and truck, but not ship

keen ruin
#

ohh jeez yeah

#

I guess that's true

#

wait the truck though

#

that probably is so bad for enemy pathing in vanilla

green gust
#

Truck would be reasonably to having a moving link

keen ruin
#

I ought to compare, that would be interesting

#

based on my testing I think it would be good if zeekerss made those non auto updating, but they probably have that flag set currently

green gust
#

Don't they need to be auto updating or nah

keen ruin
#

if they're attaching to a moving surface rather than moving across the navmesh, it kiiiinda updates without that flag

green gust
#

Icic

#

I kinda figured it might be smthn like that

keen ruin
#

I think that it doesn't quite get the endpoint positions right though

#

so it's better to have them auto update with my patch than not

green gust
#

Icic

#

Ig not something I'll have to worry about since I just depend on pathfindinglib

#

Don't find a reason to make it a soft dependency even if I technically can anytime soon

keen ruin
#

wait can you? I would have figured your enemies would need a fair amount of work to make them directly use unity pathfinding

green gust
#

As in to crlib I mean lol

keen ruin
#

ah

green gust
#

Since its just part of crlib now

#

Error might also be the result of it being in the test room

#

I was getting food so ill test it more when I'm back

keen ruin
#

whatever the cause, I don't think it makes sense for that method to ever give you a meaningless error like that so I'll take a look

keen ruin
#

I should definitely handle that though, that's a silly little oversight

green gust
#

icic

keen ruin
#

do you think it makes sense to throw an exception in this case? I'm not sure if I should do that or just return false Hmm

#

I do return false for IsResultReady in that case, so I suppose in that way it would be consistent, but maybe less obvious

green gust
#

wait im a lil confused

keen ruin
#

then again, jobData can also be null if you pass in an empty list

green gust
#

the error happened on the last line obv

#

but i did start the task no?

keen ruin
#

see my last message teehee

green gust
#

oh lol

keen ruin
#

it just occurred to me

green gust
#

yeah i passed an empty list

#

ig thats what'd happen in test room lol

keen ruin
#

I think I'm not totally consistent in what I do for 0 paths unfortunately

green gust
#

if you had to decide whether exception or return false for this type of thing i'd probably prefer an exception

#

cuz otherwise my code would be stuck here forever and i'd have no clue about it lol

keen ruin
#

technically it seems like based on my index checks, IsResultReady should throw an exception for this since there is no index that would exist if there are zero paths

#

right

#

thas tru

#

I will do that

#

it makes sense with regard to the indices as well

green gust
#

ye

keen ruin
#

PathfindingLib Version 2.2.1

  • Made SmartPathTask.StartPathTask() throw an exception if it is called with zero destinations. All path results will also throw exceptions if the task has not been started. This should help to avoid situations where IsResultReady() could always return false, blocking further navigation logic from ever running.

Anyone that makes use of SmartPathTask, please verify that this change won't affect your code that relies on either overload of StartPathTask() that takes in multiple destinations. If you have the possibility of starting a task with zero destinations, make sure that can no longer occur.

vivid dock
#

Do you know what could cause to the kidnapper fox not being able to attack the player on modded moons? It has a log with beggin attack but it stay still.

keen ruin
#

no clue

#

it's not in the game anymore so I haven't looked at the code at all really

#

if it only occurs with PathfindingLagFix installed, then it could be related to my player targeting patch, but that's about it

vivid dock
#

I going to test it

swift grove
#

I tested this mod with LC office
And the masked didn't use the elevator or ignored it.

But I think it's due to me using imperium to test it actually. (Not sure it's imperium, the interior or the mod itself-)

But I'll check if the fire exit tweak works for the masked.

keen ruin
#

Imperium should work

#

where was the masked spawned?

swift grove
keen ruin
#

were you outside?

swift grove
# keen ruin were you outside?

no I entered the free cam mode and spawned it in

and it did chase after me. But once I left the area it entered roaming mode

#

never leaving

#

didn't produce errors also

keen ruin
#

ah, well, it doesn't immediately use the elevator even if it's near it

#

it has to choose a node on another floor to use it

#

if you go outside, it should immediately bee-line it for the main exit

#

that will make it use the elevator

swift grove
#

Ah okay I'll try that again

keen ruin
#

if you wanna see it roaming through the elevator, you'll probably want to increase the simulation rate

#

I think Imperium has a control for that, but I use UnityExplorer so I'm not sure where it is

swift grove
keen ruin
#

hmm, which version of PathfindingLib are you running?

#

I discovered I made an oversight in 2.2.1 that would cause the masked not to roam properly, but I assume you would have noticed if the masked was walking to one place and standing still

#

PathfindingLib Version 2.2.2

  • Fixed an exception that would occur when SmartRoaming is sending an enemy to a search node.
  • Added SmartPathTask.IsStarted to determine whether StartPathTask() has been called.
  • Ensured that SmartRoaming will not throw an exception if it runs out of nodes to search.

I'm on a streak yippeee

swift grove
keen ruin
#

ah lol

#

nah 2.2.0 would've worked

#

should be good now on my side, I just got done testing it on 4x for a minute

#

Jacob still needs to fix the top link though, since the masked will just get stuck going up and down and up and down repeatedly if it tries to exit on the top floor in the current LC_Office release

#

I might see if I can try to detect that failure, print an error to the console and then disable the floor, but that's a fair amount of work

crimson jolt
#

just curious...

  1. how do you patch the masked? did you just prefix cancel and replace with new logic? or did you decide to go with a transpiler after all?
  2. how do you detect when players are outside? wondering mainly if your patch would exhibit the issue from vanilla where masked go inside and outside every 3s if players lock themselves in the ship
keen ruin
#

it's a transpiler

crimson jolt
#

i would peek at the code but im away from my computer right this second

crimson jolt
#

that probably also answers my second question?

keen ruin
#

it looks like this:

        //   if (Time.realtimeSinceStartup - timeAtLastUsingEntrance > 3) {
        // -   [...]
        // +   if (!CheckIfPlayersAreTargetable(this))
        // +     return;
        //   }
        //   if (!searchForPlayers.inProgress)
        //     StartSearch(base.transform.position, searchForPlayers);


        // - StartSearch([...])
        // + PatchMaskedPlayerEnemy.StartSearch(this, [...])


        // - SetMovingTowardsTargetPlayer(player)
        // + PatchMaskedPlayerEnemy.PathToPlayer(this, player)
#

where CheckIfPlayersAreTargetable:

  • If no player is in the masked's area (inside/outside, not paths):
    • Stops roaming, send the masked to the main entrance
  • Else:
    • Lets the mask roam
tardy pivot
#

vanilla code does not check "if the player is outside" it only checks "if there is a player where the masked is". from what i remember neither PathfindingLagFix nor the Masked mod patch that logic

keen ruin
#

yeah

crimson jolt
#

i need to double check where the problem was in vanilla, i forget what function is called

keen ruin
#

it's within that first if statement in my patch comments

tardy pivot
#

it's not a problem the logic is working as intended

keen ruin
#

I believe

#

the vanilla logic is flawed specifically when it's mineshaft

crimson jolt
#

i think the function that checks if players are targetable returns false if:

  1. the masked is outside
  2. all outside players are "unreachable" by pathing (usually means closed inside ship)
#

if theres also nobody to target inside it gets stuck in a loop constantly entering and exiting the building

#

idk if that is desirable but in maskfixes i opted to make them default to outdoors roaming when no targetable players exist on "either side"

keen ruin
#

GetClosestPlayer() doesn't check paths, but maybe further down that block does? I didn't think so though

swift grove
#

OH I have masked fixes

So-

I think it might be that actually I'm unsure

crimson jolt
#

if you have mask fixes disable my roaming patch

keen ruin
#

very possible that would prevent my patches yeah

crimson jolt
#

i prefix cancel state 0 and completely rewrote it

swift grove
#

I'll test it when I get free as RN I'm watching my neice and nephew atm

crimson jolt
#

mine works ok for vanilla but you should def use zaggy's patch if you wanted modded elevator support or fire exit support

keen ruin
#

but basically what my mod does by default is

  • if players not in area, go to other area
  • if players in area, roam
#

very simple and easy

swift grove
#

Ye that makes sense and easy to understand why they would conflict with each other

keen ruin
#

it matches vanilla behavior but uses smart pathing so that it can always (if the interior is set up correctly) find its way

tardy pivot
#

you could ( just for shit and gigles ) turn on global roaming is no player is targetable at all ๐Ÿคฃ

keen ruin
#

oh like toggle it on only if players aren't in the masked's area?

crimson jolt
#

lol that would probably be "the most fair" option

keen ruin
#

interesting thought, although I would have to reset the search routine then

crimson jolt
#

currently they have clairvoyance as to player's general zone which is a bit silly

keen ruin
#

yeah

crimson jolt
keen ruin
#

global roaming is the "realistic" option

#

but it also means that the masked may take quite a bit longer to find players, so idk

#

people can try it out

tardy pivot
#

global roaming looked really good in testing imo. it def is not vanilla so makes sense why it's default off

keen ruin
#

yee

#

since SmartEnemyPathfinding is meant to be act as a dependency for content mods that rely on the elevator APIs

storm lava
echo timber
storm lava
#

I don't think generic's moons are the problem. They used to have an issue but I believe it was fixed

keen ruin
#

both player and enemies are affected
then this wouldn't even be pathfinding-related thonk if looking around feels responsive, while movement feels stuttery, that sounds like you might need to turn off vsync

echo timber
#

really? i have it off too, but i can double check! im pretty advanced when it comes to this stuff and i put an insane effort into my current pack with configs and all sorts but the problem happened originally when updating a couple mods but they were unrelated and i hadnโ€™t messed with any settings either prior but ill check in a moment otherwise ill remake the whole thing and let you know if it works again

tardy pivot
#

both players and enemies are affected

am i understanding wrong or both enemies and other players stutter on your client?

echo timber
#

in either multiplayer or singleplayer, both the host or players and enemies seem to jitter around while moving forward, but can look around as normal, and sometimes in multiplayer and im not sure if it's due to the randommoonfx mod but the host of the lobby can not scan anymore nor can they interact with the ship's lever
also, vsync is off ๐Ÿค”

but it's so damn weird! just now i remade the pack i was having issues with, ran it twice to make sure configs load, and brought over my configs and now everything is normal again...what the hell

#

this happened a while ago too where for some reason the host's ship doors wouldnt open when landing on a moon, but other players can exit as normal onto the surface and even enter the dungeon

but if it works for now i guess nothing else might be needed. i was really confused

tardy pivot
#

if you see players stuttering but it's fine on their end then that's a connection issue tbh

echo timber
#

i see... i really do wonder what caused this strange issue where it vanished after remaking my pack again, i made sure every little thing was compatible as well
for the friends that mentioned the stutter/jitter besides myself, we all have high-end pcs and great connection too so i wonder if something possibly just broke when updating and it didnt save a config or some kind of value

#

i do appreciate your guys' help though, it does help me to understand a lot so when someone might need help too, i could try and assist!

vivid dock
keen ruin
#

you're sure it's not force-enabled in something like nvidia control panel?

#

the way you describe it, it sounds like you as the local player are experiencing this jittery movement, correct me if I'm wrong

#

I've experienced that type of thing at kinda random times over the course of a lot of different testing, so not sure what causes it if it's not the vsync thing

keen ruin
vivid dock
#

a little before

keen ruin
#

that has nothing to do with pathfinding, it's likely just the nutcracker look direction being desynced

#

that's not uncommon

green gust
#

Yeah enemy rotation and stuff desyncs are pretty common

#

I've seen the masked just have insanely different positions between host and client before

keen ruin
#

for the nutcracker it's got a separate rotation for the head/gun as well

echo timber
keen ruin
#

sounda like about my experience with that bug too lol

vivid dock
agile plover
#

Hi! I've seemed to narrow down an issue I've been having with https://discord.com/channels/1168655651455639582/1355711298796523823

It seems like the Soul Devourer and PathfindingLagFix don't like each other very much after the most recent updates to PLF. With just the bare minimum installed for PLF and the Soul Devourer, the enemy will just make a straight walk to the side of the ship and stay there unless provoked.

Not sure which mod needed to do the fixing, but wanted to report it here as well. ๐Ÿ‘

keen ruin
#

I'll try to take a look into that today or monday NODDERS I would suspect that if it's a regression in PathfindingLagFix, it'll need a fix on my side

#

what is the intended behavior?

#

I'm not familiar with this enemy

agile plover
#

Sort of a mix between a forest keeper and thumper. It seems to be just the wandering phase that's bugged, chases just fine when it spots a player.

#

Can enter and exit the facility like a masked too if you have the config set for it.

keen ruin
#

okay, that's curious

#

roaming has worked fine in my testing, I wonder what's being done differently there

#

I assume there wasn't a fire exit on the ship for it to path to in your reduced test case?

green gust
agile plover
#

Standing inside facing the door, yes. (So the side without the magnet)

#

If need be I can drop my profile code in here in the morning.

#

Might be something less simple than I expected.

keen ruin
#

it could very well be pathing to 0, 0, 0, especially if an exception occurred in the roaming code

agile plover
vivid dock
#

[Error : Unity Log] InvalidOperationException: An RPC called on a NetworkObject that is not in the spawned objects list. Please make sure the NetworkObject is spawned before calling RPCs.
Stack trace:
Unity.Netcode.RpcMessageHelpers.Handle (Unity.Netcode.NetworkContext& context, Unity.Netcode.RpcMetadata& metadata, Unity.Netcode.FastBufferReader& payload, Unity.Netcode.__RpcParams& rpcParams) (at <895801699cfc4b4ab52267f31e2a4998>:IL_0026)
Unity.Netcode.ServerRpcMessage.Handle (Unity.Netcode.NetworkContext& context) (at <895801699cfc4b4ab52267f31e2a4998>:IL_0037)
Unity.Netcode.NetworkBehaviour.__endSendServerRpc (Unity.Netcode.FastBufferWriter& bufferWriter, System.UInt32 rpcMethodId, Unity.Netcode.ServerRpcParams serverRpcParams, Unity.Netcode.RpcDelivery rpcDelivery) (at <895801699cfc4b4ab52267f31e2a4998>:IL_00FE)
LCOffice.Components.ElevatorSystem.ElevatorTriggerServerRpc (System.Int32 floor) (at <4a5c653978914626baaa6f3fdbf411d3>:IL_007F)
LCOffice.Components.ElevatorSystem.GoToFloor (PathfindingLib.API.SmartPathfinding.ElevatorFloor floor) (at <4a5c653978914626baaa6f3fdbf411d3>:IL_001C)
PathfindingLib.API.SmartPathfinding.ElevatorFloor.CallElevator () (at E:/Development/Lethal Company/Projects/PathfindingLib/PathfindingLib/API/SmartPathfinding/ElevatorFloor.cs:13)
SmartEnemyPathfinding.Patches.PatchMaskedPlayerEnemy.GoToSmartPathDestination (MaskedPlayerEnemy masked, PathfindingLib.API.SmartPathfinding.SmartPathDestination& destination) (at E:/Development/Lethal Company/Projects/SmartEnemyPathfinding/SmartEnemyPathfinding/Patches/PatchMaskedPlayerEnemy.cs:87)
SmartEnemyPathfinding.Patches.PatchMaskedPlayerEnemy.RoamToSmartPathDestination (EnemyAI maskedAI, PathfindingLib.API.SmartPathfinding.SmartPathDestination& destination) (at E:/Development/Lethal Company/Projects/SmartEnemyPathfinding/SmartEnemyPathfinding/Patches/PatchMaskedPlayerEnemy.cs:103)
PathfindingLib.API.SmartPathfinding.SmartRoaming+<>c__DisplayClass9_0.<CurrentSmartSearchCoroutine>g__GoToCurrentDestination|1 (PathfindingLib.API.SmartPathfinding.SmartRoaming+<>c__DisplayClass9_1& ) (at E:/Development/Lethal Company/Projects/PathfindingLib/PathfindingLib/API/SmartPathfinding/SmartRoaming.cs:132)
PathfindingLib.API.SmartPathfinding.SmartRoaming+<CurrentSmartSearchCoroutine>d__9.MoveNext () (at E:/Development/Lethal Company/Projects/PathfindingLib/PathfindingLib/API/SmartPathfinding/SmartRoaming.cs:194)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <e27997765c1848b09d8073e5d642717a>:IL_0026)

vivid dock
#

I used the Imperium to test that and spawned a masked on the first floor while my character was outside, and the masked managed to go to the second floor and get out. Then, I enter through the fire exit and the masked goes back to the main entrance and starts going to the first floor, third floor, first floor...

keen ruin
keen ruin
vivid dock
#

Ah so is it a problem with LC office?

keen ruin
#

yeah, for some reason the navmesh on the top floor doesn't reach close enough to the elevator for the link to connect

vivid dock
#

With global roaming enabled, if a masked sees me using a fire exit, will he chase me?

agile plover
#

Might be one of those instances where a new profile with fresh installs of mods might fix things.

keen ruin
vivid dock
#

I thought it was my modpack, but it seems the masked will never chase me down the fire exit

keen ruin
#

hmm, I'll have to give it a test, it's currently a lot less tested than the default mode

keen ruin
#

@agile plover I think I found the issue, but it'll take me a bit to make a correct fix since Unity doesn't expose good enough API for something I want to incorporate into the path calculations

#

probably can have the fix out tomorrow

#

possibly longer depending on how much I have to reverse engineer here

agile plover
#

No worries! Thanks for looking into the issue. coiled

keen ruin
#

oh baby a triple

PathfindingLib Version 2.3.0

  • Changed AgentExtensions.GetPathOrigin() to get the path origin for NavMeshAgents more accurately. This will avoid issues with pathfinding on agents with a non-zero baseOffset, such as the Soul Devourer enemy.
  • Added the AgentExtensions.GetQueryFilter() method to retrieve an agent's type ID, area mask, and cost overrides in one call. Previously, the cost overrides were largely unusable due to requiring 32 individual calls to NavMeshAgent.GetAreaCost().

SmartEnemyPathfinding Version 0.0.2

  • Allowed the masked to continue following the player after losing line of sight. This will allow masked to follow players through entrance teleports correctly.

PathfindingLagFix Version 2.2.4 (now requires PathfindingLib 2.3.0)

  • Use PathfindingLib's AgentExtensions.GetQueryFilter() to get cost overrides and produce paths that match NavMeshAgent.CalculatePath() more closely.
#

@agile plover @vivid dock both your reported issues should be fixed now dorime_hatsune

agile plover
#

Thanks again for the bugfix!

limber lichen
#

Would it be possible to add a debug/config in SmartEnemyPathfinding to set the Masked vision/aggro radius to 0? Not sure if another mod already covers this (besides setting yourself as non-target in Imperium), or if values like this can even be modified?

sonic loom
#

this isnt a proactive issue with the mod afaik, its just something funny that happened to me

#

for some reason, my gale client had the updates earlier than it should have
the updates happened
and then like 8 seconds later gale had a complete stroke and i had to uninstall the mods because gale couldnt find the updates existed on my end anymore
like they literally just disappeared from the client

#

this was like an hour ago btw

keen ruin
#

usually I just stick myself in a corner somewhere and then use UnityExplorer to free cam and watch the masked lol

keen ruin
sonic loom
#

no big deal, i just have to waste like a minute and a half of my life reorganizing their placements in my mod pack list lol

limber lichen
keen ruin
#

it definitely wouldn't be super difficult to patch, but I think it might require patching in multiple places

#

I would just consider it out of scope since I would assume you mean for them to be no danger (unless they walk into you by accident I suppose?)

limber lichen
keen ruin
#

ahh I see, that's what you mean

#

yeah, you would probably need to have other mods to make them convincing enough visually for that to work, I would think

#

so it does kinda make sense to me for it to be part of another mod

#

unsure how those interact with SmartEnemyPathfinding at the moment, though, I would imagine some of them cancel the vanilla code that I patch

karmic geode
#

does smart enemy pathfinding work with mirage plink ?

hexed moon
#

mirage doesnt change mask ai

karmic geode
keen ruin
#

not sure what the defaults are for it, but MaskFixes could override SmartEnemyPathfinding, I believe

karmic geode
#

:0

hexed moon
#

what parts of these would be good to turn off for smartpathfinding

karmic geode
#

sounds like the 2nd option would be the most probably to override

keen ruin
#

yep 2nd option needs to be off

#

I'm hoping that Buttery can make it auto-disable if SmartEnemyPathfinding is detected at some point

#

assuming that SmartEnemyPathfinding covers everything that patch exists to fix, which I believe it does

crimson jolt
#

like, if you use another mod for masked, the idea is you recognize that and turn it off

#

i could make it default to false if you have smartenemypathfinding installed first, and maybe make it print a warning in console or something

#

if you have it on still

#

in the event somebody has smartenemypathfinding but disables the masked setting, then if i force disable mine, masked wont work right

#

etc

#

the two reasons i patch the roaming state are:

  1. making masked default to outdoor roaming if it can't find any targetable players inside or outside (fixes them using entrance teleport every 3s if you lock yourself inside the ship, as a bonus it highlights their ship hiding behavior a bit better)
  2. better logic for handling the mineshaft elevator (smartenemypathfinding definitely covers this)
#

i can take a peek and see if smartenemypathfinding covers the first case

#

maybe i could try to get maskfixes to read your SEF config and adapt to that

#

that might be the best automatic solution

keen ruin
#

GetClosestPlayer() just checks the area, not paths, nor door unless you explicitly tell it to

#

I mirror that in the replacement logic in my patch, so it shouldn't have issue #1 there

crimson jolt
#

right sorry, i said i would do that

#

GetClosestPlayer calls PlayerIsTargetable which includes this excerpt in the boolean return:
&& (!this.isOutside || !StartOfRound.Instance.hangarDoorsClosed || playerScript.isInHangarShipRoom == this.isInsidePlayerShip)

keen ruin
#

also, currently (and probably for the forseeable future), SmartEnemyPathfinding doesn't have a toggle for the masked patch, but I am totally fine with the default being off with a warning when on if my patches are present

crimson jolt
#

so if the mask is outside, the ship doors are closed, and the player is on the other side of the ship doors from the masked enemy, the entire function returns false

keen ruin
#

ahhh

crimson jolt
#

and if the function returns targetable==false, the mask will ignore that player when checking where it shoudl be

keen ruin
#

I see, I made the mistake of thinking cannotBeInShip related to that but I didn't check

crimson jolt
#

yes

#

i made the exact same mistake until trying it out in game and realizing there was an issue

#

so i dont blame you

#

Lol

keen ruin
#

hmm, then lemme check what it looks like with my patches

#

lol

crimson jolt
#

i thought it mentioned your mask fix was toggleable

keen ruin
#

maybe you're thinking of the global roaming toggle?

crimson jolt
#

if it's not toggleable, and you dont intend to make it toggleable, im totally good to add an auto-killswitch

keen ruin
#

yeah I don't have any plans to, since I also don't currently have any plans to add patches for any other enemies

crimson jolt
#

ok perfect

#

i'll try to get some auto compat in today, then

keen ruin
#

Jacob mentioned he might be interested in patching more vanilla enemies but the masked was the only one in vanilla that could use entrance teleports/elevators

#

๐Ÿซก sounds good

#

I'll look into the ship door thing

crimson jolt
#

shrug

#

i do like that elevator usage is mostly a "special case" for certain enemies though, it would be a bit silly if everybody could use the elevator

#

i think it's a cool "oh shit" moment when you realize masked are smart enough to use the elevator!

keen ruin
#

yeah the trapping enemies thing feels all right to me since it cuts off main, but I definitely can see another mod adding that feature

crimson jolt
#

starlancerenemyescape might also be a good candidate, since it lets enemies exit the building

#

it might want to look into comprehensively patching the vanilla enemy set to improve the effect on mineshaft maps

keen ruin
#

yeah, I think that at this point it would probably be good if that was rewritten or replaced with a mod that fully utilizes PathfindingLib

#

that way, enemies can path in/out of the interior based on actual objectives instead of just randomly rolling to do it

#

it's always been a little silly to me how that works, but there wasn't really an alternative till now

crimson jolt
#

that's true yeah

keen ruin
#

I guess one other barrier is that that requires a lot of transpiler work to be done "properly" imo

crimson jolt
#

and if global roaming is supported (or will be supported soon) that could probably replicate some of the randomness

keen ruin
#

oh, global roaming is provided through PathfindingLib, so anyone can use it if they want to

#

really what "global roaming" means is just setting link flags to include fire exits and main entrance in a roaming algorithm that uses the smart pathfinding API

#

PathfindingLib has a replication of the vanilla roaming code that uses it, so you can just call that

crimson jolt
#

i think i realize what my confusion was

#

i think your config setting just lets masked use fire exit and wander inside/outside using entrances as pseudo-links

#

right?

#

but the fixed elevator behavior, etc. is non-optional

keen ruin
#

yep

crimson jolt
#

ok i understand now

#

i just misunderstood what the setting was for

#

yours should definitely have priority

keen ruin
#

it also has to swap a few parameters for the search to make it so it can find paths to outside nodes

#

like the search area

#

@crimson jolt this should do right?

    private static bool AllPlayersAreShutInShip()
    {
        if (!StartOfRound.Instance.hangarDoorsClosed)
            return false;

        foreach (var player in StartOfRound.Instance.allPlayerScripts)
        {
            if (!player.isPlayerControlled)
                continue;
            if (player.isPlayerDead)
                continue;
            if (player.inAnimationWithEnemy)
                continue;
            if (!player.isInHangarShipRoom)
                return false;
        }
        return true;
    }

    private static bool CheckIfPlayersAreTargetable(MaskedPlayerEnemy masked)
    {
        if (Plugin.GlobalRoaming.Value)
            return true;

        if (masked.GetClosestPlayer() == null)
        {
            if (masked.isOutside && AllPlayersAreShutInShip())
                return true;

            var result = GoToDestination(masked, RoundManager.FindMainEntrancePosition(getTeleportPosition: true, getOutsideEntrance: !masked.isOutside));

            if (result == GoToDestinationResult.InProgress)
                return false;
            if (result == GoToDestinationResult.Success)
            {
                masked.StopSearch(masked.searchForPlayers);
                return false;
            }
        }

        return true;
    }
crimson jolt
#

kinda depends how you wanna do it

#

with mask fixes i opted to make them prefer outdoor roaming unless they were already inside the building with another targetable player

keen ruin
#

for context, CheckIfPlayersAreTargetable returning true results in the masked roaming in whatever zone it's currently in

crimson jolt
#

since masked were originally outdoor enemies, and have some unique ship behavior that's not seen very often

crimson jolt
keen ruin
#

hmm, does that mean you don't send them back inside if there's no players outside?

#

as far as I understand, that's the intended behavior in vanilla

crimson jolt
#

but if everybody is standing in an inaccessible outdoor area (like jetpacking to the top of a hill or something) then it would still make them re-enter the building in a loop, i think?

#

i forget if GetClosestPlayer checks for a valid path along the chain-of-custody

#

assuming it does, the question is "are you ok with that"

keen ruin
#

nah it doesn't look for a path

#

so the masked would still roam outside in that case

crimson jolt
#

then i'd warrant a guess that your solution should be fine

crimson jolt
#

i kinda misspoke

#

they roam inside if:

  1. there are targetable players inside
  2. they are already inside the building OR there are no players anywhere outside
crimson jolt
keen ruin
#

ah, so if no !player.isInsideFactory then they go inside?

#

yeah in that case I believe it does

crimson jolt
#
// default to wandering outside, since we can hide on the ship
// only go inside if:
// - there is a player inside, and...
// - we are already inside, or there are no players to target outside
bool wantsToBeInside = closestInsidePlayer != null && (!maskedAI.isOutside || closestOutsidePlayer == null);
#

closestInsidePlayer and closestOutsidePlayer are both assigned if !isPlayerDead && isPlayerControlled based on the value of isInsideFactory

#

and then it compares distances

keen ruin
#

oh wait, distances?

crimson jolt
#

the distance comparison is just so i can check whether the masked wants to use the elevator later

keen ruin
#

ah

crimson jolt
#

if the closest inside player is on the opposite end of the elevator from the masked

#

it opts to use the elevator to reach them

#

as long as there's a player at any distance, "closest player" will be non-null

crimson jolt
keen ruin
#

oh yeah speaking of your elevator logic, do you limit it to only mineshaft interior? I'm wondering how it interacts with custom elevators using the vanilla controller

#

(e.g. black mesa elevators as they stand currently)

crimson jolt
#

yeah all of my elevator stuff is limited to mineshaft

#

which is why i need to make sure it passes the buck to your mod

#

the only thing i do related to elevators that "might" be a problem is transpiling out the object.findobjectoftype call

#

and replacing it with RoundManager.Instance.currentMineshaftElevator

#

but i assume that shouldn't get in your way

keen ruin
#

nah

#

I delete all that code entirely

crimson jolt
#

lol cool

keen ruin
#

I thought you prefix canceled that code though?

crimson jolt
#

the rest of the stuff is all under the roaming patch option

#

which can be completely killswitched

keen ruin
#

or you mean when the patch is off?

#

ahh yea

crimson jolt
#

i transpiled the elevator thing

#

because it needs to apply all the time

#

otherwise you get lag spikes

keen ruin
#

yeeep

crimson jolt
#

the prefix cancel is done like this

#

only if you have the roaming patch enabled, and the mask is in behavior state 0, it runs my new roaming state instead of the vanilla one

#

you can kinda visualize it as me just replacing the contents of the switch case 0

keen ruin
#

yee

crimson jolt
#

if im being honest you make transpiling it look easy

#

it was just so much easier for me to conceptualize rewriting the behavior from scratch and covering "all" the use cases

#

in my case "all" is just vanilla stuff though

keen ruin
#

well it helps that I have a utility class for it lol

#

it took a good while for me to get to that point

#

I wanna say for this patch that CodeMatcher would probably work too though, but I barely use that so idk for sure

#

SmartEnemyPathfinding Version 0.0.3

  • Fixed the masked repeatedly using the main entrance when all players lock themselves in ship.
    it is done
crimson jolt
#

shouldnt take me long to update either

#

glad that is all sorted

karmic geode
#

Yippeee!!

keen ruin
#

๐Ÿซก

vivid dock
keen ruin
#

oh like the masked took the elevator down after someone trapped the jester?

#

love that lol

ashen harbor
green gust
ashen harbor
#

LMAO I tried and it didn't send

#

I will try again

#

There we go

keen ruin
#

hmm looks like this is just a lil oversight

keen ruin
#

interestingly, this also kinda reveals an oversight on zeekerss part

#

it prioritizes the lowest path length when choosing the next roaming node, but if the search start has no path, then the path length ends up being zero

#

seems like it should probably be float.PositiveInfinity instead

#

now I gotta decide if my reimplementation should also have that bug

tardy pivot
#

while in doubt. config it up ๐Ÿ™ƒ

keen ruin
#

oh god

#

PathfindingLib has no config so far, I think it would be nice to keep it that way lol

#

maybe I can expose that as an option in the roaming config though

#

if needed

green gust
#

it would be a config in pathfindinglib and not smart enemy pathfinding?

tardy pivot
#

it's an oversight in the pathing logic itself not in whatever enemy uses it

#

at best it could be a setting in PathfindingLagFix

#

but the fix has to be implemented in PathfindingLib so i understand what Zaggy is pondering on

ashen harbor
#

Gaming

keen ruin
#

in the vanilla case it would be a patch in PathfindingLagFix

keen ruin
#

PathfindingLib Version 2.3.1

  • Made SmartRoaming use AgentExtensions.GetPathOrigin() to determine the start point of its paths.
  • Fixed an exception that could occur in SmartRoaming if a path from an agent succeeds, while a path from the search start point fails.
  • Set the non-smart agent navmesh area type name so that NavMesh.GetAreaFromName("NonSmartAgent") returns 25.
green gust
#

the thing is supposed to explicitly always follow me and teleport when there's no path and it has no current path to go off of

#

spawned a manorlord too and it just would not follow me at all and struggled a bit

#

i've only tested on this interior though so could be an interior thing? dunno

#

01992d48-201b-152c-b71e-3dfb422ef1f9

i tested with these + coderebirth, ill have to send a google drive link for latest coderebirth since its 200mb and i dont got nitro ๐Ÿ™ƒ

#

though firsti ll test with the current thunderstore release of coderebirth, might also exist there (i imagine it does)

#

seed: 62682703

#

oh and the moon was repress

#

nvm doesnt happen with thunderstore coderebirthlib and coderebirth, guess i gotta figure out what i changed lol

green gust
#

now that i tested again this doesnt happen :/

karmic geode
#

Classic modding experience

keen ruin
#

uh oh

#

presumably an issue on your side then? but I can send you a debug build of PathfindingLib to get more info out of it if you need

green gust
vivid dock
#

When global roaming is enabled in SmartEnemyPathfinding, can the masked enter or exit the facility regardless of whether all other players are inside or not?

keen ruin
#

indeed

#

they move purely based on search routine and line of sight, they know nothing about any players' positions

fossil sequoia
ashen harbor
# fossil sequoia

This is an issue with LC Office from what Zaggy has said in the past I believe

#

@swift token you gotta fix this sometime lol

keen ruin
#

yeah hard to say if it's for sure that issue if it hasn't been fixed yet, but it seems likely

#

the top floor doesn't connect to the elevator

ashen harbor
#

last update for Office was a couple months ago so before you stated it needed fixed

steep tartan
#

PathfindingLib is crashing LC in the new version (on my modpack, idk if it happens with others)

green gust
#

Yes crashes due to the new update

#

Zaggy will fix it when he's available

vapid python
#

Also happening with me

#

Was about to mention it but beat me to the punch by about 3 hours lol (tbf I was asleep)

keen ruin
#

yeeerp

#

Unity version change broke my native hooks, looking into it now

#

well, not looking into it, preparing to update all the offsets

#

Matty was (maybe still is?) looking at integrating a pdb lookup instead of using fixed offsets, which should prevent this problem in future (and also make us backwards compatible)

#

well, as long as data structures don't change...

#

those are not in the pdbs

#

uh oh

#

I think Unity hasn't published the pdbs to their symbol server yet

green gust
keen ruin
#

I suspect the pdbs are available when installing the editor locally though, trying that now

#

bit of a pain for what Matty is working on though

tardy pivot
#

they will publish them eventually no?

#

or somebody will have to spin up a third-party pdb server

keen ruin
#

surely they will lol

keen ruin
#

(if you decide to go for that pdb lookup library mod anyway)

#

oop

#

WinDbg got it this time, maybe we're good

keen ruin
#

Took me a bit longer than I had hoped, but:

PathfindingLib Version 2.4.0

  • Updated native hooks to support Unity 2022.3.62f2 (Lethal Company v73). This breaks compatibility with previous versions.
#

lemme know if you get any crashes, but I think I covered all the functionality

ashen harbor
#

Honestly @keen ruin You guys were in vc working hard on this earlier, proud of you for getting it out so swiftly tbh

keen ruin
#

PathfindingLagFix theoretically shouldn't need any update, though I've only made a cursory check thus far