#Starlancer AIFix v3.13.2 | EnemyEscape v3.0.0

1 messages · Page 2 of 1

gleaming robin
#

Still, I'm stoked that I managed to get it working, even if it is a little shoehorned

#

Gonna test it with a naturally spawned Jester now

sullen inlet
#

Don't you literally like, lance stars? Stand proud

gleaming robin
sullen inlet
#

Excellent

reef salmon
# gleaming robin

does this use the lethal escape bandaid solution of visually keeping the jester out of the box and just changing its speed while it's technically in the idle state

gleaming robin
#

How does it kill in the idle state? Or does it force the kill collider during that?

#

But no, it sort of forces it to stay in BehaviourState 2 (the aggressive state) while conditions are met (a player exists outside)

stiff reef
gleaming robin
#

As a reminder, AIFix doesn't put enemies outside or give them the logic to exit the facility

stiff reef
#

I know AC allows me to let jester to spawn outside and this will allow him to body my team >:)

gleaming robin
#

yee

stiff reef
#

And he will go at full speed

sullen inlet
#

Imagine a map like Triskelion but instead of big acid lake you fall into a pit full of jesters

stiff reef
#

unlike Lethal Escape i changed jesters speed to 6 to give people a fighting chance

stiff reef
#

is the update that fixes jester out or nah?

gleaming robin
#

Nope, still not fully fixed yet, so tba

stiff reef
#

Mk

rough echo
gleaming robin
# rough echo Very nice

Ty ty, I'm so close to the Jester fix being complete, it just gets weird whenever it returns to its passive state. For some reason the cranking animation happens again, even though it isn't in the process of winding up to attack. I'm close to a fix tho, I can feel it 😤

tiny grove
#

@gleaming robin does this work for brackens, and if it does, would the bracken still make people lag?

gleaming robin
#

I've spawned brackens outside and not noticed any change in performance

#

I do have a powerful rig though, so I can't answer for 100% certain

#

When I say powerful I mean my vanilla fps is about 240

tiny grove
#

i might try it with friends then cus when i updated my map to have brackens spawn outside, it tanked my fps heavy (only mine tho)

#

and i was the host so

gleaming robin
#

Lemme know how it goes!

tired ore
#

It's just harder for the bracken to start doing that inside than outside for obvious reasons

proven fox
#

So, is this better then Escape Company? Ik people are likely making that comparison a lot, sorry I am sure you've heard this question before 😅

Also, does this work when only the host has this mod installed?

foggy remnant
tiny grove
primal smelt
#

I really enjoyed your starlancer maps but unfortunately LLL maps break some other mods so ill have to revisit later

foggy remnant
#

i didnt have issue with mine. everything loaded just fine. i wanna know which mods doesnt work on your end

primal smelt
#

2 mods
They work but don't

#

Hold on i made a post in LLL thread

foggy remnant
#

they work but dont?

primal smelt
#

I'll tag you

proven fox
# proven fox ohhh that's cool!

Causes some SERIOUS lag when there is 100 of them.

Ik that sounds wild, bc ofc there should be lag, but honestly they didn't cause lag before this mod.
Just letting ya know

gleaming robin
main wyvern
#

The only acceptable answer is hoarding bugs

gleaming robin
#

Exactly

spice latch
#

giants

gleaming robin
#

New moon: Land of the Giants

#

Fr though, I have no idea what to do with that bug report 😓

spice latch
#

Just nod and move on

main wyvern
#

Ig

#

Because you can’t really do anything with that

#

Ofc 100 giants would break stuff

#

There’s no scenario where you’d ever even have that many

#

If a moon has more than 10 giants at a time it’s not a good moon UAHGHHUAHGHHH

spice latch
#

100 jesters

main wyvern
#

Dear god no

#

Oh hey wait now I can do my spider moon idea

#

Not sure how well it would work

#

But it would be neat

gleaming robin
#

The only reason I wanted to know was bc if there is some kind of leak in my code I'd wanna patch it, but I think the issue that's probably happening is 100 things trying to properly use the navmesh at once is just too much

stiff reef
#

100 Coil heads

main wyvern
stiff reef
#

:)

gleaming robin
#

Hoooooooooooooooly shit y'all

#

I got Jester working

#

It turns out I was way overcomplicating things, but I just tested it and got the following results:

  • The jester winds up and attacks
  • It'll return to its box appropriately after 5 seconds of having no targets outside without getting stuck in the crank animation
  • It'll properly wind up and attack again if I go back out
  • It follows me into the ship (while winding up outside of the ship) after popping out and murders me
#

@carmine shale

carmine shale
#

YOOOOO

#

JESTERRRRRRR

#

We love to see it

gleaming robin
carmine shale
#

LET'S GOOOOO

#

Duuuuuude I wonder what it'll look like when a jester is chasing you as you take off

#

Bro goes supersonic speed underneath you haha

gleaming robin
#

probably lmao

#

the ship door actually does block it from entering

#

but at that point, all you're trying to do is teleport your team and gtfo'ing

#

cuz it stays mad

#

it can 100% get you on the roof

#

Also this might be one of the most cursed images lately

bright fern
#

THUMP THUMP THUMP THUMP

"We literally cannot leave the ship we gotta go im teleporting you in-"

"CAPTAIN. YIPPEE INSI--"

INVERSE TELEPORT NOISES

gleaming robin
#

Oh that's a brilliant idea Masa!

bright fern
#

Inverse teleport saves the day

carmine shale
#

Yeee!

#

stuck outside with a jester?

#

teleport in!

bright fern
#

On a serious note though, Masa REALLY can't wait for a toy factory moon that spawns Nutcrackers and Jesters outside now

#

(Instead of Dogs, Baboons & Giants)

carmine shale
#

Haven't tried it yet

#

Tho the box itself looks a bit smaller than the jester

bright fern
#

Mini Jesters

#

Call it a Joker

carmine shale
#

Haha

gleaming robin
# gleaming robin

@stuck spruce I don't think you've ventured into this post, but here's a look at the jester fix

stuck spruce
gleaming robin
#

Gonna upload the fix shortly, as well as update the modpack

rancid brook
#

Why does that look the fiend lol

reef salmon
rancid brook
gleaming robin
#
  • StarlancerAIFix v1.2.0
    • Added JesterAIPatch, which fixes the jester enemy being unable to attack while outside.
      • Previous behaviour: Jester would wind up, pop out, then immediately return to box.
      • New behaviour: Jester winds up, pops out, then massacres anyone unfortunate enough to be outside.
bright fern
#

Yippeeeee

stiff reef
#

I CAN NOW MAKE IT A 15% CHANCE FOR JESTER TO APPEAR OUTSIDE ON ANY MOON

#

HAHAHAHAH

gleaming robin
#

Unfortunately for others, yes :3

rough echo
#

To add to the 100 enemies issue: Of course it didn't lag before if 100 indoor enemies were outside, they virtually had no AI

#

Their AI consisted of "navigate to 0,0,0"

#

Now, if you have 100 indoor enemies outside, they actually do shit

#

They're gonna lag

#

lmao

gleaming robin
#

Oooh excellent point, ty Nikki

rough echo
tiny grove
#

insane

#

also you probably shouldn't bother trying to fix the 100 enemies bug because it's normally impossible even when heavily modded lol, you would need to actually go out of your way to somehow break it

gleaming robin
#

Yea I'll make the call now and say I won't be addressing that particular use-case 🤭

stuck spruce
#

Yeah same with what Metrollen said, I wouldn't stress about it ^^

proven fox
# gleaming robin 100 of what, exactly? For clarity, this mod only does something when an enemy f...

Listen, I was just spamming the shit outa monsters XD

I am just saying, prior to using this mod it was perfectly optimized to handle monsters in numbers of hundreds for goofy moments when ya just wanna mess around, zero lag at all.

But with this mod, it's more as you would expect, slowing down the game till it can't run anymore.

I know that sounds dumb, and it's only gonna happen in crazy moments like those, I am just pointing out a distinction, that's all xD

gleaming robin
#

Like Nikki mentioned though, did they have AI capabilities, or was it just to see them get into a huge clump?

proven fox
#

Well I mean they where all walking around, doing what they usually would do, ofc some clumped up bc there was so many.

gleaming robin
#

Did they attack?

#

Just covering all the bases lol

rough echo
#

If another mod was modifying them and their AI was working without lag with 100 of them, I'd be impressed

#

But I'm telling you right now that vanilla AI behavior is that they don't work

#

It's been tested pretty extensively and let's just say Coilheads having dance parties and not attacking you is not intended AI behavior lmao

tiny grove
#

coiled ▶️ 🤸‍♂️

spice kindle
#

sorry, but how do you make enemies go outside?

#

or spawn outside

tired ore
#

if you want them to go outside you want #1175921476134785125

#

if you want them to spawn outside you want to get a config mod

spice kindle
#

i have letha quantities

#

oh you can use LLL for that

stuck spruce
#

@gleaming robin Have you come across this yourself or just me?

#

This is on Triskelion

#

with Moreinterior Bunker

teal apex
# stuck spruce

Hmm looks like maybe issue with nodes I placed around or just a incompatibility with mine will test it this mod later

stuck spruce
teal apex
#

Is it only using this mod or in general ?

stuck spruce
#

