qwbarch / mirage

A mod that mimics player voices for Unity games
https://thunderstore.io/c/lethal-company/p/qwbarch/Mirage
Other
13 stars 3 forks source link

Atlas Abyss outside mimics glitch and then inside mimics glitch? #28

Closed LukeAChilds closed 9 months ago

LukeAChilds commented 9 months ago

Playing with a friend on Atlas Abyss there was one working mimic day 1 we went we could hear it mimic and move. Then outside on a foggy day I saw a mask stationary and it could not be killed or stunned.

Log

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
EnemyAI.Update () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0000)
MaskedPlayerEnemy.Update () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0000)

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
EnemyAI.Update () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0000)
MaskedPlayerEnemy.Update () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0000)

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
EnemyAI.Update () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0000)
MaskedPlayerEnemy.Update () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0000)

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
EnemyAI.Update () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0000)
MaskedPlayerEnemy.Update () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0000)

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
EnemyAI.Update () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0000)
MaskedPlayerEnemy.Update () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0000)

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
EnemyAI.Update () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0000)
MaskedPlayerEnemy.Update () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0000)

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
EnemyAI.Update () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0000)
MaskedPlayerEnemy.Update () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0000)

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
EnemyAI.Update () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0000)
MaskedPlayerEnemy.Update () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0000)

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
EnemyAI.Update () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0000)
MaskedPlayerEnemy.Update () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0000)

This was spammed into the log.

Mod List

This is the mod list I had

I had the Castle interior from scoopys mod only active on Atlas Abyss and was where we heard the working one.

Configs

## Settings file was created by plugin qwbarch.Mirage v1.0.11
## Plugin GUID: Mirage

[Credits]

## Whether the credits penalty should be applied during the end of a round.
# Setting type: Boolean
# Default value: false
EnablePenalty = true

[Imitate player]

## The minimum amount of time in between voice playbacks (in milliseconds).
## This only applies for masked enemies.
# Setting type: Int32
# Default value: 7000
MinimumDelay = 10000

## The maximum amount of time in between voice playbacks (in milliseconds).
## This only applies for masked enemies.
# Setting type: Int32
# Default value: 12000
MaximumDelay = 22000

## The minimum amount of time in between voice playbacks (in milliseconds).
## This only applies for non-masked enemies.
# Setting type: Int32
# Default value: 20000
MinimumDelayNonMasked = 20000

## The maximum amount of time in between voice playbacks (in milliseconds).
## This only applies for non-masked enemies.
# Setting type: Int32
# Default value: 40000
MaximumDelayNonMasked = 40000

## Set to true to have recordings deleted in between rounds. Set to false to delete in between games.
## Note: This setting is synced to all clients.
# Setting type: Boolean
# Default value: true
DeleteRecordingsPerRound = true

## Set to true to never delete recordings (ignores the option set by DeleteRecordingsPerRound).
## Note: This setting is not synced to other clients.
# Setting type: Boolean
# Default value: false
IgnoreRecordingsDeletion = false

## Whether or not mimicking voices should be muted if it's the local player's voice.
# Setting type: Boolean
# Default value: false
MuteLocalPlayerVoice = false

## Whether or not the masked enemy should mimic voices.
# Setting type: Boolean
# Default value: true
EnableMaskedEnemy = true

## Whether or not the baboon hawk should mimic voices.
# Setting type: Boolean
# Default value: false
EnableBaboonHawk = false

## Whether or not the bracken should mimic voices.
# Setting type: Boolean
# Default value: false
EnableBracken = false

## Whether or not the spider should mimic voices.
# Setting type: Boolean
# Default value: false
EnableSpider = false

## Whether or not bees should mimic voices.
# Setting type: Boolean
# Default value: false
EnableBees = false

## Whether or not locust swarms should mimic voices.
# Setting type: Boolean
# Default value: false
EnableLocustSwarm = false

## Whether or not the coil-head should mimic voices.
# Setting type: Boolean
# Default value: false
EnableCoilHead = false

