makamys / DMod

Backport of foxes and bundles to 1.7.10
The Unlicense
9 stars 5 forks source link

Foxes overspawning (not despawning?) with RTG+JAS #7

Open AstroTibs opened 1 year ago

AstroTibs commented 1 year ago

Full disclosure: I'm using RTG and Just Another Spawner, which obviously changes the spawning logic.

However, unlike other mobs, foxes seem to just accumulate nonstop in their home biomes.

JAS is smart enough to replicate default spawning behavior so that you can modify it to your liking, so there's probably something going on with fox despawning that is not working properly. Maybe it's something to do with despawn radius?

Sights like this are very common, and only with foxes.

makamys commented 1 year ago

This might be an issue with your JAS config. Have you tested with the default config? Also, I'm not sure why you mention despawning, since in vanilla, animals never despawn (maybe this is also related to your non-default config?)

AstroTibs commented 1 year ago

I don't think so. I previously haven't done anything special for JAS except for MoCreatures. I let JAS pre-populate with what I set as the defaults.

My EntityHandlers/dmod.cfg is:

{
  "FILE_VERSION": "3.0",
  "LIVING_HANDLERS": {
    "dmod.fox": {
      "Type-Enabled": "OPENSKY-true",
      "Contents": [
        "dmod.fox"
      ]
    }
  }
}

My SpawnListEntries/dmod.cfg is currently (for example):

"Weight-PassivePackMax-ChunkPackMin-ChunkPackMax": "1-0-0-1"

where previously, it was:

"Weight-PassivePackMax-ChunkPackMin-ChunkPackMax": "1-2-1-2"

Where OPENSKY is:

"OPENSKY": {
  "Spawn Rate": 1,
  "Spawn Cap": 10,
  "Chunk Spawn Chance": 0.0,
  "Spawn Medium": "air",
  "Iterations Per Chunk": 3,
  "Iterations Per Pack": 4,
  "Spawn Tag": "!solidside(1,{0,0,0},{0,-1,0})||liquid({0,0,0},{0,0,0})||normal({0,0,0},{0,0,0})||normal({0,0,0},{0,1,0})||!opaque({0,0,0},{0,-1,0})||!sky()",
  "Default Biome Cap": -1,
  "Biome Caps": {}
},

I have not confirmed whether this change has eased up the spawning—I have just discovered the command to selectively kill entities.

However, the unassuming default value of 1-2-1-2 producing what you're seeing is concerning.

makamys commented 1 year ago

Hm. Is the issue present in the last Galaxy Odyssey release? I'll have a go at reproducing it later.

AstroTibs commented 1 year ago

I made a mistake. The default values are actually: "Weight-PassivePackMax-ChunkPackMin-ChunkPackMax": "8-4-2-4" At some point I reduced them to 1-2-1-2, and at another point I further reduced to 1-0-0-1.

The massive reduction to 1-2-1-2 was done in version 1.22.205.23 of Galaxy Odyssey. The huge population of foxes might have been generated before then—as we speak, I am flying around and mass deleting them to see if those huge populations were simply the holdovers from default spawn values. I'm currently in a forest that I'm pretty sure was only visited once, briefly, and I see maybe 10 foxes. So that may not be a good sign.

I'm not sure how to properly test, short of living in a world nearby a relevant forest for a long time, and then seeing a load of foxes.

makamys commented 1 year ago

I just remembered something. You once had a similar issue, and it turned out the problematic mobs weren't actually foxes, they were just using the fox model. It would be worth checking if the same isn't the case here.

makamys commented 1 year ago

Actually, I looked at Galaxy Odyssey 1.22.201.17's config, and I think I see the issue. It's caused by the OPENSKY creature type (which is only used by foxes). The spawn rate is set to 1. For reference, MONSTERs also have a spawn rate of 1, and CREATUREs have a spawn rate of 400. Which suggests the value is reciprocal (lower is more common).

Foxes use the CREATURE type in a fresh instance with JAS+DMod, or if I regenerate the config in GO, so it seems to be something you changed.

AstroTibs commented 1 year ago

That is a great memory. In that case, the issue was entity registry from Immersive Cavegen specifically.

Nice catch with spawn rates. I will give it a look in a week when we're back from vacation.