#Reference Enemy with Tutorial/Documentation

1446 messages Β· Page 2 of 2 (latest)

granite sundial
#

Oh wow the rigidbody doesn't seem to work, nor does the box collider. Are you sure that the box collider in the collision object is supposed to be trigger? Also, should the rigidbody be kinematic? The ai works fine, it's just the collision being a little funky

scenic scarab
granite sundial
#

Yea, I think so. I'm going to try once again from the beginning and see if I missed something

#

I got a slight issue

scenic scarab
granite sundial
#

I couldn't on that specific model. But, now I can(Changed it to something different)

scenic scarab
granite sundial
#

Oke! Btw what node type did you pick for scan node?

scenic scarab
granite sundial
#

I'll check it asap

alpine silo
#

is there a way to lock the player camera to face the enemy?

#

I think the fiend mod does that somehow but I am not 100% sure

granite sundial
#

Yeah, Fiend does it(I know 'cause I played with the mod). The masked does it, too, and I believe both of the enemies do it similarly(?)

alpine silo
#

ahh right

#

forgot the masked do that as well

#

thanks, will take a look at them

granite sundial
# alpine silo ahh right

Btw is this the correct setup in terms of the game object? I always struggle setting up things in Unity while I take no issue coding stuff in VS2022

#

Weirdly enough, I forgot to remove the light and camera when exporting from blender, that's why there's a mesh in the hierarchy

alpine silo
#

I think it should work

#

Not at my PC rn but I can look later how I made it

scenic scarab
granite sundial
#

I've assigned the tags and layers given in the guide, however, I believe turncompass, eye, and attackarea are untagged, but has the enemy layer. I can't seem to find the rest of the MMHOOK dlls despite having it installled

scenic scarab
#

Anyways, does the game still run fine?

granite sundial
#

Yeh, runs fine

scenic scarab
#

if yes, you don't need them, because LethalLib I guess only depends on MMHOOK_Assembly-CSharp.dll

#

but yeah, these turncompass, eye, and attackarea are not all required, or, well, the "eye" is somewhat, but the rest are not

#

the eye is used if you want your enemy to require line of sight

#

which you would do in code, of course

granite sundial
#

Ye

#

I just put them in for good measure, in case I want to play around with them further

granite sundial
granite sundial
#

The setting up enemies part

scenic scarab
#

oh yeah, but the plugin code itself registers the enemy with LethalLib

granite sundial
#

I got the enemy to work finally. It seems like I did miss a step(not sure which one). Thanks for the guide btw!

scenic scarab
granite sundial
#

Yea, I have netcode patcher set up. I believe the issue stemmed from possibly the collision game object itself

#

I must've forgotten the Enemy AI Collision Detect script, because I took a look into that class, and it referenced the OnCollisionWithPlayer

scenic scarab
#

oh, yeah that one is important

alpine silo
#

can i rotate my enemy by 90 degrees to the left without having to create an empty parent w/ all the new scripts and references and layers and yadda yadd?

scenic scarab
alpine silo
#

for some reason

#

the model before was rotated the same in blender but did not have issues

#

eugh

scenic scarab
#

has this been an issue from the start?

alpine silo
#

no

#

well

#

with the new model yes

#

its the same model but edited

#

and new rig

scenic scarab
#

okay, so you'll want to export the model with proper settings for the directions

alpine silo
#

ive used the ones from the modding wiki

scenic scarab
#

have you tried applying rotation?

alpine silo
alpine silo
scenic scarab
#

in blender though?

alpine silo
#

rotated the model by 90 degrees but that did nto change anything ingame

alpine silo
#

:d

scenic scarab
#

what does this rotation look like?

#

I think it should be 0

alpine silo
scenic scarab
#

if it's not, try applying the rotation, with Ctrl+A and choosing

#

huh

alpine silo
#

modding is driving me insane

scenic scarab
#

oh, your enemy is not facing in -Y

alpine silo
#

oh

scenic scarab
#

it is facing in X

alpine silo
#

oh

scenic scarab
#

yeah, just fix that :3

alpine silo
#

why did I not hzave problems before then argghhgh nvm thank you

#

thanks

scenic scarab
alpine silo
#

ye all good

scenic scarab
#

nice!

alpine silo
#

do you by any chance know what a HUD object needs in unity?

#

as in a visual effect, like the masked red visuals or company creatures mushrooms

granite sundial
#

I believe those are post processing effects, not 100% tho

burnt forum
#

What affects the ability for an enemy to slow down, like when turning and stuff? I have an enemy that slams into walls when it's moving and tries to turn, and it looks sorta janky like that.

scenic scarab
alpine silo
#

do mods generate pdb files for people who downloaded it?

scenic scarab
alpine silo
#

I didnt want my file path to be shown in the console whenever an error occurs

#

but I did not include the pdb in the mod zip, so will people who downloaded my mod generate a new one?

#

oh my lord now I get why you guys almost never saw him

#

there was a bug that prevented slenderman from spawning when taking a page after a day where he already spawned

scenic scarab
#

I should add this to LC-ExampleEnemy, but I haven't had the time to do that yet

scenic scarab
alpine silo
#

omg

alpine silo
#

are there any known incompatibilities with old enemy AI and items/LethalLib code with v50 yet?

scenic scarab
alpine silo
#

okay

worn hazel
alpine silo
#

oh

#

with what was it replaced?

worn hazel
#

lemme check

alpine silo
#

is there like a collection where I can see all replaced methods etc?

alpine silo
worn hazel
#

i think this was the new method

alpine silo
#

but the parameters are the same?

worn hazel
#

theres an extra parameter iirc but you should be just able to null it and use it the same way

alpine silo
#

oh

#

alright, thank you

#

v50 is still a beta though right?

worn hazel
#

yeah still a beta

#

so could change

alpine silo
#

I think Ill keep my mod v49 until v50 is official

#

okay, thanks

worn hazel
#

this has a lot of stuff about changes

alpine silo
#

thanks

worn hazel
#

it just added the ability to override the eye the enemy has

#

which is really cool

alpine silo
#

ohh but the unity project stuff stays the same right?

#

for lethal lib enemies/items

worn hazel
#

theres like minimal changes to the unity project, i think nomnom made a migration tool if you wanna update your unity project but i'd wait till full v50 release

#

i havent had to change anything about my shop item, scrap, or enemy

#

except making my own line of sight function

alpine silo
#

okay

worn hazel
#

instead of checking what version im in, making my own line of sight just let me be compatible with v49 and v50

alpine silo
#

alright yeah I think ill just wait for the official v50 release

#

I assume most mods are still not updated to v50

worn hazel
#

quite a few are, i might not be updating mine cuz like, im waiting to port to LLL

alpine silo
#

o

#

how come?

#

many mods are moving to lll

worn hazel
#

LL is unlikely to be supported after this updated

alpine silo
#

but not sure of lll supports custom enemies

alpine silo
worn hazel
#

highly recommended to move onto LLL

#

it'll use a superior system

alpine silo
#

aw man idk I am too nooby for that

worn hazel
#

dw

alpine silo
#

welp ill wait and see

worn hazel
#

its practically the same as LL

#

they both use very similar logi

#

the only difference is one has extra features and is still maintained

alpine silo
#

lll does not work with items/enemies spawning on custom modded moons tho afaik

#

at least lll fixed which I use

#

because lll made my friends glitch thorugh the interior floor

worn hazel
#

LLL doesnt have custom items and enemies yet

alpine silo
#

and made them have different interiors than I did on the same moon lol

worn hazel
#

itll be next update

alpine silo
#

ah

serene locust
#

Oh boi can we get some pins in here? πŸ˜…

worn hazel
serene locust
#

Im pretty early in development with my custom entity and my head is full of questions. So Imma for sure read through all of this πŸ™„ but havin pins for crucial stuff on this would be nice to have 🫣

worn hazel
#

It has everything that you need to know

#

Including stuff from here lol

serene locust
#

Is there anything about textures / shader in there?

worn hazel
#

There isn't anything about textures / shaders here

#

Textures are pretty simple lol

#

Shaders... maybe, I havent learned em yet tho

serene locust
#

Well im still just makin the model and it’ll take quite long til im workin on textures / shaders. Im just thinkin ahead πŸ™„

worn hazel
#

Generally the process for creating my enemies is the following.
Make a model in blender
Texture it
Rig it, fix its weight's
Clone the example-enemy project into your own github, rename stuff for your own project, rename the modasset into whatever asset bundle name you want
Import stuff into Unity, make sure you're using the right asset bundle name
Apply the basic gameobjects and components you need for a basic enemy.
Then start making the AI etc

worn hazel
#

Um let me see if I can find you a tutorial

#

This is absolutely horrid

#

And it WILL fuck you over later

#

And by later, I mean quite immediately, halfway through making your enemy AND after you're done making your enemy

serene locust
#

I picked the model of bracken for a base and made changes on it - for example turning tris into quads

worn hazel
#

Don't use ingame models

#

They are shite to say the least

#

Made horribly

serene locust
#

Yeah i pulled my hair workin with it already

worn hazel
#

It is MUCH easier to actually learn how to make the model

#

Takes probably 5 minutes to do what you're making with skin modifier

serene locust
#

So i should instead work from scratch with a 2d art behind it for reference and work my way up from there?

worn hazel
#

That tutorial taught me a lot about different tools etc

#

References are extremely helpful

serene locust
#

Aight imma ask for someone to make a sketch about my guy cuz im not good in that πŸ˜…

alpine silo
#

you can just drag&drop any google image you want to use as a reference onto the canvas

deep wind
#

Hey all, i'm trying to make my first mod which is a enemy mod. I'm new to modding so it may be a noob question but after i drag and drop my enemyType prefab and animator into the asset bundler and build it. I run the game and the game fails to see the enemyType and i have no idea why its happening ? Anyone had this issue before πŸ˜›

#

Doing Logger.LogInfo(bundle.GetAllAssetNames()); in the code also returns System.string[] sooo it just doesnt seem to recognise anything in the asset bundle?

alpine silo
#

Ive never heard about dragging&dropping stuff into an asset bundle

#

I did it with the button on the bottom right of the interface

#

there I could select an asset bundle

deep wind
#

It was me being stupid, i input the wrong asset name into the code whoopse

worn hazel
#

Happens lol

alpine silo
#

is there a known release date for v50 yet?

#

I dont really wanna update my monster mod only to rewrite the code a few days/weeks later in case of new v50 code changes

void fulcrum
#

As far as I know the only thing changing for the EnemyAI abstract class is the line of sight function being renamed/replaced

alpine silo
#

thats really all that has been changed?

#

welp in that case

#

I might make a custom method for both v49 and v50 as well

#

although if my enemy dependns on ll Ill probably have to wait for an official ll update for v50 anyways

scenic scarab
alpine silo
#

awesome

#

alright then

deep wind
#

Hey guys, once again a stupid question probably. I got a enemy mod and my code seems to work. The only thing that doesnt is the enemy killing the player on contact and the enemy opening doors. OpenDoorSpeedMultiplier which is set to 1 but it doesnt appear to do anything. The killing code i have is the following: ```public override void OnCollideWithPlayer(Collider other)
{
PlayerControllerB playerControllerB = MeetsStandardPlayerCollisionConditions(other);

if (playerControllerB != null)
{
    Debug.Log("WidePutin Collision with Player!");
    playerControllerB.DamagePlayer(100);
}

}```

scenic scarab
deep wind
#

Yea, i was not entirely sure what to add to the main script so i added the prefab to it which should be fine i suppose

worn hazel
worn hazel
#

did you make sure IsTrigger is on?

scenic scarab
#

also try to put debug messges in your collision stuff to make sure the code is running in the first place

scenic scarab
deep wind
#

yea all is set, except the can collide with enemies

worn hazel
#

you dont need that part for what you're trying to do

#

is it that your rigid body is setup like htat?

#

try turning off gravity and turning on kinematics

#

rigid body settings can be a little confusing so i dont understand it 10%

#

100%*

deep wind
#

Oh yea that could work, i'll try that πŸ™‚ thanks guys

deep wind
#

That solved both issues πŸ˜„

worn hazel
#

nicee

alpine silo
#

my enemy is visible through any fog, even when far away

#

is there a way to change that?

#

as in, the further away it is in the fog from the player's view, the harder it is for the player to spot it

worn hazel
alpine silo
#

uh

#

probably

#

idk

#

just made materials inside blender

worn hazel
alpine silo
#

I dont think so

worn hazel
#

Can you show an example of the problem?

#

I believe the way vanilla combats this is by changing the mesh based on how far away the player is

#

I'm not 100% sure how they do it though

#

I just noticed the forest giant has a close and a far bosy

#

Body

blissful snow
alpine silo
#

I always thought it was normal like that for lc enemies but someone mentioned it in my mods channel a few days ago

#

I think they mean this

#

that the enemy kind of stings out/has such high contrast even though there's fog

alpine silo
#

do I need to re import the dlls for v50?

worn hazel
#

Which dlls?

alpine silo
#

assembly csharp

worn hazel
#

The assembly csharp? Yes

alpine silo
#

oh

worn hazel
#

New functions etc were added

#

So you have to, to see em

alpine silo
#

and lethalli?

#

b

#

I suppose its not enough to change the one line of sight method to the new one to properly update my mod

worn hazel
#

Yeah lethal lib too

#

Always update your dlls

alpine silo
#

i forgor how to import them/add them to dependencies since my visual studio hates me and doesnt show up the proper windows for that

#

I'll do that another day, thanks for the information though!

worn hazel
#

Your csproj to update the version number, dll folder to put them in

#

All good

#

Example Enemy should be updated with v50 unity project too

alpine silo
#

oh do I need to make unity changes as well?

worn hazel
alpine silo
#

I meant like

#

Do I need to re export the asset bundle or change stuff with the unity objects

worn hazel
alpine silo
#

Okay

#

If my enemy used the new los method though I probably have to update the mod dll in the unity project thiugh

#

Eh

#

Not sure rn I'll check that later

alpine silo
#

its weird, I have checked that v50 is installed but ILSpy still says in playerControllerB that the LOS method still is the old one

#

but it should be in Assembly-CSharp.dll -> GameNetcodeStuff -> PlayerControllerB right?

blissful snow
alpine silo
#

Yeah

#

But the enemy method still looks the same on the player Controller class

#

For some reason

scenic scarab
#

Btw, I'm finally working on an update to LC-ExampleEnemy to make it easier to update it and projects based on it, when the game updates :3

And this is of course done by referencing the game's assemblies directly instead of copying them in a folder called dlls. Though still updating the Unity project won't be as easy, but anyways the way how this worked before was horrible πŸ˜…

worn hazel
scenic scarab
#

though, it will not be a template in the same way as Xilo's templates, I'm too lazy for that

blissful snow
scenic scarab
alpine silo
alpine silo
#

without it I'm sure there wouldn't be as many enemy and item mods as there currently are

scenic scarab
#

thanks! :3

blissful snow
alpine silo
#

Wait

#

Omg

#

I think I might be stupid

alpine silo
#

yeah my code didnt use the enemyAI method after all

#

just the playerControllerB bool

#

do I need to check the destroy on death box?

blissful snow
#

Nah dont

alpine silo
#

okay

#

welp so my mod was compatible with v50 all along this whole time

blissful snow
#

actually it depends. What it does is just completely remove ur enemy from the game the moment it dies, which will cancel out any death animation/sound etc

alpine silo
#

hmm

alpine silo
#

welp I think it has worked fine so far so ill just keep it how it is

blissful snow
#

Fair enoigh

alpine silo
#

I patched it with the new dlls now though and updated the assembly csharp dependency, so I assume errors can now occur with v49?

blissful snow
#

Im not sure tbh

alpine silo
#

currently trying to add a config for my mod where you can select custom moons with a custom weight each for the spawnrate of an item, like so many interior/enemy/item mods use the format "Moon:Weight;Moon2:Weight2", but I have no clue on how to do that

#

is there any guide for that?

blissful snow
#

i think hamnuii and xu know

scenic scarab
#

Anyways the dictionary stuff in LethalLib rused to be broken, until I fixed it

worn hazel
#

I've had to remove the way I do it in my mod since I've moved onto LLL, but I'd be happy to help you port

blissful snow
#

in the custom rarities dictionary, would anything bad happen I set the rarity in infernis to be 69 or whatever, but then I run the game without actually having the infernis mod installed?

worn hazel
#

nothing bad should happen no

#

i also wrote a lil config parser if you want

#

it takes a string like "Infernis@400,Junic@200,Egypt@50" and makes the dictionaries for both vanilla and custom moons

blissful snow
worn hazel
#
        private (Dictionary<LevelTypes, int> spawnRateByLevelType, Dictionary<string, int> spawnRateByCustomLevelType) ConfigParsing(string configMoonRarity) {
            Dictionary<LevelTypes, int> spawnRateByLevelType = new Dictionary<LevelTypes, int>();
            Dictionary<string, int> spawnRateByCustomLevelType = new Dictionary<string, int>();

            foreach (string entry in configMoonRarity.Split(',').Select(s => s.Trim())) {
                string[] entryParts = entry.Split('@');

                if (entryParts.Length != 2)
                {
                    continue;
                }

                string name = entryParts[0];
                int spawnrate;

                if (!int.TryParse(entryParts[1], out spawnrate))
                {
                    continue;
                }

                if (System.Enum.TryParse<LevelTypes>(name, true, out LevelTypes levelType))
                {
                    spawnRateByLevelType[levelType] = spawnrate;
                    Plugin.Logger.LogInfo($"Registered spawn rate for level type {levelType} to {spawnrate}");
                }
                else
                {
                    spawnRateByCustomLevelType[name] = spawnrate;
                    Plugin.Logger.LogInfo($"Registered spawn rate for custom level type {name} to {spawnrate}");
                }
            }
            return (spawnRateByLevelType, spawnRateByCustomLevelType);
        }
#

now its nothing pretty

#

and this only works for LL

#

but yeah

blissful snow
#

ty

worn hazel
#

ignore that im using it for just scrap in this example

#

but this is how you would use it

#

where configMoonRarity is the config's string

blissful snow
#

ty, ima slap it onto my ghost lol

worn hazel
#
    private void RegisterEnemyWithConfig(bool enabled, string configMoonRarity, EnemyType enemy, TerminalNode terminalNode, TerminalKeyword terminalKeyword) {
        if (enabled) { 
            (Dictionary<LevelTypes, int> spawnRateByLevelType, Dictionary<string, int> spawnRateByCustomLevelType) = ConfigParsing(configMoonRarity);
            RegisterEnemy(enemy, spawnRateByLevelType, spawnRateByCustomLevelType, terminalNode, terminalKeyword);
            return;
        } else {
            RegisterEnemy(enemy, 0, LevelTypes.All, terminalNode, terminalKeyword);
            return;
  }
``` i also had this function to make t hings just a tiny bit easier for me lmao cuz im lazy
alpine silo
#

thank you, Ill test that out with my mod

worn hazel
#

good luck

#

and let me know when you switch to LLL, i made different functions xd

alpine silo
alpine silo
#

is there some sort of conflict or competition between ll and lll?

worn hazel
#

whats up?

#

wdym

alpine silo
#

I thought lll only supports moons

worn hazel
#

LLL supports interiors, moons, enemies, scraps, items

alpine silo
#

I have seen many people say they switched to lll

worn hazel
#

yeah LLL is maintained

#

whilst LL is not

alpine silo
#

ohh

#

but ll is still compatible with v50 right?

worn hazel
#

i think so

alpine silo
#

okay

#

are there many differences between ll and lll?

#

I might break my mod trying to port :p

worn hazel
#

nah porting from LL to LLL is pretty easy

#

they both use similar systems cuz vanilla systems

alpine silo
#

is there a guide on how to port?

#

sorry I just wanna avoid utterly destroying the mod :p

worn hazel
#

I'll make one tmrw or today, im just busy with rewriting locker's AI rn

alpine silo
#

okay

#

all good

worn hazel
#

nah thats reasonable lol

alpine silo
#

you are maintaining giant specimens and locker and lll?

#

holy moly

worn hazel
#

im not maintain LLL lmfao

alpine silo
#

oh

#

still

worn hazel
#

im maintaing giant specimens, helping out with locker since guy is busy

alpine silo
#

mad respect I love enemy mods

worn hazel
#

making viral company, code: rebirth, maintaining immersive scrap, already finished with hotbarrd

#

not sure what im missing but im probably missing something

alpine silo
#

damn

#

thats a lot

worn hazel
worn hazel
# alpine silo thats a lot

ye, im also making tutorials on enemies, scrap, items and writing notes for when i make the LLL lethal wiki docs

alpine silo
#

oh I probably won't be able to help much sorry, my modding knowledge is still

#

pretty bad yeah

worn hazel
#

thats completely fine tbh, you've managed to make something which is already good enough :3

alpine silo
#

wouldnt have been able to make slenderman without the guides!

worn hazel
#

the guide you followed probably didnt have my changes back then xd, but you're welcome :3

#

anyway imma probably afk for a bit, this locker code doesnt look the greatest 😭

alpine silo
#

damn

#

good luck :P

worn hazel
#

ty

blissful snow
#

idk if im doing something wrong cuz the custom stuff jus doesn't work. The console does say that the ghost was registered in the levels but it jus isnt: [Debug :LCM_HauntedHarpist|1.3.12] Registered spawn rate for custom level type Experimentation to 999 [Debug :LCM_HauntedHarpist|1.3.12] Registered spawn rate for custom level type Titan to 999 and then when I go to titan this is the spawning log thingy:

#
[Info   : Unity Log] enemy #0 probability - 16
[Info   : Unity Log] Setting enemy numberspawned to 0 to start: Lasso
[Info   : Unity Log] enemy #1 probability - 0
[Info   : Unity Log] Enemy 1 could not be spawned. current power count is 0; max is 18.
[Info   : Unity Log] Setting enemy numberspawned to 0 to start: Bunker Spider
[Info   : Unity Log] enemy #2 probability - 59
[Info   : Unity Log] Setting enemy numberspawned to 0 to start: Centipede
[Info   : Unity Log] enemy #3 probability - 54
[Info   : Unity Log] Setting enemy numberspawned to 0 to start: Blob
[Info   : Unity Log] enemy #4 probability - 19
#
[Info   : Unity Log] enemy #5 probability - 62
[Info   : Unity Log] Setting enemy numberspawned to 0 to start: Spring
[Info   : Unity Log] enemy #6 probability - 59
[Info   : Unity Log] Setting enemy numberspawned to 0 to start: Crawler
[Info   : Unity Log] enemy #7 probability - 53
[Info   : Unity Log] Setting enemy numberspawned to 0 to start: Hoarding bug
[Info   : Unity Log] enemy #8 probability - 38
[Info   : Unity Log] Setting enemy numberspawned to 0 to start: Jester
[Info   : Unity Log] enemy #9 probability - 62
[Info   : Unity Log] Setting enemy numberspawned to 0 to start: Puffer
[Info   : Unity Log] enemy #10 probability - 16
[Info   : Unity Log] Setting enemy numberspawned to 0 to start: Nutcracker
[Info   : Unity Log] enemy #11 probability - 71
[Info   : Unity Log] Setting enemy numberspawned to 0 to start: Masked
[Info   : Unity Log] enemy #12 probability - 31
[Info   : Unity Log] Setting enemy numberspawned to 0 to start: Dalek
[Info   : Unity Log] enemy #13 probability - 0
[Info   : Unity Log] Setting enemy numberspawned to 0 to start: VileVendingMachine
[Info   : Unity Log] enemy #14 probability - 20
[Info   : Unity Log] Setting enemy numberspawned to 0 to start: Butler
[Info   : Unity Log] enemy #15 probability - 0
[Info   : Unity Log] Setting enemy numberspawned to 0 to start: Butler Bees
[Info   : Unity Log] enemy #16 probability - 0
[Info   : Unity Log] Setting enemy numberspawned to 0 to start: Red pill
[Info   : Unity Log] enemy #17 probability - 0
[Info   : Unity Log] Enemy 17 could not be spawned. current power count is 0; max is 18.
[Info   : Unity Log] ADDING ENEMY #3: Centipede
[Info   : Unity Log] Adding 1 to power level, enemy: Centipede```
#

I use the register thing: RegisterEnemyWithConfig(true, "Experimentation@999,Titan@999", _harpGhostEnemyType, harpGhostTerminalNode, harpGhostTerminalKeyword);

worn hazel
#

I forgot to mention

blissful snow
#

oh lol

worn hazel
#

In LL, the vanilla names must be followed by "Level"

#

TitanLevel etc

blissful snow
#

true

worn hazel
#

It'll be fine for custom levels and artifice and adamance and embeion

#

Embrion*

#

Since they're not technically vanilla in LL

blissful snow
#

oh oke

#

ill try it now ty

scenic scarab
worn hazel
#

Learned the annoying way where my mod didn't work for a couple days

scenic scarab
#

For debugging LL, set extended logging to true so you see where stuff gets added to

worn hazel
scenic scarab
#

why would it break with vanilla but not custom moons?

#

or is vanilla "LL knows this moon exists in vanilla"?

worn hazel
#

It might just be the way I parse the function actually, but then it'd recognise Experimentation as custom

#

:3 yeah probably on my side but tbf it's a stupid problem

#

I'm not sure actually

scenic scarab
#

hmm, dunno

granite sundial
#

I've been very absent from LC modding. What did Zeekerss change in terms of enemies?

worn hazel
granite sundial
#

Oke, thanks!

merry crow
#

LMAO I'm stuck on the first step, what package do I need to install for contextlib

worn hazel
merry crow
#

same error

worn hazel
#

Hmmm

#

You should only be needing python installed

merry crow
#

its importing before line 6

worn hazel
#

Is it the fact that yoy changed the folders name?

#

Try doing it before you do stuff like editing the name of the folders etc

merry crow
#

I didnt change anything, its straight extracted from github.
I now tried to modify the code to import the entire contextlib, and now it kinda runs, but crashes on "chdir", it seems can't reference contextlib.chdir

#

im running 3.10 btw

#

this is after I imported the entire contextlib

scenic scarab
#

@merry crow you could try installing the latest python version, and if nothing works, you can manually do the steps instead (steps are explained in README.md)

merry crow
alpine silo
#

I have put both this and the ConfigParsing part in my Awake method

worn hazel
#

uhh these are methods, you wouldn't put em in awake

#

you'd use em in awake, but not put em in awake

worn hazel
alpine silo
#

oo nvm stupid me put the method outside of the class

#

seems to work just fine now, thank you!!

blissful snow
# worn hazel In LL, the vanilla names must be followed by "Level"

Sry for ping, I've tried doing this too but it still didnt work. I tried titan and adamance several times and the ghost doesn't get mentioned in the the spawning logs. The code to register them did work though: [Debug :LCM_HauntedHarpist|1.3.12] Registered spawn rate for level type Modded to 100 [Debug :LCM_HauntedHarpist|1.3.12] Registered spawn rate for level type ExperimentationLevel to 50 [Debug :LCM_HauntedHarpist|1.3.12] Registered spawn rate for level type AssuranceLevel to 100 [Debug :LCM_HauntedHarpist|1.3.12] Registered spawn rate for level type VowLevel to 200 [Debug :LCM_HauntedHarpist|1.3.12] Registered spawn rate for level type OffenseLevel to 100 [Debug :LCM_HauntedHarpist|1.3.12] Registered spawn rate for level type MarchLevel to 200 [Debug :LCM_HauntedHarpist|1.3.12] Registered spawn rate for level type RendLevel to 200 [Debug :LCM_HauntedHarpist|1.3.12] Registered spawn rate for level type DineLevel to 100 [Debug :LCM_HauntedHarpist|1.3.12] Registered spawn rate for level type TitanLevel to 999 [Debug :LCM_HauntedHarpist|1.3.12] Registered spawn rate for custom level type Adamance to 100 [Debug :LCM_HauntedHarpist|1.3.12] Registered spawn rate for custom level type Embrion to 150 [Debug :LCM_HauntedHarpist|1.3.12] Registered spawn rate for custom level type Artifice to 200 [Debug :LCM_HauntedHarpist|1.3.12] Registered spawn rate for custom level type Auralis to 150

worn hazel
#

can i see your spawning logs and what u do to get em? cuz this looks like it works for me owo_think

blissful snow
worn hazel
#

hmm not sure why it doesnt show, it works for me, can you try seeing the spawn weight by adding code that outputs your enemy's spawn weight when u manually spawn it in and spawn it in on adamance or titan?

#

thats how i check

blissful snow
#

ye sure, gimme a sec

worn hazel
blissful snow
#

ty

blissful snow
#

does anyone know the purpose of the variable public float mostOptimalDistance in the EnemyAI class? From what I can see is that its used in a few methods, but before its used he resets it to some big value, which ultimately defeats the point of it being a class variable and not a local one?

scenic scarab
#

yeah I dunno really about zeekerss code lol

blissful snow
#

oh ok, just checking im not going insane lol

scenic scarab
#

Btw for anyone interested, I'm currently working on a branch of LC-ExampleEnemy which can be live reloaded so you don't need to restart the game to see your changes

I got it already working somewhat, but I had to disable networking functionality, which is fine for solo testing, but otherwise looks promising

blissful snow
#

oo that looks cool

#

do you think u would able to do it with networking functionality in the future? Or is that impossible lol

scenic scarab
# blissful snow do you think u would able to do it with networking functionality in the future? ...

It's definitely possible, but I don't know enough about Unity NGO to know what to do. It's possible that all I'd need to do is remove the enemy prefab from being a registered network prefabs list.

However, the current way live reloading works isn't really optimal since you can't attach custom scripts in unity because they lose their references due to how Script Engine works, and the enemy prefab must be deleted and readded every time the plugin is reloaded, so I might come up with a solution that fixes these issues.

And that solution would be to instead of reloading the whole assembly, we just detour from the original methods to the methods in the new reloaded assembly (so we still reload the assembly, but we keep the old assembly there so anything that needs it has it and will be rerouted to our new assembly). Then scripts in asset bundles will get their references, and we don't need to completely clean up everything we did (like destroying our old enemy gameobjects)

#

So, that's gonna be the next project I'll probably do, which is a fork of Script Engine that does that detouring stuff

#

Since reloading plugins is super useful, but Script Engine definitely has issues, like I had to combine two assemblies into one as it can't really handle hot reloading dependencies

blissful snow
#

oh ok fair enough