#Starlancer AIFix v3.13.2 | EnemyEscape v3.0.0
1 messages · Page 2 of 1
Don't you literally like, lance stars? Stand proud
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
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)
Nah wait until someone finds jester outside on rend
As a reminder, AIFix doesn't put enemies outside or give them the logic to exit the facility
I know AC allows me to let jester to spawn outside and this will allow him to body my team >:)
yee
And he will go at full speed
Imagine a map like Triskelion but instead of big acid lake you fall into a pit full of jesters
unlike Lethal Escape i changed jesters speed to 6 to give people a fighting chance
is the update that fixes jester out or nah?
Nope, still not fully fixed yet, so tba
Mk
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 😤
@gleaming robin does this work for brackens, and if it does, would the bracken still make people lag?
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
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
Lemme know how it goes!
Are you running pathfindinglagfix? I'm also running a powerful rig and even in vanilla bracken can easily kill my fps if it can't pathfind
It's just harder for the bracken to start doing that inside than outside for obvious reasons
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?
what kind of mod is Escape Company?
i'm pretty sure it just fixes the ai for enemies that are outside so if a mod like escape company let's an enemy outside they act as they should
ohhh that's cool!
I really enjoyed your starlancer maps but unfortunately LLL maps break some other mods so ill have to revisit later
what kind of breakage?
i didnt have issue with mine. everything loaded just fine. i wanna know which mods doesnt work on your end
they work but dont?
I'll tag you
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
100 of what, exactly?
For clarity, this mod only does something when an enemy first spawns, it doesn't have any check in place for an enemy moving from inside to outside or vice versa
What in gods name do you need 100 of outside
The only acceptable answer is hoarding bugs
Exactly
giants
New moon: Land of the Giants
Fr though, I have no idea what to do with that bug report 😓
Just nod and move on
Nothing
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 
100 jesters
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
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
100 Coil heads
Pfp checks out
:)
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
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
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
THUMP THUMP THUMP THUMP
"We literally cannot leave the ship we gotta go im teleporting you in-"
"CAPTAIN. YIPPEE INSI--"
INVERSE TELEPORT NOISES
Oh that's a brilliant idea Masa!
Inverse teleport saves the day
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)
That could pair well with the mod that adds the jester box as a scrap
Haven't tried it yet
Tho the box itself looks a bit smaller than the jester
Haha
@stuck spruce I don't think you've ventured into this post, but here's a look at the jester fix
Fear inducing activate! 😮 Haha that's actually funny xD
Gonna upload the fix shortly, as well as update the modpack
Why does that look the fiend lol
because it is

- 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.
- Added JesterAIPatch, which fixes the jester enemy being unable to attack while outside.
Yippeeeee
THE POWER
I CAN NOW MAKE IT A 15% CHANCE FOR JESTER TO APPEAR OUTSIDE ON ANY MOON
HAHAHAHAH
Unfortunately for others, yes :3
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
Oooh excellent point, ty Nikki