General use, not standalone. Also running Zaggy Pathfinding Fix and Diversity

teal apex
#

Gotcha

#

I will see if I can improve the nav mesh spawns I know the cave is what gave us the biggest headache for enemy pathing

stuck spruce
#

I did a little test with HexiBetterShotgun too and BetterShotgun, it REALLY messes with stuff. Gonna see if they in discord or something

gleaming robin
#

I haven't personally come across that issue in testing

teal apex
gleaming robin
teal apex
#

Sorry saw was direct to someone else

#

Lol

gleaming robin
#

No worries, any input is welcome lol
Does bunker have any odd generation properties? Like does it generate above ground at all?

teal apex
#

it should only generate at root for dungeon generator

gleaming robin
#

but heightwise it doesn't skew upwards?

#

Cuz it seems like that error thinks the ai is outside I think

teal apex
#

Nope not like a lot maybe only like I have had it like do 2 to 3 above normal entrance with the stairs but I made them rare

gleaming robin
#

Yeah that'd be fine

teal apex
#

Will check my AI node positions

#

If they are too close to walls or under furniture

gleaming robin
#

The way I grab the inside vs outside divide is by grabbing the lowest y position among outsideAI-tagged nodes and the highest y position among the insideAI-tagged nodes and placing the division in the middle of them

teal apex
#

2 I can think of us the barracks and the mess hall I might need to change

#

Ah gotcha

gleaming robin
#

kk, lemme know
ugh, I really wish that error was slightly more descriptive

teal apex
#

For sure 👍

gleaming robin
#

All it tells me is "hey there's a problem somewhere in your patch"

teal apex
#

ok i check some problem spots i can think of

#

the pink diamond is the AI nodes

#

so i did have one under table

#

and i had ones near other spawn nodes

#

like the hazard and scrap spawn

gleaming robin
#

I wouldn't think that would cause an issue here, but it's worth testing. If you test without changing your mod, just adding mine, are you able to replicate the errors?

stuck spruce
stuck spruce
gleaming robin
#

That's so strange. Unless you've got something directly editing the EnemyType script, my script shouldn't even fire if they're already tagged correctly

#

Can you use AC to force the bunker with just crawlers and centipedes?

stuck spruce
#

Sadly not jsut for the interior but LLL might be able to? I will check now

gleaming robin
#

kk

stuck spruce
#

damn sadly no :<

gleaming robin
#

I think maybe you can set interior spawns with LLL config, then force bunker with the MoreInteriors config?

rough echo
#

Could also just force Bunker on a moon and change that moon to only Snare Fleas and Thumpers

stuck spruce
rough echo
#

Kk

#

vanishes back into obscurity

gleaming robin
stuck spruce
#

But I legit can't replicate what went on.

gleaming robin
#

Was that also with bunker interior?

stuck spruce
#

I thought maybe because a client picked up "controller" from AC maybe

#

No this was with Hospital Interior this time

#

But console clear

#

So wasn't a client using controller either

stuck spruce
#

And like you said, the error is like the most vaguest thing, just tells you something not working and that's it >.<

#

For life of me I can not replicate what ever went on. Not in solo it seems anyway

gleaming robin
#

Does it actually break their AI btw, or do they still function? Also next time you get this error, send me the full log

stuck spruce
#

Asking in SavageCompany on spawn method for the events because I am out of ideas 😛

copper yew
#

forgot to mention earlier, but the issues we were debugging in #1200695291972685926 doesn't come from starlancer ai fix at all, so there's nothing for you to worry about 😛

gleaming robin
#

Lemme know if there's any way I can potentially help!

gleaming robin
stuck spruce
# gleaming robin Yea those are really weird errors. Though have you tested it without anything bu...

I've tested without 0 issues like I said and also retested reintroducing other mods back in, still to no luck reproducing anything remotely. Checked logs for player interactions and saw nothing out of ordinary/error. I am genuinely lost on this one, seems like a rare occurrence the game just didn't like. I've even forced certain events (Indoor/Outdoor Spawn Events) with SavageCompany to see if that caused it but still no errors.

#

Even spawned centipedes and crawlers outside and the only error was the obvious raycasting because centipede has nowhere to hang

gleaming robin
#

Ah sorry, I must've missed/forgotten you mentioned it already lol
Well if it was just a hiccup, then I guess there's not much to do about it unless someone stumbles upon a fix for it, so I'll call this a non-issue for now

stuck spruce
#

Yeah it's no stress, it was more of a question than report anyway as it was just so unusual! If I reproduce at some point I'll let you know. My best bet only way I am gonna recreate it is if I get a specific dunggen that caused it to begin with. I should've saved the seed tbh >.< I only thought about that afterwards

copper yew
#

#1193657447290769489 message

have you run into any reports on the starlancer maps about masked enemies? starting to wonder if this is a common issue for modded moons

#

since readek mentioned it happened on starlancer moons i thought i might as well ask

gleaming robin
#

Nothing besides "masks spawn too early and are outside by the time I get to the door" but that's been a while ago, before I moved the entrance twice lol

#

Can you sum up the issue in that thread for me? Idk where to start looking atm

stuck spruce
#

@gleaming robin I don't know how this affects it but have noticed double/triple entries from LLL and only just noticed it when to check on dungeon flows?

gleaming robin
#

Do you mean when you simulate dungeons? Not sure what you mean

stuck spruce
gleaming robin
#

Yeah I'm not sure exactly what causes that if it's on my end, but I don't think it'd be a problem. Do the later configs default to something different than the one you configured yourself?

#

Update on the AI Fix progress btw: I've managed to get a sandworm to reset underground after attacking. Gonna do another test where I have both indoor and outdoor spawns and see if anything breaks

#

If it works I'm gonna try fixing the coilhead sliding, and then the AI Fix should be complete \[T]/

copper yew
primal smelt
#

I don't think it may necessarily be a "bug" per se with the high chance to see masked spawning, greeting you when you land - I've had in vanilla titan for example, a bracken be spawned immediately as soon as I entered the facility - By default, they have the spawn rate of the bracken, so if a moon has bracken at high probability to spawn, they'll mimic that

I presume people may not be reading the config, but even I'm speculating

Sometimes I've seen masked run out the building as soon as I've landed but I've seen plenty of times they don't

#

These things were long before your mod came out

merry kraken
gleaming robin
#

Yeah I've run into similar occurrences

primal smelt
#

I put 100 hours into pure vanilla before touching anything modded so I've seen my fair share of "occurences" if you will and when people jump head first into modded, it just leads to speculation when it could all be vanilla behavior from the getgo

gleaming robin
#

LC is quite the quirky game when it comes to bugs

carmine shale
#

Makes me love vanilla-feeling mods like Peepers

primal smelt
#

I enjoy mods like savage company, with the randomness, but I wish it was a bit more stable

#

It's better than the other event mods for the most part in terms of events

#

I just wish finding serious players was easier

bright fern
#

Kind of relieved that there are more unserious players than serious players to be honest. The amount of games Masa played where people were just too serious, competitive and strict/militaristic about their layouts and tactics wanting to win was very.. very exhausting. Epseically when you play a frikkin Party Game @.@ (Came from Dead by Daylight 😔)

Not saying that serious players gotta go but ye

gleaming robin
#

Pretending to be serious is fun, but LC is not a game to be sweaty in lol

#

Managed to fix up the sandworm AI, heading to bed late as per usual, but tomorrow I'll fix the dumb coilhead AI

copper yew
#

oh what's wrong with the sandworm ai? 👀

#

i've only been in a public lobby once but it was super chill, probably one of my most memorable sessions actually

#

so i guess i got lucky with the strangers in my lobby

lean cargo
#

I’ve never been in a public lobby

teal apex
tiny grove
#

just mousin around

#

are they just supposed to be for ambience like the manticoils and locusts?

teal apex
#

gonna make enemies but only gonna be occasion

#

they will switch from like aggressive to passive like the spore lizard and other types

#

can be helpful with a cheese prop and also calmed with cheese

#

basically like this

  • Passive search
  • Rats get near another little more aggro
  • more rats get more aggressive or they disperse
  • Cheese makes calm
  • Cheese can make them help find items
tiny grove
#

oooo

primal smelt
bright fern
#

Masa's been in countless lobbies that had their game face on when needed but were magnetically attracted to landmines. They took the loss without any salt too.

The only times Masa saw arguments is when someone does get too sweaty/impatient about something you DEFINITELY can wait a bit for, or if someone trolls/disrespects.

#

If someone leaves after 1 bad match too, that is -not- a casual. That is someone on the ragetrain. Not normal gaming/party behavior fr fr

#

They are grinding & slaving, not playing & volunteering. :'D

gleaming robin
#

I was way overcomplicating things while I was trying to fix it, but eventually I figured out that, instead of introducing like 4 blocks of logic, I could just tell it to override the reset position if it's tagged for being inside

#

I'm relatively inexperienced at coding, but I'm getting better at the logic behind doing things

gleaming robin
#

