winstxnhdw / lc-hax

A powerful, feature-rich and highly performant internal cheat for the co-op indie horror video game, Lethal Company.
77 stars 25 forks source link

Enemy improvements #415

Closed xAstroBoy closed 4 months ago

xAstroBoy commented 4 months ago

Found a way to : Force Coil Head to move/stop under possession using a ServerRPC

Make jester stay open under possession even if there's nobody inside the facility. Reliably calm Hoarding Bug by setting it's state back to idle when angry and no items are nearby. Fix the nutcracker going to sentry unwantedly.

Restored OnDeath event (idk why you removed it in PossessionMod) along with the unpossession ability since there's no reason to control a enemy when is supposed to no longer work. Check for host for despawning a enemy, it throws a error otherwise and breaks it.

Made PossessionMod a bit more freely, give enemies ability to interact even under AI control with doors . Removed a lot of redundant controller methods , and just use the controller's events.

winstxnhdw commented 4 months ago

Where’s OnEnemyDeath?

xAstroBoy commented 4 months ago

Where’s OnEnemyDeath?

is OnDeath(Enemy enemy) in controllers, i typoed it. also seems the github bot today decided to toss a bunch of merge conflicts for no reason twice?

winstxnhdw commented 4 months ago

The bot now squashes formatting changes into the previous commit.

winstxnhdw commented 4 months ago

Diff shows OnDeath was never removed.

xAstroBoy commented 4 months ago

Diff shows OnDeath was never removed.

in PossessionMod the OnDeath Event was never being executed because the check got removed during my commits and i never realized it was gone, until i saw the code once more to patch a couple enemies up.

winstxnhdw commented 4 months ago

I see, must’ve removed it by mistake. Didn’t remember seeing it at all.

xAstroBoy commented 4 months ago

I see, must’ve removed it by mistake. Didn’t remember seeing it at all.

yup, as well i figured how to make coilhead move even server side with it's respective animations than a idle coilhead moving on other clients.

xAstroBoy commented 4 months ago

i cannot figure why is failing to build, the class is still there...

winstxnhdw commented 4 months ago

You renamed it to CoilHeadEnemyController. It’s supposed to be CoilHeadController.

xAstroBoy commented 4 months ago

You renamed it to CoilHeadEnemyController. It’s supposed to be CoilHeadController.

yeah i reverted the renaming.

xAstroBoy commented 4 months ago

@winstxnhdw all good.

xAstroBoy commented 4 months ago

@winstxnhdw exposing isAIControlled with Enemy.Update will make sure the Nutcracker can go sentry if we are possessing it and give the AI control.

winstxnhdw commented 4 months ago

@winstxnhdw exposing isAIControlled with Enemy.Update will make sure the Nutcracker can go sentry if we are possessing it and give the AI control.

Why not just not Update at all if AI is given control?

xAstroBoy commented 4 months ago

@winstxnhdw exposing isAIControlled with Enemy.Update will make sure the Nutcracker can go sentry if we are possessing it and give the AI control.

Why not just not Update at all if AI is given control?

Take example from the find i did in jester behaviour, usually jester cannot pop out if nobody is inside, with that small update patch i can force the jester to be open all times , even under AI control and even if people are outside.

is a way to unlock enemies's behaviour, we can disable something that just forces that behaviour, but we can always force a variable that makes the AI itself go into a disabled behaviour when is meant to not be if a certain criteria is met.