HomelessGinger / MaskedEnemyOverhaul

2 stars 3 forks source link

Breaking Enemy Spawn Rates #3

Open Adam759 opened 10 months ago

Adam759 commented 10 months ago

On v48, latest version of bepinex. It seems to be breaking the enemy spawn rate system. With the mod enabled, the following shows up in console:

image

And the spawn rates do not display. No enemies will spawn in the map throughout the course of the day.

Lallering commented 10 months ago

is this only with custom spawn? if you use vanilla spawns it keeps sending errors?

IanBarthel commented 10 months ago

are you running other mods that may conflict? i just tested with vanilla spawns, default mod spawns, and custom mod spawns and had enemies every time with no errors

jakeb072001 commented 10 months ago

I have this same issue, no enemies spawn at all, I removed just this mod and the issue went away.

I have a lot of mods but while trying to find the culprit I removed every mod one at a time so im a bit doubtful it's a conflict (though I stopped removing mods after finding this one was the cause so I guess it is possible).

Could maybe be something with the config, I may try regenerate the config and see if that does anything otherwise I'll install one mod at a time while keeping this mod in and see if I can find a conflict.

jakeb072001 commented 10 months ago

I've tried just about everything, this mod by itself seems to work fine but if I add other mods then enemies spawn incredibly rarely. I've noticed that turrets and landmines become incredibly common though with this mod on, which is odd.

ShallCanyon commented 10 months ago

Same issue, I tried to switch back to the modpack version I played normally days ago(v45), with mods updated(v48), enemies don't spawn. No other mod that changes spawn rate installed.

kuba44 commented 10 months ago

The latest update still didn't fix the issue for me, no enemies spawning.

jakeb072001 commented 10 months ago

ok, don't know if its something I changed or the latest update but setting vanilla spawns to true now fixes this (as far as I can tell). I would like to have masked spawn on every moon but for now I'll just leave this option on till its fixed.

Edit: previously when I said that enemies would very rarely spawn that's because I would only ever see a max of 2 enemies, after looking more at the config I've noticed that there's an option for max number of masked that's set to 2, could that be applying to all enemies?

John-Chiu commented 10 months ago

ok, don't know if its something I changed or the latest update but setting vanilla spawns to true now fixes this (as far as I can tell). I would like to have masked spawn on every moon but for now I'll just leave this option on till its fixed.

Edit: previously when I said that enemies would very rarely spawn that's because I would only ever see a max of 2 enemies, after looking more at the config I've noticed that there's an option for max number of masked that's set to 2, could that be applying to all enemies?

Thanks for your info. Setting vanilla spawns to true solve the problem. Enemy can spawn now.

IanBarthel commented 10 months ago

if no enemies spawn unless vanilla spawn is true, it is 100% a mod conflict. mod conflicts can happen even if the mod does not directly affect spawns. It also is common to happen with mods that add moons, and the LethalExpansion mod (which causes a large number of issues with a large number of mods)

John-Chiu commented 10 months ago

In my modpack, remove mod "LethalAutocomplete" then MaskedEnemyOverhaul works correctly even vanilla spawns is set to false. But I can't reproduce this issue with modpack contains only LethalAutocomplete and MaskedEnemyOverhaul. It is weird.

maikgr commented 10 months ago

Listing conflicting mods that I found:

Removing these two mods fixes the breaking spawn issue with Use Vanilla Spawn = false

creidhne-a16i commented 10 months ago

I had some weird issue just now. basically no matter what I do on rend/dine/titan there would be tons of zombies spawning from the first minute despite zombie apocalypse being disabled and rates adjusted to negative numbers. Just tons of them. Rolled back to older version I had lying around (v2.4.1) and the issues went away entirely.

IanBarthel commented 10 months ago

I had some weird issue just now. basically no matter what I do on rend/dine/titan there would be tons of zombies spawning from the first minute despite zombie apocalypse being disabled and rates adjusted to negative numbers. Just tons of them. Rolled back to older version I had lying around (v2.4.1) and the issues went away entirely.