Alright, added a little piece of logic to the SpringMan DoAIInterval() to tell it to resume its walk cycle if it loses players (such as when they get up on the ship where it can't go)

#

Gonna post soon, just wanna do another test rq

bright fern
#

Oh, just realized Masa never mentioned this

First of all, Jester got otuside with LethalEscape on Acidir 👌 peak gamer moment. Second of all however, it was stuck in a tree and did not know how to get to Masa. Lastly though, not a visual glitch, it calmed down again after going to interior then back to exterior (But still stuck)

#

Probably gonna mention this to Wesley too since it could be a Acidir skill issue

gleaming robin
#
  1. Noice
  2. Probably just a navmesh issue. @spice latch if you wanna allow for this, you'll need an off mesh link so that enemies have some idea of what to do there, feel free to dm me directly if you need more info
  3. See #2 🤭
#

Okay so uh

#

I thought Bracken couldn't get in the ship

#

I was wrong

lean cargo
gleaming robin
#

I was testing expressly for this and it definitely took a minute before it came in. I was watching the monitor and saw the coilhead I was testing just ploppin' around, then all of a sudden I see a red dot going straight for the ship's ladder. Turn around and 😱

faint flower
gleaming robin
#

*I close the doors*
"You're coming with us, let's ride"

#

Version 2.0 dropping shortly

gleaming robin
#

Starlancer AI Fix v2.0.0

#
  • Starlancer AI Fix v2.0.0
    • Added SandwormResetPatch
      • Previous behavior: After attacking, an interior sandworm would appear just below the surface and break its AI.
      • New behavior: Interior sandworms now relocate to a random inside node after they attack, thus preserving their AI.
    • Added SpringManAnimPatch
      • Previous behavior: Upon losing all targets (such as its target player entering the ship and there being no other targets available to it), a springman would begin sliding around without animating a walk cycle.
      • New behavior: Upon losing all targets, a springman will now correctly resume its walking animation.
#

Barring future LC entity releases or bugs that arise from StarlancerAIFix, it is now feature complete and I can stop poring over decompiled LC code 😵‍💫

lean cargo
#

Congrats!

gleaming robin
#

So go wild and put monsters wherever you want you heathens

lean cargo
#

Only earth leviathans on every spawn node, got it

gleaming robin
#

It's your funeral :3

lean cargo
#

That’d be so horrible lmfao

bright fern
#

100% Interior Earth Leviathans in Egypt, Orion or Gratar

#

Maybe EchoReach.. actually no EchoReach could slap hard with Eareth Leviathans

Holy shit, gonna just turn that place into Dune

gleaming robin
#

As always, I'm so excited for the moon makers to grab this fix and be able to fully embrace their enemy theming however they'd like!

queen furnace
#

That's what i'm doing myself with lethal quantities :p

bright fern
#

A lot of Masa's inspirations seem to lean towards enemy & interior mods, though who knows. Might just start with a moon based on Hygroderes maybe.

The world of sliiiiime

bright fern
#

Just the fact that it can be done now

reef salmon
#

coilheads seem to have trouble getting onto the ship. whenever i go onto the ship, they just continue passively wandering even after chasing me. tested on experimentation and asteroid 13.

#

actually, same happens with jesters (passive ones atleast)

gleaming robin
#

It's likely that there's no off mesh links for the enemies to enter the ship with, which is why masked can't enter the ship on some custom moons.

Coilheads also lack the capability to climb ladders even if the right links were present, so because you become unreachable via navmesh they resume a passive wandering state as if no one was watching them.

reef salmon
#

there's definitely mesh links on experimentation though

gleaming robin
#

If someone were to put a walkable off mesh link from the ground to the ship, a coilhead could walk right in

gleaming robin
reef salmon
#

only tested passive jester though

gleaming robin
#

Odd, but other than that it attacked correctly?

reef salmon
#

yep

gleaming robin
#

That's good at least. I'll check the experimentation scene later, for now I need to lay on my couch and watch some TV 🤭

reef salmon
#

alrighty 👍

bright fern
#

Enjoy your rest. :3

rough echo
gleaming robin
#

Rip me

gleaming robin
reef salmon
gleaming robin
carmine shale
#

There he is

reef salmon
#

huh

gleaming robin
carmine shale
#

Rip

#

Lmao

gleaming robin
#

So it seems like there is a slight navmesh issue on experimentation though

#

if you're standing by the console it runs under the ship

reef salmon
#

if it matters, i was boarding the ship on this ladder

carmine shale
#

That's silly

gleaming robin
#

Shouldn't matter, it's AI should find a way up regardless

#

gonna test again tho

reef salmon
#

hm

#

remember to check with coilheads too

gleaming robin
gleaming robin
#

idk why tho lol

gleaming robin
gleaming robin
carmine shale
#

I think it makes sense they can't climb ladders

#

They got no arms

gleaming robin
#

I've also still never made a config before

reef salmon
#

well maybe you can find out

gleaming robin
#

Well I was right at least, so we know that it's working-as-intended for coilheads to not use ladders

ornate onyx
#

INTERIOR WORMS

#

this is insane

foggy remnant
#

havent been playing much

#

but i used a mod that makes the worm into a shark

#

but havent seen it yet

gleaming robin
#

Well, it seems like this should be the code allowing a coilhead to climb

#

I didn't even know what |= was

rough echo
#

No climbing coils >:(

gleaming robin
#

Nah, not by default. If I did add it, it would be as a config that defaulted to false

#

The problem there is if I config it for that, what else will people want and when will it end? 😵‍💫

#

atm it was just an exercise in seeing how to do it, but I don't think I'm going to actually make it rn

#

Thinking about it, Zeekers might've also excluded climbing from coilheads so they couldn't climb extension ladders to chase after players, since they're so fast they'd probably murder you before you got halfway up

rough echo
#

Valid

rough echo
bright fern
gleaming robin
#

Oh sick, you got DOOM on your phone? bet

queen furnace
# rough echo

This will become a mod where one of your crew members plays a bracken that can kill other mobs and bring loot back to the ship 🤣

bright fern
gleaming robin
bright fern
gleaming robin
#

I expected a smol bork at the end tbh

bright fern
#

ᵇᵒʳᵏ

empty pivot
#

Question

#

Just like how skinwalkers states dissonancelagfix is redundancy (since it already does what the mod does) - is there any redundant mods to have if using AI Fix (Such as pathfindinglagfix)?

sullen inlet
#

No

#

And whatever is said below me

gleaming robin
#

I don't believe so. Looking at PFLF it sounds like it primarily triggers when an enemy can't path due to edgecase circumstances. One of the listed cases that's addressed by PFLF is:

This would occur for the Bracken if it spawned outside, since it has no outside nodes, or if the bracken was in a dead end with a player watching the exit.

Specifically here, my ai fix would take care of the outside part of the problem, but would do absolutely nothing about the dead end. So I think they could probably pair together rather well

#

Ah, actually, I thought I had asked about this directly with the dev already and I had.

#

And as a note for compatibility regarding pretty much anything, everything I've patched has been in postfixes to make it as compatible as possible, and my code postfixes the following methods:

  • EnemyAI("Start")
  • JesterAI("Update")
  • SandWormAI("StartEmergeAnimation")
  • SpringManAI("DoAIInterval")

The specific ones are only triggered if the enemy is where it doesn't normally belong, meaning Jester/Spring outside and Worm inside, and the Jester/Spring patches have logic to prevent them from constantly triggering and to make sure the code gets called as infrequently as possible.

#

sorry for all the words, but I figured this was as good a time as any to give some further insight into how the fix works

faint copper
#

yeah, the outdoor bracken lag only happens with mods, but same functions can cause lag in very normal gameplay circumstances

#

as far as I know, no other mods attempt to address that

#

at some point I want to revisit the mod to see if my newer utility functions for transpilers allow me to do things automatically for all calls to the problematic functions, but it's tricky because I need to track what coroutines are running

tulip vault
reef salmon
foggy remnant
#

if they function like the ladder. maybe the masked and the braken can

#

tho knowing the masked. it would pick it up maybe hahaha

reef salmon
#

yeah enemies can't climb extension ladders, can't just add something to the navmesh on a whim\

reef salmon
#

oh\

#

well maybe im a little stupid\

#

but the extension ladder probably doesnt do that\

tulip vault
#

not by default i dont think

#

it wouldnt be hard to do i dont think

gleaming robin
#

The ladder might generate an off mesh link when used

gleaming robin
reef salmon
celest isle
#

Does this fix outside brakens doing nothing?

copper yew
#

oops just realized im on the wrong thread, sorry for the ping biggie

#

@gleaming robin out of curiosity while you were working on fixing enemy ais, do you come across this often?

[Error  : Unity Log] "CalculatePolygonPath" can only be called on an active agent that has been placed on a NavMesh.

i originally had a patch in mirage that tries to fix this by disabling functions that'd require the enemy to be placed on a navmesh:
https://github.com/qwbarch/lc-mirage/blob/cd6ac11489f71cbf75d71477eb7abb7cd8bbb2b7/src/Mirage/Patch/IgnoreNavMesh.fs#L26-L31

but im assuming this is a bit sus and could be causing issues so i'm reverting it (although it didn't have any issues while using mirage on its own, i feel like this might be the cause of some mod incompatibilities)

edit: actually since i'm using OccludeAudio in mirage now, the Physics.Linecast call might be causing this error, so i probably just need to patch occlude audio to ignore update if it's not on a nav mesh, but still curious if you've seen this error log a lot while you were testing things yourself

tiny grove
celest isle
#

Does this fix bracken doin nothing outside

gleaming robin
gleaming robin
faint copper
#

by doing so I'll have to implement the pathfinding at a bit of a lower level, so it should remove that spam at least from the enemies that are calling ChooseFarthestNodeFromPosition

#

but I'm thinking I'm going to end up making it in an enemy-agnostic way, so I may be able to just blanket fix all direct calls to the synchronous pathfinding function

#

(if all goes well, it uses an experimental Unity API so I don't know how well it will work)

bright fern
#

Dont have the logs because Masa was a bit tipsy yesterday, but Jester might still be bugged(?)

We had the Jester wind up inside, then come outside after the windup with LethalEscape and well it killed one person, then the rest fleed inside. We waited for the time that the Jester would calm down, and got back outside.

The Jester's model wasn't sprung out anymore, but the modded Jester music was still playing, and the Jesxter was still aggro'd. So Masa got uhh.. destroyed by a Jester headbutting Masa with the box at mach 10

#

Its not game breaking, but it definitely was a unfortunate scare 😅 Though there's a chance that the Jester killing you might also unfortunately trigger the 'cant interact' glitch, though Masa isn't sure yet if that one is because of SLAI

gleaming robin
#

So the jester spawned inside, then followed you outside?

#

@bright fern

bright fern
#

Yes.

#

Which, that's LethalEscape's doing of course

#

Though when everyone went back inside then came back out later (to de-aggro jester), it seemed to not have de-aggro'd the Jester, but did change its model to the box

#

Probably would be good to mention that Masa's only other player was killed outside by the Jester

gleaming robin
#

Yee. Based on that I think that's the result of it still trying to follow its inside AI routine while being outside. I can try adding a check for Lethal Escape (though I'd need to figure out how) and add a small function to EnemyAI(Update) if it exists

#

I just wanted my scripts to fire as infrequently as possible 🤭

empty pivot
bright fern
#

yippieeee. And yeah no had a feeling. Jesters currently are dangerous af because of it xD

#

We had no chance even with SlidingCompany & BetterStamina LOL

copper yew
storm zephyr
faint copper
#

yeah, I'm thinking if I can get the proof of concept working I'll create a thread for it, I can ping you

rough echo
gleaming robin
#

Putting together a sort-of patch rn
All I really needed was the ModGUID to make the check

#

Are there any other mods that allow enemies in and out of the facility?

rough echo
#

I don't think so other than maybe any mods that alter Masked behavior

gleaming robin
#

Yeah but masked shouldn't need any sort of patching for this since they already have logic for in/out transfers

rough echo
#

Mhm

gleaming robin
#

Has anyone run in to any odd springhead behavior inside with the fix?

#

Also I wonder if this patch will allow the jester to follow you inside while angry 🤔

#

only while running LEsc, of course

gleaming robin
#

Testing a patch now

gleaming robin
#

So it seems like the issue here stems from LEsc using prefixes on the JesterAI

#

Gonna try unpatching certain patches of the JesterAI code from LethalEscape to see if I can fix this without breaking its ability to leave the facility

#

Actually, maybe unpatching my jester code if LEsc is present would be better. I'll test it when I'm back at my PC, and hopefully that'll work, bc it's much less likely to break anything on LEsc's side

#

Ideally removing my jester specific stuff will prevent the immediate rage while still letting it navigate properly when naturally spawned outside

bright fern
#

Glad to hear Masa's information provided just about enough to find the problem :D Was kinda under influence yesterday lmao so it almost became a afterthought

gleaming robin
#

I'm unsure as to why, but for some reason I can't seem to affect LEsc's patching with Harmony. I can find it in an "if" statement with bepinex, it's a softdependency, and I've tried unpatching individual methods and unpatching the whole ID and LEsc is just unfazed

gleaming robin
#

Okay I figured that out at least, but now I'm getting a bug I thought I had fixed. If I go into the facility while it's winding up, let it pop, then go back out it's sliding around and cranking again but without the mechanics of winding up

#

😵‍💫

severe pewter
#

Oof

gleaming robin
#

Yea apparently I never actually fixed it, I checked with the current release lol

spice latch
#

Bees inside are no joke lol

empty pivot
gleaming robin
#

Thanks to @spice latch and @hallow merlin , Starlancer AI Fix is almost at 50k downloads ✨

haughty rapids
#

Hey audio knight, I’m assuming that if an enemy is teleported outside, its AI won’t update right?

gleaming robin
#

Are you referring to how Lethal Escape functions?

#

Or is there another mod that does that?

haughty rapids
gleaming robin
#

Just sent a message in SD, already been working on a patch for LEsc :)

