#Starlancer AIFix v3.13.2 | EnemyEscape v3.0.0

1 messages ยท Page 3 of 1

faint copper
#

that would increase the number of renderers significantly

rocky fable
#

Barch's mod lol I wear a few cosmetics tbh

faint copper
#

god I still really wonder what's destroying those renderers without destroying the masked itself

copper yew
#

mirage only sets the mimicking player, cosmetics are still set by other mods (like AC, MC, etc)

faint copper
#

that is really weird, especially if it's doing it to the base meshes

#

if it sets it to mimicking a random player, that might do it

copper yew
#

yeah mirage does that

#

what's your hunch on why mimicking a random player might cause it though

faint copper
#

yeah, maybe a mod with cosmetics is seeing that and adding cosmetics to the masked so the renderer count is really high

gleaming robin
#

Just to confirm, Zaggy
logger.LogWarning($"Found null reference inside {___thisNetworkObject.gameObject.name} ({ ___thisEnemyIndex}, {___thisNetworkObject.NetworkObjectId})'s skinnedMeshRenderers. Removing to prevent potential null reference exceptions.");

faint copper
#

๐Ÿ‘

copper yew
#

ah yeah true, makes sense that the renderer count could be really high

rocky fable
#

Everytime a damn masked is spawning I keep getting annoying thumpers

copper yew
#

so in this case it's more likely a non issue

faint copper
#

well

rocky fable
#

I can't get shit if I'm dying lmfao

faint copper
#

I wouldn't call it a non issue until I know what causes it, but sure

gleaming robin
#

@rocky fable want another beta version?

rocky fable
#

Let me enable debug for log output

faint copper
#

ah heck I need to know

#

so repro steps is just spam vow?

copper yew
gleaming robin
#

@rocky fable there's a more informative version

gleaming robin
copper yew
#

@gleaming robin i think you should print the # of mesh renderers there are before removing them from the list

faint copper
#

yep yep

copper yew
#

just makes it easier to know if that's the cause of the huge amount of logs

gleaming robin
#

oh good idea

copper yew
#

also maybe add a counter for # of nulls found and print it after the loop

rocky fable
#

Well hopefully I get more info from this dll to find out why it's going so nuts

#

Likely cosmetics I think

gleaming robin
#

If you wanna wait a sec I'll have this new version ready

rocky fable
#

Okay

#

For now I'll head back and see what shows up in the debug in the current live build lol

faint copper
#

holy loading time

copper yew
#

thats what i say every time i load lunxara's modpack to debug

rocky fable
#

Tbf it was really slow before

#

I nuked LogNeuter and disabled TooManyEmotes to help speed it up

#

XD

copper yew
#

where's the prints for the counters ๐Ÿ‘€

gleaming robin
#

oops forgot that

#

shush

copper yew
#

loool

gleaming robin
#

Just put this after the for loops, yea?
logger.LogWarning($"Found {skinNull} null SkinnedMeshRenderers and {meshNull} null MeshRenderers.");

copper yew
#

ya

faint copper
#

this is supposed to be foggy

gleaming robin
#

Also ty @faint copper for teaching me $ interpolation, that's so much more readable lol

faint copper
#

new exploit just dropped perhaps??

faint copper
rocky fable
#

You're lucky lol

gleaming robin
#

Alright nerds, try this one @_@

#

This should give a crystal-damn-clear log of what's happening

faint copper
#

wow what mod makes me move like a thumper

rocky fable
#

I did that to restore the speed perks I had with AC

#

โ˜ ๏ธ

gleaming robin
rocky fable
#

It was smaller

#

But then I nuked AC and found alternatives to replace it and well

#

XD

#

You gotta love that instant ship land

#

Lmfao

#

Nyooooooom

faint copper
#

that is pretty nice lol

#

no luck getting masked on the first two tries, time to spawn them myself lol

copper yew
#