## Whether or not the earth leviathan should mimic voices.
# Setting type: Boolean
# Default value: false
EnableEarthLeviathan = false

## Whether or not the eyeless dog should mimic voices.
# Setting type: Boolean
# Default value: false
EnableEyelessDog = false

## Whether or not the forest keeper should mimic voices.
# Setting type: Boolean
# Default value: false
EnableForestKeeper = false

## Whether or not the ghost girl should mimic voices.
# Setting type: Boolean
# Default value: false
EnableGhostgirl = false

## Whether or not the hoarding bug should mimic voices.
# Setting type: Boolean
# Default value: false
EnableHoardingBug = false

## Whether or not the hygrodere should mimic voices.
# Setting type: Boolean
# Default value: false
EnableHygrodere = false

## Whether or not the jester should mimic voices.
# Setting type: Boolean
# Default value: false
EnableJester = false

## Whether or not the manticoil should mimic voices.
# Setting type: Boolean
# Default value: false
EnableManticoil = false

## Whether or not the nutcracker should mimic voices.
# Setting type: Boolean
# Default value: false
EnableNutcracker = false

## Whether or not the snare flea should mimic voices.
# Setting type: Boolean
# Default value: false
EnableSnareFlea = false

## Whether or not the spore lizard should mimic voices.
# Setting type: Boolean
# Default value: false
EnableSporeLizard = false

## Whether or not the thumper should mimic voices.
# Setting type: Boolean
# Default value: false
EnableThumper = false

## Whether or not all modded enemies should mimic voices.
# Setting type: Boolean
# Default value: false
EnableModdedEnemies = false

[MaskedPlayerEnemy]

## Whether or not masked enemies should naturally spawn. Set this to false if you only want to spawn on player death. Set this to true if you want the vanilla spawning behaviour.
# Setting type: Boolean
# Default value: false
EnableNaturalSpawn = true

## The percent chance of a masked enemy spawning on player death (like a zombie). Must have a value of 0-100.
# Setting type: Int32
# Default value: 100
SpawnOnPlayerDeath = 0

## If set to true, SpawnOnPlayerDeath will only succeed if the dying player is alone.
# Setting type: Boolean
# Default value: false
SpawnOnlyWhenPlayerAlone = false

## Whether or not a masked enemy should have its mask texture
# Setting type: Boolean
# Default value: false
EnableMask = false

## Whether or not the arms out animation should be used.
# Setting type: Boolean
# Default value: false
EnableArmsOut = true

End of Day log

At the end of play the spam ended and this was shown

[Info   : Unity Log] Despawning props and enemies #2
[Info   : Unity Log] Despawning props and enemies #3
[Info   : Unity Log] Enemies on map: 13
[Info   : Unity Log] Despawning enemy: MaskedPlayerEnemy(Clone)
[Info   : Unity Log] Despawning enemy: MaskedPlayerEnemy(Clone)
[Info   : Unity Log] Despawning enemy: MouthDog(Clone)
[Info   : Unity Log] Despawning enemy: MaskedPlayerEnemy(Clone)
[Info   : Unity Log] Despawning enemy: MaskedPlayerEnemy(Clone)
[Info   : Unity Log] Despawning enemy: MaskedPlayerEnemy(Clone)
[Info   : Unity Log] Despawning enemy: MaskedPlayerEnemy(Clone)
[Info   : Unity Log] Despawning enemy: MaskedPlayerEnemy(Clone)
[Info   : Unity Log] Despawning enemy: Crawler(Clone)
[Info   : Unity Log] Despawning enemy: MaskedPlayerEnemy(Clone)
[Info   : Unity Log] Despawning enemy: Centipede(Clone)
[Info   : Unity Log] Despawning enemy: Flowerman(Clone)
[Info   : Unity Log] Despawning enemy: HoarderBug(Clone)
[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
EnemyAI.SubtractFromPowerLevel () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0010)
EnemyAI.OnDestroy () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0029)
(wrapper dynamic-method) MaskedPlayerEnemy.DMD<MaskedPlayerEnemy::OnDestroy>(MaskedPlayerEnemy)

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
EnemyAI.SubtractFromPowerLevel () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0010)
EnemyAI.OnDestroy () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0029)
(wrapper dynamic-method) MaskedPlayerEnemy.DMD<MaskedPlayerEnemy::OnDestroy>(MaskedPlayerEnemy)

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
EnemyAI.SubtractFromPowerLevel () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0010)
EnemyAI.OnDestroy () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0029)
(wrapper dynamic-method) MaskedPlayerEnemy.DMD<MaskedPlayerEnemy::OnDestroy>(MaskedPlayerEnemy)

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
EnemyAI.SubtractFromPowerLevel () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0010)
EnemyAI.OnDestroy () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0029)
(wrapper dynamic-method) MaskedPlayerEnemy.DMD<MaskedPlayerEnemy::OnDestroy>(MaskedPlayerEnemy)

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
EnemyAI.SubtractFromPowerLevel () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0010)
EnemyAI.OnDestroy () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0029)
(wrapper dynamic-method) MaskedPlayerEnemy.DMD<MaskedPlayerEnemy::OnDestroy>(MaskedPlayerEnemy)