make sure spawn enemies outside is turned off if there are too many

creidhne-a16i commented 10 months ago

I want them to spawn outside. But not in the L2D4 "sudden horde" amounts, and adjusting the spawn rate did nothing.

IanBarthel commented 10 months ago

I want them to spawn outside. But not in the L2D4 "sudden horde" amounts, and adjusting the spawn rate did nothing.

the issue is beehives dont spawn on those maps, so it can only spawn masked out there, and outside enemies seem to ignore the max enemy count

jakeb072001 commented 10 months ago

Just an update on this, setting vanilla spawns to false works now (other enemies spawn). However, I haven't seen a masked enemy since I first had this issue (I have played probably close to 20 hours since then). I'm going to try to use something like LethalQuantities to manually fix the spawning but we'll see how it goes.

jakeb072001 commented 10 months ago

Another update, I got a masked to spawn naturally. I set the max allowed masked to 10 and I got one to spawn. I set this using LethalQuantities so I don't know if it will work the same using this mods masked limit config option but at least I know how to get every enemy spawning correctly again.

Catpyre commented 10 months ago

I dont use this mod despite how good it is because of the way ti prevents other enemies from spawning. Even with the vanilla spawn rate enabled and with it apparently being incompat with other mods? Im just wondering if this will ever be a fixed issue because even with trying to force the game to spawn enemies with other mods nothing at all will spawn.

Capital-Asterisk commented 10 months ago

I've encountered this issue a few times while playing with a group with LethalCompany_InputUtils installed (it conflicts as maikgr pointed out). A friend has pointed out that power levels are ignored. We would get spawns like 3 giants, 5 baboons, 5 dogs, etc... which I'm told never happens in the vanilla game.

So I decided to investigate myself, built a debug configured dll, and continued playing with my group for the past week. Masked spawn on every moon as expected, but the crazy spawns will still happen occasionally. Looking through logs, the NullReferenceException on the first comment never gets triggered.

Capital-Asterisk commented 9 months ago

POSSIBLE CAUSE OF ISSUE

Yes, I think I solved it. Note these lines in MaskedSpawnSettings.cs:133

___currentLevel.maxEnemyPowerCount += maskedEnemy.enemyType.MaxCount;
___currentLevel.maxDaytimeEnemyPowerCount += maskedEnemy.enemyType.MaxCount;
___currentLevel.maxOutsideEnemyPowerCount += maskedEnemy.enemyType.MaxCount;

The power counts increase, but never decrease. There might be no mod conflict. By simply landing on the same moon without resetting the game, the power levels steadily increase with no limits.

I added some prints for power levels, this is what is logged after landing twice:

[Info   :MaskedEnemyRework] Starting Round Manager
[Info   :MaskedEnemyRework] no zombies :(
[Info   :MaskedEnemyRework] Power levels before:
* maxEnemyPowerCount: 15
* maxDaytimeEnemyPowerCount: 20
* maxOutsideEnemyPowerCount: 6
[Info   :MaskedEnemyRework] Power levels after:
* maxEnemyPowerCount: 17
* maxDaytimeEnemyPowerCount: 22
* maxOutsideEnemyPowerCount: 8
...
...
...
[Info   :MaskedEnemyRework] Starting Round Manager
[Info   :MaskedEnemyRework] no zombies :(
[Info   :MaskedEnemyRework] Power levels before:
* maxEnemyPowerCount: 17
* maxDaytimeEnemyPowerCount: 22
* maxOutsideEnemyPowerCount: 8
[Info   :MaskedEnemyRework] Power levels after:
* maxEnemyPowerCount: 19
* maxDaytimeEnemyPowerCount: 24
* maxOutsideEnemyPowerCount: 10

Solution

I'll get a pull request up. (also, it doesn't seem like the github repo is in sync with what was uploaded to Thunderstore? MaskedEnemyRework.External_Classes is missing)