gleaming robin
#

Now to test with LEsc

bright fern
#

Lets goooo it wasnt headbutting you anymooore

gleaming robin
#

I can't get it to follow me outside in aggro form, but I fixed the insta-box-attack issue at least

#

OHhhhhhhhhhhh

#

actually I don't think that's a bug

#

I think it reverted to passive when you and your team left, then it teleported outside, had the incompatible interaction with AI Fix, and thus ZOOMED at you at mach speed and killed you

#

It does seem to lose some AI outside, but I think maybe I'm not setting the compability patch properly

bright fern
#

Hmm.. Maybe.

Basically, to re-iterate the scene..

  • We were inside, Jester starts winding up.
  • We escape the interior before the Jester is able to wind up completely (there was about 10 seconds left)
  • The jester teleports outside 10 seconds later, already winded up, and starts chasing us
  • Jester kills other friend, and Masa goes back into the main entrance
  • Masa waits for a bit inside (20 seconds or so), then went back outside
  • Jester was still there but in box form, visually, but still chased Masa, sped up, and eventually headbutted Masa to the afterlife
gleaming robin
#

Hmm. I'll try removing my jester patch then and keeping theirs. The navigation should still work with the other patch I'm including

copper yew
bright fern
#

Can test again, just Masa will be alone this time

Friend's PC died today :'c

rough wedge
#

what could be absolutely friggin insane, probably almost impossible is adding support for the company monster to work inside certain facility rooms or outdoor areas. someone could make a really cool mod that has like a blue variant that pays you less, but also less risky than going for the rest of the days or whatever. idk

gleaming robin
# copper yew dubbb what was even the issue

So for the perma-crank issue, something just wasn't being set right in BehaviourStateIndex 2 when it was outside, so in addition to the adjustment I made to let it attack while outside, I had to add some of the original code back in. My thought is that it's probably the poppedOut bool needed to fire in order to override the cranking animation, but this works and nothing here is computationally expensive afaik, so I'm just gonna leave this part alone now 🤭

gleaming robin
gleaming robin
rough wedge
#

yeh i dont know why i said almost impossible. isnt the wall with the door just like...a prefab that only appears on that planet, its not like its linked to the entire planet right?

gleaming robin
#

Unsure, I haven't really explored the company planet scene yet

gleaming robin
haughty rapids
#

😊 ♥️

gleaming robin
#

@bright fern just ran a test where a Jester started winding up inside, I left the facility, it popped inside and immediately teleported outside in angry mode :3
In addition, spawning a jester outside did not result in it immediately attacking in box form

#

Another test: Spawned a jester inside, let it wind up and pop while in the facility, I left the facility, it immediately teleported outside (which btw I think is what LEsc wants it to do), stayed in angry mode, found me and killed me.
I did run into an issue during the test before this success where it spawned inside one of the giant rocks that randomly generate and got stuck, so I'm also gonna see about setting an escaping enemy's position to a random node upon leaving the facility. I also need to test to make sure going back into the facility after it escapes outside de-aggros it

gleaming robin
#

Interesting. I just tested interior Jester behavior without my fix or LEsc enabled, and apparently once it knows you exist, it no longer asks for your location, it simply knows where you are.
I spawned one in the start room, had it notice me, left, waited for 5-ish seconds, went back in: It had left the room.
I go back in to the start room and wait, not moving after entering: Few seconds later Jester just comes right back in and stares at me

#

So at least I don't have to fix that behavior I guess? Its target is its target until the target dies or it swaps to someone else who is in the same area but the first target is not

#

idk it feels janky

#

I think maybe the target resets after it pops and goes back into its box, gonna check

#

Nope, Jester was dialed in on me, even after going back into its box

reef salmon
#

oh so that's why they're a nightmare and always seem to run back into you when you go back in

gleaming robin
#

Yep, they really are a nuisance

reef salmon
#

oh tested it, if it spots you and doesn't start winding, it will NEVER leave you alone even if you leave the building. if it does wind and then go back into the box, it'll wander as normal

gleaming robin
#

weird, it definitely homed in on me with that second scenario, under vanilla circumstances (spawned with DanceTools)

bright fern
gleaming robin
#

Yee, regardless I've got it working pretty well I'd say, just need to refine the code a bit, but that'll have to wait til tomorrow

bright fern
#

Yipeee, love seeing progress!

reef salmon
gleaming robin
#

||[REDACTED] is now processing||

carmine shale
#

Remind me to test something with coilheads tonight

#

Was playing with friends last night and noticed a lil quirk with them outside

gleaming robin
#

I'll try to 🤭 I recommend that tests for issues with specifically SAIFix be done on vanilla moons though, and any issue that presents itself on a modded moon be reported to the moonmaker. If navmesh isn't set up properly, there can definitely be some quirky behavior lol