I got to 60 and it was bareable 😄
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
Yea I'll make the call now and say I won't be addressing that particular use-case 🤭
Yeah same with what Metrollen said, I wouldn't stress about it ^^
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
Like Nikki mentioned though, did they have AI capabilities, or was it just to see them get into a huge clump?
Well I mean they where all walking around, doing what they usually would do, ofc some clumped up bc there was so many.
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
▶️ 🤸♂️
if you want them to go outside you want #1175921476134785125
if you want them to spawn outside you want to get a config mod
@gleaming robin Have you come across this yourself or just me?
This is on Triskelion
with Moreinterior Bunker
Hmm looks like maybe issue with nodes I placed around or just a incompatibility with mine will test it this mod later
Cheers man, also noticed simlar AI problems in Atlas
Is it only using this mod or in general ?
General use, not standalone. Also running Zaggy Pathfinding Fix and Diversity
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
I did a little test with HexiBetterShotgun too and BetterShotgun, it REALLY messes with stuff. Gonna see if they in discord or something
Just want to make sure, you're using the AINode tag, right?
I haven't personally come across that issue in testing
Yes I am using AI node tag
Are you spawning these centipedes and crawlers outside?
No worries, any input is welcome lol
Does bunker have any odd generation properties? Like does it generate above ground at all?
it should only generate at root for dungeon generator
but heightwise it doesn't skew upwards?
Cuz it seems like that error thinks the ai is outside I think
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
Yeah that'd be fine
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
kk, lemme know
ugh, I really wish that error was slightly more descriptive
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
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?
Yeah these were inside spawns exclusively I haven't actually tried spawned thumpers outside and wont try centipedes because I have a feeling they'll not work properly due to looking for somewhere to hang 😛
I am trying to reproduce the error but having difficulty on reproducing it 😛
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?
Sadly not jsut for the interior but LLL might be able to? I will check now
kk
damn sadly no :<
I think maybe you can set interior spawns with LLL config, then force bunker with the MoreInteriors config?
Could also just force Bunker on a moon and change that moon to only Snare Fleas and Thumpers
What I am doing now haha 😄
The other thing is that I'd expect it to happen with any entity, not just two random ones
Yeah one playthrough it was also happening to dogs and ghost girl
But I legit can't replicate what went on.
Was that also with bunker interior?
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
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
Does it actually break their AI btw, or do they still function? Also next time you get this error, send me the full log
AI completely broke, there was no behaviour to them other than movement. Even came across a blob there was folded into a ball which was actually funny asf xD
Asking in SavageCompany on spawn method for the events because I am out of ideas 😛
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 😛
Oh good ^^; Glad to hear that, hope you can get it sorted out!
Lemme know if there's any way I can potentially help!
Yea those are really weird errors. Though have you tested it without anything but the aifix and MoreInteriors? bc if it's something else causing the error this has been a wild goose chase 😓
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
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
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
#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
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
@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?
Do you mean when you simulate dungeons? Not sure what you mean
LLL config I am seeing multiple entries of same dungeon/moons like 2-3times
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]/
oh sorry i got sidetracked and forgot i messaged here. i'll try and summarize later when im on my pc
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
Yeah I've run into similar occurrences
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
LC is quite the quirky game when it comes to bugs
Yeah I played probably around 60ish hours of vanilla/more company before touching mods
Makes me love vanilla-feeling mods like Peepers
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
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
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
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
I’ve never been in a public lobby
upgrading the AI maybe another week i think
just mousin around
are they just supposed to be for ambience like the manticoils and locusts?
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
oooo
Interesting
I find that the game is overrun by casuals that can't make it past 1 day without quitting
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
Interior sandworms would attack appropriately, but subsequently warp to the surface and get stuck at the classic 0,0,0 (like spawning an inside enemy outside with my fix 🤭 )
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
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
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
- Noice
- 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
- See #2 🤭
Okay so uh
I thought Bracken couldn't get in the ship
I was wrong
That’s horrifying
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 😱
*Bracken closes ship doors*
"Just you and me now"
*I close the doors*
"You're coming with us, let's ride"
Version 2.0 dropping shortly
Me and the Bracken on our way to Titan
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.
- Added SandwormResetPatch
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 😵💫
Congrats!
So go wild and put monsters wherever you want you heathens
Only earth leviathans on every spawn node, got it
It's your funeral :3
That’d be so horrible lmfao
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
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!
That's what i'm doing myself with lethal quantities :p
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
Egypt's future interior map with the Earth Leviathans feels like its gonna be crazy
Just the fact that it can be done now
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)
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.
there's definitely mesh links on experimentation though
If someone were to put a walkable off mesh link from the ground to the ship, a coilhead could walk right in
Hm, and you said jester can't get in the ship?
yeah
only tested passive jester though
Odd, but other than that it attacked correctly?
yep
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 🤭
alrighty 👍
Enjoy your rest. :3
Top 10 moments before disaster
lol
Rip me
What are you using to spawn monsters outside?
DanceTools
There he is
huh
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
if it matters, i was boarding the ship on this ladder
That's silly
it does ignore that ladder
idk why tho lol
I'm pretty sure coilheads not getting in the ship is rooted in their navmesh capabilities, which idk if I should touch
add a setting for it 
fwiw I can confirm that they don't get in the ship on experimentation on my end as well
maybe 🤭 idk how I'd patch that tho
I've also still never made a config before
well maybe you can find out

