Azelf reports: Petz seem to have a much lower ... #4573

Closed
opened 2023-05-21 09:08:32 +00:00 by yourland-report · 10 comments

Azelf reports a bug:

Petz seem to have a much lower spawn rate compared to before

Player position:

{
	z = 414.36801147461,
	x = -286.01800537109,
	y = 7.5
}

Player look:

{
	z = -0.77385729551315,
	x = 0.35380852222443,
	y = -0.52532315254211
}

Player information:

{
	max_jitter = 7.9890003204346,
	avg_jitter = 0.0010000020265579,
	connection_uptime = 5716,
	serialization_version = 29,
	patch = 0,
	lang_code = "",
	state = "Active",
	version_string = "5.7.0",
	avg_rtt = 0.16599999368191,
	formspec_version = 6,
	ip_version = 6,
	protocol_version = 41,
	minor = 7,
	major = 5,
	min_rtt = 0.16500000655651,
	max_rtt = 8.1960000991821,
	min_jitter = 0
}

Player meta:

{
	fields = {
		["3d_armor_inventory"] = "return {\"\", \"shields:shield_rainbow 1 17384\", \"3d_armor:chestplate_rainbow 1 17384\", \"3d_armor:boots_crystal 1 33440\", \"3d_armor:leggings_rainbow 1 17384\", \"3d_armor:helmet_rainbow 1 17384\"}",
		repellant = "0",
		arenalib_infobox_arenaID = "0",
		["ocean_build.last_warning"] = "1.67602e+09",
		yl_commons_player_created = "1659363683",
		yl_commons_player_joined = "1684654429",
		played_time = "3068497",
		jointime = "1659363683",
		bitten = "0",
		died = "91",
		crafted = "232897",
		["stamina:level"] = "11",
		digged_nodes = "556238",
		["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}",
		punch_count = "171631",
		["stamina:exhaustion"] = "127.5",
		inflicted_damage = "3683422",
		xp = "693712",
		yl_commons_thankyou = "50",
		hud_state = "on",
		["stamina:poisoned"] = "no",
		["ocean_build.ocean_built"] = "11",
		["signslib:pos"] = "(3857,41,1541)",
		partychat = "party",
		placed_nodes = "151514",
		yl_church = "return {[\"last_heal\"] = 1678197363, [\"last_death_portal\"] = 1684655244, [\"last_death\"] = {[\"z\"] = 4625, [\"x\"] = -912, [\"y\"] = 143}}"
	}
}

Log identifier


[MOD] yl_report log identifier = KWYK3oFIS6InBqTcfHftPCqFi0F75CVP

Profiler save:

profile-20230521T090832.json_prettyEE

Status:

# Server: version: 5.6.1-yl | game: Minetest Game | uptime: 13h 29min 19s | max lag: 0.329s | clients (19/52): 9T9, AliasAlreadyTaken, Alinia, Aliza, Azelf, Bailiff, bizon, Boot, Chache, daydream, flux, IIIullaIII, itsrapier, Murmel, niceride, Qichta29, rheo, Service, Tute

Teleport command:

/teleport xyz -286 8 414

Compass command:

/give_compass Construction KWYK3oFIS6InBqTcfHftPCqFi0F75CVP D2691E -286 8 414
Azelf reports a bug: > Petz seem to have a much lower spawn rate compared to before Player position: ``` { z = 414.36801147461, x = -286.01800537109, y = 7.5 } ``` Player look: ``` { z = -0.77385729551315, x = 0.35380852222443, y = -0.52532315254211 } ``` Player information: ``` { max_jitter = 7.9890003204346, avg_jitter = 0.0010000020265579, connection_uptime = 5716, serialization_version = 29, patch = 0, lang_code = "", state = "Active", version_string = "5.7.0", avg_rtt = 0.16599999368191, formspec_version = 6, ip_version = 6, protocol_version = 41, minor = 7, major = 5, min_rtt = 0.16500000655651, max_rtt = 8.1960000991821, min_jitter = 0 } ``` Player meta: ``` { fields = { ["3d_armor_inventory"] = "return {\"\", \"shields:shield_rainbow 1 17384\", \"3d_armor:chestplate_rainbow 1 17384\", \"3d_armor:boots_crystal 1 33440\", \"3d_armor:leggings_rainbow 1 17384\", \"3d_armor:helmet_rainbow 1 17384\"}", repellant = "0", arenalib_infobox_arenaID = "0", ["ocean_build.last_warning"] = "1.67602e+09", yl_commons_player_created = "1659363683", yl_commons_player_joined = "1684654429", played_time = "3068497", jointime = "1659363683", bitten = "0", died = "91", crafted = "232897", ["stamina:level"] = "11", digged_nodes = "556238", ["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}", punch_count = "171631", ["stamina:exhaustion"] = "127.5", inflicted_damage = "3683422", xp = "693712", yl_commons_thankyou = "50", hud_state = "on", ["stamina:poisoned"] = "no", ["ocean_build.ocean_built"] = "11", ["signslib:pos"] = "(3857,41,1541)", partychat = "party", placed_nodes = "151514", yl_church = "return {[\"last_heal\"] = 1678197363, [\"last_death_portal\"] = 1684655244, [\"last_death\"] = {[\"z\"] = 4625, [\"x\"] = -912, [\"y\"] = 143}}" } } ``` Log identifier ``` [MOD] yl_report log identifier = KWYK3oFIS6InBqTcfHftPCqFi0F75CVP ``` Profiler save: ``` profile-20230521T090832.json_prettyEE ``` Status: ``` # Server: version: 5.6.1-yl | game: Minetest Game | uptime: 13h 29min 19s | max lag: 0.329s | clients (19/52): 9T9, AliasAlreadyTaken, Alinia, Aliza, Azelf, Bailiff, bizon, Boot, Chache, daydream, flux, IIIullaIII, itsrapier, Murmel, niceride, Qichta29, rheo, Service, Tute ``` Teleport command: ``` /teleport xyz -286 8 414 ``` Compass command: ``` /give_compass Construction KWYK3oFIS6InBqTcfHftPCqFi0F75CVP D2691E -286 8 414 ```
AliasAlreadyTaken was assigned by yourland-report 2023-05-21 09:08:32 +00:00
flux added the
1. kind/bug
1. kind/balancing
4. step/needs confirmation
labels 2023-05-21 16:09:58 +00:00
Member

i certainly haven't noticed that e.g. polar bears and snow leopards have a lower spawn rate along the miocene route

i certainly haven't noticed that e.g. polar bears and snow leopards have a lower spawn rate along the miocene route

I am doing scouting for upcoming goblin changes,
have to say this is correct, I'm seeing perhaps 1/6th the spawns,
maybe even higher/less.

I am doing scouting for upcoming goblin changes, have to say this is correct, I'm seeing perhaps 1/6th the spawns, maybe even higher/less.

I did testing outside Sacrementum's beaches and in an empty savanna biome near niceride's base, and both of them yielded extremely few new petz spawns, despite long periods of afk time.

The Miocene route isn't really valid because many of the mobs that can be found there are usually leftovers from past times and also past moves. If you wanted to test, kill all the petz mobs in a section of the trail and see how many spawn.

I did testing outside Sacrementum's beaches and in an empty savanna biome near niceride's base, and both of them yielded extremely few new petz spawns, despite long periods of afk time. The Miocene route isn't really valid because many of the mobs that can be found there are usually leftovers from past times and also past moves. If you wanted to test, kill all the petz mobs in a section of the trail and see how many spawn.
Member

turns out petz did change its spawning logic, but i'm not sure exactly how it differs 25a2a5c449

turns out petz did change its spawning logic, but i'm not sure exactly how it differs https://github.com/runsy/petz/commit/25a2a5c44904f40c4a821bc3ba564f6bad26648d
Member

pseudocode

OLD

every step (dtime seconds):
pos = [get a spawn pos]
      if dtime * len(players) / 30 < random():
          pick a player
          pick a position near the player
          figure out where the ground is
          if ground, return position w/ ground

if pos exists,
    spawn there

chance of spawning a mob near a given player is about 1 in 30 seconds

NEW

every 30 seconds:
pos = [get a spawn pos]
      pick a player
      pick a position near the player
      figure out where the ground is
      if ground, return position w/ ground

if pos exists,
    spawn there

chance of spawning a mob near a given player is about 1 in (30 * #players) seconds

pseudocode OLD --- ```python every step (dtime seconds): pos = [get a spawn pos] if dtime * len(players) / 30 < random(): pick a player pick a position near the player figure out where the ground is if ground, return position w/ ground if pos exists, spawn there ``` chance of spawning a mob near a given player is about 1 in 30 seconds NEW --- ```python every 30 seconds: pos = [get a spawn pos] pick a player pick a position near the player figure out where the ground is if ground, return position w/ ground if pos exists, spawn there ``` chance of spawning a mob near a given player is about 1 in (30 * `#players`) seconds
flux added
3. source/mod upstream
and removed
4. step/needs confirmation
labels 2023-05-23 22:32:29 +00:00

I wonder whether this was intended and what the thoughts behind this are. Maybe to not lag the server and keep spawn at a constant rate?

mob_core and water_life also implement spawn functions, rest of mobs_redo use ABMs, as far as I remember?

Begs the question: How do we WANT spawn to work? So far, most of those spawn function delivered a ~****~ very poor performance and all had some drawbacks.

Some random thoughts:

whether a mob spawns should be able to depend on

  • the biome
  • the underground
  • a max y and min y
  • the proximity to a player (no bears appearing right behind someone out of nowhere!)
  • the number of mobs in the world
  • the number of same-type mobs in the vicinity
  • protection (wilderness, protected, open, yl_mob_spawn_allowed): #4581

if feeling fancy:

  • make it that the mob does not spawn in the field of view (because suddenly appearing enemies or animals popping just out of nowhere break immersion)
  • allow the modmaker to hand over a function that takes a position and returns a boolean, so that special conditions can also be checked (a bit like the prerequisite of NPCs)

Anything else?

I wonder whether this was intended and what the thoughts behind this are. Maybe to not lag the server and keep spawn at a constant rate? mob_core and water_life also implement spawn functions, rest of mobs_redo use ABMs, as far as I remember? Begs the question: How do we WANT spawn to work? So far, most of those spawn function delivered a ~\*\*\*\*~ very poor performance and all had some drawbacks. Some random thoughts: whether a mob spawns should be able to depend on - the biome - the underground - a max y and min y - the proximity to a player (no bears appearing right behind someone out of nowhere!) - the number of mobs in the world - the number of same-type mobs in the vicinity - protection (wilderness, protected, open, yl_mob_spawn_allowed): #4581 if feeling fancy: - make it that the mob does not spawn in the field of view (because suddenly appearing enemies or animals popping just out of nowhere break immersion) - allow the modmaker to hand over a function that takes a position and returns a boolean, so that special conditions can also be checked (a bit like the prerequisite of NPCs) Anything else?
Member

the proximity to a player (no bears appearing right behind someone out of nowhere!)

this is also now a feature of petz's new spawn logic. before petz always spawned 16 nodes away from a player. now they can spawn anywhere within a 32x32x32 cube around the player.

> the proximity to a player (no bears appearing right behind someone out of nowhere!) this is also now a feature of petz's new spawn logic. before petz always spawned 16 nodes away from a player. now they can spawn anywhere within a 32x32x32 cube around the player.
Member

the biome

we've already learned that the biome reported by the API is next to meaningless w/ valleys mapgen.

> the biome we've already learned that the biome reported by the API is next to meaningless w/ valleys mapgen.
Member

gonna create a new issue for discussing new spawning mechanics, we've got a bad habit of turning a specific issue into a general discussion of mechanics

gonna create a new issue for discussing new spawning mechanics, we've got a bad habit of turning a specific issue into a general discussion of mechanics
flux added the
5. result/fixed
label 2023-12-18 23:36:58 +00:00
Member

considering this fixed via spawnit. if anything, there are too many petz now.

considering this fixed via spawnit. if anything, there are too many petz now.
flux closed this issue 2023-12-18 23:37:20 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
5 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#4573
No description provided.