carmine shale
#

Good to know!

queen furnace
#

Question: i'm trying to spawn spiders on modded planets, when i attack them they move fine, but if i don't they stay on the same spot, don't move and don't even shoot webs, why is that?

gleaming robin
#

Is the terrain particularly not-flat?

#

I've had them lay webs on Triskelion

queen furnace
#

it's flat

gleaming robin
#

hm

queen furnace
#

i tried infernis and celest

#

there are trees and other things

#

but they don't even move anyway

gleaming robin
#

I wonder if they're not set up to look for the type of mesh that a terrain is. But that doesn't make sense bc it should convert at runtime, I thought

queen furnace
#

i also use arachnophilia

gleaming robin
#

oh

#

well if that modifies the ai at all, that's probably the cause

queen furnace
#

so should shoot them further

#

oh

#

i'll try without it

gleaming robin
#

kk, lemme know

#

Actually, I just peeked at the code and might have an idea.
@spice latch is Infernis' terrain set to the room layer?

#

I'm gonna be so stoked if I'm right about this

queen furnace
#

they act the same

gleaming robin
#

kk, I'mma wait and see what wesley responds with before further investigation

queen furnace
#

ok !

gleaming robin
#

That's why spiders don't lay webs then

spice latch
#

Ah

queen furnace
#

But that mean that it wont ever work if the planet modder doesn't do that or do you think you can work around it ?

gleaming robin
#

So lemme ask another question, just to see how on-the-money I am 🤭

#

Does Infernis' terrain show up on the ship radar?

spice latch
#

Nope lol

gleaming robin
#

I'm a god

spice latch
#

we knew this

gleaming robin
#

Vanilla terrain meshes are in the room layer as well, and it's that layer that the ship radar looks for to render on the screen

#

So anything you want to show up on the ship screen needs to be in the room layer

#

This will also allow spiders to lay webs :3c

#

Assurance's terrain mesh

spice latch
#

That makes sense
Looks like I'm releasing a few patches lol

gleaming robin
#

I'm sorry, and you're welcome 🤭

queen furnace
#

What's the most efficient way to let all planet modders know this ? 🤣

gleaming robin
#

uhhhhhhhhhhhhhhhhhh

#

@golden basin idk if this is announcement worthy or not, but it's pretty useful info

golden basin
#

Hm?

#

Sorry, I'm not caught up in the loop, what's the info lol

gleaming robin
#

To get things to show up on the ship radar screen, they need to be placed in the "Room" layer in unity

#

This also affects certain enemy behavior, like spiders placing webs and stuff outside (with the AI Fix ofc)

golden basin
#

Oh, unfortunately this is a massive skill issue by the moon creators, it might also be something put into the documentation for LLL or something automatic

#

There's no real way to "announce" this

#

As much as I'd love for it to be real, we don't have a secret moon society that we didn't invite you to

#

Or maybe there is one and I wasn't invited

#

Worth mentioning it to batby probably

queen furnace
#

HolographicWings too maybe

gleaming robin
#

Hmm, maybe I should start the moon society then

golden basin
#

Meh, don't think LE is even being worked on

#

Oh actually

#

The moon society does exist

#

Though it's given a broader name

#

It's where the developer nerds hang out usually, not just moon only

gleaming robin
#

Ohhhh

#

nah, not exclusive enough

#

I'll just stay one of the "their moon shows up on the radar!!!" people for now and let people run to me with questions 🤭

tulip vault
#

right now the most relevant place is the moon society yeah

queen furnace
#

that was fast

gleaming robin
tulip vault
#

its the other channel im talking to you in rn

gleaming robin
#

ohhhh

queen furnace
#

Is sfDesat in there too ?

golden basin
#

He's in the server, they could ping him

queen furnace
#

Would be nice !

tired ore
#

can dogs getting constantly aggroed be an aifix bug? or should i search somewhere else

#

happens out of the blue

gleaming robin
#

constantly aggroed in what way?

#

@tired ore

tired ore
#

like there's nothing going on in the ship but they keep jumping to one spot inside

gleaming robin
#

vanilla moon?

tired ore
#

yeah

gleaming robin
#

huh

#

that shouldn't be from AIFix

#

I don't directly touch dog ai

tired ore
#

it might be something else in the ship making sounds, but just thought i'd ask

#

ty!

queen furnace
gleaming robin
#

np!

tired ore
#

i also thought it might be genimprovements monitors making sounds, but im lost honestly lmao

gleaming robin
#

Any sound source loud enough attracts them I think

#

is it multiple dogs at once?

#

if so I'm wondering if they're attracting each other lol

tired ore
#

no just one

tired ore
#

but it seemed fixated on one place

gleaming robin
#

well you can certainly try disabling AIFix and see if it persists, but I really don't think it has anything to do with it

haughty rapids
#

what birds 👀

empty pivot
#

There's a needybirds mod?

#

omg imagine a parrot that repeats things it hears

#

"Shh .. there's a dog outside" - Bird: "SQUAAK - there's a dog outside!"

queen furnace
#

No i mean the manticoil haha

#

The dogs chase them sometimes

granite star
#

anyone know if this mod works with lethal escape

gleaming robin
#

Mostly conflict free, only issue is with the Jester. I have a patch almost ready for it though.

rough wedge
#

does this work with arachnophila

gleaming robin
#

Shouldn't have any conflicts, from what I understand

rough wedge
#

k

rocky fable
#

@gleaming robin You think the error spam caused by boxxing masked enemies could be fixed at all? Seems to be a vanilla bug but it'll spam this message repeatedly
[Error : Unity Log] NullReferenceException
Stack trace:
UnityEngine.Component.CompareTag (System.String tag) (at <e27997765c1848b09d8073e5d642717a>:IL_0001)
(wrapper dynamic-method) EnemyAI.DMDEnemyAI::EnableEnemyMesh(EnemyAI,bool,bool)
StartOfRound.SetPlayerSafeInShip () (at <af9b1eec498a45aebd42601d6ab85015>:IL_006B)
AudioReverbTrigger.ChangeAudioReverbForPlayer (GameNetcodeStuff.PlayerControllerB pScript) (at <af9b1eec498a45aebd42601d6ab85015>:IL_0177)
AudioReverbTrigger.OnTriggerStay (UnityEngine.Collider other) (at <af9b1eec498a45aebd42601d6ab85015>:IL_018B)

[Error : Unity Log] NullReferenceException
Stack trace:
UnityEngine.Component.CompareTag (System.String tag) (at <e27997765c1848b09d8073e5d642717a>:IL_0001)
(wrapper dynamic-method) EnemyAI.DMDEnemyAI::EnableEnemyMesh(EnemyAI,bool,bool)
StartOfRound.SetPlayerSafeInShip () (at <af9b1eec498a45aebd42601d6ab85015>:IL_006B)
AudioReverbTrigger.ChangeAudioReverbForPlayer (GameNetcodeStuff.PlayerControllerB pScript) (at <af9b1eec498a45aebd42601d6ab85015>:IL_0177)
AudioReverbTrigger.OnTriggerStay (UnityEngine.Collider other) (at <af9b1eec498a45aebd42601d6ab85015>:IL_018B)

[Error : Unity Log] NullReferenceException
Stack trace:
UnityEngine.Component.CompareTag (System.String tag) (at <e27997765c1848b09d8073e5d642717a>:IL_0001)
(wrapper dynamic-method) EnemyAI.DMDEnemyAI::EnableEnemyMesh(EnemyAI,bool,bool)
StartOfRound.SetPlayerSafeInShip () (at <af9b1eec498a45aebd42601d6ab85015>:IL_006B)
AudioReverbTrigger.ChangeAudioReverbForPlayer (GameNetcodeStuff.PlayerControllerB pScript) (at <af9b1eec498a45aebd42601d6ab85015>:IL_0177)
AudioReverbTrigger.OnTriggerStay (UnityEngine.Collider other) (at <af9b1eec498a45aebd42601d6ab85015>:IL_018B)

[Error : Unity Log] NullReferenceException
Stack trace:
UnityEngine.Component.CompareTag (System.String tag) (at <e27997765c1848b09d8073e5d642717a>:IL_0001)
(wrapper dynamic-method) EnemyAI.DMDEnemyAI::EnableEnemyMesh(EnemyAI,bool,bool)
StartOfRound.SetPlayerSafeInShip () (at <af9b1eec498a45aebd42601d6ab85015>:IL_006B)
AudioReverbTrigger.ChangeAudioReverbForPlayer (GameNetcodeStuff.PlayerControllerB pScript) (at <af9b1eec498a45aebd42601d6ab85015>:IL_0177)
AudioReverbTrigger.OnTriggerStay (UnityEngine.Collider other) (at <af9b1eec498a45aebd42601d6ab85015>:IL_018B)

[Error : Unity Log] NullReferenceException
Stack trace:
UnityEngine.Component.CompareTag (System.String tag) (at <e27997765c1848b09d8073e5d642717a>:IL_0001)
(wrapper dynamic-method) EnemyAI.DMDEnemyAI::EnableEnemyMesh(EnemyAI,bool,bool)
StartOfRound.SetPlayerSafeInShip () (at <af9b1eec498a45aebd42601d6ab85015>:IL_006B)
AudioReverbTrigger.ChangeAudioReverbForPlayer (GameNetcodeStuff.PlayerControllerB pScript) (at <af9b1eec498a45aebd42601d6ab85015>:IL_0177)
AudioReverbTrigger.OnTriggerStay (UnityEngine.Collider other) (at <af9b1eec498a45aebd42601d6ab85015>:IL_018B)