impossible for me to get null meshes again :(

#

spawning them myself never does anything, they're always non-null

#

at least so far

rocky fable
faint copper
#

oh, it did clear them out, nice

gleaming robin
#

Lunxara is the queen of finding null refs here

copper yew
#

damn now i wish the log also printed the object's name for the ones at the end

gleaming robin
#

Maybe test it with 0 cosmetic mods now?

gleaming robin
rocky fable
#

Still wonder what causes the CalculatePolygonPath spam now

#

Yeah it's definitely gotta be cosmetics

copper yew
#

CalculatePolygonPath comes from this from what i remember

gleaming robin
copper yew
#

patching them out got rid of it, but i removed the patches cuz i didn't know if it was unintentionally causing other bugs

rocky fable
copper yew
# gleaming robin wdym?

like for the counter logs, would be nice if it printed which enemy ai it is, but not a big deal

faint copper
#

oh, diversity broke everything and I can't land again now

#

rip

rocky fable
gleaming robin
#

I can add that rq :P

rocky fable
#

Chaos said he's looking into it

copper yew
rocky fable
copper yew
gleaming robin
#

Go forth, test subjects

rocky fable
#

You're on a roll tonight Starlancer

#

XD

copper yew
#

tbh it's probably enough of a test if lunxara takes off cosmetics and sees if it's mostly gone

#

if it is then it's confirmed a non-issue

gleaming robin
#

It was just one sentence ๐Ÿคญ

#

Fair, but also

#

information ๐Ÿค“

copper yew
#

true might as well

rocky fable
#

Yeah plus

#

it might be able to be fixed too

#

If it's cosmetics

copper yew
#

it's not an issue though in that case

#

the tests here is just to confirm if it is or not

gleaming robin
#

the cosmetics would just increase the # of renderers, not effect the actual NREs themselves

copper yew
#

if removing the cosmetics makes the logs not spam then all starlance has to do is to only print once instead of on each iteration

faint copper
#

@copper yew do you have cosmetics equipped? if not, I would wonder what those two null renderers were in your logs

#

I would assume it's all renderers, not just the cosmetics ones

#

but maybe I'm wrong

gleaming robin
copper yew
#

if cosmetics carry on from save to save then yeah i should have cosmetics

faint copper
#

MoreCompany just stores them in a .txt file, so it should, yeah

copper yew
#

ah then yeah i do have cosmetics on

faint copper
#

how many?

copper yew
#

sec i need to see how to even check

rocky fable
#

I will say the way AC handled cosmetic presets was awful, anyone who imported a profile code would have to set it all up again

copper yew
#

i haven't touched it in a long time

faint copper
#

it'll be in the bottom right of the main menu

rocky fable
#

I hope when ProfX does their version of presets and stuff it's not like that

faint copper
#

I'm curious whether ProfX's thing will end up being a competitor for LMM

rocky fable
#

Lol maybe

faint copper
#

if they're both planning on doing cosmetics support anyway

copper yew
#

i have 2 cosmetics on

faint copper
#

ah then that makes sense

#

it was always a pair of renderers being null in your logs

copper yew
#

yeah

faint copper
#

so this might just be MoreCompany being a silly goose somehow... but I still want to know why they're destroying their models >:(

rocky fable
#

Meanwhile me XD

gleaming robin
gleaming robin
rocky fable
#

Ayyyy lmfaoooooo

#

Something broke

copper yew
#

oh god

rocky fable
#

Have not had this happen in ages

copper yew
#

whats the logs

#

are they stuck?

rocky fable
copper yew
#

it's this again

rocky fable
#

Spamming

copper yew
#

it's the literal bug that people kept thinking came from mirage

#

and i know for a fact that it's not

gleaming robin
#

MEO possibly?

copper yew
#

nah MEO doesn't touch these functions

gleaming robin
#

@rocky fable do you have Lethal Escape?

rocky fable
#

Weird how I haven't had it until just now with that new update for your AI Fix

#

Nope

faint copper
#

@rocky fable since you seem to be able to reproduce the issue much more easily, if you want to test with this version of OpenBodyCams, I co-opted the debugging option to print when a model referenced by an AI is deleted

copper yew
#

gonna go grab some food and whatnot and then check back here later

faint copper
#

(so make sure ModelDestructionDebuggingPatchEnabled = true)

gleaming robin
#

@faint copper I'm preemptively condensing the warnings so that only a single one gets printed per enemy after all the iteration is done behind-the-scenes. Is this informative enough, too informative, not informative enough?
logger.LogWarning($"Found and removed {skinNull} null SkinnedMeshRenderers and {meshNull} null MeshRenderers in {___thisNetworkObject.gameObject.name} ({___thisEnemyIndex}, {___thisNetworkObject.NetworkObjectId} to prevent potential null reference exceptions.");

faint copper
# rocky fable

this looks like it's a null EnemyAI.agent thonk who is deleting a NavMeshAgent without deleting the EnemyAI it's attached to??

rocky fable
#

I wonder if it's another vanilla bug

faint copper
#

I wouldn't really think so

rocky fable
#

Hmmmm

#

I know I got it a lot before at one point but it stopped and this is the first time it's happened in a bit

#

Is there any mod in my list that stands out as the potential cause?

faint copper
#

it's very hard to say

rocky fable
#

Oh hey

faint copper
#

anything that messes with AI in general or masked in particular I guess

rocky fable
#

Nvm thought I found it

#

Lol

faint copper
#

thing is, something literally has to be setting EnemyAI.agent = null for that error to happen, otherwise we'd be seeing another frame on the stack there in one of Unity's functions

#

which is.......... not good

rocky fable
#

Got it

#

[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
StarlancerAIFix.Patches.AIFix.EnemyMeshPatch (UnityEngine.SkinnedMeshRenderer[]& ___skinnedMeshRenderers, UnityEngine.MeshRenderer[]& ___meshRenderers, Unity.Netcode.NetworkObject& ___thisNetworkObject, System.Int32& ___thisEnemyIndex) (at <96990cc55c4f4b44aa802759fbb89746>:IL_012C)
(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: Object reference not set to an instance of an object
Stack trace:
MaskedPlayerEnemy.CalculateAnimationDirection (System.Single maxSpeed) (at <af9b1eec498a45aebd42601d6ab85015>:IL_0021)
(wrapper dynamic-method) MaskedPlayerEnemy.DMDMaskedPlayerEnemy::Update(MaskedPlayerEnemy)

[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
MaskedPlayerEnemy.LookAtFocusedPosition () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0185)
MaskedPlayerEnemy.LateUpdate () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0017)

[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
MaskedPlayerEnemy.CalculateAnimationDirection (System.Single maxSpeed) (at <af9b1eec498a45aebd42601d6ab85015>:IL_0021)
(wrapper dynamic-method) MaskedPlayerEnemy.DMDMaskedPlayerEnemy::Update(MaskedPlayerEnemy)

[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
MaskedPlayerEnemy.LookAtFocusedPosition () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0185)
MaskedPlayerEnemy.LateUpdate () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0017)

[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
MaskedPlayerEnemy.CalculateAnimationDirection (System.Single maxSpeed) (at <af9b1eec498a45aebd42601d6ab85015>:IL_0021)
(wrapper dynamic-method) MaskedPlayerEnemy.DMDMaskedPlayerEnemy::Update(MaskedPlayerEnemy)

[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
MaskedPlayerEnemy.LookAtFocusedPosition () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0185)
MaskedPlayerEnemy.LateUpdate () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0017)

faint copper
#

unless I'm wrong and it's possible for it to inline a native function at least

tulip vault
#

@faint copper hear me out

rocky fable
#

Something happened in AiFix

tulip vault
#

navmeshagent is a component right

faint copper
#

sure

rocky fable
#

@gleaming robin

tulip vault
#

in theory could you implement OnDestroy and intentionally throw an error to get the stack trace of the mod causing it?

faint copper
#

isn't OnDestroy deferred?

rocky fable
#

Can you make sense of what happened there?

faint copper
#

but I do have a hook on Object.Destroy() and Object.DestroyImmediate() for this kind of purpose in OpenBodyCams

rocky fable
#

[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
StarlancerAIFix.Patches.AIFix.EnemyMeshPatch (UnityEngine.SkinnedMeshRenderer[]& skinnedMeshRenderers, UnityEngine.MeshRenderer[]& meshRenderers, Unity.Netcode.NetworkObject& thisNetworkObject, System.Int32& thisEnemyIndex) (at <96990cc55c4f4b44aa802759fbb89746>:IL_012C)
(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)

this is before it spammed

faint copper
#

that's Starlancer's code

rocky fable
#

Yep

gleaming robin
#

hmm

faint copper
#

technically you could grab ILSpy to find the exact line that that IL_XXXX instruction points to

#

that'll tell you exactly what is null in most cases

gleaming robin
faint copper
#

open the specific assembly that was running when the stack trace was generated and go to the method that was running, then at the top switch the language dropdown to IL

#

then it'll show bytecode indices in hex that those ones in the stack trace refers to, the stack trace points to the first instruction of that line so there will be a few after and one will be dereferencing null

rocky fable
#

@copper yew btw in thise case a stack trace happened in Starlancer's code

gleaming robin
#

well 012C is my logger apparently ๐Ÿค”

rocky fable
#

In other cases it was probably some other mod lol

faint copper
#

since I assume it's one of your string-interpolated prints

gleaming robin
#

yea

#

is there a way to provide text in Discord in a dropdown, rather than creating a txt file?

faint copper
#

I don't know of one, but I haven't looked into it

gleaming robin
#

eh, no worries

#

well heck, it didn't reach

#

regardless, there's the full IL of my EnemyMeshPatch

faint copper
#

oh

#

hmm

gleaming robin
#

Is it because I forgot a ) ?

faint copper
#

nah

#

that's not evaluated, that's part of the string

gleaming robin
#

ah right

#

So is it acting like one of my interpolated references is null?

copper yew
#

is it possible that the network object can for whatever reason be null

#

i remember there was an issue like this that happened when i was debugging a mod conflict with mirage

gleaming robin
#

If the NO is null, I think the whole enemy GO just doesn't exist

faint copper
#

it wasn't null before though, I don't see why it would be now

copper yew
#

maybe it's possible for a mesh renderer to be null while the network object still exists, and vice versa though, idk

gleaming robin
rocky fable
#

I haven't booted the game up since lol

gleaming robin
#

oh hella

#

for future tests, just upload the log and maybe a small screenshot of the error

copper yew
#

i wonder what the hud manager error is cuz i always see it

rocky fable
#

same tbh

faint copper
#

MoreCompany sends a message in the chat to synchronize cosmetics but it sends the player ID as -1

#

for some reason their patches aren't currently preventing that from causing an error

copper yew
#

i remember this being reported on the AC thread that this happened with a user that installed AC as well though

faint copper
#

hmm interesting

#

maybe I'm wrong then

tulip vault
#

might be because prefix return false doesn't stop other prefixes on the same function from running

copper yew
#

nah maybe u are right, im gonna see if i can find the msg just to make sure

faint copper
#

the other hook should be in the stack then

copper yew
#

alright i cant find the message, i think i just remembered wrong

faint copper
#

I haven't looked too deeply into it yet honestly

#

it used to be fine, they didn't change how it worked

#

at least not fundamentally

#

finally

#

so it is just MoreCompany being silly

#

someone probably ought to make a PR to it to make it update the mesh arrays when this happens

#

not sure if this actually breaks anything seriously though, since I don't know the exact purpose in vanilla for those arrays and hiding the renderers

#

but now that I solved the mystery I really gotta go sleep stitchDeadTired

#

curiosity will be the death of me

rocky fable
gleaming robin
# rocky fable

This is actually showing my code repeating for entities I think? It's a little hard to tell the specifics as to when things are happening without the Unity LogInfo breaking things up

rocky fable
#

Hmmm maybe

gleaming robin
#

Yea it looks like something is calling EnableEnemyMesh more than normal

faint copper
#

I think that the SetPlayerSafeInShip function just gets called constantly until the ship is in orbit

#

or at least for a certain period upon leaving

gleaming robin
#

idk why that'd be calling a stack trace tho

copper yew
#

imo you should still log and see if the network object is null

gleaming robin
copper yew
#

yeah, and do one for ___thisNetworkObject.gameObject as well just in case

#

might as well have that extra info

gleaming robin
#

ah debug code

#

Hope y'all find something useful :3

rocky fable
#

Inb4 it was LC_MaskedFix that broke it

#

XD

gleaming robin
#

also I guess I should add the Code role to myself

gleaming robin
#

Wait, are you saying it did break it, or just that it'd be silly?

rocky fable
#

No I'm just saying inb4 it's that to be silly

#

Lol

gleaming robin
#

ah kk

#

Go break it some more Lunxara, I'm counting on you ๐Ÿคญ

rocky fable
#

@copper yew gonna neeed you to help me break it

#

๐Ÿ‘

copper yew
#

ah shit im not on my pc rn

rocky fable
#

Lol holy fuck

#

it broke hard lmfao

rocky fable
#

Look at how fast that log is zoomin lmfaoooooooooooo

#

NYOOOOOOOOOM

copper yew
#

jeeeesus

#

howd u replicate that

rocky fable
#

I put bees on the ship

#

and left

#

and they didn't despawn

#

LMFAO

#

Hold on lemme show the light show in game

#

Lmao the size of this log

#

Btw looks like the masked enemy had some fun too

#

@gleaming robin hope you have fun with this one

#

XD

#

Love how that latest upate of the ai fix to debug with Starlancer set managed to break that hard

#

XD

#

and with that I readded EnemyFix lol I doubt the next live build will break that hard but

#

XD

pastel spoke
#

Does this mod help with the LethalEscape mod?

white summitBOT
#

Hello, @pastel spoke, we have a dedicated support channel and forum here: #help-and-troubleshooting #1185732310700654732
Anyone responding is a volunteer so be patient.

lean cargo
#

At least it should

pastel spoke
#

Aight

#

thanks

undone copper
#

what relation does this mod have with lethalescape

golden basin
#

It should give more compatibility to lethal escape

undone copper
#

very good.. ive had it together for a long while just wasnt even sure what this did lol

#

but it came w a few fixes, so i kept it..

gleaming robin
#

@pastel spoke @undone copper
Prior to this update, SLAI didn't really interact with LEsc. SLAI in general is more for allowing moon creators to be silly with their indoor/outdoor spawnlists. With this update however, I fix an incompatibility where outside jesters would break and go immediately and permanently aggressive when both SLAI and LEsc were enabled :3

pastel spoke
#

Ah I see

#

thanks for the clarification

gleaming robin
#

@faint copper ??????????

faint copper
#

I would guess it's argument 1

#

not sure why sometimes the IL index is misaligned, but it might just be because the lines starts are indicated by a truncated number

#

generally one line will contain more than one instruction, so I think it's likely they store them in a bit shifted number

gleaming robin
#

Ah. When you say argument one, are you referring to the gameObject?

faint copper
#

it would also explain the occasional nop

#

I mean the ldarg.1

#

which would correspond to the zero-indexed parameter #1 for the method that the IL is in

gleaming robin
#

oh so that'd be thisEnemyIndex?

faint copper
#

oh maybe it's ldarg.2

#

I can't see with the red circle there lol

gleaming robin
#

oh sorry xP

faint copper
#

ah yep arg 2

#

judging by the following call, it must be the NetworkObject

gleaming robin
#

I guess it would make sense to clear out the NetworkObjects upon leaving actually. Would that be why those errors started getting thrown?

faint copper
#

but also, I wonder, are you using .NET Standard 2.1?

#

if you do, then putting the .pdb next to the dll should give you line numbers instead

#

or there's also a pinned message in #dev-general I think that explains a way to embed debug symbols

faint copper
#

but I guess that qwbarch had mentioned that you should print whether it was null, was it null when those errors occurred?

gleaming robin
#

Actually yes

faint copper
#

ah, that would explain it then

#

how are you checking if it's null? with == null?

gleaming robin
#

yea

faint copper
#

because it's worth noting that you can use is null to check whether the field has been set to null

#

the == operator is overloaded to also check whether an object has been Destroy()ed in Unity, but is null bypasses that so you can tell if someone did thisNetworkObject = null

#

if it wasn't set to null then that means that someone Destroy()ed it without also Destroy()ing the object it's attached to, which would seem very strange to me

#

unless that's some quirk of Unity's netcode

gleaming robin
#

Hm. I'll add in another debug line above for "is null" and then we can see both ways. Guess I gotta download Lunxara's code ๐Ÿคญ

faint copper
#

lemme modify OpenBodyCams to print when that gets destroyed too so you can test for two things at once

gleaming robin
#

kk, should I check for NetworkObjectId to be nulled as well?

#

oh nvm, it can't be lol

faint copper
#

isn't that an int? it shouldn't be possible for that to be null

#

yea

#

well, a ulong I guess

gleaming robin
#

yea that

#

I know this is useful, but also this is dumb lol

gleaming robin
faint copper
#

untested but should print a stack trace when any NetworkObject held by an EnemyAI.thisNetworkObject is destroyed

#

(OpenBodyCams is present in Lunxara's profile, so you probably want to disable that first)

#

oh, you'll also need to enable the ModelDestructionDebuggingPatchEnabled option in OpenBodyCams to get that to print, can be done at runtime

gleaming robin
#

kk

#

I know these errors are interesting, but they're really just a result of my logging, right? Not my mod failing?

golden basin
#

openbodycams, diversity's bracken and one more other mod, cant remember which

faint copper
#

hmm, I know the black screen thing was still unresolved last I heard, but I haven't been able to reproduce it even using her profile

gleaming robin
#

Okay so that was weird

#

Even after I left the planet, the masked was still registered in the system and throwing update/late update errors

faint copper
#

yeah, I wondered if it was not getting despawned correctly

gleaming robin
#

Yeah, anytime I step into the ship EnableEnemyMesh fires, so I might need to find a better method to hook into

gleaming robin
#

@copper yew how are you going about removing the mask from the MaskedEnemy?

#

nvm, thought I was on to something with that

rocky fable
# gleaming robin

You told me to break it but I didn't expect that build to break the game that hard XD

#

Freaking out cus the bees didn't despawn

#

Lol

gleaming robin
#

yea that was amazing lol

rocky fable
#

It really was XD

gleaming robin
#

Also with your code masked were completely borked

rocky fable
#

Yeah which is funny cus the only 3 mods that touch them are

gleaming robin
#

So I've had to switch to a more condensed testing environment ๐Ÿคญ

rocky fable
#

Mirage, MEOFork, and LC Masked Fix

#

lol

#

No other mod there should touch them

#

If Mirage and MEOFork don't touch those functions that were breaking like qwbarch said

#

Hmmmm

#

LC Masked Fix?

#

XD

gleaming robin
#

well

#

I just tried it with this modlist and the masked was still AI-dead

rocky fable
#

Oh Huh

#

@copper yew

#

Bruh if it's OpenBodyCams somehow

#

โ˜ ๏ธ

#

There's no way right?

gleaming robin
#

gonna test with no mirage, then with no bodycam + with mirage

rocky fable
#

Yeah

gleaming robin
#

I really should be working on my moons

rocky fable
ornate onyx
gleaming robin
#

new update is big

ornate onyx
#

Even though i read every changelog and shit

rocky fable
#

After all this hard work I've been seeing this man do to fix the masked

#

Gonna use them for sure lol

#

Every Starlancer mod is a must now

ornate onyx
gleaming robin
#

I want more people to use my music tbh

#

I haven't heard anyone talk about it

rocky fable
#

Added it

#

Time to go buy Boombox

gleaming robin
#

@faint copper just gonna go ahead and upload this for reference. This is just with AIFix, BodyCam, and DanceTools

gleaming robin
#

Nope, Masked worked fine

rocky fable
#

Okay okay good

gleaming robin
#

Now testing with just Mirage

rocky fable
#

I wonder what in Mirage's code is doing it then now or if the 2 mods have a weird conflict lol

gleaming robin
#

we finna find out

faint copper
gleaming robin
faint copper
#

sorry I meant null not non-null

#

guess you got the idea though lol

gleaming robin
#

also, this is just with Mirage and DanceTools ๐Ÿ˜ฌ

rocky fable
#

OOF

#

@copper yew

#

Fix

#

Lol

#

I'm vibing to this boombox right now

#

XD

gleaming robin
#

I'm gonna test your code again, but without Mirage

rocky fable
#

Yeah go for it

#

Now it's just isolating the issue in Mirage's code somehow if it's fine with MEOFork lol

gleaming robin
#

No breaking or nulls upon spawn

rocky fable
#

Weird

#

Did you also test with the option for compat with Mirage unticked?

#

Wonder if that MimickingPlayer flag is causing something

gleaming robin
#

Ah, I didn't

#

No nulls upon leaving. Gonna try again with a shit-ton of cosmetics

copper yew
rocky fable
gleaming robin
#

welp, the game crashed xD

rocky fable
#

untick that option to allow MEOFork to control them similarly XD

gleaming robin
#

kk

rocky fable
#

Was standing in the lobby vibing to boombox when I screenshotted that

gleaming robin
#

Is mine the only music mod you have? Just checking to make sure you were hearing my songs ๐Ÿคญ

rocky fable
#

Yeah it was definitely your songs haha

#

The only other mod I have that might is Lethal Resonance but it doesn't touch the radio right now as far as I'm aware

copper yew
gleaming robin
# copper yew ill send the patch in a sec

kk, I'm gonna test it with MEO fork compat disabled + no cosmetics, then with a ton of cosmetics. I'll have to test your patch later unfortunately, I gotta go to the store ๐Ÿคญ

rocky fable
#

We know something is going brrrrr

#

XD

gleaming robin
#

Masked AI didn't break, testing with many cosmetics now

#

gdi it crashed again

rocky fable
#

โ˜ ๏ธ

#

If that's the case I wonder wtf in Mirage could even cause it

gleaming robin
#

cursed

rocky fable
#

Haha

copper yew
#

mimickingPlayer wouldn't be my problem

#

this issue might be MC not doing a null check

rocky fable
#

True

#

So maybe a compatibility patch for MoreCompany would need to be made

copper yew
#

idk if you can read that since it's F# but GetComponentsInChildren<Transform>() i think returns a List<Transform>

#

so i just filter for only the ones with HeadMask in its name

#

and set it as non active

gleaming robin
#

Well to further add to the confusion, still no nulls

rocky fable
#

So MEO has whatever is causing this dealt with

#

Or doesn't touch what might be doing it

gleaming robin
#

I had disabled Diversity and Symbiosis earlier bc they were annoying me (the sassy ship voice, but I don't even remember why Symbiosis was), so I'll test that later

#

I gotta head to the store tho, so I'll be back later y'all ๐Ÿ‘‹

rocky fable
#

Lol

#

Also you can disable the ship voice in Diversity

#

๐Ÿคฃ๐Ÿคฃ๐Ÿ˜ญ๐Ÿ˜ญ

#

I love the new voice

#

:3

gleaming robin
#

It just got grating after hearing it so much so fast in my loading and exiting ๐Ÿคญ

rocky fable
#

lol that's fair

copper yew
#

MEO wrote its own patch to apply MC cosmetics it seems:

internal class MoreCompanyPatch
    {
        public static void ApplyCosmetics(MaskedPlayerEnemy masked)
        {
            //IL_00de: Unknown result type (might be due to invalid IL or missing references)
            //IL_00e8: Unknown result type (might be due to invalid IL or missing references)
            if (!MainClass.showCosmetics || MainClass.playerIdsAndCosmetics.Count == 0)
            {
                return;
            }
            Transform val = ((Component)masked).transform.Find("ScavengerModel").Find("metarig");
            CosmeticApplication component = ((Component)val).GetComponent<CosmeticApplication>();
            if (Object.op_Implicit((Object)(object)component))
            {
                component.ClearCosmetics();
                Object.Destroy((Object)(object)component);
            }
            List<string> list = MainClass.playerIdsAndCosmetics[(int)masked.mimickingPlayer.playerClientId];
            component = ((Component)val).gameObject.AddComponent<CosmeticApplication>();
            foreach (string item in list)
            {
                component.ApplyCosmetic(item, true);
            }
            foreach (CosmeticInstance spawnedCosmetic in component.spawnedCosmetics)
            {
                Transform transform = ((Component)spawnedCosmetic).transform;
                transform.localScale *= 0.38f;
            }
        }
    }
#

but for mirage i let morecompany handle that themselves

#

which means it's probably an MC bug

rocky fable
#

Yeah

#

So it seems it's time to implement that patch ^^

copper yew
#

nope that means MC has to fix it ๐Ÿ˜›

#

(if it really is MC at least)

#

which i'll report after i test it a bit to make sure

rocky fable
#

๐Ÿ‘

#

It could also be weirdness somehow regarding having MC handle the cosmetics itself vs a patch

copper yew
#

cosmetic mods are supposed to handle it themselves

#

idk why MEO even has a custom patch for it

rocky fable
#

If that's really the case though then uh

#

Why did that bug also happen with [REDACTED] before?

copper yew
#

dunno

rocky fable
#

Hmmmmm

copper yew
#

tbf idk waht the issue is yet since it's never happened to me

#

other than just looking at the error messages

rocky fable
#

Yeah it's odd

empty pivot
#

I never expected Diversity of all mods to f with the ship voice ๐Ÿคฃ

rocky fable
empty pivot
#

it says that???

rocky fable
#

It does if a dog is close to the ship yeah, the new voice is a troll

#

It's great XD

empty pivot
#

all I know is that it bugs me when the quota is reached because I was doing testing prior to the nuclear fallout

#

haven't been able to play any session after diversity's update

rocky fable
#

I love the new voice tbh

empty pivot
#

not due to diversity- due to the fallout 'n poor timing

rocky fable
#

Yeah I already got my replacements going

empty pivot
#

doesn't help that during the testing of ensuring the next session is ready - the save I had was on deadline day

#

so EVERY DAMN TIME I launched the cheat-save to test things, I always hear him yapping

#

and you can't even disable the bastard by pressing E on the speaker

rocky fable
#

Lmao

#

That's when you land the ship and sell stuff

#

XD

empty pivot
#

so I'm well aware of his quota talk and can't-disable-me jargon-

#

but the darn mods I was testing could be tested on company building >n>

#

selling things, testing prices, items, etc

#

it just so happened* to be convenient to have a cheat save on deadline day so stuff sells at 100%

#

lotta good all that balancing did ๐Ÿ˜’

#

wasted damn hours is what it concluded to be.

copper yew
rocky fable
#

Just prepare to have the game freak out if you leave the planet XD

copper yew
#

it spams it nonstop right

#

im assuming until the ship goes back to space

rocky fable
copper yew
#

ah ic

rocky fable
#

๐Ÿ‘

gleaming robin
copper yew
gleaming robin
#

Okay I'm increasingly confused. I can't get any null renders to happen

gleaming robin
copper yew
#

causing, although i'm not entirely sure on it so i need to confirm it myself before i report it to MC

opal bane
#

@gleaming robin I am out of the loop. What is Seamless Dungeon? This sounds like something I will want to have.

opal bane
#

ty!

rocky fable
#

Btw @gleaming robin I would love a way to disable the vanilla boombox tracks now lol

gleaming robin
rocky fable
#

The vanilla ones suck XD

rocky fable
gleaming robin
#

Aww no they don't (well a couple do xD)

rocky fable
#

It doesn't happen with the current live version of the AIFix for whatever reason

#

It started with the 2 most recent debug builds

copper yew
gleaming robin
#

oh heck

#

maybe my checks are somehow breaking Mirage

rocky fable
#

It's still good to figure out what is happening though

#

Yeah possible

gleaming robin
#

lemme try without the debug builds

copper yew
#

ill send you what i interact with from MaskedPlayerEnemy

gleaming robin
copper yew
#

ah

#

but either way

gleaming robin
#

that just happened to be there ๐Ÿคญ

copper yew
#

mirage really doesn't do much with masked enemies

#

only sets the mimicking player, suit, etc, if the masked enemy isn't null

rocky fable
gleaming robin
#

okay so if I remove AI fix Mirage doesn't break :B

rocky fable
gleaming robin
#

lemme just retest the debug version to be sure

rocky fable
#

You got this

gleaming robin
#

lmao yep, something in the debug version breaks masked xD

rocky fable
#

I will say the debug version before the 2 most recent ones gave me no issues

gleaming robin
#

wtf

rocky fable
#

Maybe cross check the code

#

Could be an accidental edit that borked something

gleaming robin
#

I'm gonna comment each new line til it works

#

tho...I have a theory :S

copper yew
rocky fable
copper yew
#

it's that i set the mimicking player after cosmetic mods tries to read it

#

my fix was that i just made sure mine runs first

copper yew
gleaming robin
#

it's just the extra logging

copper yew
#

what the

#

can the gods tell me how that would break compat

#

๐Ÿ˜ญ

gleaming robin
#

nope

#

but I might be able to in a min

copper yew
#

you might be god himself

rocky fable
#

I guess Masked enemies don't like to report extra logs

#

XD

gleaming robin
#

Maybe I should do like my friend suggested and split the NRE patch into a separate mod

#

since it's not really AI

rocky fable
#

You could, would you call it StarlancerMaskedFix?

gleaming robin
#

Possibly. Or more descriptively StarlancerNullMeshFix

rocky fable
#

Ye

gleaming robin
#

or NREMeshFix, they're all confusing lol

copper yew
#

StarlancerMeshFix for the brand

rocky fable
#

I'd be down to have it be seperated if you'd prefer that

queen furnace
#

@rocky fable what was the bug that spawn a random player model when you tp someone from ?

gleaming robin
queen furnace
#

I have this bug and i think i remember you was talking about it, i wanna find the culprit

rocky fable
#

I haven't had any bugs relating to tping in a bit

queen furnace
#

Yeah it was a while ago i think

rocky fable
#

Only time I did was with a bug that got patched in the recent Mirage versions

#

So

#

I can't tell you

queen furnace
#

wasn't it latecompany or something ?

rocky fable
#

LateCompany causes radar desyncs but so does every late join mod

queen furnace
#

oh

rocky fable
#

Like I said I can't help you lol

queen furnace
#

Ok, Thanks anyway !

copper yew
#

whats a radar desync

#

should i not be using LateCompany

sturdy aspen
copper yew
#

pixel was about to get hit by strays

sturdy aspen
#

Also unrelated but audio knight is a sick name

copper yew
#

speaking of which

#

i've been curious

#

@gleaming robin are you a sound engineer and a game dev

gleaming robin
copper yew
#

oh just cuz the name AudioKnight ๐Ÿ˜›

#

OH SHIT

#

u have a spotify

#

time to check it out

gleaming robin
#

(also not a professional game dev or anything, I put out one short horror game a few years back that was okay for my very first release, but I would have done things way differently now)

gleaming robin
#

@copper yew found it

#

if I directly reference the gameObject it breaks everything

copper yew
#

THAT'S IT?

#

like when it's null right

gleaming robin
#

yep, and gonna do one more hyper-specific test

copper yew
#

it's crazy how one small thing can break everything else

#

kinda like when i had a mod conflict with mirage regarding dead bodies

gleaming robin
#

Yee

#

So it completely breaks upon any reference to a component of ___thisNetworkObject

#

so gameObject or NetworkObjectId

empty pivot
#

I did dig through all recently updated mods (I log when things get updated, to ensure I know what fucked something up)

#

tested diversity, it stopped. :p

#

but YOU DID UPDATE ON THE SAME HECKIN' DAY~ -3-

copper yew
#

that's why i mentioned to do the null checks, since it seemed like the network object was null

#

and if you get a null refernece exception, everything else that was supposed to run after your patch won't run anymore

gleaming robin
#

yea I guess I misunderstood the assignment

#

tho I did run the code by you and Zaggy :P

#

Finally getting somewhere

#

A more useful chunk

#

The first cycle is null, the second cycle has 0 null renderers, then the 3rd finds 159 null renderers

#

Gonna test with removing Mirage again, just to see

copper yew
#

niceee

copper yew
gleaming robin
#

Without mirage, it went back to 8 mesh renderers and 0 of them were null. I had forgotten to re-enable MEOF's compat setting, so I did that and it went back up to 326 with 159 null

#

@copper yew I disabled MEOF and all of the null renderers disappeared

#

Took off all my cosmetics, number of renderers went back down to 8 from 167.
0 nulls

#

so for some reason MEOF's compatibility setting with your mod seems to be the issue?

rocky fable
#

Why is MEOF causing a bunch of null renderers?

#

Huhhhhhh

#

@devout sedge

#

Need you to shine some light on this XD

rocky fable
devout sedge
#

idk exactly, but MEO yoinks a reference of the masked prefab around the start of the game. for some reason, it uses the ship terminal's 'Start' method for this

#

if AI fix makes copies and modifies them, there will be a mismatch as MEO would replace them with the old prefabs

gleaming robin
#

The NRE issue was present beforehand, which is what sent me down this rabbit-hole lol
All I'm doing is checking for null renderers and then removing them

copper yew
#

wait so with just mirage and meof the problem isnt there?

devout sedge
#

so something is adding a heck ton of a lot of mesh renderer?

copper yew
#

ill take a look at MEOF later to see if i have any ideas, but i remember coppertiel's changes looking fine to me

rocky fable
devout sedge
#

it's mostly the same with only a few changes

gleaming robin
devout sedge
#

it might be something with more company cosmetics?

copper yew
#

if MC is open source i might take a look there later

rocky fable
copper yew
#

ah nice

#

it does sound like an MC issue though

rocky fable
tulip vault
#

Looking into this

copper yew
#

cuz coppertiel's compat change makes MEOF not apply cosmetics

tulip vault
#

yup

#

ew

copper yew
#

and mirage just gets MC to do it directly instead

tulip vault
#

I'm guessing it might be this

rocky fable
#

Batby over here finding the issue in a hitch

copper yew
#

so fast ๐Ÿ˜‚

rocky fable
#

Gotta love Batby ๐Ÿ’œ Batby is a pro

gleaming robin
#

Hey now, I did a lot ๐Ÿ˜ค

tulip vault
#

one sec

rocky fable
tulip vault
#

ill post more

copper yew
rocky fable
#

I love all of you ๐Ÿ’œ

#

Amazing mod devs each of you

gleaming robin
#

@tulip vault Assuming I keep this fix, I might push it into a separate mod. Is there a better place to call it than prefixing EnableEnemyMesh? It fires frequently inside the ship

rocky fable
gleaming robin
#

It does seem handy as a safety-net

tulip vault
#

until you learn transpilers you could probably get away with just remaking that function w/ the null check built in and prefix returning false tbh

rocky fable
#

Pushing it as a seperate mod makes sense, and you might even be able to merge in a fix for what MC is doing as well

gleaming robin
devout sedge
#

are cosmetics accidentally being added to the masked enemy prefab? does the number of mesh renderers build up over time?

tulip vault
#

since in this context it's not really your responsability to validate the lists, as it's a mod/s issue

gleaming robin
tulip vault
#

The primary issue here I believe is something the MoreCompany dev missed, and the masked enemy overhaul dev might have missed it too

#
  1. it's doubling them because both mods do the same thing
#

i dont know how that happened but

#

both add the cosmetics to the mimic

devout sedge
#

i never really touched this part, left it as is

rocky fable
#

So essentially to fix the issue of it doubling would be for MEOF to get an update that removes that patch basically

#

Since they're both doing the same thing

tulip vault
#

thats not the main issue

rocky fable
#

Ah okay okay

devout sedge
#

if this somehow doesn't happen on the original MEO then that would be strange

rocky fable
#

It likely does

tulip vault
#

I'm still trying to figure it out but I can't actually find where any of this gets called before Start in order for these components to even be in the list

#

but regardless

#

both mods versions of this code don't consider adding or removing from the enemyAI.meshRenderers and enemyAI.skinnedMeshRenderers list when they destroy stuff

#

im assuming because obv. the system was built for players and the mimic stuff was kinda chucked on ontop which might of had a little less research

#

(and of course, in normal circumstances it doesn't\ throw an error)

tulip vault
#

yeah were good

#

is the more company dev and/or the masked enemy overhaul dev contactable on here?

rocky fable
tulip vault
#

mhm

rocky fable
#

That's why Coppertiel is actively maintaining the fork currently with HomelessGinger's blessing

tulip vault
#

if someone wants to make a little mod that fixes this or if @gleaming robin wants to put it in their mod for now just let me know and i can explain the exact thing you'd want to do to fix this

#

ahhh

rocky fable
#

So I'm sure MEOF could implement the fix

devout sedge
#

I can probably just move the ApplyCosmetics line up into if (!Plugin.DontTouchMimickingPlayer)'s block

#

there's no point in calling ApplyCosmetics if it doesn't even touch mimickingPlayer

#

assuming of course that its purpose is to change the mimicking player and cosmetic after MoreCompany had set it

#

though I have a feeling this is something that had just never worked

#

since MoreCompany's code runs after MEO

gleaming robin
tulip vault
#

@devout sedge Basically because MC and/or MEO uses SetEnemyOutside() as a target to do this code it does add any potential cosmetics to the mimic before it collects them via GetComponentsInChildren because Start happens on the next frame

But, .ClearCosmetics doesn't strip destroyed .GameObjects from those lists.

In theory the easiest way to resolve this might be postfixing MC's .ClearCosmetics, Checking if the gameobject the component is attatched to has a EnemyAI (or derivative) component and then if it does validating those lists and removing any nulls

devout sedge
#

MEO postfixes MaskedPlayerEnemy::Start. as of now I don't have much knowledge of what order these are called

devout sedge
copper yew
devout sedge
#

^ i'm now unsure about this, after "Start happens on the next frame"

tulip vault
#

ye gimmie sec

#

writing up in detail

devout sedge
#

all this random 'anything can change anywhere' nonsense makes me feel like eventually porting a certain framework of mine to C#

gleaming robin
tulip vault
#

this will be two messages holdup

copper yew
undone copper
#

a jester followed us with lethalescape t o the ship as intended, but it appeared closed even when eating us... should i be asking here?

copper yew
undone copper
#

im going to sleep in a few mins too haha it ok

#

just keeping this here then

tulip vault
#

In basegame, EnemyAI does this in Start()

    public virtual void Start()
        this.agent = base.gameObject.GetComponentInChildren<NavMeshAgent>();
        this.skinnedMeshRenderers = base.gameObject.GetComponentsInChildren<SkinnedMeshRenderer>();
        this.meshRenderers = base.gameObject.GetComponentsInChildren<MeshRenderer>();

This populates the list with all the found Renderers attatched to the parent and/or it's children.

More Company applies cosmetics to the mimic in the function that spawns the mimic, utilizing the basegame call ofMaskedPlayerEnemey.SetEnemyOutside() that is called on the same frame. This means it's running before Start() so the basegame code above is correctly adding these new cosmetics to those lists.

There's two big issues though, first one being on More Company's side. This is a problem caused by More Company but on it's own never actually happens on it's own.

The ClearCosmetics() function in More Company here

    public void ClearCosmetics()
        {
            foreach (var spawnedCosmetic in spawnedCosmetics)
            {
                GameObject.Destroy(spawnedCosmetic.gameObject);
            }
            spawnedCosmetics.Clear();
        }

Was built for players, not mimics. When the Cosmetic GameObject is destroyed, the components on it are destroyed too. This includes the MeshRenderer's which are not being removed from the EnemyAI lists that obtained them on Start().

#

the second issue, being on MEO's Side, is the problem that causes the problem in More Company to actually occur.

The ApplyCosmetics() function here (stripped of irrelevant code to fit in the message) is run on a Postfix to EnemyAI.Start().
        public static void ApplyCosmetics(MaskedPlayerEnemy masked)
        {
            Transform cosmeticRoot = masked.transform.Find("ScavengerModel").Find("metarig");
            CosmeticApplication cosmeticApplication = cosmeticRoot.GetComponent<CosmeticApplication>();
            if (cosmeticApplication)
            {
                cosmeticApplication.ClearCosmetics();
                GameObject.Destroy(cosmeticApplication);
            }


            List<string> playerCosmetics = MoreCompany.MainClass.playerIdsAndCosmetics[(int)masked.mimickingPlayer.playerClientId];
            cosmeticApplication = cosmeticRoot.gameObject.AddComponent<CosmeticApplication>();
            foreach (var cosmetic in playerCosmetics)
            {
                cosmeticApplication.ApplyCosmetic(cosmetic, true);
            }
        }
#

This code finds the CosmeticApplication that was already added via More Company before the EnemyAI.Start() ran and runs ClearCosmetics() on it. Destroying every Cosmetic MeshRenderer that was already added to the mimic and included in the lists that were populated in Start(). So now the list has null references. Also. Because this code is running as a Postfix, the Cosmetics MEO is re-adding have missed the window to be automatically added to those lists via the basegame code, and code has not been added to manually add these new Renderers to the lists after the fact. So in theory the Mimic's .meshRenderers and .skinnedMeshRenderers lists have both null references and are missing the actual cosmetic meshrenders that didn't get destroyed.

#

long ahhh post

devout sedge
# copper yew are u talking about a dynamically typed language

you seem to like F#? not really language-related though. another project of mine has a task system that can very effectively order tasks based on a description of how they access certain variable. 'Task A writes to a queue, Task B reads from it, so Task A runs before Task B' but with a bunch of other weird things that allow it to be perfectly rolled into a game loop

gleaming robin
undone copper
#

oh unfortunately i dont have it........

#

but if ithappens again ill be sure to grab it

#

ive started another game since

#

several

devout sedge
copper yew
tulip vault
#

on a "just fixing the issue" side of things answer. i would just postfix whatever version of ApplyCosmetics and ClearCosmetics is being used to check if the gameobject that has the CosmeticApplication component has a enemyAI, and if it does ensure those two lists either have nulls removed or new meshrenderers added

on a specific to your side of things answer, i would look into if still need to be doing all the MoreCompanyCosmetic related stuff in MEO. as from a glance it kinda seems like at some point MC adapted the patch MEO implemented directly

devout sedge
devout sedge
tulip vault
#

Wouldn't know

rocky fable
#

None of the ones I've used have anyways

devout sedge
#

ClearCosmetics touching EnemyAI introduces additional coupling that seems like a bad idea. since meshRenderers is set by EnemyAI, i'd say it makes sense for something postfixed in MaskedEnemy to modify it

copper yew
devout sedge
gleaming robin
#

Update on the NRE situation @copper yew @rocky fable @devout sedge :
Until/Unless a solution presents itself to sweep through the enemy mesh renderers once and clear out the nulls, I have managed to successfully replace the EnableEnemyMesh code via prefix to simply ignore any null instances, thus preventing any NREs.

#

oh and @faint copper

last robin
#

So what does this do?

gleaming robin
last robin
#

The mod

gleaming robin
#

A helper mod that automatically assigns the correct interior or exterior AI to an enemy when they spawn depending on if they are inside or outside of the dungeon.

Most moon creators will be adding this as a dependency so they can put enemies on either spawn list, but it can also be used by normal modders that want to force spawn enemies outside for fun

faint copper
golden basin
#

lovely

faint copper
#

seems good to me

#

but really imo it feels out of scope for your mod since I don't believe anything you do triggers this

#

is qwbarch looking at making a PR for MoreCompany? I saw they were looking at the source earlier

gleaming robin
# golden basin lovely

Yea I'll be pushing out an update shortly and no one will have to deal with that ๐Ÿคญ

golden basin
#

lol

#

dunno if its the AI fix but theres insane client desync ongoing when we play

#

i cant imagine it being the AI fix

devout sedge
#

i'm currently fixing the null mesh renderers

gleaming robin
gleaming robin
faint copper
#

what I mean is that modifying EnableEnemyMesh() is a bandaid fix, it really ought to be fixed by the people causing the issue

#

I guess they just haven't hadn't realized that they're causing it yet

#

it's a really specific issue, it shouldn't happen with other enemies normally

gleaming robin
#

I'll push an update removing the patch, saying that MEOFork is implementing its own fix which would make mine redundant. Ty @devout sedge

gleaming robin
faint copper
#

was typing and not reading lol

gleaming robin
#

๐Ÿคญ

#

All my coding the past 24 hours wasn't for naught at least, since it helped isolate the problem.

faint copper
#

yeah, it's been around for a while, it'll be nice to have one weird spam bug removed

#

it may have also been the cause of some enemies not despawning, but not sure

#

I think there was a mod that was aiming to fix that by just despawning the enemies sooner, wouldn't be surprised if the underlying issue was the null pointers when hiding the enemies before the ship leaves

copper yew
#

yeah the enemies not despawning had to do with null exceptions

#

so it could be related

#

i remember network objects being null was the issue

#

where the vanilla code tries to call networkObject.Despawn(), but the network object is null

#

if i remember right at least....

faint copper
#

oh, that does seem odd and perhaps unrelated then

#

I'd have to spend a bunch of time reading the surrounding code but I got better things to do lol

#

I guess we'll find out if that still happens eventually

copper yew
#

EnemyFix seemed to be enough for people i just never bothered looking at it any deeper

gleaming robin
#

Well now that that's handled, time to fix the Jester. Again. @_@

tulip vault
faint copper
#

oh I know the problem

#

I found it yesterday, at least partially

#

I didn't know that MaskedEnemyOverhaul was creating the cosmetics before MoreCompany tried to, but yeah

devout sedge
faint copper
#

hmmm

faint copper
#

#1206494982521753620 message

#

the initially-created cosmetics would not show up as being destroyed, so this indicates to me that MoreCompany was calling it later

#

I may be wrong though, but that's why I believe it to be the case

devout sedge
faint copper
#

also, the stack trace I got indicates that MoreCompany is doing it in the AI interval function? so it would be well after Start()

#

bottom line is MoreCompany needs to fix the issue too

#

but yeah, I wouldn't expect patching it on MEO's side would fix it

gleaming robin
#

uh, should I keep my null-check in then?

faint copper
#

well.. I wouldn't take my word for it rather than testing to see if the errors are still present, but if your goal is to prevent those errors, I would imagine so

gleaming robin
#

to heck with it, I might as well keep it in until I hear it's been solved elsewhere, won't hurt anything and it'll prevent bs @_@

copper yew
#

i'm probably gonna try and reproduce the error and just open a PR for MC later

#

@gleaming robin how do i reproduce that exact error

#

probably going to try it tonight

gleaming robin
#

I recommend installing DanceTools by dancemoon for ease of testing.

  1. Disable the ai fix
  2. Land on a moon. (Cosmetics may or may not be required, and Vow was my testing ground bc of last night lol)
  3. Spawn a Masked. (Hit tilde, type "enemy masked")
  4. Step out of the ship.
  5. Your log should now be flooded with NREs
copper yew
#

is just having mc + meo/meof enough for the test? or should i use your profile code as well

gleaming robin
#

iirc it was the meof compatibility patch that triggered the NREs, so it might need mirage as well, but you can try it without, it's a pretty quick test

copper yew
#

ah bet, thanks for the detailed steps

devout sedge
#

the exception occurs in a patched EnableEnemyMesh though?

gleaming robin
#

Calling EEM is what throws the NREs even without modification

devout sedge
#

i'm testing right now. With AI fix I can see

[Warning:Starlancer AI Fix] Found null reference inside MaskedPlayerEnemy(Clone)'s meshRenderers. Removing to prevent potential null reference exceptions.
gleaming robin
#

The null still exists, but the NRE doesn't occur with the patch

#

The live release of SLAI removes the nulls, but bc of how EEM is called, its kinda spammy. So I'm gonna push new code that instead just replaces EEM so that it has a null-check built into it

copper yew
#

whats EEM

gleaming robin
#

EnableEnemyMesh

copper yew
#

ah

copper yew
#

does that mean a fix for MC won't really be needed

gleaming robin
#

I'm cookin with my sous chef

faint copper
#

if the enemy doesn't know about all attached models then it can't hide properly

copper yew
#

honestly if audio knight's changes is good enough as a bandaid fix, im prob gonna skip working on a pr for mc

#

since i'd rather just work on other things if the bandaid fix works

faint copper
#

yeah, fair enough

gleaming robin
#

I'll handle it for now ๐Ÿซก

#

Just gotta figure out how to make the LEsc jester stop acting like a CLOWN

devout sedge
#

i think this might be related to the 'invisible masked with floating cosmetics' issue that I've seen a few times

#

though that was a while ago

copper yew
#

ah

#

i'll still try and fix it for MC later then

rocky fable
#

So updates inc soon?

#

;o

gleaming robin
rocky fable
#

Idk lmfao sounded like you were gonna push a mod and Coppertiel is implementing a fix into MEOF

#

and now barch may be implementing a fix into Mirage

#

XD

copper yew
#

i'm not implementing it into mirage

#

it's an MC bug

#

if i add a fix it'd be to MC directly

tulip vault
gleaming robin
#

ah, my understanding is that barch is gonna put in a PR later for MC, idk about Coppertiel, and I've decided I'm gonna try to make my null-remover better rather than swapping it to a null-check

rocky fable
#

I look forward to your fix

#

๐Ÿ’œ

gleaming robin
#

trying to address this first lol

rocky fable
#

Haha

gleaming robin
#

so far I'm unable to replicate that specific issue, but I have found that an LEsc jester breaks if its aggressive inside and then warps outside. It'll shut the box, move to one spot, and then not navigate on its own, only when it sees a player again

#

allowing it to attack outside in the first place was tricky, and idk if I can get it to keep its aggro behavior upon warp, but I do want to at least address the nav breaking

devout sedge
#

For the renderer stuff, I guess there's kind of a rule that mod devs have to follow: "adding or removing MeshRenderers from enemies must update EnemyAI meshRenderers & skinnedMeshRenderers."

MC should either...

  • Follow the rule above and fix MimicPatches.cs and update renderers. (MEO has to fix this too) or...
  • Add EnemyAI support for CosmeticApplication. This probably practical, but I'm not a fan of it as it adds side-effects to existing functions and bloats CosmeticApplication.
copper yew
#

im more of a fan of the first option

faint copper
#

I think given that CosmeticApplication is attached to an EnemyAI, it would be nice if it did it automatically, but obviously the downside is that it will be allocating and throwing away as many arrays as there are cosmetics because it doesn't apply all of the cosmetics in one function call

#

so yeah, first option probably better as the API stands

gleaming robin
#

I wanna put the jester under a hydraulic press

sturdy aspen
gleaming robin
#

Alright so I fixed the nav issue, I think. Testing my latest code I haven't had the issue pop up again.
As far the whole "jester attacking while still in box" thing, that should already be fixed and I couldn't replicate it

gleaming robin
#

@copper yew @rocky fable @faint copper let's fucking GOOOOOOOOOOOO. Only fires if the null-check finds a null so it only logs one time

rocky fable
#

No more log spam

#

๐Ÿ˜„

gleaming robin
#

just tidying up the log message, then I'll test again and if all goes well push the update

rocky fable
#

Look at this chad out here doing work

copper yew
#

dubbbbb

gleaming robin
#

Lunxara's bepinex is config'd differently then mine so it's missing the info-padding in-between these but I spawned 3 masked with small delays between each - after each spawn, I crossed the "set safe in ship" threshold to trigger EnableEnemyMesh.
Each one only logged one instance of null renderers! And referencing the gameObject didn't break everything!

rocky fable
#

Let's gooo ๐Ÿ™‚

rocky fable
#

lol

gleaming robin
#

For saving it to the actual log file afterwards

rocky fable
#

๐Ÿ‘

gleaming robin
#

idk about anyone else, but I like seeing how much stuff occurs in-between things happening

#

Here's a slightly better log that I edited a bit

#

I'm so pleased lol

rocky fable
#

You did a great job!!!!

copper yew
#

niceeee good shit

#

logs look way better now for sure

gleaming robin
#
  • StarlancerAIFix v3.2.0
    • Optimized the NRE patch. It now only runs the null removal if a null reference is found, which also means it doesn't spam the log.
    • Fixed an issue where jesters would get stuck in place if they entered the attack behavior outside and then lost their targets.
#

Starlancer AI Fix v3.2.0

#

@rocky fable Be sure to share the logs of the fix working out in the wild!

copper yew
#

what's the error log supposed to look like again? i'll share it in #1200695291972685926

rocky fable
copper yew
#

yeah i will on my next update

rocky fable
#

Starlancer's AI Fix is now needed by everyone

copper yew
#

just don't wanna push an update just to change the readme xd

gleaming robin
vapid verge
rocky fable
#

There you go btw

gleaming robin
#

LET'S GOOOOOO
I love seeing the variation in the number as well, I'm assuming the two masked had different numbers of cosmetics on?

rocky fable
#

They would have both been mimics of me since I was solo, but I never came across the other one I boxxed one cus it popped out of a vent in front of me XD

gleaming robin
#

Ohhh you left before the other one fully spawned?

rocky fable
#

Possible lol idk

gleaming robin
#

Only explanation I can think of for one having 2x as many nulls

rocky fable
#

Yeah it would make sense

#

The game certainly performs better without masked spamming NRE's though lol

#

Masked no longer go brrrrr on game performance

gleaming robin
#

I'm glad there's a tangible benefit!

#

Was slightly worried that the performance hit wouldn't be mitigated all that much and the main benefit would be a cleaner log
So I'm quite pleased with it being actually effective in that regard

rocky fable
#

This one showed up self aware. It was like "Hold up hold up I can explain"

#

XD

gleaming robin
#

It was thinking "well ONE of us has to change"

raw rivet
#

So, how does this mod work with stuff like the SnatchinBracken which modifies the AI for that enemy?
Will it lose its custom behaviour once its outside and be replaced with this one's?

gleaming robin
# raw rivet So, how does this mod work with stuff like the SnatchinBracken which modifies th...

This is generally designed with compatibility in mind, and only specifically touches Jester, Sandworm, and SpringMan AIs.

  • The general portion of the patch just gives enemies the appropriate navigation capabilities when they spawn, depending on whether they spawn inside or outside the facility. It doesn't touch any actual behaviors.
  • The Jester patch is necessary because it has some hardcoded stuff to look inside the facility for players, I give it logic to be aware of players while outside.
  • The Sandworm patch is a simple reset of its position to a random inside node after it attacks indoors, otherwise it warps to the surface and becomes broken.
  • The SpringMan patch is a simple patch to let it resume its walking animation once it becomes completely cut-off from players. Purely an aesthetic fix.

All of those are postfixes. I have one prefix for EnableEnemyMesh that detects and removes any null renderers it finds to prevent any Null Reference Exceptions from occurring, which right now is mainly caused by MoreCompany + MaskedEnemyOverhaul, but even after they fix it on their end will serve as a handy safety net to catch any edge-case occurrences.

There's also one patch that's dependent on Lethal Escape or the WIP Seamless Dungeon mod, that does a postfix check on Update() to ensure that the enemy has the correct navigational ability.

raw rivet
#

i imagine it will break, but thats due to snatchinbracken not knowing where to take the body outside

#

so typically we turn that mod off if we want the bracken to escape, or vice versa

gleaming robin
#

Please let me know how it goes! I just took a look at SnatchinBracken's page and yea it's possible that it might break since it'll be setting its position to an inaccessible node.

However, I'm wondering if they have a fallback for the mansion tileset where the bracken room doesn't exist where "if bracken room doesn't exist or can't be reached, use normal favorite spot logic"

raw rivet
#

I suggested in their thread they could detect when they're outside and set a new favourite spot at the main entrance

#

then, could then make it so it goes back inside with the body and then resume normal behaviour

gleaming robin
#

Possibly, though I wouldn't blame them if they decide that entering/leaving would be out-of-scope for SB. For compatibility and to keep the AI as vanilla as possible I would suggest just doing an outside check before they run their code
if (!isOutside) {set favorite spot to BrackRoom}

raw rivet
#

Makes sense, i passed it on to him

gleaming robin
#

Sweet, ty :)

raw rivet
#

It would be awesome if all 3 mods could play nice

gleaming robin
#

For sure!

raw rivet
#

like the demogorgon

#

the shy guy already has its own unique ai for leaving without lethal escape

gleaming robin
#

Lethal Escape actually does give escaping enemies the correct AI. SLAI disables LEsc's Jester Update() postfix in favor of its own, otherwise the Jester is permanently aggressive but stuck in the box. I added my extra Update() patch to it as a failsafe in case the AI just happens to not update (and like I said for when Seamless Dungeon comes out if it allows enemies to cross nav-thresholds).

raw rivet
#

Weird, for me the jester freezes outside upon killing a player, or perhaps when they go indoors
Like just stands still whilst the skull is out and doesnt chase anymore
We only had lethal escape, no other mod that would touch the jester AI in any way
Thats why i was gonna try this mod later to see if it fixes it

gleaming robin
#

Unless I'm mistaken, LEsc doesn't have logic for returning indoors, does it?
And yea that's definitely odd, and SLAI should fix that for ya :3

#

The main purpose of the mod was to allow moon creators to put enemies on either spawnlist btw, in case you were curious

raw rivet
#

makes sense

raw rivet
rocky fable
#

All Starlancer mods are goated

#

Change my mind

gleaming robin
undone copper
#

how do indoors eyeless dog work lol

#

do they work..

#

it would be so funny..

queen furnace
#

They work

undone copper
#

no way

gleaming robin
#

Everything works with SLAIFix :3c

undone copper
#

im enabling their inside spawns in a few intersting places :)))

#

my friends are gonna enjoy it

gleaming robin
#

I hope they don't ๐Ÿคญ

undone copper
#

4 lootbugs spawned in celeste outside and stole my loot put it out of the ship and protected it as if it was theirs

#

i love it

gleaming robin
#

oh snap they went in the ship?

#

I thought they didn't have the nav-logic to do so

queen furnace
undone copper
#

guess so!! plus lethalescape has a config for making them build nests outside

#

soo that likely came into play too

rocky fable
#

Hey @gleaming robin is there a bug right now with the current version of ai fix causing outside enemies to not spawn? I notice I keep having dogs and giants not spawning in and I'm gonna check the log after we end stream cus idk what's going on XD

gleaming robin
#

I don't touch anything regarding the actual spawning of enemies, so I don't think it'd be the AI Fix

#

But lemme know if you find something

rocky fable
#

My only guess is EnemyFix tbh

#

I took it out

gleaming robin
rocky fable
#

Only inside ones

gleaming robin
#

Ah, weird

rocky fable
#

Yeah I thought maybe it was AIFix cus I didn't have this last night, but your mod didn't report errors so I doubt it lol

#

I would love for a fix for Stormy planets spamming this message btw [Warning: Unity Log] Particle System is trying to spawn on a mesh with zero surface area
[Warning: Unity Log] Particle System is trying to spawn on a mesh with zero surface area
[Warning: Unity Log] Particle System is trying to spawn on a mesh with zero surface area
[Warning: Unity Log] Particle System is trying to spawn on a mesh with zero surface area
[Warning: Unity Log] Particle System is trying to spawn on a mesh with zero surface area
[Warning: Unity Log] Particle System is trying to spawn on a mesh with zero surface area
[Warning: Unity Log] Particle System is trying to spawn on a mesh with zero surface area
[Warning: Unity Log] Particle System is trying to spawn on a mesh with zero surface area
[Warning: Unity Log] Particle System is trying to spawn on a mesh with zero surface area

#

Idk why they do that

gleaming robin
#

I'm pretty sure that's a vanilla issue

#

It's when the static electricity is building on some scraps that aren't properly set-up

#

At least I'm pretty sure that's happened with some vanilla scraps

rocky fable
#

Yeah I just would love for the game to not spam that

#

Lol

golden basin
rough echo
#

I've also seen that specific Unity warning when using YippeeKeyMod and attempting to Yippee as a dead player

raw rivet
#

The jester seems to work outside now! Nice!

gleaming robin
gleaming robin
#

Just released StarlancerMoons v1.0 peeps โœจ

rocky fable
#

I still keep noticing dogs and giants aren't spawning the way they should lol, and I know this wasn't happening before the latest update for AIFix I need to check my logs again to see wtf is going on XD

gleaming robin
#

That's very strange. I was testing my moon update and I definitely had outside spawns ๐Ÿค”

#

You've got quite the modlist tho :P

reef salmon
#

jesters seem a bit buggy, they seem to sometimes start cranking while walking with no music, then start properly cranking later

gleaming robin
#

gah, I feel like there's gotta be something else causing that, I swear I haven't run into that bug in forever

#

Do you have anything else affecting enemies?

rocky fable
#

Weirdly enough the only mod I have installed that posted weird messages in the logs was Better Lobbies lol