Do not store mobs that cannot be tamed AND fly #4142

Open
opened 2023-04-08 19:11:30 +00:00 by AliasAlreadyTaken · 10 comments

This issue deals with seagull, ghost and bat invasions and similar.

The plan is to set static_save = false in their definitons.

Examples:

Seagulls:
https://gitea.your-land.de/your-land/water_life/src/branch/yl_stable/animals/gulls.lua#L131

Batz:
https://gitea.your-land.de/your-land/petz/src/branch/yl_stable/petz/petz/bat_mobkit.lua#L35

Other canditates:

ghosts

This issue deals with seagull, ghost and bat invasions and similar. The plan is to set `static_save = false` in their definitons. Examples: Seagulls: https://gitea.your-land.de/your-land/water_life/src/branch/yl_stable/animals/gulls.lua#L131 Batz: https://gitea.your-land.de/your-land/petz/src/branch/yl_stable/petz/petz/bat_mobkit.lua#L35 Other canditates: ghosts
AliasAlreadyTaken added the
1. kind/enhancement
2. prio/elevated
labels 2023-04-08 19:13:36 +00:00
Member

related issues:

other candidates:

  • anything else from petz that flies
  • anything else from petz w/ huge reproduction potential

personally, i think we should try the "limiter" idea before turning off static_save entirely. i've mostly got it implemented, though i do need to test it. the problem w/ turning off static_save is that it leads to a lot of unintuitive results like mobs disappearing when you look away from them (causing the area to "unload") and then turn back.

related issues: * #2077 bats and waterlife birds * #2421 birds (dupe) * #3294 ghosts * #3544 geckos * #3757 dolphins * #3981 cave mobs other candidates: * anything else from petz that flies * anything else from petz w/ huge reproduction potential personally, i think we should try the "limiter" idea before turning off static_save entirely. i've mostly got it implemented, though i do need to test it. the problem w/ turning off static_save is that it leads to a lot of unintuitive results like mobs disappearing when you look away from them (causing the area to "unload") and then turn back.
Member

implementation: 445a287a0a

we might want to tweak it.

implementation: https://gitea.your-land.de/your-land/yl_commons/commit/445a287a0a9158236bd51aa21ad90926feacde87 we might want to tweak it.
Author
Owner

Please let clearobjects take a new parameter entity type

https://github.com/minetest/minetest/issues/13401

Please let clearobjects take a new parameter entity type https://github.com/minetest/minetest/issues/13401
AliasAlreadyTaken added the
3. source/engine
label 2023-04-08 21:29:38 +00:00
Member

@AliasAlreadyTaken i've got another idea now. changing clearobjects is tricky, but that's because it's meant to erase the mob and all copies that load forever. instead, i could write something that erases any mobs of a certain kind that are currently loaded, and any which load after, until the process is shut off.

e.g.

> /mob_cull water_life:gull
1100 mobs removed, new spawns or loads will be removed until you run this command again.
@AliasAlreadyTaken i've got another idea now. changing `clearobjects` is tricky, but that's because it's meant to erase the mob and all copies that load forever. instead, i could write something that erases any mobs of a certain kind that are currently loaded, and any which load after, until the process is shut off. e.g. ``` > /mob_cull water_life:gull 1100 mobs removed, new spawns or loads will be removed until you run this command again. ```
Author
Owner

To defeat the seagulls I made a temporary moevex chatcommand for Sokomine, we could run that in a command block with a blinky plant

Kill all Seagulls (= Möve, hence moev-ex):

minetest.register_chatcommand(
    "moevex",
    {
        privs = {staff = true},
        func = function(name, param)
            local x=0 
			for _,v in pairs(minetest.luaentities) do 
				if v.name=="water_life:gull" then 
					x=x+1 v.object:remove() 
				end 
			end 
			return true, "Removed:" .. dump(x)
        end
    }
)
To defeat the seagulls I made a temporary moevex chatcommand for Sokomine, we could run that in a command block with a blinky plant Kill all Seagulls (= Möve, hence moev-ex): ```lua minetest.register_chatcommand( "moevex", { privs = {staff = true}, func = function(name, param) local x=0 for _,v in pairs(minetest.luaentities) do if v.name=="water_life:gull" then x=x+1 v.object:remove() end end return true, "Removed:" .. dump(x) end } ) ```
Member

Möv-Ex works very well. At max, about 83 seagulls were removed in one go.

Möv-Ex works very well. At max, about 83 seagulls were removed in one go.
Member

At max, about 83 seagulls were removed in one go.

i watched alias run it 3 or 4 times, and declare that 1300 Moeve were removed

> At max, about 83 seagulls were removed in one go. i watched alias run it 3 or 4 times, and declare that 1300 Moeve were removed
Author
Owner

When Sokomine showed me around the moeve-infested skies of PuertoDel, I cleared a total of 1300 seagulls in several command runs, the largest batch was 383.

When Sokomine showed me around the moeve-infested skies of PuertoDel, I cleared a total of 1300 seagulls in several command runs, the largest batch was 383.
Member

the mob spawn limiter is apparently live, but it isn't working very well - i'm still finding areas w/ lots (up to ~100) of gulls and other mobs.

i've doubled the default radius of the spawn limiter in a new update: 404f170439

if that doesn't help get a handle on the gulls, probably the next step is to keep them from static saving as suggested.

the mob spawn limiter is apparently live, but it isn't working very well - i'm still finding areas w/ lots (up to ~100) of gulls and other mobs. ![](https://gitea.your-land.de/attachments/b713ace2-0b18-4241-8932-bbc9b946304c) i've doubled the default radius of the spawn limiter in a new update: https://gitea.your-land.de/your-land/yl_commons/commit/404f1704398deae7a79acff13f55ec8568db9d03 if that doesn't help get a handle on the gulls, probably the next step is to keep them from static saving as suggested.
Member
noting a relevant engine PR: https://github.com/minetest/minetest/pull/14138
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: your-land/bugtracker#4142
No description provided.