#

When I asked Coppertiel if it was from MEOFork he said he thinks it could be caused by this

gleaming robin
#

What do you mean by boxxing masked enemies?

rocky fable
#

Idk if it happens just from them spawning in but I know it happens guaranteed after I've taken one down and left a planet lol

#

I'll see the log spam from them

gleaming robin
#

Oh it happens when you leave?

rocky fable
#

Might happen before I leave, I check the logs after

gleaming robin
#

Can you test on a vanilla moon that for sure has masked, and then like Experimentation as well?

rocky fable
#

I know that log came from Vow

#

but I also got those errors on Rend last night

gleaming robin
#

Weird, but that means its not necessarily what Coppertiel was saying

rocky fable
#

Vow is my go to to test mimics cus of that 80% spawn chance XD

gleaming robin
#

also the ship's navmeshcolliders are the same in each vanilla map, afaik, which means the masked can get into any of them. I think the masked ALWAYS knows someone's location and just takes weird routes to get there until line of sight is acquired

rocky fable
#

Yeah I've also noticed they can hear you talk btw

#

I've had masked walk around and as soon as I shout they come running

#

XD

gleaming robin
#

Oh neat. Also, vow doesn't naturally have masked according to the wiki. Did you mod them in? Bc if so I'd recommend Rend since it does naturally have masks

rocky fable
#

Yeah as I said this happened on Rend for me too

#

same error spam

gleaming robin
#

But what I'm thinking is that this is a vanilla bug. Perhaps when a masked dies on/in the ship the collider bugs out as the ship is leaving

#

Oh right lol

rocky fable
#

Very possible though I usually never kill them on the ship

#

XD

tulip vault
#

its a vanilla bug

rocky fable
tulip vault
#
        for (int i = 0; i < this.skinnedMeshRenderers.Length; i++)
        {
            if (!this.skinnedMeshRenderers[i].CompareTag("DoNotSet") || overrideDoNotSet)
            {
                this.skinnedMeshRenderers[i].gameObject.layer = layer;
            }
        }
        for (int j = 0; j < this.meshRenderers.Length; j++)
        {
            if (!this.meshRenderers[j].CompareTag("DoNotSet") || overrideDoNotSet)
            {
                this.meshRenderers[j].gameObject.layer = layer;
            }
        }

this code here doesn't check if the skinnedMeshRenderers.Length or meshRenderers.Length contains any null references in the lists

#

@gleaming robin in theory you could prefix this (EnemyAI.EnableEnemyMesh) and iterate through both lists and remove any nulls

gleaming robin
rocky fable
tulip vault
#

possibly yeah

#

log spam for performance + it kills a seemingly fairly important function since throwing an error kills that chain of code

gleaming robin
tulip vault
#

tags can't be null

gleaming robin
#

ah, the object then?

tulip vault
#

this is what im concerned about

#

the act of trying to use .CompareTag on a null object

gleaming robin
#

kk

#

so really just check to make sure "this" isn't null then

#

OH WAIT

#

nvm I think I see what you're saying

#

it needs to check for being null before it even tries to compare the tag

tulip vault
#

yeah

#

lists/arrays etc. can store null references

#
  1. MyThing
  2. null
  3. MySecondThing

etc.

#

eg. if you destroy something that a list contains it wont auto remove it from a list, it just means that spot in the list is now null

#

its possible some of the enemies aren't set up perfectly in this regard

#

so either a prefix patch to that specific function or even like when the enemy networkspawns, you should iterate through those two lists and just remove any nulls that might exist

#

A lot of people dunk on Zeekers code for any reason they can find but doing code without null checking relevant objects is a fairly common problem in the codebase

gleaming robin
#

well this should immediately back out if it detects that the mesh renderer is gone, right?

tulip vault
#

correct but how are you going to insert that code

gleaming robin
#

Oh I was just showing a snippet for logic questions. Like this, yeah?

tulip vault
#

well no cuz your just doing it the better way and its gonna go do it the bad way right after

#

you could

gleaming robin
#

I thought prefixing replaced lol

tulip vault
#

ok discord fuck you

#

prefix adds code before the main function, postfix adds code after the main function

queen furnace
#

Is this the infamous null check i always see in patch notes and don't know what it is about ?

haughty rapids
#

That’s a null check yeah :P

queen furnace
#

ok ok !

haughty rapids
#

You see that in patch notes?

tulip vault
#

you can either

A. return early in the prefix, meaning your code runs, then stops the function before the main function runs. (little gross but not the worst for now)

