debiankaios reports: my sword broke but no message ... #1510

Closed
opened 2022-02-21 13:32:44 +00:00 by yourland-report · 11 comments

debiankaios reports a bug:

my sword broke but no message come short before it broke. MNow i have a megency sword

Player position:

{
	y = 29152.80078125,
	x = -1541.8231201172,
	z = -3536.1013183594
}

Player look:

{
	y = 0.073934428393841,
	x = 0.074946857988834,
	z = -0.9944429397583
}

Player information:

{
	min_rtt = 0.012000000104308,
	max_rtt = 1.0110000371933,
	connection_uptime = 2846,
	max_jitter = 0.99300003051758,
	minor = 6,
	major = 5,
	ip_version = 6,
	formspec_version = 5,
	patch = 0,
	protocol_version = 39,
	serialization_version = 28,
	lang_code = "de",
	version_string = "5.6.0-dev-80812b8",
	avg_rtt = 0.01799999922514,
	state = "Active",
	avg_jitter = 0.00099999830126762,
	min_jitter = 0
}

Player meta:

{
	fields = {
		["3d_armor_inventory"] = "return {\"3d_armor:boots_crystal 1 12040\", \"3d_armor:helmet_rainbow 1 4816\", \"3d_armor:leggings_rainbow 1 4816\", \"3d_armor:chestplate_rainbow 1 4784\", \"shields:shield_rainbow 1 4816\", \"\"}",
		played_time = "1542813",
		jointime = "1618169882",
		yl_commons_player_joined = "1645447529",
		["signslib:pos"] = "(-1543,164,-3652)",
		digged_nodes = "127953",
		bitten = "0",
		["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}",
		partychat = "party",
		yl_church = "return {[\"last_death\"] = {[\"y\"] = 124, [\"x\"] = -1482, [\"z\"] = -3530}, [\"last_death_portal\"] = 1645256093}",
		["stamina:level"] = "15.525",
		punch_count = "22377",
		arenalib_infobox_arenaID = "0",
		inflicted_damage = "432552",
		crafted = "1468",
		died = "222",
		xp = "119882",
		yl_commons_thankyou = "46",
		placed_nodes = "46204",
		hud_state = "on",
		repellant = "0",
		yl_commons_player_created = "1618169882"
	}
}

Log identifier


[MOD] yl_report log identifier = 8J5CnwxUc9Co30pQBWknlXSTmqd6Usg6

Profiler save:

profile-20220221T143243.json_pretty

Status:

# Server: version=5.4.1-yl, uptime=426387, max_lag=5.46731, clients={upie, Giuseppe, tubbo, rohit, bizon, 1tester1, debiankaios, Akshay_444, Zandoros, Arabella, Stevee, name______, tour, Kain, Baobab, debian44, acen2006, Bailiff, Service, AliasAlreadyTaken, guestxmart, rheo}

Teleport command:

/teleport xyz -1542 29153 -3536

Compass command:

/give_compass Construction 8J5CnwxUc9Co30pQBWknlXSTmqd6Usg6 D2691E -1542 29153 -3536
debiankaios reports a bug: > my sword broke but no message come short before it broke. MNow i have a megency sword Player position: ``` { y = 29152.80078125, x = -1541.8231201172, z = -3536.1013183594 } ``` Player look: ``` { y = 0.073934428393841, x = 0.074946857988834, z = -0.9944429397583 } ``` Player information: ``` { min_rtt = 0.012000000104308, max_rtt = 1.0110000371933, connection_uptime = 2846, max_jitter = 0.99300003051758, minor = 6, major = 5, ip_version = 6, formspec_version = 5, patch = 0, protocol_version = 39, serialization_version = 28, lang_code = "de", version_string = "5.6.0-dev-80812b8", avg_rtt = 0.01799999922514, state = "Active", avg_jitter = 0.00099999830126762, min_jitter = 0 } ``` Player meta: ``` { fields = { ["3d_armor_inventory"] = "return {\"3d_armor:boots_crystal 1 12040\", \"3d_armor:helmet_rainbow 1 4816\", \"3d_armor:leggings_rainbow 1 4816\", \"3d_armor:chestplate_rainbow 1 4784\", \"shields:shield_rainbow 1 4816\", \"\"}", played_time = "1542813", jointime = "1618169882", yl_commons_player_joined = "1645447529", ["signslib:pos"] = "(-1543,164,-3652)", digged_nodes = "127953", bitten = "0", ["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}", partychat = "party", yl_church = "return {[\"last_death\"] = {[\"y\"] = 124, [\"x\"] = -1482, [\"z\"] = -3530}, [\"last_death_portal\"] = 1645256093}", ["stamina:level"] = "15.525", punch_count = "22377", arenalib_infobox_arenaID = "0", inflicted_damage = "432552", crafted = "1468", died = "222", xp = "119882", yl_commons_thankyou = "46", placed_nodes = "46204", hud_state = "on", repellant = "0", yl_commons_player_created = "1618169882" } } ``` Log identifier ``` [MOD] yl_report log identifier = 8J5CnwxUc9Co30pQBWknlXSTmqd6Usg6 ``` Profiler save: ``` profile-20220221T143243.json_pretty ``` Status: ``` # Server: version=5.4.1-yl, uptime=426387, max_lag=5.46731, clients={upie, Giuseppe, tubbo, rohit, bizon, 1tester1, debiankaios, Akshay_444, Zandoros, Arabella, Stevee, name______, tour, Kain, Baobab, debian44, acen2006, Bailiff, Service, AliasAlreadyTaken, guestxmart, rheo} ``` Teleport command: ``` /teleport xyz -1542 29153 -3536 ``` Compass command: ``` /give_compass Construction 8J5CnwxUc9Co30pQBWknlXSTmqd6Usg6 D2691E -1542 29153 -3536 ```
AliasAlreadyTaken was assigned by yourland-report 2022-02-21 13:32:44 +00:00

Aloha,

which type of sword was that?

Related: Please do not blindly rely on this message.

Greetings, Alias

Aloha, which type of sword was that? Related: Please do not blindly rely on this message. Greetings, Alias
AliasAlreadyTaken added the
1. kind/bug
4. step/help wanted
labels 2022-02-21 23:53:57 +00:00
Member

i'm guessing it was a victim of debiankaios's terrible internet connection

i'm guessing it was a victim of debiankaios's terrible internet connection
Member

y'know, it's technically possible to keep weapons from disappearing when they break, but instead replacing them w/ a non-functional varaint which could be repaired

y'know, it's technically possible to keep weapons from disappearing when they break, but instead replacing them w/ a non-functional varaint which could be repaired
Member

This was due to using the sword to kill mobs. There's no easy, general way to fix this behavior because mobs_redo doesn't expose the necessary API hooks, and mobkit mobs don't cause any tool wear whatsoever.

See comments in your-land/yl_commons#9

The solution is something we should address when mobs get an overhaul.

This was due to using the sword to kill mobs. There's no easy, general way to fix this behavior because `mobs_redo` doesn't expose the necessary API hooks, and mobkit mobs don't cause any tool wear whatsoever. See comments in https://gitea.your-land.de/your-land/yl_commons/pulls/9 The solution is something we should address when mobs get an overhaul.

Maybe we could use

https://github.com/minetest/minetest/blob/master/doc/lua_api.txt#L7735

after_use = function(itemstack, user, node, digparams),
-- default: nil
-- If defined, should return an itemstack and will be called instead of
-- wearing out the item (if tool). If returns nil, does nothing.
-- If after_use doesn't exist, it is the same as:
--   function(itemstack, user, node, digparams)
--     itemstack:add_wear(digparams.wear)
--     return itemstack
--   end
-- The user may be any ObjectRef or nil.

This seems to include however the tool is used, on dig on mobs, on anything. drawback, this will overwrite default wear and we'll have to deal with it on a custom basis.

If it works, we can add logging there.

Maybe we could use https://github.com/minetest/minetest/blob/master/doc/lua_api.txt#L7735 ``` after_use = function(itemstack, user, node, digparams), -- default: nil -- If defined, should return an itemstack and will be called instead of -- wearing out the item (if tool). If returns nil, does nothing. -- If after_use doesn't exist, it is the same as: -- function(itemstack, user, node, digparams) -- itemstack:add_wear(digparams.wear) -- return itemstack -- end -- The user may be any ObjectRef or nil. ``` This seems to include however the tool is used, on dig on mobs, on anything. drawback, this will overwrite default wear and we'll have to deal with it on a custom basis. If it works, we can add logging there.
Member

Just tested to make sure - after_use is not called when attacking mobs, only when breaking nodes.

Just tested to make sure - `after_use` is not called when attacking mobs, only when breaking nodes.
flux added this to the flux's TODO list project 2022-07-02 19:52:06 +00:00
flux modified the project from flux's TODO list to (deleted) 2022-07-02 23:42:06 +00:00
flux added a new dependency 2022-11-07 18:51:19 +00:00
flux added this to the flux's TODO list project 2022-11-07 18:51:27 +00:00
AliasAlreadyTaken was unassigned by flux 2022-11-07 18:51:31 +00:00
flux self-assigned this 2022-11-07 18:51:31 +00:00
flux added
4. step/at work
and removed
4. step/help wanted
labels 2022-11-07 18:51:41 +00:00
flux removed the
4. step/at work
label 2023-02-27 21:14:11 +00:00
flux added the
4. step/at work
label 2023-03-02 23:21:59 +00:00
Member

so, it occurred to me today - why not just override the on_punch callback for all mobs_redo entities, check the tool wear before and after, and warn if the tool is damaged?

i discovered you can do that, but that mobs_redo has a bug in which, after a normal hit, the tool is again worn down by the engine's on_punch logic. i've created an upstream issue for this: https://notabug.org/TenPlus1/mobs_redo/issues/134

however, the problem remains - there is no way to detect when the engine wears the tool down when punching a mob.

so, it occurred to me today - why not just override the `on_punch` callback for all mobs_redo entities, check the tool wear before and after, and warn if the tool is damaged? i discovered you *can* do that, but that mobs_redo has a bug in which, after a normal hit, the tool is *again* worn down by the engine's on_punch logic. i've created an upstream issue for this: https://notabug.org/TenPlus1/mobs_redo/issues/134 however, the problem remains - there is no way to detect when the engine wears the tool down when punching a mob.
flux added the
3. source/engine
label 2023-03-02 23:40:02 +00:00
Member

i've implemented a warning when a player punches a mob and the tool wears, which also takes into account the wear from the engine by simulating it b381c284e7

i've implemented a warning when a player punches a mob and the tool wears, which also takes into account the wear from the engine by simulating it https://gitea.your-land.de/your-land/yl_commons/commit/b381c284e77a4b16a5e2911d523c2d2e509f79ae
flux added
4. step/ready to QA test
2. prio/elevated
and removed
4. step/at work
labels 2023-03-03 00:00:58 +00:00
Member

i've created a new issue for the upstream mobs_redo report, which is somewhat tangential: #3916

i've created a new issue for the upstream mobs_redo report, which is somewhat tangential: #3916
AliasAlreadyTaken added this to the 1.1.118 milestone 2023-03-03 12:45:16 +00:00

QA

I get a message when the sword is close to breaking. That should be ok for now

QA I get a message when the sword is close to breaking. That should be ok for now
AliasAlreadyTaken added the
ugh/QA OK
label 2023-04-14 08:56:39 +00:00
flux added
5. result/fixed
and removed
4. step/ready to QA test
labels 2023-04-25 20:24:33 +00:00
flux removed this from the flux's TODO list project 2023-04-25 20:24:37 +00:00
flux removed their assignment 2023-04-25 20:24:39 +00:00
Member

this is live

this is live
flux removed a dependency 2023-04-25 20:24:58 +00:00
flux closed this issue 2023-04-25 20:25:04 +00:00
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#1510
No description provided.