Make a HUD for notification-type messages (like "you can't hit <name>...") #6270

Open
opened 2024-02-08 16:02:33 +00:00 by yourland-report · 8 comments

whosit reports a bug:

"you can't hit name because their pvp is disabled" should be a HUD display, not chat message

Player position:

{
	x = 2171.9428710938,
	y = 18.5,
	z = 942.57897949219
}

Player look:

{
	x = 0.77095848321915,
	y = -0.43035355210304,
	z = -0.46948784589767
}

Player information:

{
	avg_jitter = 0.089000001549721,
	connection_uptime = 12797,
	serialization_version = 29,
	patch = 0,
	state = "Active",
	version_string = "5.8.0",
	protocol_version = 42,
	ip_version = 6,
	min_rtt = 0.041000001132488,
	max_rtt = 9.6280002593994,
	lang_code = "",
	formspec_version = 7,
	minor = 8,
	major = 5,
	avg_rtt = 0.14699999988079,
	min_jitter = 0,
	max_jitter = 8.9429998397827
}

Player meta:

{
	fields = {
		["petz:werewolf_clan_idx"] = "3",
		bitten = "0",
		punch_count = "40636",
		["petz:werewolf_vignette_id"] = "20",
		yl_commons_thankyou = "198",
		partychat = "party",
		["stamina:level"] = "9",
		arenalib_infobox_arenaID = "0",
		["stamina:exhaustion"] = "56",
		xp_redo_hud_color = "0x0000ff",
		["signslib:pos"] = "(-1936,51,3715)",
		yl_commons_player_created = "1615221933",
		yl_commons_player_joined = "1707395387",
		["3d_armor_inventory"] = "return {\"3d_armor:boots_crystal 1 12240\", \"3d_armor:leggings_crystal 1 18780\", \"shields:shield_crystal 1 18780\", \"3d_armor:chestplate_crystal 1 18780\", \"3d_armor:helmet_crystal 1 18780\", \"\"}",
		["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}",
		["petz:werewolf"] = "1",
		["petz:lycanthropy"] = "1",
		xp = "200916",
		crafted = "73928",
		jointime = "1615221933",
		played_time = "7953067",
		repellant = "0",
		hud_state = "on",
		lagometer = "1",
		inflicted_damage = "623438",
		yl_church = "return {[\"last_heal\"] = 1706117659, [\"last_death_portal\"] = 1706886812, [\"last_death\"] = {[\"x\"] = 1988, [\"y\"] = -30912, [\"z\"] = 1508}}",
		["stamina:poisoned"] = "no",
		["petz:old_override_table"] = "return {[\"new_move\"] = true, [\"sneak\"] = true, [\"sneak_glitch\"] = false, [\"jump\"] = 1.5, [\"speed\"] = 2, [\"gravity\"] = 1}",
		digged_nodes = "316524",
		placed_nodes = "91438",
		died = "779",
		["petz:pre_werewolf_animation"] = "return {[\"model\"] = \"skinsdb_3d_armor_character_5.b3d\", [\"animation\"] = \"mine\", [\"animation_speed\"] = 30, [\"textures\"] = {\"blank.png\", \"character.warrior_m1.png\", \"3d_armor_trans.png^3d_armor_boots_crystal.png^3d_armor_leggings_crystal.png^shields_shield_crystal.png^3d_armor_chestplate_crystal.png^3d_armor_helmet_crystal.png\", \"moreores_tool_mithrilsword.png^[colorize:violet:50\"}}"
	}
}

Log identifier


[MOD] yl_report log identifier = VEzPbAKyGxZ9hX3qkk8UjqoreBRNALVz

Profiler save:

profile-20240208T160233.json_prettyEE

Status:

# Server: version: 5.7.0-yl-thx-tmm | game: Minetest Game | uptime: 4d 20h 5min 41s | max lag: 1.17s | clients (24/52): Administrator, AliasAlreadyTaken, Bailiff, Davidsoft, daydream, flux, Hecate, JinnyC, Lucy1, Lupercus, Marat1ch, Minetest13, MixMash, Murmel, NoobLegend, pilo, poppyasdan, rheo, Sandra, Service, STEALTH, tagtraum, threehymns, whosit

Teleport command:

/teleport xyz 2172 19 943

Compass command:

/give_compass Construction VEzPbAKyGxZ9hX3qkk8UjqoreBRNALVz D2691E 2172 19 943
whosit reports a bug: > "you can't hit name because their pvp is disabled" should be a HUD display, not chat message Player position: ``` { x = 2171.9428710938, y = 18.5, z = 942.57897949219 } ``` Player look: ``` { x = 0.77095848321915, y = -0.43035355210304, z = -0.46948784589767 } ``` Player information: ``` { avg_jitter = 0.089000001549721, connection_uptime = 12797, serialization_version = 29, patch = 0, state = "Active", version_string = "5.8.0", protocol_version = 42, ip_version = 6, min_rtt = 0.041000001132488, max_rtt = 9.6280002593994, lang_code = "", formspec_version = 7, minor = 8, major = 5, avg_rtt = 0.14699999988079, min_jitter = 0, max_jitter = 8.9429998397827 } ``` Player meta: ``` { fields = { ["petz:werewolf_clan_idx"] = "3", bitten = "0", punch_count = "40636", ["petz:werewolf_vignette_id"] = "20", yl_commons_thankyou = "198", partychat = "party", ["stamina:level"] = "9", arenalib_infobox_arenaID = "0", ["stamina:exhaustion"] = "56", xp_redo_hud_color = "0x0000ff", ["signslib:pos"] = "(-1936,51,3715)", yl_commons_player_created = "1615221933", yl_commons_player_joined = "1707395387", ["3d_armor_inventory"] = "return {\"3d_armor:boots_crystal 1 12240\", \"3d_armor:leggings_crystal 1 18780\", \"shields:shield_crystal 1 18780\", \"3d_armor:chestplate_crystal 1 18780\", \"3d_armor:helmet_crystal 1 18780\", \"\"}", ["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}", ["petz:werewolf"] = "1", ["petz:lycanthropy"] = "1", xp = "200916", crafted = "73928", jointime = "1615221933", played_time = "7953067", repellant = "0", hud_state = "on", lagometer = "1", inflicted_damage = "623438", yl_church = "return {[\"last_heal\"] = 1706117659, [\"last_death_portal\"] = 1706886812, [\"last_death\"] = {[\"x\"] = 1988, [\"y\"] = -30912, [\"z\"] = 1508}}", ["stamina:poisoned"] = "no", ["petz:old_override_table"] = "return {[\"new_move\"] = true, [\"sneak\"] = true, [\"sneak_glitch\"] = false, [\"jump\"] = 1.5, [\"speed\"] = 2, [\"gravity\"] = 1}", digged_nodes = "316524", placed_nodes = "91438", died = "779", ["petz:pre_werewolf_animation"] = "return {[\"model\"] = \"skinsdb_3d_armor_character_5.b3d\", [\"animation\"] = \"mine\", [\"animation_speed\"] = 30, [\"textures\"] = {\"blank.png\", \"character.warrior_m1.png\", \"3d_armor_trans.png^3d_armor_boots_crystal.png^3d_armor_leggings_crystal.png^shields_shield_crystal.png^3d_armor_chestplate_crystal.png^3d_armor_helmet_crystal.png\", \"moreores_tool_mithrilsword.png^[colorize:violet:50\"}}" } } ``` Log identifier ``` [MOD] yl_report log identifier = VEzPbAKyGxZ9hX3qkk8UjqoreBRNALVz ``` Profiler save: ``` profile-20240208T160233.json_prettyEE ``` Status: ``` # Server: version: 5.7.0-yl-thx-tmm | game: Minetest Game | uptime: 4d 20h 5min 41s | max lag: 1.17s | clients (24/52): Administrator, AliasAlreadyTaken, Bailiff, Davidsoft, daydream, flux, Hecate, JinnyC, Lucy1, Lupercus, Marat1ch, Minetest13, MixMash, Murmel, NoobLegend, pilo, poppyasdan, rheo, Sandra, Service, STEALTH, tagtraum, threehymns, whosit ``` Teleport command: ``` /teleport xyz 2172 19 943 ``` Compass command: ``` /give_compass Construction VEzPbAKyGxZ9hX3qkk8UjqoreBRNALVz D2691E 2172 19 943 ```
AliasAlreadyTaken was assigned by yourland-report 2024-02-08 16:02:33 +00:00
whosit changed title from whosit reports: "you can't hit name because th ... to make message "you can't hit name..." a HUD 2024-02-08 16:32:17 +00:00
whosit added the
1. kind/enhancement
label 2024-02-08 16:32:27 +00:00
Member

Wouldn't that mean more network traffic? I'm generally not intrested in these messages as they only mean that a hit meant for an enemy by accident hit a player and was thus wasted. At least the player wasn't harmed.

Wouldn't that mean more network traffic? I'm generally not intrested in these messages as they only mean that a hit meant for an enemy by accident hit a player and was thus wasted. At least the player wasn't harmed.
Member

I'm generally not intrested in these messages as they only mean that a hit meant for an enemy by accident hit a player and was thus wasted. At least the player wasn't harmed.

I was just annoyed that I can't see my chat during battle - it was wiped by these messages (southern ditch is cramped...)

Wouldn't that mean more network traffic?

Technically, yes. And server has to manage them... Best solution is SSCSM (I wonder if those support this...). Can we have a special label for "waiting for server-sent client-side mods" or something? :p

> I'm generally not intrested in these messages as they only mean that a hit meant for an enemy by accident hit a player and was thus wasted. At least the player wasn't harmed. I was just annoyed that I can't see my chat during battle - it was wiped by these messages (southern ditch is cramped...) > Wouldn't that mean more network traffic? Technically, yes. And server has to manage them... Best solution is SSCSM (I wonder if those support this...). Can we have a special label for "waiting for server-sent client-side mods" or something? :p
Member

Wouldn't that mean more network traffic?

unless we want to apply some sort of fading effect when the message disappears, it's only a marginal difference to display a text HUD vs. a chat message. i did originally think that a fade effect was appropriate here, but it's probably better for our userbase in general if we skip that.

SSCSM

maybe. we need to proceed like SSCSM will never happen, while proselytizing for it as much as it's appropriate. if and when SSCSM is ever realized, we'll have to run some tests and possibly adapt.

> Wouldn't that mean more network traffic? unless we want to apply some sort of fading effect when the message disappears, it's only a marginal difference to display a text HUD vs. a chat message. i did originally think that a fade effect was appropriate here, but it's probably better for our userbase in general if we skip that. > SSCSM maybe. we need to proceed like SSCSM will never happen, while proselytizing for it as much as it's appropriate. if and when SSCSM is ever realized, we'll have to run some tests and possibly adapt.

label would be upstream/client?

Also your-land/administration#197

Regarding the message: How about we display it once ever time one person is hit per session, reset when pvp is toggled or user logs out?

label would be upstream/client? Also your-land/administration#197 Regarding the message: How about we display it once ever time one person is hit per session, reset when pvp is toggled or user logs out?
whosit changed title from make message "you can't hit name..." a HUD to Make a HUD for notification-type messages (like "you can't hit <name>...") 2024-02-12 14:11:23 +00:00
Member

What this could be is:

  • single hud element, with many lines of text (like, up to 10, whatever)
  • single API: yl_notify.send(player, text)
  • yl_notify will append all messages into one list, with a timestamp,
  • then it will append all current messages into a single string and update the HUD
  • after a timeout, messages should be removed from that list, HUD updated
  • when all messages are gone, HUD is removed

what should go there:

  • you can't hit someone
  • your stuff has been repaired
  • werewolves can only eat meat msg
  • area is protected by such and such
  • replacer messages (you have no more of the block or whatever)

Can be smart and just add counts to repeating messages like "you can't hit whosit X 10", resetting the timeout, etc.

If you think this way people will want to review the messages, then save them and let the player see msgs with /notify_show

What this could be is: - _single_ hud element, with many lines of text (like, up to 10, whatever) - single API: `yl_notify.send(player, text)` - `yl_notify` will append all messages into one list, with a timestamp, - then it will append all current messages into a single string and update the HUD - after a timeout, messages should be removed from that list, HUD updated - when all messages are gone, HUD is removed what should go there: - you can't hit someone - your stuff has been repaired - werewolves can only eat meat msg - area is protected by such and such - replacer messages (you have no more of the block or whatever) Can be smart and just add counts to repeating messages like "you can't hit whosit X 10", resetting the timeout, etc. If you think this way people will want to review the messages, then save them and let the player see msgs with `/notify_show`

Consider adding the messages from the replacer there too. They can be really annoying...

Consider adding the messages from the replacer there too. They can be really annoying...

Sounds like a nice idea, especially in contrast to sending in the chat.

Sounds like a nice idea, especially in contrast to sending in the chat.
Member

label would be upstream/client?

only if we want to gate this on SSCSM. i don't think we should.


i feel like i need to create some sort of "standard HUD messages" mod. currently, various mods compete for screen real estate space and there's no way for them to coordinate with each other.

create callbacks to add text to HUDs at several important screen coordinates - bottom left, bottom right, above center. (top left is occupied by chat text, top left by the minimap, bottom center by the hotbar and health etc. hud bars).

additionally, it'd be awesome if we could give players some sort of standardized way to control the exact positioning of various HUD elements on their screen. my futil already enforces unique identifiers for persistent HUDs, perhaps that could be split off into its own mod.

> label would be upstream/client? only if we want to gate this on SSCSM. i don't think we should. ---------------------------- i feel like i need to create some sort of "standard HUD messages" mod. currently, various mods compete for screen real estate space and there's no way for them to coordinate with each other. create callbacks to add text to HUDs at several important screen coordinates - bottom left, bottom right, above center. (top left is occupied by chat text, top left by the minimap, bottom center by the hotbar and health etc. hud bars). additionally, it'd be *awesome* if we could give players some sort of standardized way to control the exact positioning of various HUD elements on their screen. my futil already enforces unique identifiers for persistent HUDs, perhaps that could be split off into its own mod.
Sign in to join this conversation.
No Milestone
No project
No Assignees
6 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#6270
No description provided.