B. directly modify the main function via transpiling (best option but scary and challenging for people who haven't done it before)

C. instead of fixing the check directly to stop null checks from creeping in. either in a prefix patch to that function or when the enemy OnNetworkSpawn's. go through those lists yourself and remove and nulls from the list so it can't fail the poorly implemented check

queen furnace
#

Yeah something like " added a null ckeck on ... blablabla"

gleaming robin
tulip vault
#

for prefix returning basically instead of a void function you can make it a bool function and return false to end early or true to continue

rocky fable
#

I will say if the update gets pushed that fixes this comes out tonight at all I'll restart my game to update XD

gleaming robin
#

kk, brainblasting rn

#

trying to become Listpilled

tulip vault
#

feel free to slide in the dms if you need a vibe check on anything

rocky fable
queen furnace
#

oh

gleaming robin
gleaming robin
#

I will be pushing an update shortly

gleaming robin
#
  • StarlancerAIFix v3.0.0
    • Added a patch for dealing with null reference exceptions regarding MeshRenderers and SkinnedMeshRenderers in EnableEnemyMesh().
    • Fixed the issue where jesters would get stuck in their cranking animation after attacking (or attempting to attack) outside.
    • Added compatibility with Lethal Escape.
      • Automatically disables LEsc's JesterAI.Update() Postfix in favor of SLAI.
      • This addresses the issue where jesters would be immediately hostile and stuck in the incorrect animation state upon spawning outside.
    • Added future compatibility for Seamless Dungeon.
    • Refined SpringManAnimPatch.
    • Further code optimizations.
#

@rocky fable be on the lookout :3

#

Also @bright fern I know you were looking forward to the LEsc compatibility

copper yew
gleaming robin
#

Oh nice!

#

Let me know if you see the logs indicating it's actually doing something. I imagine it's hard to replicate at will, and I didn't have time to test that part of the patch (since I literally made it in the last 2 hours with some help from Batby)

gleaming robin
#

Starlancer AI Fix v3.0.0

#

It's so bizarre to think about how many people are using my code rn

queen furnace
#

Lol well it's a must have

#

Btw tried the spiders again now that infernis has a map and they do lay webs !

gleaming robin
#

SLAI is on v3 and my poor moons are still on 0.5.7

copper yew
#

my next playthrough won't be for a couple days at least so it's likely someone else will have confirmed if it works or not by then

queen furnace
gleaming robin
#

Me releasing the next update :3c

haughty rapids
#

oh does the arachnaphilia mod do evil things to spiders outside?

queen furnace
#

They lay a lot of webs outside, idk if that's evil :p

#

In moded moons they stuggle a bit

#

i have to try to increase the size of webs maybe they can lay better

rocky fable
#

[Error : Unity Log] NullReferenceException
Stack trace:
UnityEngine.Component.CompareTag (System.String tag) (at <e27997765c1848b09d8073e5d642717a>:IL_0001)
(wrapper dynamic-method) EnemyAI.DMDEnemyAI::EnableEnemyMesh(EnemyAI,bool,bool)
StartOfRound.SetPlayerSafeInShip () (at <af9b1eec498a45aebd42601d6ab85015>:IL_008B)
AudioReverbTrigger.ChangeAudioReverbForPlayer (GameNetcodeStuff.PlayerControllerB pScript) (at <af9b1eec498a45aebd42601d6ab85015>:IL_0177)
AudioReverbTrigger.OnTriggerStay (UnityEngine.Collider other) (at <af9b1eec498a45aebd42601d6ab85015>:IL_018B)

[Error : Unity Log] NullReferenceException
Stack trace:
UnityEngine.Component.CompareTag (System.String tag) (at <e27997765c1848b09d8073e5d642717a>:IL_0001)
(wrapper dynamic-method) EnemyAI.DMDEnemyAI::EnableEnemyMesh(EnemyAI,bool,bool)
StartOfRound.SetPlayerSafeInShip () (at <af9b1eec498a45aebd42601d6ab85015>:IL_008B)
AudioReverbTrigger.ChangeAudioReverbForPlayer (GameNetcodeStuff.PlayerControllerB pScript) (at <af9b1eec498a45aebd42601d6ab85015>:IL_0177)
AudioReverbTrigger.OnTriggerStay (UnityEngine.Collider other) (at <af9b1eec498a45aebd42601d6ab85015>:IL_018B)

[Error : Unity Log] NullReferenceException
Stack trace:
UnityEngine.Component.CompareTag (System.String tag) (at <e27997765c1848b09d8073e5d642717a>:IL_0001)
(wrapper dynamic-method) EnemyAI.DMDEnemyAI::EnableEnemyMesh(EnemyAI,bool,bool)
StartOfRound.SetPlayerSafeInShip () (at <af9b1eec498a45aebd42601d6ab85015>:IL_008B)
AudioReverbTrigger.ChangeAudioReverbForPlayer (GameNetcodeStuff.PlayerControllerB pScript) (at <af9b1eec498a45aebd42601d6ab85015>:IL_0177)
AudioReverbTrigger.OnTriggerStay (UnityEngine.Collider other) (at <af9b1eec498a45aebd42601d6ab85015>:IL_018B)

[Error : Unity Log] NullReferenceException
Stack trace:
UnityEngine.Component.CompareTag (System.String tag) (at <e27997765c1848b09d8073e5d642717a>:IL_0001)
(wrapper dynamic-method) EnemyAI.DMDEnemyAI::EnableEnemyMesh(EnemyAI,bool,bool)
StartOfRound.SetPlayerSafeInShip () (at <af9b1eec498a45aebd42601d6ab85015>:IL_008B)
AudioReverbTrigger.ChangeAudioReverbForPlayer (GameNetcodeStuff.PlayerControllerB pScript) (at <af9b1eec498a45aebd42601d6ab85015>:IL_0177)
AudioReverbTrigger.OnTriggerStay (UnityEngine.Collider other) (at <af9b1eec498a45aebd42601d6ab85015>:IL_018B)

[Error : Unity Log] NullReferenceException
Stack trace:
UnityEngine.Component.CompareTag (System.String tag) (at <e27997765c1848b09d8073e5d642717a>:IL_0001)
(wrapper dynamic-method) EnemyAI.DMDEnemyAI::EnableEnemyMesh(EnemyAI,bool,bool)
StartOfRound.SetPlayerSafeInShip () (at <af9b1eec498a45aebd42601d6ab85015>:IL_008B)
AudioReverbTrigger.ChangeAudioReverbForPlayer (GameNetcodeStuff.PlayerControllerB pScript) (at <af9b1eec498a45aebd42601d6ab85015>:IL_0177)
AudioReverbTrigger.OnTriggerStay (UnityEngine.Collider other) (at <af9b1eec498a45aebd42601d6ab85015>:IL_018B) it's still happening 😦

#

Game hates me lol

gleaming robin
#

hmm

gleaming robin
#

Also did the log show my code doing anything?

#

oh for the love of

#

I found a typo in my code, which probably is the problem

distant bay
gleaming robin
distant bay
#

That's gonna be fun

faint copper
#

wait, why not RemoveAt while you're there?

#

(I assume it's List<>)

gleaming robin
#

Here's the full code for context

faint copper
#

oh

#

that also doesn't quite work the way you might like, because you're still incrementing your index after removing an element

#

so you'll skip an element if one is removed

rocky fable
faint copper
#

probably want

for (int i = 0; i < count;)
{
  if (thing)
    list.RemoveAt(i);
  else
    i++;
}
gleaming robin
gleaming robin
faint copper
#

yeah, it also saves the List doing a linear search right after you did it for it

faint copper
#

but you could also format it as a while

gleaming robin
#

Alright lemme take a step back

faint copper
#
[a, b, c, d, e]
i = 3;    ^
RemoveAt(i)
[a, b, c, e]
i = 3;    ^


[a, b, c, d, e]
i = 3;    ^
i++
[a, b, c, d, e]
i = 4;       ^
gleaming robin
#

RemoveAt is more specific to the index, whereas Remove is meant for removing the first time something shows up?
And I think I see the logic. If it does remove something, the index stays the same, thus allowing it to pick up from where it left off

gleaming robin
faint copper
#

RemoveAt is more specific to the index, whereas Remove is meant for removing the first time something shows up?
More important to think of the data structure the List<> represents. It uses an array as its backing data structure, and has no acceleration for finding a specific element within it. When calling Remove(), that tells it that it has to iterate the whole list and find the index of that element via the default equality comparer, then remove the item at that index.
When calling RemoveAt(i), you're telling it that index ahead of time so it doesn't have to scan for it.

#

in other words, you're making it do the work you already did to find that element by scanning and comparing all over again

gleaming robin
#

Gotcha. So this should be more accurate then

faint copper
#

that should do it, yeah

#

alternatively,

while (meshList.Remove(null));

:^)

#

but that can repeat scan early indices

gleaming robin
#

lmao while loops scare me

faint copper
#

eventually you get to the point where you get annoyed with the limitations of for and even while loops and you just start doing while (true) instead sometimes lol

#

trying to fit some loops into those can make for some very illegible code

gleaming robin
gleaming robin
faint copper
#

for sure, the way you have now is the optimal way anyway

gleaming robin
#

I'm hoping that the real issue was the typo, but I'll take the more optimized version regardless

faint copper
#

I do wonder though, I feel like someone ought to write a hook to debug these mimic meshes being deleted unexpectedly, because I really don't think it's an issue with your mod but I keep seeing it randomly

rocky fable
gleaming robin
faint copper
#

it was potentially skipping elements before too, so it's possible that allowed some null pointers to slip through

gleaming robin
#

and yeah that was my other thought

faint copper
#

those mods should be updating the list if they feel the need to destroy things instead of just disabling them

#

assuming it is a mod's fault and not just a vanilla bug

#

which is also very possible

gleaming robin
#

I think I've seen it in vanilla tbh

faint copper
#

I think so too

gleaming robin
#

and I don't really use masked mods

faint copper
#

it's possible it's just something to do with the despawning code

gleaming robin
#

Yee, and if it's not specific to the masked then this will theoretically iron out the NREs across the board

rocky fable
#

That null error being fixed may even fix the invisible masked bug

#

Lol

gleaming robin
#

Maybe! For now I just want to see my code doing things 🤭

#

Oh and it should be logging this stuff in yellow if my code is functioning properly @rocky fable

faint copper
#

not sure how likely that is though

rocky fable
#

Hope that doesn't cause any issues

#

Lol

gleaming robin
#

wtf

faint copper
#

wuh oh, is that the plugin?

gleaming robin
#

yea

rocky fable
#

Yeah that happened on game launch

gleaming robin
#

Did you replace the existing file, or put it alongside it?

rocky fable
#

replaced it

gleaming robin
#

ooooooooookay then, one sec while I boot VS back up

#

I had preemptively updated the "modVersion", could that be the issue? @faint copper

faint copper
#

I wouldn't think so

rocky fable
#

That error also happens with the live release atm

#

just tested

gleaming robin
#

oh

#

that would explain why it didn't work then

rocky fable
#

Ye

#

I just missed that error before cus I usually have it log in the background with the console closed

#

Lol

gleaming robin
#

@golden basin idk who to poke for this, can you get someone to remove the latest SLAIFix? It bronk

rocky fable
#

Something is just going wrong on game launch

gleaming robin
#

That's true I guess

faint copper
#

it looks like StarlanderAIFixBase.logger is never initialized? although perhaps it should pass through to base.Logger anyway

gleaming robin
#

How do you see that?

faint copper
#

I just looked at the decompile on Thunderstore sorry

gleaming robin
#

oh

#

well lemme try logger = Logger; since I removed that thinking it wasn't needed @_@

#

Yep

#

that was the issue .-.

rocky fable
#

The fix you did in the hotfix for the masked enemies though is still needed I'm sure lol

#

Glad you fixed it

#

XD

rocky fable
#

the code change you did with Zaggy

#

lol

gleaming robin
#

oh right

#

test this rq for me please

rocky fable
#

No error 👍

#

Now to see if I can find a mimic

#

XD

gleaming robin
#

\[T]/

#

Gonna go ahead and push it regardless just to have a working version on TS again

rocky fable
#

Ye

gleaming robin
#

Starlancer AI Fix v3.1.0

#

Thanks for catching that @rocky fable, hopefully the NREs disappear

#

And thank you @faint copper bc it would've taken me a few to figure out that the logger was breaking it ^^;

rocky fable
#

Holy shit

#

Can someone make out this error for me after going back into orbit?

gleaming robin
#

hm

#

well my instinct is telling me that it's Diversity

rocky fable
#

it's spamming hard lol

#

Let me tell chaos

gleaming robin
#

yea I have absolutely 0 idea what that error means

#

I'm just the AI guy (apparently)

rocky fable
#

He'll debunk it lol

gleaming robin
#

Any chance AI Fix removed some NREs? 🥺

rocky fable
#

I never had a mimic spawn that game was gonna leave and go back

#

but then got stuck in orbit with error spam

#

XD

gleaming robin
rocky fable
#

The life of troubleshooting eh?

#

XD

gleaming robin
#

Pretty much 🤭

copper yew
#

i feel that so much 😂

gleaming robin
#

I just want to see the log flooded with my mod doing a bunch of things, like how the log spits out a bunch of useless messages about negative colliders whenever you land

faint copper
gleaming robin
#

Yee, I felt silly once you pointed it out, I don't wanna think about how I would've felt if it took me an hour to realize it xD

faint copper
#

I've had those moments too, it definitely helps to have a second set of eyes lol

rocky fable
gleaming robin
#

VINDICATIONNNNNNNNNNNNNNN

#

but also

#

WHY ARE THERE SO MANY

#

JESUS CHRIST

rocky fable
#

Also this

gleaming robin
#

@faint copper @tulip vault @copper yew

gleaming robin
rocky fable
#

Started spamming before

#

and a couple time after

#

No idea what it's from

gleaming robin
#

Moon?

rocky fable
#

Vow

gleaming robin
#

Interior?

rocky fable
#

Facility

gleaming robin
#

hm

copper yew
#

hmmm lemme take a look

gleaming robin
#

well that rules those out

rocky fable
#

There was a Thumper roaming around might have been from that

#

lol

copper yew
#

@rocky fable how do i reproduce this

rocky fable
#

if you have MEOFork

#

and wait for a masked enemy to spawn

copper yew
#

meof shouldn't do anything

#

ah thats what u mean

rocky fable
#

Vow has 80% spawn chance

#

Lol

gleaming robin
tulip vault
#

sorry for not responding too much a little out of it

rocky fable
#

prob vanilla

tulip vault
#

new error

gleaming robin
tulip vault
# rocky fable

from here i would maybe suggest debug.logging the two lists when the mask enemy starts, so you can know what might be being destroyed

gleaming robin
rocky fable
#

Yeah I can turn on Debugging

faint copper
#

does it allow you to ToString() a destroyed object?

rocky fable
faint copper
#

idk if I've tried that

faint copper
# rocky fable

does this continue spamming indefinitely or does it just output a bunch and then stop?

rocky fable
faint copper
#

hmm

rocky fable
#

stopped for a bit

#

started again

#

I think the Thumper was doing it

gleaming robin
faint copper
#

@gleaming robin are you checking and removing those nulls in an update function?

rocky fable
#

I copy pasted the amount of times it posted them

#

🙂

faint copper
#

since if it is in an update and it doesn't freeze the game while printing all that spam that would indicate that it's not actually taking effect I think

gleaming robin
faint copper
#

oh yeah that also gets called synchronously for all enemies in the world

#

at least when loading out which is where Lunxara's stack traces came from

copper yew
#

back when i was figuring out what was causing the CalculatePolygonPath error, i remember there being these main culprits:

  • EnemyAI.SetDestinationToPosition
  • EnemyAI.DoAIInterval
  • EnemyAI.PathIsIntersectedByLineOfSight

if the enemy isn't on a nav mesh, it'll spam these errors. i tried patching these out, but decided it's a bit too invasive and could potentially cause problems, so i ended up removing it (since i was also not sure if it was the cause of other bugs that mirage had

faint copper
#

so what I wonder is @rocky fable was the game frozen for the duration of that spam or did it continue rendering frames?

faint copper
#

ah, then it seems like the hook isn't doing its job

#

it should catch all the nulls all at once and then stop printing immediately on the next frame

rocky fable
#

Hmmmm

faint copper
#

lemme check the code

gleaming robin
gleaming robin
#

(this way you can just ref the source)

faint copper
#

this is where vanilla calls into the function you're hooking

#

it calls it for every enemy in the world, so once it runs through those once, it should have cleared out all the nulls and never print again

#

(unless it's spawning new enemies while you're safe on the ship, which would be very strange)

gleaming robin
#

Just to see if there's a misunderstanding

#

Lunxara's screenshot was the only amount that it logged

#

the stop and start was the navmesh error

rocky fable
#

Yeah that was the only amount it logged, but I did also get killed by the Thumper XD

#

Unfortunately

faint copper
#

well I suppose maybe my phrasing was confusing, but my question above about it continuing to spam without freezing the game was specifically about the "removing to prevent potential null reference exceptions" warning

rocky fable
#

Yeah it just kept rendering frames as normal

#

Btw I never found that mimic due to the Thumper

#

But I heard it running around

faint copper
#

right, and as it continued rendering frames it kept printing that there were nulls?

rocky fable
#

Yeah

faint copper
#

ah yeah

#

that's the part I'm concerned about

rocky fable
#

You should see how much the logs where it spammed the errors before about nulls went

#

It was just

#

Insane

faint copper
#

not sure what there could allow that to continue though

rocky fable
#

Yeah you'd need debugging on

#

@copper yew did you want my mod pack to test with btw?

gleaming robin
copper yew
#

oh nah i'm just thinking right now

#

about what might be causing it to never remove the nulls for whatever reason

gleaming robin
#

The start-of-round warnings lag is probably caused by the dungen

faint copper
rocky fable
#

time to try and get debugs

gleaming robin
#

If you know of a way to print if it destroyed something, lemme know and I'll pop it in and keep using @rocky fable as a guinea pig 🤭

faint copper
#

it's a bit tricky but I do have a hook for that in OpenBodyCams behind an option

#

basically you'd have to change the BodyCamComponent.AnyBodyCamHasReference() for a scan of all EnemyAIs' renderer arrays

#

if this is for non-shipping code then it's probably fine to just spam FindObjectsOfType<EnemyAI>() like vanilla does, but that will be incredibly slow

gleaming robin
#

I just don't see how it could not actually be removing the null refs

faint copper
#

I don't either, that's the weird thing

copper yew
#

yeah me neither...

gleaming robin
#

well I mean

faint copper
#

unfortunately I think Unity doesn't keep the name of objects after they're destroyed too

#

so you can't just print them after the fact

gleaming robin
#

if @rocky fable gets my warnings and then doesn't get the NRE errors then wouldn't that be a confirmation?

faint copper
#

oh, I suppose so actually

#

so then the question is, why the hell does it still spam it lol

#

that's why the hook I mentioned above would be useful

gleaming robin
#

idk how meshrenderer arrays work exactly, but as long as it doesn't infini-spam I don't think it's an issue, there's just more going on under the hood

faint copper
#

it's not magic or anything, it's just an array of the MeshRenderer component instances that attached to descendants of the EnemyAI's GameObject

#

so for it to continue spamming like that, there would either have to be a mod messing with those arrays, or something would have to be spawning new enemies, at least that's what I'm getting from looking at ILSpy

gleaming robin
#

hm, it's also referencing just the one enemy

copper yew
#

@rocky fable aight send the modpack actually, i can't think of anything so i might as well just run it directly to see if i can get any clues

faint copper
#

or even the ID of the NetworkBehaviour

rocky fable
faint copper
#

I will say though, I'm a bit of a stickler for finding the root cause of an issue, but I won't force you to do the same

#

feel free to just keep your solution as-is and silence the warning, that should prevent it from causing any performance degradation while it's spamming

gleaming robin
#

Fair, but I wouldn't mind finding out a lil more. Is the logging what causes the performance drop, or is it both the logging & the removal?

faint copper
#

well

#

logging is probably the majority really

#

the removal will cause some GC churn, but logging takes like .1ms each time from what I've seen profiling a few things

copper yew
#

also the fact that logging is almost always on the unity thread itself

faint copper
#

when we're talking a 60fps budget or better that can be a big hit

gleaming robin
#

Ah. It's hard for me to detect these performance drops bc my pc is beefy ^^;

faint copper
#

yeah, it gets worse if someone is CPU-bound

#

generally in this game it will be GPU-bound though I think

#

until you get a bunch of AI and items spawned at least

gleaming robin
faint copper
#

yeah, NetworkObjectId should be the most guaranteed to be unique

gleaming robin
#

kk

faint copper
#

the enemy index is just a field on the EnemyAI instance called thisEnemyIndex though

gleaming robin
#

Oh, I see. We'll stick with the superunique tho

faint copper
#

wouldn't hurt to print both really

gleaming robin
#

Fair

faint copper
#

when making debug prints for testing I always like to write more information rather than less so I don't have to rebuild a bunch of times

#

but I still end up doing so SadCat

gleaming robin
#

Like so?
logger.LogWarning("Found null reference inside " + ___thisNetworkObject.gameObject.name + ___thisEnemyIndex +"'s skinnedMeshRenderers. Removing to prevent potential null reference exceptions.");

copper yew
#

(i'm on vow)

faint copper
#

does it happen immediately or only upon leaving? my impression was it liked to happen when leaving, but maybe I'm hallucinating

rocky fable
#

It happened while I was inside

faint copper
copper yew
#

guys i got the logs

#

it stops after a bit as intended

#

i don't think there's an issue

rocky fable
#

Yeah but

#

What does the debug say?

copper yew
#

it's not spamming

#

it's spamming logs from other mods

faint copper
#

well did it ever spam endlessly? I feel like I've seen it where it only spams briefly

#

Lunxara would have to confirm

copper yew
#

yeah it's only brief

rocky fable
#

I never was able to tell if it kept going cus I died

#

lol

copper yew
faint copper
copper yew
#

wait then again this looks nothing like lunxara's screenshot

#

so that might be an edge case

#

(or maybe there's just a lot of enemies when that happened, idk)

gleaming robin
#

Yours is much closer to the number of meshrenderers that a single Masked has

faint copper
#

oh yeah, in your case it's just printing a couple at a time thonk

copper yew
#

yeah it was just a single masked so you're right

#

so it's possible that in lunxara's case there were just a bunch of masked enemies, which triggered that hook at the same time for whatever reason

faint copper
#

hmm, is there a mod in that profile that makes masked enemies inherit a random player's cosmetics perhaps?