Well I was right at least, so we know that it's working-as-intended for coilheads to not use ladders
havent been playing much
but i used a mod that makes the worm into a shark
but havent seen it yet
ah that
Well, it seems like this should be the code allowing a coilhead to climb
I didn't even know what |= was
No climbing coils >:(
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
Valid
Doom 👀
Oh sick, you got DOOM on your phone? bet
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 🤣
Nonono, on the TERMINAL 🗣️
OHHHHHHHHHH even better
Yeah yeah yeah 🗣️
I expected a smol bork at the end tbh
ᵇᵒʳᵏ
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)?
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
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
what are you doing in jesterAI and springman out of cvuriousity
i don't think any enemy can climb extension ladders
if they function like the ladder. maybe the masked and the braken can
tho knowing the masked. it would pick it up maybe hahaha
yeah enemies can't climb extension ladders, can't just add something to the navmesh on a whim\
yes you can\
oh\
well maybe im a little stupid\
but the extension ladder probably doesnt do that\
The ladder might generate an off mesh link when used
Forcing the outside jester to check for any players that aren't in the factory, and setting the spring man walkSpeed animation speed to 1f if it loses track of all targets
it doesn't i think
Does this fix outside brakens doing nothing?
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
this is what saved me from a coilhead when i used the office interior...
Does this fix bracken doin nothing outside
Yes
Not that I can recall. I would think that'd only happen if an enemy is completely stuck and unable to move, whereas what I fixed was them navigating to one useless spot
semi-related to this, but I'm trying to make a proof of concept for PathfindingLagFix where it does the pathfinding off the main thread, which I initially thought wasn't possible
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)
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
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
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 🤭
What, you don't wanna spam the log with 6 debug info every .5 seconds like lethalrichpresence? ;p
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
thats what was confusing me since i'd see the error even while they're not stuck. interesting 🤔
I need this
If you need testers let me know.
yeah, I'm thinking if I can get the proof of concept working I'll create a thread for it, I can ping you
Should be easy if Lethal Escape is open source, if not then less so
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?
I don't think so other than maybe any mods that alter Masked behavior
Yeah but masked shouldn't need any sort of patching for this since they already have logic for in/out transfers
Mhm
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
So I just tested this with Lethal Escape and without (just to be sure) and it's hilarious watching the jester just briskly walk at you and boxbutt you for 9999 damage and confirmed it was the result of a conflict with LEsc
Testing a patch now
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
Yes, lmao. Skipped the wind up and just straight up boxes you
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
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
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
😵💫
Oof
Yea apparently I never actually fixed it, I checked with the current release lol
Bees inside are no joke lol
Infernis go brrrrrr-
Thanks to @spice latch and @hallow merlin , Starlancer AI Fix is almost at 50k downloads ✨
Hey audio knight, I’m assuming that if an enemy is teleported outside, its AI won’t update right?
Are you referring to how Lethal Escape functions?
Or is there another mod that does that?
Yeah this! Also the WIP Seamless Dungeon!
Just sent a message in SD, already been working on a patch for LEsc :)
I... may have fixed it?
Lets goooo it wasnt headbutting you anymooore
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
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
Hmm. I'll try removing my jester patch then and keeping theirs. The navigation should still work with the other patch I'm including
dubbb what was even the issue
Can test again, just Masa will be alone this time
Friend's PC died today :'c
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
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 🤭
I'll let you know when I have it working for myself so you can test :3
ah interesting 🤔
That probably wouldn't be the hardest thing to implement actually. If you place a collision trigger that springs the animation and kill trigger/kill animation it'd probably work
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?
Unsure, I haven't really explored the company planet scene yet
Nope, it immediately hates me if I use LEsc's Jester Update() postfix instead of mine
awesome :P
😊 ♥️
Mkay!
@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
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
oh so that's why they're a nightmare and always seem to run back into you when you go back in
Yep, they really are a nuisance
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
weird, it definitely homed in on me with that second scenario, under vanilla circumstances (spawned with DanceTools)
Sowwie, was at family. :D
Interesting to see how the Jester has so much behavior for being such a simple entity tbh. But yeah definitely janky too
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
Yipeee, love seeing progress!
i spawned it with dancetools too
||[REDACTED] is now processing||
Released my tutorial!
https://discord.com/channels/1168655651455639582/1210653206225363018
Remind me to test something with coilheads tonight
Was playing with friends last night and noticed a lil quirk with them outside
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
Good to know!
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?
it's flat
hm
i tried infernis and celest
there are trees and other things
but they don't even move anyway
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
i also use arachnophilia
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
they act the same
kk, I'mma wait and see what wesley responds with before further investigation
ok !
It's not
Ah
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 ?
So lemme ask another question, just to see how on-the-money I am 🤭
Does Infernis' terrain show up on the ship radar?
Nope lol
I'm a god
we knew this
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
That makes sense
Looks like I'm releasing a few patches lol
I'm sorry, and you're welcome 🤭
What's the most efficient way to let all planet modders know this ? 🤣
uhhhhhhhhhhhhhhhhhh
@golden basin idk if this is announcement worthy or not, but it's pretty useful info
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)
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
HolographicWings too maybe
Hmm, maybe I should start the moon society then
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
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 🤭
right now the most relevant place is the moon society yeah
Damn, i didn't expect this to work 😮
that was fast
I can't tell if this is a joke or an actual thing now
its the other channel im talking to you in rn
ohhhh
Is sfDesat in there too ?
He's in the server, they could ping him
Would be nice !
good too know, i'll change it
can dogs getting constantly aggroed be an aifix bug? or should i search somewhere else
happens out of the blue
like there's nothing going on in the ship but they keep jumping to one spot inside
vanilla moon?
yeah
If you have the needycats, or can be birds too
np!
nah not them surely, but thanks
i also thought it might be genimprovements monitors making sounds, but im lost honestly lmao
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
no just one
that would be funny considering i do run mirage
but it seemed fixated on one place
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
birds???
what birds 👀
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!"
anyone know if this mod works with lethal escape
Mostly conflict free, only issue is with the Jester. I have a patch almost ready for it though.
does this work with arachnophila
Shouldn't have any conflicts, from what I understand
k
@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
What do you mean by boxxing masked enemies?
Like after you bonk them dead basically
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
Oh it happens when you leave?
Might happen before I leave, I check the logs after
Can you test on a vanilla moon that for sure has masked, and then like Experimentation as well?
Weird, but that means its not necessarily what Coppertiel was saying
Vow is my go to to test mimics cus of that 80% spawn chance XD
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
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
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
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
its a vanilla bug
Yeah it makes sense
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
Is there any noticeable effect from the error, other than the console spam?
For some it causes a hit to performance in my games
possibly yeah
log spam for performance + it kills a seemingly fairly important function since throwing an error kills that chain of code
Would it be as simple as changing it to this?
tags can't be null
ah, the object then?
this is what im concerned about
the act of trying to use .CompareTag on a null object
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
yeah
lists/arrays etc. can store null references
- MyThing
- null
- 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
well this should immediately back out if it detects that the mesh renderer is gone, right?
correct but how are you going to insert that code
Oh I was just showing a snippet for logic questions. Like this, yeah?
well no cuz your just doing it the better way and its gonna go do it the bad way right after
you could
I thought prefixing replaced lol
ok discord fuck you
prefix adds code before the main function, postfix adds code after the main function
Is this the infamous null check i always see in patch notes and don't know what it is about ?
That’s a null check yeah :P
ok ok !
You see that in patch notes?
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
Yeah something like " added a null ckeck on ... blablabla"
A) So just add return; below the second if statement?
B) Definitely looks scary in the Harmony documentation
C) Would this be just doing the same iteration as the original code (i/j) but doing
if(null) { remove object from array }?
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
I will say if the update gets pushed that fixes this comes out tonight at all I'll restart my game to update XD
feel free to slide in the dms if you need a vibe check on anything
What's the update about ?
Fixing a vanilla bug with masked enemies throwing null errors
oh
And adding compatibility with Lethal Escape :3c
Noice
I will be pushing an update shortly
- 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
huge, those null reference exceptions were making me lag really bad today, which lunxara told me you were working on a fix
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)
:0
@copper yew just making sure you see this 🤭
Starlancer AI Fix v3.0.0
It's so bizarre to think about how many people are using my code rn
Lol well it's a must have
Btw tried the spiders again now that infernis has a map and they do lay webs !
SLAI is on v3 and my poor moons are still on 0.5.7
it's a great feeling to have
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
What is left to make the moons to 1.0 ?
Me releasing the next update :3c
oh does the arachnaphilia mod do evil things to spiders outside?
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
[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
hmm
Is it still the masked throwing this error?
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
added future compatibility for Seamless Dungeon
Should be
yee
That's gonna be fun
Here's the full code for context
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
Oooh hotfix time 🙂
probably want
for (int i = 0; i < count;)
{
if (thing)
list.RemoveAt(i);
else
i++;
}
ahhh I see. Also Remove and RemoveAt is apparently an important difference, because Remove returns a bool lmao
Wouldn't this skip an extra spot?
yeah, it also saves the List doing a linear search right after you did it for it
I dropped the i++ in the for loop, so no
but you could also format it as a while
Alright lemme take a step back
[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; ^
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
You wanna test the hotfix before I go through the trouble of uploading? 🤭
Sure
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 callingRemove(), 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 callingRemoveAt(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
Gotcha. So this should be more accurate then
that should do it, yeah
alternatively,
while (meshList.Remove(null));
:^)
but that can repeat scan early indices
lmao while loops scare me
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
Give this a try please
I see. Luckily not an issue here, and I prefer it to be more laid out 🤭
for sure, the way you have now is the optimal way anyway
I'm hoping that the real issue was the typo, but I'll take the more optimized version regardless
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
Yeah I'll let you know if it's all good now ^^
Actually, the count and length should have been the same, right? So it really wouldn't have mattered
it was potentially skipping elements before too, so it's possible that allowed some null pointers to slip through
Nah, I think it's a mix of masked mods and base game's lack of null checks
and yeah that was my other thought
thing is, vanilla lacks those null checks because it's not destroying meshes randomly lol
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
absolutely not, how dare you suggest such a thing
I think I've seen it in vanilla tbh
I think so too
and I don't really use masked mods
it's possible it's just something to do with the despawning code
Yee, and if it's not specific to the masked then this will theoretically iron out the NREs across the board
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
it's also possible that cosmetics/suits applied to the masked players could cause issues
not sure how likely that is though
wtf
wuh oh, is that the plugin?
yea
Yeah that happened on game launch
Did you replace the existing file, or put it alongside it?
replaced it
ooooooooookay then, one sec while I boot VS back up
I had preemptively updated the "modVersion", could that be the issue? @faint copper
I wouldn't think so
Ye
I just missed that error before cus I usually have it log in the background with the console closed
Lol
@golden basin idk who to poke for this, can you get someone to remove the latest SLAIFix? It bronk
I mean if you're working on pushing out a hotfix release, people can just download the new one when it goes live
Something is just going wrong on game launch
That's true I guess
it looks like StarlanderAIFixBase.logger is never initialized? although perhaps it should pass through to base.Logger anyway
How do you see that?
I just looked at the decompile on Thunderstore sorry
oh
well lemme try logger = Logger; since I removed that thinking it wasn't needed @_@
Yep
that was the issue .-.
The fix you did in the hotfix for the masked enemies though is still needed I'm sure lol
Glad you fixed it
XD
wdym?
\[T]/
Gonna go ahead and push it regardless just to have a working version on TS again
Ye
- StarlancerAIFix v3.1.0
- Accidentally broke the plugin in v3.0.0, this is now fixed.
https://thunderstore.io/c/lethal-company/p/AudioKnight/StarlancerAIFix/
- Accidentally broke the plugin in v3.0.0, this is now fixed.
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 ^^;
yea I have absolutely 0 idea what that error means
I'm just the AI guy (apparently)
He'll debunk it lol
Any chance AI Fix removed some NREs? 🥺
I never had a mimic spawn that game was gonna leave and go back
but then got stuck in orbit with error spam
XD
Pretty much 🤭
i feel that so much 😂
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
np! I wanted to make sure you didn't spend too much time troubleshooting that
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
I've had those moments too, it definitely helps to have a second set of eyes lol
Also this
@faint copper @tulip vault @copper yew
uh... before or after NRE removal?
Moon?
Vow
Interior?
Facility
hm
hmmm lemme take a look
well that rules those out
@rocky fable how do i reproduce this
Go to Vow with latest StarlancerAIFix
if you have MEOFork
and wait for a masked enemy to spawn
Thumper inside or out? It's possible that it's a vanilla bug, I've seen it crop up here and there
inside
sorry for not responding too much a little out of it
prob vanilla
you're fine chef
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
Any idea if that's the only other monster that was around?
Yeah I can turn on Debugging
does it allow you to ToString() a destroyed object?
Yeah there was a Yippee too but I killed it lol
idk if I've tried that
does this continue spamming indefinitely or does it just output a bunch and then stop?
It was spamming for a good while
hmm
I think they meant my warning logs
@gleaming robin are you checking and removing those nulls in an update function?
Oh those
I copy pasted the amount of times it posted them
🙂
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
nah, EnemyMeshEnable()
whew
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
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
so what I wonder is @rocky fable was the game frozen for the duration of that spam or did it continue rendering frames?
It never froze no
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
Hmmmm
lemme check the code
Why would it do that if it's iterating through the list?
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)
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
Yeah that was the only amount it logged, but I did also get killed by the Thumper XD
Unfortunately
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
Yeah it just kept rendering frames as normal
Btw I never found that mimic due to the Thumper
But I heard it running around
right, and as it continued rendering frames it kept printing that there were nulls?
Yeah
You should see how much the logs where it spammed the errors before about nulls went
It was just
Insane
not sure what there could allow that to continue though
I feel like that amount of log lines could possibly just not lag the game though
oh nah i'm just thinking right now
about what might be causing it to never remove the nulls for whatever reason
The start-of-round warnings lag is probably caused by the dungen
logging is done pretty much synchronously, so when you're printing a long list of lines from the main thread in a loop without stopping it should block all rendering (as far as I know)
time to try and get debugs
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 🤭
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
I just don't see how it could not actually be removing the null refs
I don't either, that's the weird thing
yeah me neither...
well I mean
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
if @rocky fable gets my warnings and then doesn't get the NRE errors then wouldn't that be a confirmation?
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
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
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
hm, it's also referencing just the one enemy
@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
it could be multiple enemies, but that's also possible. you could probably differentiate by printing the thisEnemyIndex which should be unique for every spawned enemy
or even the ID of the NetworkBehaviour
018dee37-3502-d259-e82a-57c70c5c6b60
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
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?
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
also the fact that logging is almost always on the unity thread itself
when we're talking a 60fps budget or better that can be a big hit
Ah. It's hard for me to detect these performance drops bc my pc is beefy ^^;
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
I'm not sure how to ref the enemy index, but would NetworkObjectId work?
yeah, NetworkObjectId should be the most guaranteed to be unique
kk
the enemy index is just a field on the EnemyAI instance called thisEnemyIndex though
Oh, I see. We'll stick with the superunique tho
wouldn't hurt to print both really
Fair
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 
Like so?
logger.LogWarning("Found null reference inside " + ___thisNetworkObject.gameObject.name + ___thisEnemyIndex +"'s skinnedMeshRenderers. Removing to prevent potential null reference exceptions.");
hmm i can't reproduce the error. how often does this happen? there's a masked enemy and i don't see anything
(i'm on vow)
Odd
does it happen immediately or only upon leaving? my impression was it liked to happen when leaving, but maybe I'm hallucinating
It happened while I was inside
oh, I would put both IDs, and you could use interpolated strings too (note the $): $"Found null reference inside {___thisNetworkObject.gameObject.name} ({___thisEnemyIndex}, {___thisNetworkObject.NetworkObjectId})'s skinnedMeshRenderers. Removing to prevent potential null reference exceptions."
guys i got the logs
it stops after a bit as intended
i don't think there's an issue
well did it ever spam endlessly? I feel like I've seen it where it only spams briefly
Lunxara would have to confirm
yeah it's only brief
what does the $ mean
it designates an interpolated string, meaning that you can evaluate expressions to place inside the string in those {}
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)
Yours is much closer to the number of meshrenderers that a single Masked has
oh yeah, in your case it's just printing a couple at a time 
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
hmm, is there a mod in that profile that makes masked enemies inherit a random player's cosmetics perhaps?
