Pet scorpions will try to attack NPCs and NPCs will hit them back and scorps get hurt #6248

Closed
opened 2024-02-06 13:13:51 +00:00 by yourland-report · 9 comments

whosit reports a bug:

pet scorpions will try to attack NPCs

Player position:

{
	z = 1109.5139160156,
	x = 2026.8560791016,
	y = 15.5
}

Player look:

{
	z = 0.38186210393906,
	x = -0.65243273973465,
	y = -0.6546089053154
}

Player information:

{
	avg_jitter = 0.010999999940395,
	connection_uptime = 809,
	lang_code = "",
	patch = 0,
	minor = 8,
	major = 5,
	formspec_version = 7,
	state = "Active",
	version_string = "5.8.0",
	serialization_version = 29,
	protocol_version = 43,
	max_rtt = 4.3039999008179,
	ip_version = 6,
	min_rtt = 0.03999999910593,
	avg_rtt = 0.045000001788139,
	min_jitter = 0,
	max_jitter = 4.2529997825623
}

Player meta:

{
	fields = {
		lagometer = "1",
		punch_count = "40593",
		xp_redo_hud_color = "0x0000ff",
		inflicted_damage = "622044",
		["petz:werewolf_vignette_id"] = "20",
		arenalib_infobox_arenaID = "0",
		yl_commons_player_created = "1615221933",
		["stamina:level"] = "0",
		partychat = "party",
		["stamina:exhaustion"] = "109",
		["petz:werewolf"] = "0",
		repellant = "0",
		["petz:lycanthropy"] = "0",
		yl_commons_thankyou = "170",
		hud_state = "on",
		played_time = "7412294",
		yl_church = "return {[\"last_death\"] = {[\"z\"] = 1469, [\"x\"] = 3318, [\"y\"] = 66}, [\"last_heal\"] = 1707143152, [\"last_death_portal\"] = 1704531307}",
		placed_nodes = "94580",
		xp = "0",
		crafted = "72335",
		["petz:old_override_table"] = "return {[\"new_move\"] = true, [\"sneak\"] = true, [\"sneak_glitch\"] = false, [\"jump\"] = 1.5, [\"speed\"] = 2, [\"gravity\"] = 1}",
		["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}",
		["petz:werewolf_clan_idx"] = "3",
		died = "787",
		bitten = "0",
		["stamina:poisoned"] = "no",
		["signslib:pos"] = "(-1936,51,3715)",
		["hud_manager:spawnit:hud_enabled"] = "y",
		yl_commons_player_joined = "1707224447",
		digged_nodes = "312574",
		jointime = "1615221933",
		["3d_armor_inventory"] = "return {\"3d_armor:boots_crystal 1 35140\", \"3d_armor:chestplate_crystal 1 35140\", \"3d_armor:leggings_crystal 1 35140\", \"shields:shield_crystal 1 35140\", \"3d_armor:helmet_crystal 1 35140\", \"\"}"
	}
}

Log identifier


[MOD] yl_report log identifier = R8sHvgYi7wM94pyzBDAs1TydjKNIVAJM

Profiler save:

profile-20240206T131351.json_prettyEE

Status:

# Server: version: 5.8.0-yl-test | game: Minetest Game | uptime: 1d 3h 46min 12s | max lag: 0.383s | clients (1/52): whosit

Teleport command:

/teleport xyz 2027 16 1110

Compass command:

/give_compass Construction R8sHvgYi7wM94pyzBDAs1TydjKNIVAJM D2691E 2027 16 1110
whosit reports a bug: > pet scorpions will try to attack NPCs Player position: ``` { z = 1109.5139160156, x = 2026.8560791016, y = 15.5 } ``` Player look: ``` { z = 0.38186210393906, x = -0.65243273973465, y = -0.6546089053154 } ``` Player information: ``` { avg_jitter = 0.010999999940395, connection_uptime = 809, lang_code = "", patch = 0, minor = 8, major = 5, formspec_version = 7, state = "Active", version_string = "5.8.0", serialization_version = 29, protocol_version = 43, max_rtt = 4.3039999008179, ip_version = 6, min_rtt = 0.03999999910593, avg_rtt = 0.045000001788139, min_jitter = 0, max_jitter = 4.2529997825623 } ``` Player meta: ``` { fields = { lagometer = "1", punch_count = "40593", xp_redo_hud_color = "0x0000ff", inflicted_damage = "622044", ["petz:werewolf_vignette_id"] = "20", arenalib_infobox_arenaID = "0", yl_commons_player_created = "1615221933", ["stamina:level"] = "0", partychat = "party", ["stamina:exhaustion"] = "109", ["petz:werewolf"] = "0", repellant = "0", ["petz:lycanthropy"] = "0", yl_commons_thankyou = "170", hud_state = "on", played_time = "7412294", yl_church = "return {[\"last_death\"] = {[\"z\"] = 1469, [\"x\"] = 3318, [\"y\"] = 66}, [\"last_heal\"] = 1707143152, [\"last_death_portal\"] = 1704531307}", placed_nodes = "94580", xp = "0", crafted = "72335", ["petz:old_override_table"] = "return {[\"new_move\"] = true, [\"sneak\"] = true, [\"sneak_glitch\"] = false, [\"jump\"] = 1.5, [\"speed\"] = 2, [\"gravity\"] = 1}", ["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}", ["petz:werewolf_clan_idx"] = "3", died = "787", bitten = "0", ["stamina:poisoned"] = "no", ["signslib:pos"] = "(-1936,51,3715)", ["hud_manager:spawnit:hud_enabled"] = "y", yl_commons_player_joined = "1707224447", digged_nodes = "312574", jointime = "1615221933", ["3d_armor_inventory"] = "return {\"3d_armor:boots_crystal 1 35140\", \"3d_armor:chestplate_crystal 1 35140\", \"3d_armor:leggings_crystal 1 35140\", \"shields:shield_crystal 1 35140\", \"3d_armor:helmet_crystal 1 35140\", \"\"}" } } ``` Log identifier ``` [MOD] yl_report log identifier = R8sHvgYi7wM94pyzBDAs1TydjKNIVAJM ``` Profiler save: ``` profile-20240206T131351.json_prettyEE ``` Status: ``` # Server: version: 5.8.0-yl-test | game: Minetest Game | uptime: 1d 3h 46min 12s | max lag: 0.383s | clients (1/52): whosit ``` Teleport command: ``` /teleport xyz 2027 16 1110 ``` Compass command: ``` /give_compass Construction R8sHvgYi7wM94pyzBDAs1TydjKNIVAJM D2691E 2027 16 1110 ```
AliasAlreadyTaken was assigned by yourland-report 2024-02-06 13:13:51 +00:00
whosit changed title from whosit reports: pet scorpions will try to atta ... to whosit reports: pet scorpions will try to attack NPCs and NPCs will hit them back and hurt 2024-02-06 13:15:23 +00:00
whosit changed title from whosit reports: pet scorpions will try to attack NPCs and NPCs will hit them back and hurt to Pet scorpions will try to attack NPCs and NPCs will hit them back and scorps get hurt 2024-02-06 13:15:42 +00:00
Member

Only August will hit scorps back, because he's yl_npc:npc, Sigrun for example is yl_npc:human and does not fight back.

Only August will hit scorps back, because he's `yl_npc:npc`, Sigrun for example is `yl_npc:human` and does not fight back.

Pet scorpions shouldn't attack either, they are all of type = "npc" and scorpions have no order to attack anything. Yet, they are owner_loyal = true. May that be the cause?

The "fight back" depends on what NPC we'll use for the city services

Pet scorpions shouldn't attack either, they are all of `type = "npc"` and scorpions have no order to attack anything. Yet, they are `owner_loyal = true`. May that be the cause? The "fight back" depends on what NPC we'll use for the city services
AliasAlreadyTaken added the
1. kind/bug
label 2024-02-06 13:39:37 +00:00
Member

apparently attack_npcs=true is the default? d4a25064ea/api.lua (L193)

the reason NPCs don't target each other is because they also have passive = true, the pet scorpion doesn't.

we could either fix this by setting attack_npcs=false for the pet scorpion, or request Tenplus1 change the default behavior depending on the kind of mob (monster vs. npc vs. animal)

apparently `attack_npcs=true` is the default? https://codeberg.org/tenplus1/mobs_redo/src/commit/d4a25064eaab8158dc305c9a682d55d9a8f0d360/api.lua#L193 the reason NPCs don't target each other is because they also have `passive = true`, the pet scorpion doesn't. we could either fix this by setting `attack_npcs=false` for the pet scorpion, or request Tenplus1 change the default behavior depending on the kind of mob (monster vs. npc vs. animal)

Changing upstream may break a lot of stuff.

Let's explicitly change the pet scorpion to attack_npcs=false

Are there other values that hint at a certain direction?

Changing upstream may break a lot of stuff. Let's explicitly change the pet scorpion to attack_npcs=false Are there other values that hint at a certain direction?
Member

Let's explicitly change the pet scorpion to attack_npcs=false

done 1852c49fc6

Are there other values that hint at a certain direction?

i don't understand this. what kind of "direction"?

> Let's explicitly change the pet scorpion to attack_npcs=false done https://gitea.your-land.de/your-land/Scorpion/commit/1852c49fc6006656040f51aa0cb5f713b493c02a > Are there other values that hint at a certain direction? i don't understand this. what kind of "direction"?
flux added the
4. step/question
4. step/ready to QA test
labels 2024-02-07 23:03:06 +00:00

Are there other values that hint at a certain direction?

i don't understand this. what kind of "direction"?

That referred to a sentence I deleted before sending. It was meant to say that apparently mobs_redo takes certain assumptions what one will do with it: make hostile mobs. The questions was whether there are other values geared towards that goal, which in light of a more general usage should have different default values.

> > Are there other values that hint at a certain direction? > > i don't understand this. what kind of "direction"? That referred to a sentence I deleted before sending. It was meant to say that apparently mobs_redo takes certain assumptions what one will do with it: make hostile mobs. The questions was whether there are other values geared towards that goal, which in light of a more general usage should have different default values.
Member

It was meant to say that apparently mobs_redo takes certain assumptions what one will do with it

i'm pretty sure that the defaults make a bunch of contradictory assumptions.

> It was meant to say that apparently mobs_redo takes certain assumptions what one will do with it i'm pretty sure that the defaults make a bunch of contradictory assumptions.
Member

image

best buds now?

![image](/attachments/bd4b3325-11aa-46e5-9019-c12b56626f0a) best buds now?
127 KiB
whosit added the
ugh/QA OK
label 2024-02-17 15:55:11 +00:00
AliasAlreadyTaken added this to the 1.1.123 milestone 2024-02-18 01:22:54 +00:00
flux added
5. result/fixed
and removed
4. step/ready to QA test
labels 2024-03-28 22:00:50 +00:00
AliasAlreadyTaken was unassigned by flux 2024-03-28 22:00:52 +00:00
Member

live.

live.
flux closed this issue 2024-03-28 22:01:15 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 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#6248
No description provided.