AliasAlreadyTaken reports: is there a way to log the caus ... #3136

Open
opened 2022-11-25 19:35:37 +00:00 by yourland-report · 2 comments

AliasAlreadyTaken reports a bug:

is there a way to log the cause of death as "hunger", when a person starves, in contrast to just "engine" or sethp?

Player position:

{
	x = 1979.3000488281,
	y = 18,
	z = 1174.291015625
}

Player look:

{
	x = 0.9835638999939,
	y = -0.17364817857742,
	z = 0.049480997025967
}

Player information:

{
	ip_version = 6,
	min_rtt = 0.017000000923872,
	avg_rtt = 0.01799999922514,
	min_jitter = 0,
	max_jitter = 0.22100000083447,
	avg_jitter = 0.0010000001639128,
	connection_uptime = 2772,
	serialization_version = 29,
	patch = 0,
	state = "Active",
	formspec_version = 6,
	lang_code = "",
	protocol_version = 41,
	max_rtt = 0.23999999463558,
	major = 5,
	minor = 7,
	version_string = "5.7.0-dev-8b26bab37"
}

Player meta:

{
	fields = {
		arenalib_watchID = "0",
		["arena_lib_editor.players_number"] = "0",
		["arena_lib_editor.spawner_ID"] = "0",
		["arena_lib_editor.team_ID"] = "0",
		arenalib_infobox_arenaID = "0",
		repellant = "0",
		lagometer = "1",
		xp_redo_hud_color = "0xFFFF00",
		hud_state = "on",
		xp = "0",
		yl_commons_thankyou = "642",
		["3d_armor_inventory"] = "return {\"\", \"\", \"\", \"\", \"\", \"\"}",
		yl_church = "return {[\"last_death\"] = {[\"x\"] = -16080, [\"y\"] = -9915, [\"z\"] = -15812}, [\"last_death_portal\"] = 1663123370, [\"last_heal\"] = 1622459682}",
		team = "STAFF",
		szutil_watch = "return {}",
		["ethereal:fly_timer"] = "-99",
		bitten = "0",
		yl_audio_state = "off",
		["signslib:pos"] = "(1993,17,990)",
		yl_commons_player_joined = "1669402173",
		played_time = "66694548",
		digged_nodes = "135967",
		placed_nodes = "177385",
		died = "1582",
		["stamina:poisoned"] = "no",
		["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}",
		["petz:werewolf"] = "0",
		["stamina:level"] = "0",
		["petz:lycanthropy"] = "0",
		["stamina:exhaustion"] = "41.5",
		punch_count = "62081",
		partychat = "party",
		inflicted_damage = "2534380",
		["petz:werewolf_vignette_id"] = "19",
		["petz:old_override_table"] = "return {[\"speed\"] = 1, [\"new_move\"] = true, [\"sneak_glitch\"] = false, [\"gravity\"] = 1, [\"jump\"] = 1, [\"sneak\"] = true}",
		["ocean_build.last_warning"] = "1.66878e+09",
		["sethome:home"] = "(1983.4349365234,17.5,1183.5950927734)",
		["ocean_build.ocean_built"] = "1",
		["petz:werewolf_clan_idx"] = "4",
		crafted = "4421"
	}
}

Log identifier


[MOD] yl_report log identifier = 1YgAdaIQB5CKOyApiyrbDhB62xO8t4Ai

Profiler save:

profile-20221125T193537.json_prettyEE

Status:

# Server: version: 5.6.1-yl | game: Minetest Game | uptime: 7h 8min 54s | max lag: 3.58s | clients (27/42): ajshggdvhvfhfhhfhfh, AliasAlreadyTaken, Bailiff, bizon, daydream, dragon014, DragonWrangler1, Ernesto, ey, flux, Giuseppe, labrat, Laylem, lomy, MartinCZ, Miri, mm7, Parrish, Pearl_love, rabenkind, Ravise, Service, set, shanish, Stoned_Bob, Therottenpotato, yo_hi

Teleport command:

/teleport xyz 1979 18 1174

Compass command:

/give_compass Construction 1YgAdaIQB5CKOyApiyrbDhB62xO8t4Ai D2691E 1979 18 1174
AliasAlreadyTaken reports a bug: > is there a way to log the cause of death as "hunger", when a person starves, in contrast to just "engine" or sethp? Player position: ``` { x = 1979.3000488281, y = 18, z = 1174.291015625 } ``` Player look: ``` { x = 0.9835638999939, y = -0.17364817857742, z = 0.049480997025967 } ``` Player information: ``` { ip_version = 6, min_rtt = 0.017000000923872, avg_rtt = 0.01799999922514, min_jitter = 0, max_jitter = 0.22100000083447, avg_jitter = 0.0010000001639128, connection_uptime = 2772, serialization_version = 29, patch = 0, state = "Active", formspec_version = 6, lang_code = "", protocol_version = 41, max_rtt = 0.23999999463558, major = 5, minor = 7, version_string = "5.7.0-dev-8b26bab37" } ``` Player meta: ``` { fields = { arenalib_watchID = "0", ["arena_lib_editor.players_number"] = "0", ["arena_lib_editor.spawner_ID"] = "0", ["arena_lib_editor.team_ID"] = "0", arenalib_infobox_arenaID = "0", repellant = "0", lagometer = "1", xp_redo_hud_color = "0xFFFF00", hud_state = "on", xp = "0", yl_commons_thankyou = "642", ["3d_armor_inventory"] = "return {\"\", \"\", \"\", \"\", \"\", \"\"}", yl_church = "return {[\"last_death\"] = {[\"x\"] = -16080, [\"y\"] = -9915, [\"z\"] = -15812}, [\"last_death_portal\"] = 1663123370, [\"last_heal\"] = 1622459682}", team = "STAFF", szutil_watch = "return {}", ["ethereal:fly_timer"] = "-99", bitten = "0", yl_audio_state = "off", ["signslib:pos"] = "(1993,17,990)", yl_commons_player_joined = "1669402173", played_time = "66694548", digged_nodes = "135967", placed_nodes = "177385", died = "1582", ["stamina:poisoned"] = "no", ["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}", ["petz:werewolf"] = "0", ["stamina:level"] = "0", ["petz:lycanthropy"] = "0", ["stamina:exhaustion"] = "41.5", punch_count = "62081", partychat = "party", inflicted_damage = "2534380", ["petz:werewolf_vignette_id"] = "19", ["petz:old_override_table"] = "return {[\"speed\"] = 1, [\"new_move\"] = true, [\"sneak_glitch\"] = false, [\"gravity\"] = 1, [\"jump\"] = 1, [\"sneak\"] = true}", ["ocean_build.last_warning"] = "1.66878e+09", ["sethome:home"] = "(1983.4349365234,17.5,1183.5950927734)", ["ocean_build.ocean_built"] = "1", ["petz:werewolf_clan_idx"] = "4", crafted = "4421" } } ``` Log identifier ``` [MOD] yl_report log identifier = 1YgAdaIQB5CKOyApiyrbDhB62xO8t4Ai ``` Profiler save: ``` profile-20221125T193537.json_prettyEE ``` Status: ``` # Server: version: 5.6.1-yl | game: Minetest Game | uptime: 7h 8min 54s | max lag: 3.58s | clients (27/42): ajshggdvhvfhfhhfhfh, AliasAlreadyTaken, Bailiff, bizon, daydream, dragon014, DragonWrangler1, Ernesto, ey, flux, Giuseppe, labrat, Laylem, lomy, MartinCZ, Miri, mm7, Parrish, Pearl_love, rabenkind, Ravise, Service, set, shanish, Stoned_Bob, Therottenpotato, yo_hi ``` Teleport command: ``` /teleport xyz 1979 18 1174 ``` Compass command: ``` /give_compass Construction 1YgAdaIQB5CKOyApiyrbDhB62xO8t4Ai D2691E 1979 18 1174 ```
AliasAlreadyTaken was assigned by yourland-report 2022-11-25 19:35:38 +00:00
AliasAlreadyTaken added the
1. kind/enhancement
2. prio/low
labels 2022-11-25 20:32:18 +00:00
Member

is there a way to log the cause of death as "hunger", when a person starves, in contrast to just "engine" or sethp?

i'm pretty sure you can supply custom reasons and it won't break the engine or core lua, though it might possibly break mods that only expect the options defined in the api doc.

4da8a18c8c/doc/lua_api.txt (L5192-L5203)

* `reason`: a PlayerHPChangeReason table.
    * The `type` field will have one of the following values:
        * `set_hp`: A mod or the engine called `set_hp` without
                        giving a type - use this for custom damage types.
        * `punch`: Was punched. `reason.object` will hold the puncher, or nil if none.
        * `fall`
        * `node_damage`: `damage_per_second` from a neighboring node.
                             `reason.node` will hold the node name or nil.
        * `drown`
        * `respawn`

the docs have never made much sense to me, (how can a mod specify additional fields if it's supposed to use set_hp w/ one of these types?) but as i'm starting to move forward on a more full-fledged damage type system as part of the groundwork needed for the new mob API, i'm gonna get around to testing what can be done here.

> > is there a way to log the cause of death as "hunger", when a person starves, in contrast to just "engine" or sethp? i'm pretty sure you can supply ***custom*** reasons and it won't break the engine or core lua, though it might possibly break mods that only expect the options defined in the api doc. https://github.com/minetest/minetest/blob/4da8a18c8c72a125a3ea4f3842e08757d8dbe321/doc/lua_api.txt#L5192-L5203 ```markdown * `reason`: a PlayerHPChangeReason table. * The `type` field will have one of the following values: * `set_hp`: A mod or the engine called `set_hp` without giving a type - use this for custom damage types. * `punch`: Was punched. `reason.object` will hold the puncher, or nil if none. * `fall` * `node_damage`: `damage_per_second` from a neighboring node. `reason.node` will hold the node name or nil. * `drown` * `respawn` ``` the docs have never made much sense to me, (how can a mod specify additional fields if it's supposed to use `set_hp` w/ one of these types?) but as i'm starting to move forward on a more full-fledged damage type system as part of the groundwork needed for the new mob API, i'm gonna get around to testing what can be done here.
Member

what i missed above: reason is a table w/ keys, not one of a list of strings. when type="set_hp", you can specify all sorts of custom stuff.

what i missed above: `reason` is a *table* w/ keys, not one of a list of strings. when `type="set_hp"`, you can specify all sorts of custom stuff.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 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#3136
No description provided.