[Info   : Unity Log] masked enemy inSpecialAnimationWithPlayer is null
[Info   : Unity Log] masked enemy inSpecialAnimationWithPlayer is null
[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
EnemyAI.SubtractFromPowerLevel () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0010)
EnemyAI.OnDestroy () (at <af9b1eec498a45aebd42601d6ab85015>:IL_0029)
(wrapper dynamic-method) MaskedPlayerEnemy.DMD<MaskedPlayerEnemy::OnDestroy>(MaskedPlayerEnemy)

Images

20240213003106_1

No player was orange in this lobby

qwbarch commented 9 months ago

Mirage v1.0.11 doesn't patch MaskedPlayerEnemy#Update so it sounds more like another mod is causing them to fail to update.
Sorry I couldn't help much, debugging modpacks takes too much time and I can only try to give my best guess from what the logs look like

LukeAChilds commented 9 months ago

Interesting I'm most confused by the mid play breakdown after changing moons.

Suspect some mod conflict or the way audio changes after moon swapping. I'll look into it more and mark it here if I locate the issue more directly

LukeAChilds commented 9 months ago

Found the issue. It seems on Atlas Abyss it has two types of masked. The correct type inside. And then an incorrect type that spawns outside. The outside spawning ones don't correctly become Mirage Masked and instead spawn in as these broken masked that are always orange, and have their masks still. They can only be seen by the host and do not get cleared up from moon to moon.

20240214235701_1

Using control company you can forcefully spawn in the variants and see how it spams the log once generated. These fake masks will also fill up the powercap still and can never be cleared away it seems.

20240215000533_1

qwbarch commented 9 months ago

I'll try to look into a fix sometime. Thanks for the detailed explanation!

qwbarch commented 9 months ago

@LukeAChilds Actually could you bring this up with the Atlas Abyss author as well? I wonder what's the reason for the "incorrect type" of masked

LukeAChilds commented 9 months ago

Issue may be related to the map or lethal level loader it seems as without Mirage it is consistent as of the latest updates. Poor timing. Didn't think to test without it installed. Issue shouldn't be from Mirage

The spawn logic for Atlas Abyss has two entries for Masks which may influence this bug.

LukeAChilds commented 9 months ago

Interestingly. Removing the extra mask and the outside mask from the level causes the issue to be resolved. There are still two entries for ControlCompany but both work.

However? Using

Seems to cause a unique glitch where Mask can not pathfind correctly? They get stuck trying to pathfind when inside the facility and also get stuck in a loop of stuttering essentially. A mask that is outside and goes in does not have this problem and can pathfind normally. Naturally spawned masks also have this issue. Using any combination except for all three does not have this problem.

Upon seeing a player the Mask can now pathfind.