#Starlancer AIFix v3.13.2 | EnemyEscape v3.0.0

1 messages Β· Page 4 of 1

rocky fable
#

So I removed it

#

Maybe it was affecting enemy spawns somehow

#

πŸ€·β€β™€οΈ

gleaming robin
#

Could maybe be a config issue?

rocky fable
#

Nah, I don't think so

#

Could be Better Lobbies conflicts with MoreCompany somehow

reef salmon
#

it seemed to happen whenever i spawned one with dancetools?

ornate onyx
#

ive avoided your moons like the plague like you said so now ill try it finaly lol

gloomy hearth
#

: ( same but there are three good log sanitizing mods I just haven't figured them out yet too block really bad spam like that

gleaming robin
reef salmon
#

yeah

gleaming robin
gleaming robin
#

Can you recall the exact circumstances under which this occurred? Like did this happen for its first attack attempt or after, had you gone in and out several times, or just hung out with the jester outside?

hallow merlin
#

The spore lizards get stuck, am I doing something wrong? I just set the spore lizards to spawn in the editor and enabled the mod

golden basin
#

they're smelling the flowers

#

let em be

gleaming robin
hallow merlin
#

completely clean. He spawned on an OutsideNode. Idk if the second screenshots shows the problem

gleaming robin
#

That's very bizarre. So these were naturally spawned?

hallow merlin
#

yes

gleaming robin
#

hmmmmmmmmmm
I'll dig in a lil and see what I find

hallow merlin
#

let me know if you need more information

gleaming robin
#

Will do!

gleaming robin
#

I still haven't run into that weird Puffer.Update() error, which makes sense bc I'm not touching EnemyAI.Update() unless Lethal Escape is present, but what's really confusing about that is that it's acting like the puffer straight up doesn't have it's AI attached to it.

I'm also making no headway to solving the "prefab Lizard goes to (0,0,0) on Solace" issue. The only thing I can think of is that on Start() it sets its lookAtNoise vector to Vector3.zero, but I can't figure out why its not updating its behavior after Start(). Naturally spawned lizards work just fine, so idk what the difference here is >:|

reef salmon
gleaming robin
#

kk, I'll give it a try

raw rivet
#

SnatchinBracken works outside now!
Played with SnatchinBracken, LethalEscape and StarlancerAIFix
The bracken grabbed my friend and dragged him off outside on the Auralis moon, then came back for someone else as you'd expect

foggy remnant
#

it never worked for you guys?

#

its been working for me like a month ago even without StarlancerAIFix

#

as long as i had that pathfinder fix

#

a friend of mine got dragged to a cliff

raw rivet
gleaming robin
#

Well, notsomuch for your friend

gleaming robin
#

This spore lizard issue is so weird

spice latch
#

What's the issue?
I haven't noticed anything weird with them

gleaming robin
#

Prefab spore lizards go to (0,0,0) and stay there until interacted with. LE moons can't use prefabbed enemies, so unless you've played on Solace (and I think maybe Bozoros(sp?)) I don't think anyone else has used them as prefabs

spice latch
#

Ah

gleaming robin
#

Okay, finally have a lead on solving the spore lizard AI

#

Yep, solved

#

My solution was to implant a false memory within it

#
  • StarlancerAIFix v3.3.0
    • Fixed prefab Spore Lizards being a little silly with their initial behavior.
      • Previously they would navigate to (0,0,0) and stand there until otherwise interacted with.
#

Starlancer AI Fix v3.3.0

storm zephyr
ornate onyx
ornate onyx
#

That was yesterday (for me cuz its 6 am rn) so before you made the update i just wanted to say

gleaming robin
#

Ah yea, well it's fixed now :3

gleaming robin
frigid cape
#

some kind of issue i guess

#

they seem to all go to 0,0 world coords and sit there until you bug them

gleaming robin
#

Yeah that's the issue I fixed

frigid cape
#

oh sweet

#

so they patrol and stuff like normal now?

gleaming robin
#

Yep, though I'd love confirmation from you

frigid cape
#

i'll have to test

#

is it live on thunderstore

gleaming robin
#

Yee

frigid cape
#

cool, booting it up now

#

on an eclipsed version of my moon rn and not a single lizard has spawned yet and its 5pm

gleaming robin
#

lmao

#

I thought you were using prefabs

#

So that's extra weird, bc lizards were already working fine with natural spawns for me

frigid cape
#

no no no I'm using natural spawns

#

I didn't even think about using prefabs tbh

gleaming robin
#

Well the fix should still work if you were having issues with natural spawns

#

Since the issue itself was the same

frigid cape
#

i went the whole day on my moon during an eclipse and not a single lizard spawned

#

just an fyi and I haven't changed any of those settings at all

#

so i can't test lizards if i wanted to

gleaming robin
#

you might wanna give it another go, rng is cruel sometimes

frigid cape
#

that might take a while

#

we are getting into a play session tonight so I'll be on the lookout and I'll test it if I see any lizard boys

gleaming robin
#

kk!

rocky fable
#

Btw @gleaming robin enemy spawns started working normally again after I removed Better Lobbies lol

#

So it was definitely causing some sort of conflict somewhere

gleaming robin
#

Glad to hear you figured it out!

copper yew
#

just pushed an update for mirage, so the readme now has StarlancerAIFix as one of the recommended mods πŸ˜„

reef salmon
rocky fable
#

even in vanilla it's needed

copper yew
#

it's for the EnableEnemyMesh error

reef salmon
#

oh

frigid cape
long burrow
#

heyo, I've only looked through the past week of this thread so I'm sorry if this is known, and I'm not positive if it's this mod or the moon, but on Cosmocos the outside bracken AI seems to be having an issue, it happens even on this stripped down code (018e0ca0-d020-6219-8710-87eec0799a0b),
they just kinda tend to walk to the same spot and just stand there (I believe even if they were working fine for a while before they get there sometimes and get stuck), it seems similar to the spore lizards walking to 0,0 and doing nothing until interacted with, so I'm hazarding a guess that it's this mod?
I'll post some screenshots

#

It's in front of the fire exits, straight out of the ship (a little on the right, if the wall is there then you just gotta wait a minute), when they're in this state they also make the noise of being mad when you look at em long enough but they don't move

gleaming robin
#

honestly that might just be down to being Cosmocos lol

#

@spice latch have you received reports of this?

long burrow
#

yeah it's possible, I don't belieeeve I've seen it happening on other moons but not for sure on that

#

on that topic I've also noticed (only on wesley's moons now that i think about it, but those are the only ones I've tried to put indoor enemies outside in), that when I'm alone, the outside coilheads work great, but when I host with one other person, they only respond to the other person and completely ignore me and walk right past me
I just joined the server so I guess I'm just throwin out all the bugs I've noticed at once lol, sorry

gleaming robin
#

No worries! If you manage to catch the log spitting out errors that are attributed to AIFix, send 'em my way

haughty rapids
# long burrow

OH MY LORD is that cosmocos that flower looks beautiful

long burrow
#

BUT OF COURSE ALL THE STARLANCER MOONS LOOK WAY BETTER HAHA πŸ˜… 😨

haughty rapids
#

LOL

#

you dont have to mention that, audio knight knows 😎

#

gosh i WANT to visit coscmocos really bad though

#

but I want to finish the cosmocos puzzle first!

#

AND cosmocos will be way cooler once its ported to LLL and desync issues are fixed

long burrow
#

true true, hopefully that fixes a lot of things

#

yeah I never went about doing the puzzle, honestly I was just looking for a moon I felt like could make a good mega-hard moon and it fit the bill perfectly, maybe I missed out :/

gleaming robin
#

It's okay, I know some other moons look downright amazing

#

but they don't have the performance mine do

#

🀭

haughty rapids
reef salmon
#

enemies REALLY like to get into these little cuddle circles where they're all trying to get the same spot at once which gets them all stuck

#

most prominent with spore lizards but happens with other things too

undone copper
#

theyre gossipping

ornate onyx
reef salmon
gleaming robin
#

Hm. If you interact with them do they resume normal behavior, or just go back to cuddling?

sullen inlet
#

Legends say if you say " Bozoros " a spooky clown reaction emoji appears under your message

reef salmon
#

brackens seem to work fine though

gleaming robin
#

Bugs might've all chosen that spot as a nest for some reason. I'm gonna do a more thorough test for outside AI today

reef salmon
gleaming robin
#

What's concerning is that I'm pretty sure they should automatically path to a new node if they're blocked, so something is preventing that for some reason

gleaming robin
#

Gonna load up my debug moon with a ton of ai nodes and every interior enemy spawning outside and see what happens

gleaming robin
#

So I forgot to bump up my power cap, but I had 2 springs, a thumper, a blob, and a lizard, and everything was pathing around normally (except for the blob, but I think it only moves if it detects noise maybe?? It started coming at me when I got near it)

#

Bumping up the cap to 800, will report back with a video 🀭

reef salmon
#

try spawning a bunch of lizards

gleaming robin
#

Once each enemy reaches its natural limit I'll go nuts with DanceTools

gleaming robin
reef salmon
gleaming robin
#

Gonna post a video in a min. I went ham on the number of enemies and none got clustered

#

Only weird thing I noticed was the coilhead lost me once I went inside the ship

reef salmon
#

coilheads do that normally don't they? you even had an entire fix for their animations breaking when they lose you on the ship

gleaming robin
#

They broke on getting onto the ship at all previously, but this one followed me up with the OffMeshLink and then skedaddled once I crossed the door threshold

#

@reef salmon just pinging you to make sure you see the vid

reef salmon
#

this feels like watching a zoo

gleaming robin
#

pretty much lol

reef salmon
#

i think it's maybe an issue with how many nodes the outside has?

#

if it has lots of nodes like this seems to then it's fine, but other maps not so much

gleaming robin
#

Maybe? I guess if there's too few nodes and they're too far apart that might explain that particular issue, but that's unfortunately not something I can fix on my end, so I'd suggest reporting it to the moon creator and see if they have their AI nodes set up too sparsely, maybe that'd fix the issue

#

Unless something more concrete is revealed that I can actually adjust though, there's nothing I can do

reef salmon
#

so sad

gleaming robin
#

It'll be okay, just go to Solace and you can have up to 4 lizards roaming around

#

Maybe I should put them on the daytime list so they'll spawn earlier

reef salmon
#

unfortunately i haven't really checked out the starlancer moons yet because i already have wesley's moon which is a sizable amount

gleaming robin
#

that's fair lol

undone copper
#

ive noticed that with a recent patch (the one about walking to 0,0) it happens less frequently on my end

#

i did still find lizards there once on solace where i last reported it, but the other trimes they were actually running around the beach

#

once out of many times we landed

#

only thing i can tell you to help replicate is i use pathfindinglagfix or whatever it was called

#

and diversity overhauls spore lizard aggression

#

but i dont have time to test if its those 2

haughty rapids
#

are all current moons stable?

gleaming robin
haughty rapids
# gleaming robin You mean my moons?

pfft sorry lol :P wrong thread, but yes i did mean your moons! I've just been having framerate issues with my mod (trying to minimize them as much as possible), visiting solace when its foggy seems to make it little laggy...

#

But it really might be another mod.

gleaming robin
#

Not 100% sure about the foggy performance, but I just pushed a big performance-focused update last night so maybe it'll be better for you

drowsy glacier
#

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

#

do u know which mod this come from?

gleaming robin
gleaming robin
#

So in other news, once it gets a little more testing, I'll be releasing an update to SLAI so that it'll have compatibility with @hallow merlin's new Space Station map (calling it a moon feels weird)
It'll now calculate an enemy's AI based on what type of node it spawned closest to, thus eliminating the need for calculating a height division and enabling the placement of the dungeon root wherever you want (though in most cases this is also weird)

#

Because of its more dynamic nature it is, on a technical scale, slightly less performant than the original, but since it only gets called when an enemy spawns, any drop in performance that the code might cause would be minute and last milliseconds

#

now if I ever have to implement the ability for enemies to seamlessly alter their AI upon leaving the facility (in a different manner than Lethal Escape) that might need to be more fiercely optimized, but I'll burn that bridge when I get to it 🀭

compact phoenix
#

the more i play the more i feel like the puffer became the slime annoying sibling πŸ˜‚
they just keep following u if youre within the range and kiss yer as with those big mouth and teeth

rotund musk
#

can i use both ai pathfindingfix and starlancer ai fix?

compact phoenix
#

im using them both just fine no crash or anything

keen flare
#

idk if its the mod im using or the starlancer ai fix but when i spawn enemies outside they do damage to me only and no when else (sometimes)

gleaming robin
gleaming robin
compact phoenix
gleaming robin
#

Ahh okay, I was very confused lol

celest isle
#

Ohhh nvm I get it now your talking about the puffers being relentless

compact phoenix
#

ya they added the puffer revamp on diversity 2.0 and theres no info on what they do until i forgor the revamps exists and the next thing im being clueless

#

i have pathfindingfix, this and diversity.
nothing exploded yet

dusty jewel
#

the blob i found pretty easily

#

the puffer i was confused abt

#

tho i think it was that ||the spore lizard is less afraid of you, actually stepping up (albiet slowly) to try to bite you, though if you have a weapon it will still get scared||

celest isle
#

What about blob?

ornate onyx
reef salmon
#

would it be possible to add config options for if spiders can make webs outside? and maybe a setting to configure the speed of the jester while outside

gleaming robin
#

The main focus of SLAI is to enable default behavior regardless of spawn list, not really to customize enemy behaviors.

reef salmon
#

so sad

gleaming robin
#

Someone else could make a mod for it though, and just use SLAI as a dependency

reef salmon
#

i don't think anyone would make such a specific mod though

gleaming robin
#

A person made a mod for Fallout 4 that flipped the model of the toilet paper in the starting house to be "lore-accurate"

#

People will make anything 🀭

queen furnace
reef salmon
queen furnace
#

oh

reef salmon
gleaming robin
#

fair lol

keen flare
gleaming robin
#

Is the damage occurring right when you spawn them or something? I'm unclear as to what the sequence of events is for the issue

keen flare
keen flare
old root
old root
#

if yeah then that's just been sorted

gleaming robin
#

Eyyy nice

rocky fable
old root
#

no clue tbf, whenever swipez decides to update it

rocky fable
#

@devout sedge btw don't forget to push your fix for the issue on MEOF's end btw

devout sedge
#

this is more company's bug. I thought I posted a github issue already but instead I went to a furry convention

#

or is this a different issue?

rocky fable
#

Ah so does MEOF just need to remove the mimicpatches.cs then since MoreCompany has it?

rocky fable
#

Speaking of swipez why is he not in this server?

old root
#

he's banned from here

rocky fable
#

Rip

old root
#

but yeah MEOF would need to add the two extra lines too

rocky fable
ornate onyx
old root
#

no clue, apparently he's been banned for ages though

rocky fable
#

Probably something dumb is my guess, I doubt it was on the level of πŸ₯” or Owen though

#

cus it never got spoke about

ornate onyx
#

ye i would guess the same

storm zephyr
#

Funny enough I just learned about that today. It was brought up today in the thunderstore server.

devout sedge
#

the entire MEOF 'MaskedPlayerEnemy::Start' mimic stuff is bugged and has quite a few incorrect assumptions. the 2 lines and adding cosmetics at all is likely not needed

#

I've been avoiding doing any major changes, but that's likely to change next time I feel like working on MEOF

rocky fable
gleaming robin
ornate onyx
#

ah kk

storm zephyr
#

This yeah

gleaming robin
#

But anyways, I peeked at the commit and since it doesn't touch the actual EnableEnemyMesh function, I'm just gonna leave it in SLAI as a safety net for weird edge-cases or if another mod ends up breaking meshrenderers

ornate onyx
faint copper
#

if that happens, one way around it may be to make a coroutine returning WaitForEndOfFrame

#

although I'm not entirely sure of the order there, in OpenBodyCams I had to just update things before they were used which isn't really possible there

#

not sure if MaskedEnemyOverhaul also took care of that somehow actually, I hadn't thought of it when we were discussing it before

golden basin
#

@gleaming robin i dunno what your AI fix is trynna do to my giant

gleaming robin
#

What's the circumstance of this particular giant's existence?

gleaming robin
golden basin
#

atleast thats how the navmesh sees it

golden basin
tulip vault
#

@golden basin you have a networkobject on it right

gleaming robin
tulip vault
#

@gleaming robin unrelated but sir

golden basin
golden basin
#

well idk what that is but i remember some code about network in plugin sec

#

ah no, the code im thinking about registers the network prefab

tulip vault
#

no like

golden basin
#

idk what a network object is

tulip vault
#

on the prefab

#

it has a networkobject component right

golden basin
#

im like 80% sure it doesnt

gleaming robin
tulip vault
#

your shits be fucked

tulip vault
tulip vault
#
    /// <summary>
    /// Registers a prefab to be added to the network manager.
    /// </summary>
    public static void RegisterNetworkPrefab(GameObject prefab)
    {
        if (!_networkPrefabs.Contains(prefab))
            _networkPrefabs.Add(prefab);
    }

yeah angi

#

@rustic needle incase you touch lethallib before i do this totally should throw an error if the prefab doesnt have a ngo

rustic needle
#

I haven't pushed the update though because I'm scared

tulip vault
#

me too LMAO

rustic needle
#

but my changes work lol

#

I tried with a bunch of enemies

#

but anyways, I'm also scared about just making the github release and somehow fucking that up lol

gleaming robin
tulip vault
#

you dont even need to cache it?

golden basin
#

I just never noticed it

#

lol

tulip vault
#

JesterAI __instance

gleaming robin
tulip vault
#

not to nitpick but gamedev wise instancing does refer to a different thing

#

but yeah you can grab the reference of the thing your patching

golden basin
#

its so hard to test on wesley's moons, i cant tell which errors are mine and which arent half the time because every map has its own set of errors 😭

gleaming robin
rustic needle
#

I guess I'm gonna accept my pull request and write a change log and then try to update LethalLib, because that needs to do some day lol, and my changes makes the thing not crash if a "bad" enemy was registered

tulip vault
#

ill preface this is a semi shit explanation but instancing usually refers to having multiple identical objects/assets point to a single "instance" of that thing multiple times, rather than have a version of that thing per use of it

#

eg. if you use the same fern prop 40 times on a level, you don't want that model and texture loaded 40 different times, you want all 40 copies of it to use a single instance of that model and texture as reference

distant bay
#

can someone remind me if the jester is able to climb the ship ladder?

golden basin
#

Yes, it can

#

damn thats crazy, it feels like time just skipped a moment

gleaming robin
#

What the heck

#

How dare

#

:P

distant bay
#

Anyone know if there are any Moons released currently which have outside jesters?

verbal sparrow
raw rivet
#

Hmm, i am noticing worms dont work in any interiors besides the facility, tho i assume its nothing to do with your mod and instead something to do with the collision on the floor or something

#

Using a remote radar from LethalThings i can see and hear the worm following directly on me, but it cant surface
Tested on the Mansion, Bunker and Dungeon

#

Is there any chance your mod could fix that?

gleaming robin
#

Are you saying they don't work with my mod, or you don't have my mod?

#

@raw rivet

raw rivet
gleaming robin
#

Experimentation was always my testing ground so I don't think I ever tried them in the mansion, but I can't think of why that would be different since the tiles are set up the same way

raw rivet
#

i'll try the facility, mansion and bunker with the AI fix on and off and see which ones it works in

gloomy hearth
#

Is that a feature of this mod? Big worms can eat you inside facility?

gleaming robin
gloomy hearth
#

Think I must be confused... That's not a "fix" that's a redesign and I didn't know worms were permitted to travel over to the lurk the facility. If they are it may be that the mansion gets placed somewhere other on the map when generated so the uh fix doesn't apply.

gleaming robin
#

It's a fix in the sense that if someone puts an inside enemy on the outside spawnlist, their AI breaks

#

and my mod allows the AI to function normally

#

I don't enable entities to leave/enter the facility

golden basin
#

Literally any other map would give u better testing data

#

Experimentation is made differently compared to other ingame moons

#

Hence the name

gleaming robin
#

How so?

golden basin
#

Not too sure, but the terrain is made differently in a way that validated some raycasting I was doing

#

But then when I went to another map

#

The rules had changed

#

Dunno how much experimentation is far off in terms of creation, but I'm guessing a decent bit

gleaming robin
#

Weird, I never noticed that

#

But I'll keep it in mind to try out other maps

golden basin
#

Yee, for example I was messing with the terrain colour for my enemy's footsteps

#

In experimentation I can just grab the colour in base material

#

In other maps... no idea where u guys keep the colours πŸ’€

tulip vault
#

in the textures

golden basin
#

Wait why apply the colour to the textures

tulip vault
#

for experimentaiton

#

probably to tint it a lil

golden basin
#

Oh for experimentation, I thought experimentation had the colour applied on the material?

tulip vault
#

it did

#

probably to tint it a lil

#

its additive

golden basin
#

Ic

gleaming robin
#

Experimentation's terrain just has a single hdrp/lit material, so that's probably why your method worked there

golden basin
#

How does auralis keeps it's ground colour out of curiosity

#

If I do ever decide to try colours again

tulip vault
gleaming robin
#

Experimentation's material

tulip vault
#

in the future ill prob have an optional colour value authors can select to represent a theme colour for mods to use

gleaming robin
golden basin
#

Bleh

raw rivet
#

So, without your fix in just the facility, they dont even chase properly or play the rumbling audio, let alone attack

raw rivet
#

But in custom interiors, they still sound like they're trying to attack since they actually play the rumbling audio, but the dust particles dont appear and their attack never begins

#

Also dont mind Herobrine, he was just checking out what i was up to

gleaming robin
tulip vault
#

imo lead might be room layer

gleaming robin
raw rivet
tulip vault
#

note the lack of objects rendering on castleflow

raw rivet
#

same happens with the bunker
i'll try the same with mansion again and some of the other interiors and get clips of how it behaves

gleaming robin
#

I'm off to bed tho, so I'll peep the results in the morning

raw rivet
#

it'll be interesting since you're working on your own interior, no?
So if it turns out it doesnt work in any current modded interiors, it would be neat to see if you can get it to work on yours when its done
Then other interior devs can do whatever you did to make it work

gleaming robin
#

Yee, my stuff is set up pretty close to vanilla, I've been referencing the tagging and layers

raw rivet
gleaming robin
#

Strange. I'll test it later when I have some time to dedicate to it

reef salmon
verbal sparrow
#

polarus, I'd bet

reef salmon
#

polarus does NOT make those noises

gleaming robin
#

The noise is just the worm

reef salmon
#

worms do not make those noises either

gleaming robin
#

Could be lethal resonance

gloomy hearth
#

I mean... this is all very interesting but why would you want worms to be able to attack you in facility? Plausibility it doesn't make much sense and only would if they also destroyed the facility in doing so, it makes sense on the surface, more or less, because they dig through sand and dirt. But also it's very disruptive to the more complicate and item oriented play inside the dungeon.

#

Under the framework of my opinion I also say it's nice if you can hear worms on the inside sometimes just as an indicator that they are present on the map. It's spooky and mechanically informative.

gleaming robin
#

It's on the moon-creator (or mod-pack tweaker) whether or not to put worms inside, I just give them the freedom to do so

gloomy hearth
#

Yeah cool.
Just saying. I like worms to be heard but only attack on the surface if you can make this an intentional feature / config option.

gleaming robin
#

Since their sound source is tied to their gameobject I think that'd be a bit out-of-scope unfortunately, but I do like that idea. Maybe someone else could take that and run with it

raw rivet
raw rivet
gloomy hearth
#

Haven't played all your moons yet but sounds like Tomb Raider 1 which is absolutely inspired

raw rivet
#

mm, kinda yeah
The cats synergise well (or badly, however you wanna see it) with the inside+outside worms since they're 2-handed objects, so you gotta make more trips to get them out = higher chance of dealing with the worms

gloomy hearth
#

Very nice

#

...do you scrap the cats...? (or are they just statuettes)

raw rivet
gloomy hearth
#

Wasn't sure you meant those ones

raw rivet
#

yeah its these fellas

faint flower
#

Is this mod not server side only? πŸ€”

gleaming robin
#

No clue! Doesn't hurt for everyone to have it though

#

I'm not familiar enough with networking to know if only the host needs it

faint flower
#

Okay ^^

Asking since I was playing with other people and spawned a bracken outside.

It acted normal, except that it never actually started any killing animations πŸ€”

#

(Or killed anyone)

gleaming robin
#

Bracken is weirdly coded, its anger meter doesn't go up much until it's backed into a corner. Outside it'll tend to run away most of the time if spotted, but god help you if you're a lone ship person and an outside bracken spawns

faint copper
#

the server doesn't initiate the kill animation as far as I know, so it does make sense for it not to work if only the host installs it

tulip vault
#

@gleaming robin each client would have to do the isOutside changing and etc. aswell no

#

think your mod would need to be all clients

faint copper
#

despite the fact that the server sends updates to dictate where the AI are, I believe the client is still running all the same code as the server in order to predict where the AI should be moving

#

especially since some of the AI logic depends on whether it can path to the player

gleaming robin
#

I hate networking

faint copper
#

making server-side mods would certainly be much easier if the game was designed more for server authoritativeness

#

it's not surprising it wasn't a concern, though, since it's a coop game

#

just makes for some messy code

opal bane
#

Bracken can barely be seen across the bridge on the stairs breaking my neck. πŸ˜›

gleaming robin
#

When you say shuffling along the path, do you mean the path that player was walking?

opal bane
#

correct

gleaming robin
#

Bc that looked like it took an offmesh link

opal bane
#

I will share my point of view.

#

1 sec I have to edit the video

#

Had the same thing happen on Ether (Downtown) as well.

gleaming robin
#

Strange. Nothing in my code specifically touches the bracken, so it may just be a case of desync or strange navmesh on the planets

reef salmon
opal bane
reef salmon
# opal bane Yes

lethal escape causes major desync with the bracken, so that's probably the cause

gleaming robin
#

Yea if it was a LEsc bracken, SLAI doesn't apply to it

opal bane
gleaming robin
#

Nope, it has its own code set up for monsters it transitions from inside to outside

opal bane
#

well crap

gleaming robin
#

SLAI is more for moon devs

#

(hence why almost every main moon depends on it now :3c )

opal bane
#

πŸ˜›

#

I guess I will get in contact with the lethal escape devs then.

Ty for all this help and it was good to learn about what handles the AI. πŸ˜„

gleaming robin
#

No prob! I dunno how active they are anymore tho

opal bane
#

Hmm I see.

#

Well, I will add this to my list of things to recreate as I learn how to code in this game. First to release Shattered Company.

I will probably disable Lethal escape for now.

reef salmon
#

though i guess that counts as every main moon

opal bane
#

@gleaming robin
Actually another thought!

If I used Lethal Quantities to Allow monsters to spawn outside. Would their AI be picked up by Starlancer AI automatically?

opal bane
#

This may be the workaround I need for now.

#

Cut out the middleman as it were.

gleaming robin
#

RosiePies and Tolian (I think) as well, as far as devs that have made multiple moons

gleaming robin
reef salmon
#

welllll gwagwagwagwa i did it second after wesley so every other moon that does it basically doesn't eexist totally

opal bane
# gleaming robin 100%
gleaming robin
#

I've heard good things about SnatchinBracken compatibility (I wish I could remember who brought it up initially), Arachnophilia should be fine since it just expands on its AI, and Diversity I'm not 100% sure on, but as long as it hooks into basegame navigation somehow it should be fine.
Really how SLAI works is just setting them up when they spawn. In the future, I may look further into an update() patch in case mods actually let an entity travel in and out of the facility so it can dynamically update their behavior

reef salmon
#

snatchinbracken is fine, arachno is fine, diversity doesn't mess with actual AI at all so it's fine

raw rivet
#

he gives himself a new favourite spot outside and brings people there to kill

sullen inlet
#

As far as I know Diversity works fine. Bracken and Hydrogere reworks don't really matter much, and Spore Lizard reworks do properly function from what I noticed.

However I have just imagined the terrible scenario of a Hydrogere spawning outside with Diversity bringing a beehive to the ship

opal bane
#

@gleaming robin
Now to create a custom Lethal Quantity's Spreadsheet for Lethal Escape Simulation for allllll 56 planets included in the Shattered Company Modpack!

Kill me! πŸ˜„

sullen inlet
#

Has anyone experienced surface spiders being active? All I've seen from testing is just them picking a node to walk to and staying there.

gleaming robin
#

They generally pick a node to nest at and hang around it, but if the terrain/surface isn't on the room layer they can't place webs

gleaming robin
#

Yea I guess

#

Or moon devs can put things on the right layers 🀭

tulip vault
#

is that always the right layer in every scenario?

gleaming robin
#

To put the terrain and most structure-related objects on, yes

#

If I were to fix it, it'd be "place webs anywhere" and idk if that'd cause extra problems

#

could be funny tho

tulip vault
#

fair fair

gleaming robin
#

please don't come back and say they aren't working on vanilla moons

sullen inlet
#

Layers should be correct (and I agree the methodology probably shouldn't change) - I guess they can't detect anything nearby that fits maximum web distance though

gleaming robin
#

I thought you were talking about exterior??

sullen inlet
#

I was

#

That was a poorly worded statement referring to your marked out statement

#

Which I then accidentally edited over so now it's deleted

gleaming robin
#

Ah okay

#

Is this a moon you're making?

sullen inlet
#

Yes

gleaming robin
#

Try setting more outside AI nodes, I can't remember offhand how they pick web locations, but you might be right about max distance

sullen inlet
#

I'll give it a shot. I'll also look into testing with arachnophilia since it affects web distance. Could prove/disprove the theory

#

How many AI nodes do you use on your maps for reference?

#

Varies since you have drastically varying map sizes I'm sure but figured I'd ask

gleaming robin
#

I recently bumped them up, but I don't think I've released that update yet. I try to just not put them too far away from one another, but for reference I think Vow has over 100

sullen inlet
#

Okay then I think I just have far too few, I'll bump that up by a lot then

gleaming robin
#

Yea you can't really have too many lol, and the more you have the more random the movement of enemies will appear to be

tulip vault
#

wait a minute

sullen inlet
#

Gotcha, thanks. I'll let you know if the web distance theory holds up as well.

tulip vault
#

yall

sullen inlet
#

Waiting.

tulip vault
#

you could totally make a outsideainode prefab and use the terrain tree brush thing to place these automatically over the terrain

#

or am i tripping

gleaming robin
#

Lmao you absolutely could

sullen inlet
#

I could test that maybe

#

Might have to do foliage instead but yeah

gleaming robin
#

As long as it has a meshrenderer the terrain painter can use them, and if the prefab is on the scan node layer like vanilla they should be invisible at runtime

#

God that'd make things so much easier rather than adjusting by hand if I want to raise or lower terrain

gleaming robin
sullen inlet
#

Is it in issue if they're halfway clipping into the terrain?

#

It seems that the mesh will display even if the mesh renderer is disabled unfortunately

gleaming robin
#

Rip, was a cool idea tho

sullen inlet
#

BTW adding more nodes did fix it, though indirectly. Nodes that were on slopes were valid enough for webs to be placed, though since the spiders refuse to move from their chosen node they usually just sit on 1-3 webs unmoving. Tested with centipedes as well on a whim, and while there should be abundant locations for them to hang from; they too have a habit of picking a node and becoming stationary.

spice kindle
#

im not sure if this is the correct mod to say this but hoarder bug on experimentation just stands on a single spot and never move

#

outside

gleaming robin
#

Bc as long as it's a random position, that's bc that's the spot it's chosen for its nest, and if there's no scrap outside then there's no reason for it to leave its nest

spice kindle
#

just right infront of the ship

#

in the bushes

gleaming robin
#

so not to the right of the ship against the rocks?

sullen inlet
#

It's weird, it seems for some moons enemies function fine while others they don't? I for one haven't had issues with hoarding bugs or spore lizards, but it seems other moons do. Bozoros seems to have Solace's old problem still with both normal puffers and subspecies. However one odd point is that the subspecies puffers go next to the ship (origin point) while the natural spawns pick a random node to sit on. I'm wondering if my spiders and centipedes have the same issue assuming they work fine on Wesley's moons or Triskelion.

spice kindle
gleaming robin
gleaming robin
sullen inlet
#

Is getting in aggro range supposed to be a guarantee "fix" for all enemy AI? As in they behave as normal when aggroed despite any weirdness when wandering? I've noticed surface spiders don't react to webs and don't want to walk more than a couple steps away from the nodes they sit on when aggroed. Going to ask welsey about this to cross reference behavior actually in case it's another moon specific issue.

#

Double checked, my moon is just pulling a 🀑 with spiders it seems

gleaming robin
gleaming robin
sullen inlet
#

Not the kissing, but the same general issue except for a randomly picked node. And unlike lizards they don't seem to get aggroed when approached - at least not properly.

I moreso meant (with the 🀑 comparison) that it was another moon with odd behavior for a specific species that other moons don't have an issue with.

gleaming robin
#

Just compared the v50 beta code with the old code, and it seems like SLAI should work fine without any big changes. Next update will still offer some cleaned up code tho

hallow merlin
tired ore
#

enough lines to kill a dog...

gleaming robin
#

old vs new

#

but also I don't touch its code if you were referring to that lol

hallow merlin
#

i thought he added loads of new behaviours to the baboons

tired ore
tired ore
gleaming robin
hallow merlin
#

i think they had a camp location before the update, but i never really knew what it did

rocky fable
#

Boy the Butler would make my game die anytime it was spawned and spamming those errors ☠️

#

I would get mad stutters

gleaming robin
#

Hm, it shouldn't, in theory. What moon (spoilers if new moon), what spawn list, natural or forced spawn

#

Also do you have LEsc installed @rocky fable ?

rocky fable
#

I wasn't sure if your mod needed to update for it or not

#

I already suggested @faint copper look into adding the Butler to PathfindingLagFix, I think it has Pathfinding issues like the Bracken and Snare Flea do

gleaming robin
#

LEsc = Lethal Escape, for clarity

#

I'll take a peek at it, but I don't see why SLAI would break it

rocky fable
faint copper
#

does async loggers not fix the lag? that error should be preventing the AI from doing anything that causes lag other than the messages themselves

rocky fable
#

Async Loggers did nothing

faint copper
#

interesting

rocky fable
#

Which is why I was thinking it's Pathing was erroring

#

something unrelated to the logging end of things

faint copper
#

it was a stutter and not a framerate drop?

rocky fable
#

yeah

gleaming robin
#

Does it error without SLAI as well?

rocky fable
#

the game would basically freeze

faint copper
#

that's very odd

rocky fable
#

and then be fine

#

small freezes

#

I had the same problem with LethalLib in V50

faint copper
#

well but was it on a 200ms rhythm?

rocky fable
#

except it was constant

rocky fable
#

lol

faint copper
#

given that streams are 60fps it might not be super apparent honestly

rocky fable
#

The game was capped at 60 too though

#

Lol

faint copper
#

ah

#

do you have async loggers set to defaults?

rocky fable
#

Yeah I do

faint copper
#

I'm suspicious that it's not actually the AI, because it erroring in Update() should mean the average frame rate drops instead of causing stutters

gleaming robin
# gleaming robin Does it error without SLAI as well?

bc looking at the AI code I'm not seeing anything in Update() or CheckLOS() that should be incompatible.
I don't even touch the generic EnemyAI.Update() unless LEsc is installed, which I'm changing next update anyways bc it's unnecessary rn

rocky fable
#

You can see how it just freezes lol

#

and it kept doing it until the enemy was despawned when we went in orbit

faint copper
#

hmm

#

well I'll see if the stack trace narrows down the cause of the error spam, but I don't think the spam is the root cause of the lag unless async loggers has some issue where it's locking the main thread for too long

#

which is possible but I haven't experienced it

rocky fable
old root
rocky fable
#

I think it's a bug when using MoreCompany in general atm

#

That update needs to be pushed

old root
#

but was the max player count over 4?

#

if yes then that'd be why

#

it's fixed in the new morecompany update however swipez is waiting for v50 to be out of beta since it breaks compatibility with v49

rocky fable
#

The lobby size was capped to be at 14, but I only had 2 others playing with me lol

old root
#

even though you only have 2 players it'd still loop through 14

old root
gleaming robin
#

Ahhh I see, it's set in the start function

copper yew
#

especially since you're one of its maintainers (at least from what it seems)

rocky fable
copper yew
#

ah

#

oh

#

"separate mod for now"

#

if only i have the ability to read

gleaming robin
copper yew
#

i certainly agree with that

rocky fable
#

@old root Got a question for you btw idk if you were there on stream earlier when I asked but is the desync rn in the V50 beta with Giants only dying for some players but not all similar to the Butler AI problem where it's hardcoded to 4 or is it just a vanilla issue?

old root
#

I have a feeling it might be a vanilla issue but I'm not sure

rocky fable
old root
#

Yeah I think it stays alive for whoever stabbed it

rocky fable
#

Yeah that is very strange

rocky fable
old root
#

What mods were you using cuz I'll see what mods match in both profiles

#

It seems like a bit of a weird bug to occur especially if there's no errors (not sure whether there is or not)

rocky fable
#

And we had FacilityMeltdown at the time but I took it out cus it wasn't working properly

old root
#

I'm hoping I'll be able to reproduce it in LAN

#

But anyway I'm heading to sleep πŸ˜‚

rocky fable
#

Alrighty ^^ Sleep well πŸ’œ

old root
#

so guessing it is a base game issue

gleaming robin
#

Ya love to see it

gleaming robin
#

Update coming in a bit

#

Nothing major, just a new format of code that should be lighter in weight

#

and more accurate

gleaming robin
#

Starlancer AI Fix v3.4.0

#
  • StarlancerAIFix v3.4.0
    • Improved accuracy and optimization.
keen flare
#

YIPEEEEEEEEEEEEEEEEEEE

raw rivet
#

Any progress on indoors worms working on interiors besides facility?

gleaming robin
#

Pfft I completely forgot about that sorry πŸ˜… I'll dig around a bit later

gleaming robin
#

Perhaps a better way to phrase it would be: I don't know why it's working in the facility but not other places. The ideas I've thought of so far have been shot down by the fact that factory and mansion tiles are set up the same

raw rivet
#

Yeah, no clue, its really weird

gleaming robin
#

It seems to not jump if the roof is too high in the room, but idk why that would be a factor since outside typically has no roof lol

reef salmon
gleaming robin
gleaming robin
#

@faint copper once the next LLL drops I'll force a bunch of lootbugs to spawn near an old bird and test this out :P

#

oops, last log should be threatColliders[j]

faint copper
#

looks good to me!

#

other than the log lol

#

since you never use the index for the current threat collider, though, you could do a foreach (var threatCollider in threatColliders) instead

#

having the collider in a variable makes it a lot easier to avoid small mistakes like that

gleaming robin
# faint copper since you never use the index for the current threat collider, though, you could...

I have a game dev friend that hates foreach 🀭
I also had a thought, maybe instead of checking for the component like we were talking about before, what if I make an array like with threatColliders? IVisibleThreat[] threats = __instance.GetComponents<IVisibleThreat>();
Also, do I actually need to declare new for enemyWhitelist, and if so, should I be making a new array for threatColliders every time ThreatPatch() runs?

#

If I make an IVisibleThreats[], I could then just check if its null, which would prevent me from trying to add it to custom enemies (if they're properly set up)
That would also let me make it a general patch with no whitelist, and I can make the conditional if (IVisibleThreats[] != null && __instance.enemyType.canDie) {}

faint copper
#

do they hate foreach because of some supposed performance drawback to it? that generally is so negligible to the point that it doesn't matter

#

I suppose if you're really concerned about the GC maybe, but it's probably not going to matter in practice especially for a Start()

gleaming robin
faint copper
#

I believe GetComponents<>() is only checking for multiple of the same type of component on the one object, though, rather than its children, so I don't think it suffices unless you recurse

faint copper
#

or name your index variables something more than a single letter

#

it's very easy to mess that up in nested loops

gleaming robin
#

yea for sure, for vs foreach is absolutely code-golfing for Start() in this case lol

gleaming robin
faint copper
#

you could also do Array.IndexOf(enemyWhitelist, __instance.gameObject.name) != -1

#

wait what does GetComponents<List> mean theinking that doesn't sound like a generic type argument to me

#

is that a typo for GetComponents(List)??

#

Unity documentation moment perhaps

gleaming robin
#

Β―_(ツ)_/Β―

faint copper
#

ah yeah, I think it is

gleaming robin
#

tho I guess I don't know if IndexOf() really has any drawbacks compared to a for loop, especially at this scale lmao

faint copper
#

internally it would essentially be the same thing, I believe, but it has the possibility of being optimized further by the JIT I would imagine

#

best way to find out is to measure though

#

oh, you're still only checking for colliders on the base GameObject with GetComponents

#

that's not recursive

gleaming robin
#

oh whoops, u rite

#

ty

gleaming robin
faint copper
#

yeah, definitely not important here

#

it's just possible for IndexOf to be a kind of intrinsic function in the JIT so it might get special treatment

gleaming robin
#

JIT?

faint copper
#

just-in-time compiler

#

it generates the machine code from your compiled common intermediate language bytecode

gleaming robin
#

ahh okay

#

I always forget how C# works in detail, does it go top-down and if so would this break out of ThreatPatch() if threats contains things (meaning the enemy already has IVisibleThreat components) BEFORE attempting to populate threatColliders?

#

And should I leave this as is, get rid of new, or just declare the whitelist inside ThreatPatch?
public static string[] enemyWhitelist = new string[] {"Blob", "Butler", "Centipede", "Crawler", "Flowerman", "Hoarding bug", "Nutcracker", "Bunker Spider"};

gleaming robin
#

Just trying to learn best practices and whatnot

gleaming robin
faint copper
#

having the whitelist be static is good

#

that way it never reallocates it

#

it'll just be there waiting for you to use it

gleaming robin
#

right, so is new unnecessary or does it need to be new in order to specify its length with the values I'm assigning it?

faint copper
#

I don't think it would compile without the new, would it? unless you use a collection expression

gleaming robin
#

this compiles with no errors

faint copper
#

huh, I've never really used that syntax, I'm not sure what feature enables it really

#

but yeah, I'm sure that's fine

gleaming robin
#

kk

#

I suppose I could just log it lmao

#

Thank you for the help Zaggy :3

faint copper
#

np!

gleaming robin
#

I should really go to bed, but I think if I swap IVisibleThreat[] threats = __instance.GetComponentsInChildren<IVisibleThreat>(); (plural)
with
IVisibleThreat threatExists = __instance.GetComponentInChildren<IVisibleThreat>(); (singular)
it'd be a lot more performant since it'd return on finding the first instance of IVisibleThreat which would tell me whether or not I should try adding them to begin with

faint copper
#

ah, that's very true

faint copper
#

the second call to get components isn't looking for IVisibleThreat, it's looking for Collider

#

if there are no IVisibleThreat components on an enemy, then it does something with the Colliders

turbid wave
#

yeah, so it can quit early on finding the first threat.
This is a code that adds threats in case there are none

#

got it

#

so my tip is invalid, no reason to keep it here

faint copper
#

lol no need to delete it, it's nbd

tulip vault
#

would it be faster to cache a list of the threats by making them add themselves to a list on awake then checking if the enemy has any children in that list?

#

probably not

faint copper
#

correct me if I'm wrong, but I don't think there's a way to react to Awake() of an interface

tulip vault
#

trueeee

#

trueing

faint copper
#

but yeah also that's just premature optimization

#

it should only run when an enemy spawns, which is a pretty rare operation, and I doubt this current iteration will run for more than 5ms anyway

#

I doubt it would be noticeable compared to all the DoAIInterval() calls

gleaming robin
raw rivet
#

Question
So like, for enemies like the bracken where the max spawn is 1, how does that work with an outside bracken?

#

Is it 1 inside and 1 outside? or 1 universally?

gleaming robin
#

Unsure tbh, but I think it's in/out

raw rivet
#

So universal?

#

i like lethalescape but the bracken seems to teleport alot whenever he escapes
Whereas i noticed the ones that spawn naturally outside on Auralis behave normally
So i assume the AI fix is the reason they work properly

#

so my plan was to disable brackens from escaping, then add them to the list of outside enemies on all moons at a low chance (1/4 of their indoor weight or so), which i figured would make it very rare, especially if theres only allowed to be 1 inside and outside

gleaming robin
#

Sorry that was 1 in AND 1 out, but that's just my thinking
LEsc does have its own way of making its enemies work outside and aside from the Jester I don't touch LEsc, and even then I just unpatch its JesterAI Update() postfix

raw rivet
#

Ohh i see i see

gleaming robin
#

So SLAI never actually touches LEsc enemies themselves

#

it never meets the conditions

gleaming robin
#

Starlancer AI Fix v3.5.0

#
  • StarlancerAIFix v3.5.0
    • Implemented the same code that runs on EnemyAI.Start() in EnemyAI.DoAIInterval(). This should fix the issue with Masked being unable to hurt employees after teleporting, as well as ensure that if any future mod allows an enemy to travel in and out of the facility that their AI will automatically switch.
rocky fable
#

XD

gleaming robin
#

Anything's possible, but I feel like that's probably moreso a networking thing if it's the issue I'm thinking of that you were experiencing on S-0

rocky fable
#

True, but I had it happen on S-0 without TME too

#

getting rid of TME did fix the other enemy jankiness however

gleaming robin
#

Anyways, back to The Callisto Protocol 🀭

rocky fable
#

Lmao

twilit drift
#

or is that it 🫣

rocky fable
twilit drift
#

reading comprehension: bad

#

a skill issue

gleaming robin
#

Smh my head

faint copper
#

@gleaming robin do you know if there's a function called when an enemy teleports out of the interior? do they just navigate that through an OffMeshLink that doesn't interpolate them?

#

well, I suppose I don't know that they don't interpolate, I've just never noticed them sliding up through the ground lol

gleaming robin
#

Did another enemy that can teleport outside get added in v50?

faint copper
#

nono

#

I'm looking for a way to track when an item goes between the interior and the surface

#

I need to track whether items are in the interior for CullFactory

gleaming robin
#

For players there's .isInFactory

faint copper
#

at worst I can just check every frame for every item that is being held, but that's not ideal

gleaming robin
#

True

faint copper
#

I'm keeping a collection of GrabbableObject for within the interior, and another for outside

#

items have a field for whether they're in the interior, but I can't afford to just collect every GrabbableObject and check that every frame, so I need to do it based on events

#

or minimize the amount of brute-forcing I do

#

otherwise, large interiors with lots of items will tank perf

#

that's why I ask if I can know when the enemy is teleported to or from the interior

gleaming robin
#

Can't you do a check on whatever event entranceTeleport calls?

faint copper
#

do enemies use the entrance teleport?

gleaming robin
faint copper
#

I wasn't sure if they used some sort of manual mechanism or OffMeshLinks

gleaming robin
#

And yea if a masked is near the fire exit or entrance it can call on some Teleport method

#

That's specific to masked afaik

faint copper
#

and that's the only way it gets out?

#

but for your mod, other enemies use OffMeshLinks?

gleaming robin
#

My mod doesn't let enemies escape

faint copper
#

oh I see

#

there was another mod used in combination with yours for that, right?

gleaming robin
#

I just assign AI based on spawn position, and then check position again on DoAIInterval

#

Lethal Escape is what you're thinking of

#

Which I think just straight up transforms the position to outside an entrance teleport and then does what I do with assigning AI nodes and flipping the isOutside bool

faint copper
#

aw man

gleaming robin
#

They have a GitHub I'm pretty sure if you wanna look at non-decompiled source code

faint copper
#

yep, I'm there

#

I might have to postfix their method, but I wonder if there's a reason they couldn't use the masked's method

gleaming robin
#

Might've wanted more control

golden basin
#

If you're tracking items

#

Items have an in factory proprrty

faint copper
#

wait, am I reading the masked code correctly that it can only teleport out the main entrance?

golden basin
#

Property*

golden basin
#

Oh but maybe they just spawned outside and i assumed it was fire exit

faint copper
#

since the field isn't a getter/setter, I can't detect when it changes

golden basin
#

Hmm

faint copper
#

and even if it was, it's not even accurate

golden basin
#

Yeah thats true

faint copper
#

mods can forget to set it for one thing (MaskedAIRevamp for example already does)

#

and if I load into a save the items on the ship are (often?) considered to be inside

gleaming robin
#

Idk exactly how CF works, you're culling for local player only right?

golden basin
#

That would make sense yes

#

The tutorial in the scrap wiki suggests you always turn on the in factory property

#

Not sure why

faint copper
#

I'm culling for each camera on each render call

faint copper
golden basin
#

Well why check if items are outside or inside? Just do on ship or not on ship, isn't there an event for when they get into the ship?

gleaming robin
#

I would think postfixing EntranceTeleport.TeleportPlayer() with flipping isInFactory (or w/e it is on items) would suffice

tired ore
faint copper
gleaming robin
#

I'm throwing out a general idea here bc I'm still not super knowledgeable about coding, but you could just grab the cached list of items and for each one just invert the bool

faint copper
tired ore
#

good question honestly, id say the mod existing way before masked were a thing would probably play a role

faint copper
#

oh, that could explain some of it, they would've had to figure it all out themselves

#

it's not a huge deal anyway, and it looks like even the MaskedPlayerEnemy sets its own position instead of activating an EntranceTeleport function

#

no magic solution for me :(

#

I can account for the masked pretty easily at least

faint copper
gleaming robin
#

Okay I'm getting confused

faint copper
#

I hook into something closer to the actual place where the player is teleported that works better than EntranceTeleport

gleaming robin
#

I thought you were culling items?

faint copper
#

oh, I guess I didn't really establish why this matters for the masked lol

#

MaskedAIRevamp allows them to pick up items

gleaming robin
#

ohhh

faint copper
#

they can carry them outside and my mod is unaware of that

gleaming robin
#

Then just do the same thing I suggested but postfixed onto TeleportMaskedEnemy

#

You just need it to run once on being called

faint copper
#

indeed, that's what it seems like I'll need to do

#

I'll have to also soft depend on LethalEscape and hook into its method for other enemies

gleaming robin
#

Yea

#

fair

#

I almost wanna make my own LEsc lol

tired ore
#

can you actually do that? lesc has an issue with how enemies behave when they escape

gleaming robin
#

Bro you're in my AIFix thread 😭

tired ore
#

it still happened with aifix though

faint copper
#

it certainly couldn't hurt to rework it

tired ore
#

i rember playing with both and had a thumper instakill me

gleaming robin
#

Because LEsc's teleport method doesn't allow the enemy to meet SLAI's conditions

faint copper
#

if it was written before the masked knew how to escape, there might be some things that would be better done as a mirror of how they do it

#

it definitely would also be an improvement if you don't have to check where the enemies are every AI interval

#

it's probably not too costly but doing it when they teleport is always going to be better

gleaming robin
#

True, and I could soft dependency it and only load the AI Interval code if its not found

faint copper
#

more like you could soft depend on LethalEscape and enable that interval code if that is found, no?

gleaming robin
#

I wouldn't be rewriting LEsc

#

If I did do this it'd be my own mod

golden basin
# faint copper oh boy, that's......interesting.......

I'm assuming it's because scrap will always initially spawn in the facility, but in the case of custom items? Probably should use something else, though in my case Idk cuz I make most my scrap both an item and scrap combo

faint copper
faint copper
# gleaming robin If I did do this it'd be my own mod

right, but what I mean is that LethalEscape is the mod that breaks your assumptions and made it necessary for you to include the nodes list update in DoAIInterval(), so why not only do that when LethalEscape is installed?

#

unless you want to break compat with it I guess

gleaming robin
#

The issue is (iirc) LEsc actually modifies the AI and some stats of certain enemies (which is why I have to unpatch the JesterAI.Update() postfix they use)

faint copper
#

boy, it would sure be nice if Zeekers had just put the SetEnemyOutside() function on EnemyAI instead of MaskedPlayerEnemy

gleaming robin
#

I'd want to implement a way for enemies to actually escape via the entrance/exits instead of a random chance to just teleport outside

faint copper
#

oh you mean they just teleport out without even going to the door?

gleaming robin
#

Again, if I'm remembering correctly lol

#

I think they check for if any players are outside

#

and then every so often roll the dice to escape

faint copper
#

what I saw was that it at least tries to check if the last targeted player just left

#

but it might be too forgiving or something

tired ore
#

it does both actually

#

theres a setting for random escape and following a player

faint copper
#

oh interesting, I didn't see the random chance part looking at the code

tired ore
#

id often land on a moon to be greeted by a lootbug running out

gleaming robin
#

I'd still run into a similar issue with having to run the code on either Update or DoAIInterval tho, but I'd mitigate it to only do it if the monster is (or was recently) in aggro mode

faint copper
#

hmm? what do you need to still do that for?

faint copper
#

if you control when they teleport, then your teleportation code can just switch the nodes based on a flag like the masked and it'll Just Work ℒ️, no?

gleaming robin
#

Sorry, I meant checking for if they could teleport

faint copper
#

oh yeah

gleaming robin
#

Lemme check the masked rq to see exactly how often Zeekers checks for it

faint copper
#

Masked does it that way too

#

it's in DoAIInterval while it's roaming, if it walks within a meter of the door it teleports out

gleaming robin
#

Oh well then

#

yea it shouldn't be too crazy difficult

#

If it's something people would actually want in place of LEsc

faint copper
#

I think it's worth having one that's maintained for sure

tired ore
faint copper
#

only downside is it's another mod for me to hook lol

#

I'm trying to see if there's anything in EnemyAI that I can hook into

#

I doubt it though

golden basin
#

Whats LEsc?

faint copper
#

Lethal Escape

golden basin
#

Ah

#

Wait what's the problem πŸ€”

faint copper
#

it never set the AI nodes so the AI partially broke when things escaped

gleaming robin
faint copper
#

what about it?

gleaming robin
#

If that returns true, you could check if any items match its position and set the location bool

tired ore
faint copper
#

that's another method that I have to poll

#

if it comes to polling, I already have a plan of how to do that

gleaming robin
#

ahh right you're looking for something to hook into being called

faint copper
#

there's GrabbableObject.GrabItemFromEnemy() and GrabbableObject.DiscardItemFromEnemy(), if absolutely necessary I can just add items to a list that I iterate every frame to determine where they are

#

I'd much rather track which items are held by which enemies and then move those items only when those enemies teleport

tired ore
gleaming robin
#

Are you looking at the v50 assembly?

faint copper
#

wait.........

#

I may be stupid

golden basin
#

Happens to the best of us

#

Except me, I never am stupid

gleaming robin
#

I still prefer my code, but it do be there

faint copper
#

wait wat

#

which assembly is that in?

gleaming robin
#

the main assembly-csharp

#

under EnemyAI about 4/5 the way to the bottom

faint copper
#

oh yeah I meant the version

#

but apparently I wasn't on v50

gleaming robin
#

lol

faint copper
#

somehow

golden basin
#

F

faint copper
#

I specifically had installed v50 and opened the assembly in ILSpy, but apparently it forgor

#

it makes sense that it's on EnemyAI now though, since the new little buddy can also leave

#

so I guess that solves my problem

gleaming robin
#

BROOOO I asked if there was a new enemy that could leave the factory TT_TT

faint copper
#

I FORGOR

tired ore
#

technically a trick question

gleaming robin
#

enter/leave whatever

faint copper
#

he's just a little guy I didn't think of him

tired ore
#

i wanted to say it but then thought about the entering part

faint copper
#

anyway, yeah, I can hook that method then, but that's definitely a reason for you to replace LethalEscape

#

LethalEscape in the year of our lord 2024 should call that function

gleaming robin
#

So I assume it'd be not great for if I sorta reused my SLAI code in a new escape mod rather than SetEnemyOutside

faint copper
#

yeah

#

don't do that

#

in fact, you should use SetEnemyOutside in SLAI

#

which means you'll want to check if the enemy's status changes

#

if you're going to keep your DoAIInterval check anyway

gleaming robin
#

I don't like it using FindWithTag tho

faint copper
#

why?

#

don't you call that too?

gleaming robin
#

Only once

#

I cache the results

faint copper
#

that's fine

#

it's fast

#

it'll only be called when the enemy teleports

#

if it was called every frame or every interval it would be a problem, but you can check

if (isNowOutside != enemy.isOutside) {
  enemy.SetEnemyOutside(isNowOutside);
}
#

then it only runs once every time its status changes

#

ez

#

and you'll never have out of date AI nodes if any mods do something very silly and add nodes at runtime

gleaming robin
#

Still don't wanna use it in SLAI, but might

faint copper
#

yeah, it's definitely not, but you never know what modders will do lol

#

I've had several assumptions I thought would never be broken get broken within like 2 months of me starting modding

gleaming robin
#

Yee, some dummy might make inside enemies work outside and vice versa

faint copper
#

true lol

#

at least now we have the vanilla code we need

#

I'm very glad to see that

gleaming robin
#

Yeah, me too, even if I do end up scrapping my fun code I worked so hard to optimize ; w ;

#

Some of it's still relevant at least

faint copper
#

personally I would be happy to be rid of hacks

gleaming robin
#

Plenty of it, actually

faint copper
#

imo it's a bit of a hack to poll anything in Update() or similar functions

#

I want events for everything, give me events!

#

(events as in functions and setters)

gleaming robin
#

yee

#

actually, I literally just have to change 4 lines

#

The rest is still the best way for checking spawn position and setting AI on Start(), plus setting a favorite spot (which I'll also re-do on teleport)

#

I'll mess with this later, I've had my game paused for an hour now talking about this 😭

faint copper
#

lol yeah sounds good

gleaming robin
#

If anyone has any ideas for the mod name, lemme know. I feel like StarlancerEnemyEscape is nice and descriptive, plus fits my branding lol

tired ore
#

sounds good πŸ‘€

twilit drift
#

StarlancerAIFixMaskedAddons coming soon

#

🀭

gleaming robin
#

I don't know if I'll make a fifth thread tho

tired ore
#

you should make 6 so we could make a thanos meme

gleaming robin
#

Oh god

#

StarlancerUpgrades is still gonna be a thing

#

Idk what to do for a 6th unique one

tired ore
#

a lobby watermark

gleaming robin
#

Let's not harken back to those times lol

faint copper
#

I think it's probably fine for your enemies escaping mod to live here yeah

#

they're pretty close in functionality

#

and also smallish in scope

gleaming robin
#

Smallish in scope, huge in reach

tired ore
#

wesley worked so hard putting giants old birds and leviathans inside interiors just for this to happen......

gleaming robin
#

There'll be a config lol, by default I'll probably just allow the standard inside enemies to use the teleports

#

I'll keep using @rocky fable as a guinea pig

faint copper
#

I hadn't thought about it before, but for some enemies letting them go outside would be a big nerf

golden basin
faint copper
#

I might install it specifically to make blobs go outside so they stop camping doors

gleaming robin
#

Oooh good point, I'll need to default blobs and snare fleas to false

tired ore
#

death sentence

#

but yeah configurability is key

faint copper
#

yeah I feel like Jesters definitely shouldn't be default on

#

getting forced to leave a moon isn't a great experience

tired ore
#

i think one of wesley's moons has an outside jester....

faint copper
#

erm..

tired ore
#

but also half of the time lesc was broken and jesters wouldnt do anything

faint copper
#

that kind of thing is exactly why I'm wary of custom moons lmao

#

some enemies could be kinda okay outside but I think it's fair to say that a lot of them aren't balanced for that

#

I suppose there may be counterplay if the jester isn't allowed to enter the ship, but as soon as the jester can leave and enter the facility it's over

tired ore
#

i might have a clip somewhere where a jester entered the ship and just pushed out the last surviving player as the ship was leaving lmao

faint copper
#

lol oh boy

#

I didn't even think about its giant collision box

tired ore
spice latch
gleaming robin
spice latch
# gleaming robin How so?

I made a few shortcuts which can only be taken by players meaning angry jesters will have to take the long way around
A way long enough for players to escape inside
That and the terrain allows for a bit of dodging

#

It can create some really tense moments

gleaming robin
#

friend-shaped

tired ore
#

i miss him so dearly after migrating to v50

gleaming robin
#

Y'know

#

I haven't tested it yet, but I think I've got solid code

#

I do a similar thing that I do with SLAI where I have a method to cache the EntranceTeleports and sort them by their EntranceIDs
On EnemyAI.Start() I call that method, which if it's the first enemy it runs the method through, for every enemy after it just returns the array
Then on DoAIInterval I check each inside or outside EntranceTeleport (depending on current enemy AI) and if it's within 1 meter (probably gonna make that configurable within an int range of 1m to 5m) a random number is rolled and if its below the "chance to escape" it throws the enemy inside or outside at the matching entrancePoint transform and inverts their AI variables.

faint copper
#

seems reasonable to me

#

what happens to the cached teleports when changing moons?

#

I'm suspicious that caching the teleports is a premature optimization, if you only have to update those when they go inside or outside

gleaming robin
#

Caching the teleports is done the same way that I cache AI nodes in SLAI. Every time the scene changes, the references to the EntranceTeleports become null. I have a check in my FindEntrances() method for if the cache is either null, length of 0, or the first index is null. If any of those are true, I populate the cache. If the cache is already populated correctly, FindEntrances() just returns the EntranceTeleports[].

faint copper
#

ah, right, I suppose the native objects get destroyed

gleaming robin
#

@faint copper do you know how I might go about adding an instanced timer to an enemy? I want to make it so that when the enemy teleports there's a short cooldown before it can go back inside

faint copper
#

you'd want to save the Time.time() when the teleport happened and then compare the delta to current time when seeing if you want to teleport again

#

as for storing that, that's a bit trickier

#

you could just create a dummy component that stores that in a field

#

not the prettiest thing but it works

gleaming robin
#

true

faint copper
#

zeekers needs to stop using default parameters

#

this is the second instance of this I've seen lol

gleaming robin
faint copper
#

why not just make the field internal and set/read it where you need it?

gleaming robin
#

bc I didn't know I could do that 🀭

#

As I've said, I'm still a noob at coding in general, so idk exactly how the internal differs from the other declarations, nor how to specify a method as a set/get

tulip vault
#

internal is public for you

#

private for other mods

gleaming robin
#

I seeee

tulip vault
#

i don't think zaggy meant get/set in this context but if you want i can explain those to you in dm if you want

#

their pretty neato

gleaming robin
#

sure, I love adding to my repertoire

faint copper
#

oh yeah getters and setters certainly are useful

#

in this case I don't think it's important, and by set/read I just meant using it like a variable

#

it's nice to have getters and setters for statey things on public interfaces, because then you can validate or react to the change

#

(and changing a field to a getter/setter results in a different signature so you can't just do that after you release your public API)

tulip vault
#

the amount of fields LLL has that i wish were properties man..

gleaming robin
#

oh I might've figured it out

faint copper
#

just enemy.GetComponent<StarlancerTimer>().timeAtTeleport

gleaming robin
#

yee lol

tulip vault
gleaming robin
#

on it chef

faint copper
#

the alternative is to put all the code that does the teleportation into this component, which is probably not a bad idea

gleaming robin
#

I'm not sure how that would work?

tulip vault
#

doesn't even have to be a component tbh

#

could just be a class or struct

faint copper
#

then you have a strong reference to the enemy script and it never gets GCed, which means you have to manage cleaning that up yourself