#Starlancer AIFix v3.13.2 | EnemyEscape v3.0.0
1 messages Β· Page 4 of 1
Could maybe be a config issue?
it seemed to happen whenever i spawned one with dancetools?
ive avoided your moons like the plague like you said so now ill try it finaly lol
: ( same but there are three good log sanitizing mods I just haven't figured them out yet too block really bad spam like that
That's what I've been using for my tests. I'll give it a try in a bit. You're on the latest version yea?
yeah
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?
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
hm, are you running Lethal Escape? Or are you in a more clean testing environment?
completely clean. He spawned on an OutsideNode. Idk if the second screenshots shows the problem
That's very bizarre. So these were naturally spawned?
yes
hmmmmmmmmmm
I'll dig in a lil and see what I find
let me know if you need more information
Will do!
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 >:|
first attack attempt, i believe we went inside and out several times
kk, I'll give it a try
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
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
even with that it didnt work
Nice! :D
Well, notsomuch for your friend
This spore lizard issue is so weird
What's the issue?
I haven't noticed anything weird with them
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
Ah
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.
- Fixed prefab Spore Lizards being a little silly with their initial behavior.
Starlancer AI Fix v3.3.0

I got the lizards on solace and they just kinda stay there until you come near them then they'll move and the lizards that spawn after move aswell
Do you have the 3.3 update?
That was yesterday (for me cuz its 6 am rn) so before you made the update i just wanted to say
Ah yea, well it's fixed now :3
oh right, @frigid cape you had the lizard issue on your moon, right?
some kind of issue i guess
they seem to all go to 0,0 world coords and sit there until you bug them
Yeah that's the issue I fixed
Yep, though I'd love confirmation from you
Yee
cool, booting it up now
on an eclipsed version of my moon rn and not a single lizard has spawned yet and its 5pm
lmao
I thought you were using prefabs
So that's extra weird, bc lizards were already working fine with natural spawns for me
Well the fix should still work if you were having issues with natural spawns
Since the issue itself was the same
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
you might wanna give it another go, rng is cruel sometimes
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
kk!
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
Glad to hear you figured it out!
just pushed an update for mirage, so the readme now has StarlancerAIFix as one of the recommended mods π
what for? masked already function outside
StarlancerAIFix is needed to fix the masked enemies spamming errors
even in vanilla it's needed
it's for the EnableEnemyMesh error
oh
bro never found them π
Thank you~ β¨
We found one last night, seemed to work
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
honestly that might just be down to being Cosmocos lol
@spice latch have you received reports of this?
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
No worries! If you manage to catch the log spitting out errors that are attributed to AIFix, send 'em my way
OH MY LORD is that cosmocos that flower looks beautiful
it is yeah
bro i love the cosmocos style the colors are great
BUT OF COURSE ALL THE STARLANCER MOONS LOOK WAY BETTER HAHA π π¨
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
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 :/
It's okay, I know some other moons look downright amazing
but they don't have the performance mine do
π€
apparently its HELLA cool, I saw multiple people praising wesley as a puzzle god
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
theyre gossipping
the thumper wants to eat the player while the bugs want their scrap back lol
What moon is this?
bozoros, LLL moon. happens on all moons though it seems
Hm. If you interact with them do they resume normal behavior, or just go back to cuddling?
Legends say if you say " Bozoros " a spooky clown reaction emoji appears under your message
thumper resumed normal behavior, hoarding bugs noise'd at me and stayed there
brackens seem to work fine though
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
it happens with almost everything, not just bugs. i think they're all getting stuck wandering to the same spot. maybe try disabling enemies collisions with eachother while outside?
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
Gonna load up my debug moon with a ton of ai nodes and every interior enemy spawning outside and see what happens
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 π€
try spawning a bunch of lizards
Once each enemy reaches its natural limit I'll go nuts with DanceTools
Does this primarily happen on Bozoros, or have you noticed it elsewhere?
i remember it happening on atlantica from wesley's moons and bozoros specifically but i know it's happened at some other places
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
coilheads do that normally don't they? you even had an entire fix for their animations breaking when they lose you on the ship
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
this feels like watching a zoo
pretty much lol
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
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
so sad
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
unfortunately i haven't really checked out the starlancer moons yet because i already have wesley's moon which is a sizable amount
that's fair lol
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
are all current moons stable?
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.
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
@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οΌ
Not 100% sure why you tagged Lunxara in here, but that error stems from the navmesh being set up incorrectly, or the enemy spawning too far away from navmesh to link into it
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 π€
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
can i use both ai pathfindingfix and starlancer ai fix?
im using them both just fine no crash or anything
Amazing, man!
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)
are you using lethal escape
They're following you?? My tests have shown them running as far away as possible once detecting me
As in they only target you? Is it a specific enemy type?
i just tested, was my bad i think it was diversity that changed the behaviour. i didnt know they added that recently π
Ahh okay, I was very confused lol
This and diversity behavior don't work together?
Ohhh nvm I get it now your talking about the puffers being relentless
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
yeah tbh i had no idea what the revamps were for the puffer and blob
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||
What about blob?
||now items get stuck you can grab em but its a risk||
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
The main focus of SLAI is to enable default behavior regardless of spawn list, not really to customize enemy behaviors.
so sad
Someone else could make a mod for it though, and just use SLAI as a dependency
i don't think anyone would make such a specific mod though
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 π€
spider do web outside, it just depends, in some modded moons they can't
no i mean, i want to disable spiders making webs outside
oh
there is a difference between lore accurate toilet paper and a mod built onto another mod that adds two settings for two very specific things
fair lol
they target everyone hoarding bugs
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
never mind sorry for the confusion
no
the fix for that would simply be adding https://i.1a3.uk/1710432050.png to the end of morecompany's patch of SetEnemyOutside right?
if yeah then that's just been sorted
Eyyy nice
Any eta on the MoreCompany update?
no clue tbf, whenever swipez decides to update it
@devout sedge btw don't forget to push your fix for the issue on MEOF's end btw
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?
Ah so does MEOF just need to remove the mimicpatches.cs then since MoreCompany has it?
I'd love if he updates it today but that may be wishful thinking π
Speaking of swipez why is he not in this server?
he's banned from here
Rip
but yeah MEOF would need to add the two extra lines too
There you go @devout sedge
what did bro do
no clue, apparently he's been banned for ages though
Probably something dumb is my guess, I doubt it was on the level of π₯ or Owen though
cus it never got spoke about
ye i would guess the same
Funny enough I just learned about that today. It was brought up today in the thunderstore server.
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
spill the tea
Yeah I see no reason for you to not do the big update you said you wanna do, I think HomelessGinger left due to his lack of interest cus he's so busy with other stuff
Any tea can be put in DMs please, not looking for gossip here :P
ah kk
This yeah
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
where's the tea bro lol
one thing to beware of if you're destroying the cosmetics and then creating them again is that since destruction is deferred, you may end up with destroyed components in the arrays, so it might be worth ensuring that can't happen
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
@gleaming robin i dunno what your AI fix is trynna do to my giant
What's the circumstance of this particular giant's existence?
Also curious as to what changed that caused this to suddenly pop up, since I haven't pushed any updates lately
circumference? its as much as the forest giant technically
atleast thats how the navmesh sees it
i pinged this and forgot that the testing room was turned on so that might've caused it tbh
@golden basin you have a networkobject on it right
No I meant how that giant spawned lmao
@gleaming robin unrelated but sir
spawned it, but that shouldnt cause problems as it hasnt before until i was going around on modded moons
ye i think so
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
no like
idk what a network object is
im like 80% sure it doesnt
What, you want me to switch it to JesterAI? :P
gonna yell at eva for it not throwing an error at you
your shits be fucked
getcomponents can be expensive in update and yeah you alr have the reference from the patch itself
Ahh kk
/// <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
I did this already, there is an open pull request
I haven't pushed the update though because I'm scared
me too LMAO
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
How would I cache it as a reference?
Also this is a very conditional calling of getcomponent so I'm pretty sure the expense is negligible here
you dont even need to cache it?
oih no wait i do :3
I just never noticed it
lol
JesterAI __instance
Ohhhh damn I forgot about instancing
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
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 π
Fair, game dev wise it means the creation of a non-permanent object at runtime?
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
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
Ahhh okay
can someone remind me if the jester is able to climb the ship ladder?
Thanks
Anyone know if there are any Moons released currently which have outside jesters?
Fission C by wesley i think
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?
With yours it doesnt work
imma try it again quickly with yours disabled to see if they do, but i am pretty sure worms just cant surface in general on interiors besides facility
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
i'll try the facility, mansion and bunker with the AI fix on and off and see which ones it works in
Is that a feature of this mod? Big worms can eat you inside facility?
I guess? lol
The aim is to let monsters function wherever they are
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.
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
Dont
Literally any other map would give u better testing data
Experimentation is made differently compared to other ingame moons
Hence the name
How so?
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
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 π
in the textures
Wait why apply the colour to the textures
Oh for experimentation, I thought experimentation had the colour applied on the material?
Ic
Experimentation's terrain just has a single hdrp/lit material, so that's probably why your method worked there
How does auralis keeps it's ground colour out of curiosity
If I do ever decide to try colours again
yo ucant do it like that
Experimentation's material
in the future ill prob have an optional colour value authors can select to represent a theme colour for mods to use
Yea that's a different beast altogether. It's layered textures in the terrain
Bleh
So, without your fix in just the facility, they dont even chase properly or play the rumbling audio, let alone attack
Same with custom interiors as you'd expect
Tho here it does a better job of following me, but still not triggering. They also seem to get stuck.
Then, with your mod, they work fine in the facility
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
Does it work in vanilla mansion? If so then that'll indicate an issue with how the custom interiors are made
imo lead might be room layer
That's what I'm thinking
i tested it a few days before and same issue as you see in the Dungeon one. it does track and rumble, but never surfaces. i've tried going up/down stairs and moving around to see if its stuck somewhere but no matter where i took it, it never went surfaced
note the lack of objects rendering on castleflow
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
Kk, focus on the mansion first, bc if it works there then it's almost certainly a layer issue with modded interiors
I'm off to bed tho, so I'll peep the results in the morning
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
Yee, my stuff is set up pretty close to vanilla, I've been referencing the tagging and layers
Yep, same as with the custom interiors
Strange. I'll test it later when I have some time to dedicate to it
goodness, what moon is that
polarus, I'd bet
polarus does NOT make those noises
The noise is just the worm
worms do not make those noises either
Could be lethal resonance
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.
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
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.
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
Because inside worm = funny
Noises i believe are lethal resonance
As i said, its why i am trying to set it up for custom interiors such as the bunker, where it works better because its more clearly underground and is more open
The plan was for one of our moons to have primarily worms indoors, but basically no other enemies
And cats. all the scrap is cats. Its Egypt.
Haven't played all your moons yet but sounds like Tomb Raider 1 which is absolutely inspired
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
Wasn't sure you meant those ones
yeah its these fellas
Is this mod not server side only? π€
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
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)
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
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
@gleaming robin each client would have to do the isOutside changing and etc. aswell no
think your mod would need to be all clients
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
I hate networking
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
@gleaming robin
As the host, I saw this bracken shuffle along the path to get to Player 2.
However, player 2 saw this.
Bracken can barely be seen across the bridge on the stairs breaking my neck. π
When you say shuffling along the path, do you mean the path that player was walking?
correct
Bc that looked like it took an offmesh link
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.
Strange. Nothing in my code specifically touches the bracken, so it may just be a case of desync or strange navmesh on the planets
Yes
lethal escape causes major desync with the bracken, so that's probably the cause
ahhhhh
Yea if it was a LEsc bracken, SLAI doesn't apply to it
oh! it doesn't?
Nope, it has its own code set up for monsters it transitions from inside to outside
well crap
SLAI is more for moon devs
(hence why almost every main moon depends on it now :3c )
π
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. π
No prob! I dunno how active they are anymore tho
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.
"every main moon" pretty much just starlancer and wesley's moons i think
though i guess that counts as every main moon
@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?
yep! it should!
sfDesat's as well
RosiePies and Tolian (I think) as well, as far as devs that have made multiple moons
100%
LEsc is pretty complicated from what I've seen in the source code, lots of prefixing, which is treacherous if you don't know what you're doing
welllll gwagwagwagwa i did it second after wesley so every other moon that does it basically doesn't eexist totally
Roger more questions.
Does Starlancer AI, play well with. SnatchinBracken, Diversity Bracken Dimension, and Arachnophilia?
https://thunderstore.io/c/lethal-company/p/readthisifbad/SnatchinBracken/
https://thunderstore.io/c/lethal-company/p/IntegrityChaos/Diversity/
https://thunderstore.io/c/lethal-company/p/SillySquad/Arachnophilia/
SnatchinBracken modifies the behavior of Bracken enemies. Instead of instantly killing players on contact, Brackens now capture and drag players to the infamous Bracken Room.
Diversity is a mod that revamps few aspects of the game. Generally the entities itself.
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
It would be awesome.
snatchinbracken is fine, arachno is fine, diversity doesn't mess with actual AI at all so it's fine
From experience, yes, snatchin works fine with starlancer AI
he gives himself a new favourite spot outside and brings people there to kill
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
@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! π
later
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.
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
could fix that
is that always the right layer in every scenario?
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
fair fair
please don't come back and say they aren't working on vanilla moons
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
I thought you were talking about exterior??
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
Yes
Try setting more outside AI nodes, I can't remember offhand how they pick web locations, but you might be right about max distance
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
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
Okay then I think I just have far too few, I'll bump that up by a lot then
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
wait a minute
Gotcha, thanks. I'll let you know if the web distance theory holds up as well.
yall
Waiting.
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
Lmao you absolutely could
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
Failing the layer thing working (since it'd probably adopt the terrain's layer) just disable the meshrenderer in the prefab, but since it has the component it should still work in the painter
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
Rip, was a cool idea tho
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.
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
Is it right beside the ship or some random position?
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
so not to the right of the ship against the rocks?
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.
no in the bushes close to the train track wall, i tried to get a picture but for 5 times no hoarding bug even spawned
I really have no idea why π€‘ would still have the puffer bug, but maybe I can fix that with the next update.
Yeah that sounds like it just picked a nest node and then didn't feel like moving from it. As long as it reacted normally to you getting close to it that's fine
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
Not 100% sure on that, but I know that certain bugs that happened, such as the Jester getting stuck in its cranking animation, wouldn't get fixed by proximity, but it did act relatively normal.
I'll dig into the spider a bit later and see if there's anything in the web code I can postfix to help it
Going to vector3.zero and kissing?
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.
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
how many lines is the baboon now?
enough lines to kill a dog...
i thought he added loads of new behaviours to the baboons
not touching triskelion with a ten foot pole after witnessing that btw
well he def did something
Seems like he made them a little more dynamic regarding aggro, and added the ability to set a nest location?
i think they had a camp location before the update, but i never really knew what it did
@gleaming robin does StarlancerAIFix need V50 support added for the Butler?
Boy the Butler would make my game die anytime it was spawned and spamming those errors β οΈ
I would get mad stutters
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 ?
Nah, I had to disable things like LLL and LL for the V50 beta
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
LEsc = Lethal Escape, for clarity
I'll take a peek at it, but I don't see why SLAI would break it
yeah I know I don't have it lol
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
Nope, it was causing my game to mad stutter everytime it spammed that
Async Loggers did nothing
interesting
Which is why I was thinking it's Pathing was erroring
something unrelated to the logging end of things
it was a stutter and not a framerate drop?
yeah
Does it error without SLAI as well?
the game would basically freeze
that's very odd
well but was it on a 200ms rhythm?
except it was constant
Idk, I could probably link the portion of the vod on my Twitch
lol
given that streams are 60fps it might not be super apparent honestly
Yeah I do
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
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
https://www.twitch.tv/videos/2107954672?t=01h08m42s Stuttering started around this point in the vod, maybe around a minute-ish after
You can see how it just freezes lol
and it kept doing it until the enemy was despawned when we went in orbit
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
Here's the sqlite file incase
if ur playing with over 4 players thats why
I had only 2 others with me
I think it's a bug when using MoreCompany in general atm
That update needs to be pushed
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
The lobby size was capped to be at 14, but I only had 2 others playing with me lol
yeah that'd be why then cuz the butler objects are capped at 4
even though you only have 2 players it'd still loop through 14
I've done it as a separate mod for now https://thunderstore.io/c/lethal-company/p/Dev1A3/ButlerAdditionalPlayerFix/
Ahhh I see, it's set in the start function
wouldn't it be better to have that added directly to MC?
especially since you're one of its maintainers (at least from what it seems)
It is when MC updates for V50 lol
it's okay barch, words are hard
i certainly agree with that
@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?
I saw that issue on insym's stream earlier, I had a quick look and didn't see anything that stands out that could cause it but I'm gonna do a bit of testing when I wake up
I have a feeling it might be a vanilla issue but I'm not sure
Yeah cus it happened for me earlier too when you were lurking in my chat I stabbed it while stunned and it died for some people but for me it was very much still alive and it grabbed me and killed me and even was still walking around normally after
Yeah I think it stays alive for whoever stabbed it
Yeah that is very strange
What makes it weirder is noone has bug reported it in Zeekerss server which almost makes me think it's mod related somehow
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)
And we had FacilityMeltdown at the time but I took it out cus it wasn't working properly
Alrighty ^^ Sleep well π
someone just reported it in zeekers' discord and apparently they had no mods
so guessing it is a base game issue
Let's goooo
Ya love to see it
Update coming in a bit
Nothing major, just a new format of code that should be lighter in weight
and more accurate
Ooh
Starlancer AI Fix v3.4.0
- StarlancerAIFix v3.4.0
- Improved accuracy and optimization.
YIPEEEEEEEEEEEEEEEEEEE
Any progress on indoors worms working on interiors besides facility?
Pfft I completely forgot about that sorry π I'll dig around a bit later
I'm not really seeing any reason why it's not working in places besides the facility. Big weirdness
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
Yeah, no clue, its really weird
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
maybe so it doesn't jump through structures when outside
If the roof was too low when it didn't jump that'd track, but it's the roof being too high (or at least right now it correlates to it)
@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]
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
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) {}
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()
Yep. They apparently had a project where it was called so much that the performance drawback actually did matter
If what I read online was correct, GetComponents<IThing>() doesn't work, but you could certainly try it
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
in that case the alternative is to always assign a variable for the current iteration of the indexable array so that you don't mistake an i for a j, I suppose
or name your index variables something more than a single letter
it's very easy to mess that up in nested loops
yea for sure, for vs foreach is absolutely code-golfing for Start() in this case lol
An old post, and I can't be bothered to do more in-depth searching atm cuz I'll just test it regardless, but apparently it was implemented back in Unity 4.6
you could also do Array.IndexOf(enemyWhitelist, __instance.gameObject.name) != -1
wait what does GetComponents<List> mean
that doesn't sound like a generic type argument to me
is that a typo for GetComponents(List)??
Unity documentation moment perhaps
Β―_(γ)_/Β―
ah yeah, I think it is
oooh clean and nifty
regardless of any performance drawbacks, foreach and Array.IndexOf() certainly do make the code look nicer
tho I guess I don't know if IndexOf() really has any drawbacks compared to a for loop, especially at this scale lmao
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
Also, I'm good on that front π€
Once I'm able to properly test this mess I'll report back with my findings
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
JIT?
just-in-time compiler
it generates the machine code from your compiled common intermediate language bytecode
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"};
it would, yeah
Just trying to learn best practices and whatnot
hella
having the whitelist be static is good
that way it never reallocates it
it'll just be there waiting for you to use it
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?
I don't think it would compile without the new, would it? unless you use a collection expression
this compiles with no errors
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
np!
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
ah, that's very true
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
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
lol no need to delete it, it's nbd
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
correct me if I'm wrong, but I don't think there's a way to react to Awake() of an interface
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
We love code-golfing π€
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?
Unsure tbh, but I think it's in/out
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
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
Ohh i see i see
So SLAI never actually touches LEsc enemies themselves
it never meets the conditions
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.
Maybe this will finally fix the Coil Head when outside being janky too
XD
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
True, but I had it happen on S-0 without TME too
getting rid of TME did fix the other enemy jankiness however
Anyways, back to The Callisto Protocol π€
Lmao
@gleaming robin Have you looked at fixing #1200695291972685926 message ?
or is that it π«£
That's what he fixed sir
Smh my head
@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
Did another enemy that can teleport outside get added in v50?
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
For players there's .isInFactory
at worst I can just check every frame for every item that is being held, but that's not ideal
True
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
Can't you do a check on whatever event entranceTeleport calls?
do enemies use the entrance teleport?
Only code I know of is in the masked
I wasn't sure if they used some sort of manual mechanism or OffMeshLinks
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
and that's the only way it gets out?
but for your mod, other enemies use OffMeshLinks?
My mod doesn't let enemies escape
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
aw man
They have a GitHub I'm pretty sure if you wanna look at non-decompiled source code
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
Might've wanted more control
wait, am I reading the masked code correctly that it can only teleport out the main entrance?
Property*
that would make sense
I thought I seen em leave fire exit of titan before though
Oh but maybe they just spawned outside and i assumed it was fire exit
unfortunately that's not really workable #1206494982521753620 message
since the field isn't a getter/setter, I can't detect when it changes
Hmm
and even if it was, it's not even accurate
Yeah thats true
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
Idk exactly how CF works, you're culling for local player only right?
That would make sense yes
The tutorial in the scrap wiki suggests you always turn on the in factory property
Not sure why
I'm culling for each camera on each render call
oh boy, that's......interesting.......
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?
I would think postfixing EntranceTeleport.TeleportPlayer() with flipping isInFactory (or w/e it is on items) would suffice
last time i talked with the dev of that mod they said they were a bit unexperienced in unity so i'd guess that played a role in how the mod was coded
shame that they arent doing updates anymore by the looks of it, the mod was supposed to have a reversed functionality as well
items that are on the surface aren't visible when inside so it didn't occur to me to cull based on whether they're in the ship, but I also can't locate items within the interior if they're not there so visibility testing would be broken
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
it doesn't look too bad, I'm not surprised they couldn't account for such a niche use case
good question honestly, id say the mod existing way before masked were a thing would probably play a role
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
For the masked, that isn't called if I'm reading the code correctly
Okay I'm getting confused
I hook into something closer to the actual place where the player is teleported that works better than EntranceTeleport
I thought you were culling items?
oh, I guess I didn't really establish why this matters for the masked lol
MaskedAIRevamp allows them to pick up items
ohhh
they can carry them outside and my mod is unaware of that
Then just do the same thing I suggested but postfixed onto TeleportMaskedEnemy
You just need it to run once on being called
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
Bro you're in my AIFix thread π
it still happened with aifix though
it certainly couldn't hurt to rework it
i rember playing with both and had a thumper instakill me
Because LEsc's teleport method doesn't allow the enemy to meet SLAI's conditions
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
True, and I could soft dependency it and only load the AI Interval code if its not found
more like you could soft depend on LethalEscape and enable that interval code if that is found, no?
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
oh that could make sense I suppose, maybe that's the default value in vanilla as well 
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
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)
boy, it would sure be nice if Zeekers had just put the SetEnemyOutside() function on EnemyAI instead of MaskedPlayerEnemy
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
oh you mean they just teleport out without even going to the door?
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
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
oh interesting, I didn't see the random chance part looking at the code
id often land on a moon to be greeted by a lootbug running out
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
hmm? what do you need to still do that for?
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?
Sorry, I meant checking for if they could teleport
oh yeah
Lemme check the masked rq to see exactly how often Zeekers checks for it
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
Oh well then
yea it shouldn't be too crazy difficult
If it's something people would actually want in place of LEsc
I think it's worth having one that's maintained for sure
a thousand times yes
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
Whats LEsc?
Lethal Escape
it never set the AI nodes so the AI partially broke when things escaped
What about PlayerIsTargetable()?
what about it?
If that returns true, you could check if any items match its position and set the location bool
yeah and some enemies would spawn inside terrain or far away from exits cause of the nodes used
that's another method that I have to poll
if it comes to polling, I already have a plan of how to do that
ahh right you're looking for something to hook into being called
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
and it also never got the enemies going back inside feature....
Uhhh it is actually
Are you looking at the v50 assembly?
I still prefer my code, but it do be there
lol
somehow
F
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
BROOOO I asked if there was a new enemy that could leave the factory TT_TT
enter/leave whatever
he's just a little guy I didn't think of him
i wanted to say it but then thought about the entering part
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
So I assume it'd be not great for if I sorta reused my SLAI code in a new escape mod rather than SetEnemyOutside
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
I don't like it using FindWithTag tho
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
That'd be a not-great idea lol, but you're right, SLAI doesn't account for that. I don't think vanilla LC would appreciate that either
But I'll see what I can come up with in a bit
Still don't wanna use it in SLAI, but might
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
Yee, some dummy might make inside enemies work outside and vice versa
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
personally I would be happy to be rid of hacks
Plenty of it, actually
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)
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 π
lol yeah sounds good
If anyone has any ideas for the mod name, lemme know. I feel like StarlancerEnemyEscape is nice and descriptive, plus fits my branding lol
sounds good π
I don't know if I'll make a fifth thread tho
you should make 6 so we could make a thanos meme
Oh god
StarlancerUpgrades is still gonna be a thing
Idk what to do for a 6th unique one
a lobby watermark
Let's not harken back to those times lol
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
Smallish in scope, huge in reach
wesley worked so hard putting giants old birds and leviathans inside interiors just for this to happen......
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
I hadn't thought about it before, but for some enemies letting them go outside would be a big nerf
You put some respect on my secretary's name
I might install it specifically to make blobs go outside so they stop camping doors
Oooh good point, I'll need to default blobs and snare fleas to false
we legit had to leave titan every time a jester spawned
death sentence
but yeah configurability is key
yeah I feel like Jesters definitely shouldn't be default on
getting forced to leave a moon isn't a great experience
i think one of wesley's moons has an outside jester....
erm..
but also half of the time lesc was broken and jesters wouldnt do anything
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
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
still better than getting pushed out by a zeekeers β’οΈ random spawning rock
I mean, that moon is designed in a way so you can quite easilly survive the jester if he does get mad
I made sure of that
How so?
Do you like Auralis' outside Bracken? :3c
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
friend-shaped
i miss him so dearly after migrating to v50
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.
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
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[].
ah, right, I suppose the native objects get destroyed
@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
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
true
zeekers needs to stop using default parameters
this is the second instance of this I've seen lol
Do you think this would suffice?
why not just make the field internal and set/read it where you need it?
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
I seeee
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
sure, I love adding to my repertoire
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)
the amount of fields LLL has that i wish were properties man..
I'm not quite sure how you're suggesting I go about it in this case. It needs to be instanced, so I can't just have a static variable in the plugin or other EnemyAIs with the timer component will just overwrite it (which I guess would be okay, it'd put a global cooldown on entry/exit), but idk how to reference the component's timer
oh I might've figured it out
just enemy.GetComponent<StarlancerTimer>().timeAtTeleport
yee lol
Cache the timer when you make it tho
on it chef
caching it would probably require creating a dictionary, I'm not sure it's really worth doing that for something that'll only activate occasionally
the alternative is to put all the code that does the teleportation into this component, which is probably not a bad idea
I'm not sure how that would work?
Dictionary<EnemyAI, EnemyCoolDownTimer> sounds fine tho?
doesn't even have to be a component tbh
could just be a class or struct
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
