Service reports: Implement a Formspec which sta ... #5513

Open
opened 2023-11-18 16:33:46 +00:00 by yourland-report · 11 comments

Service reports a bug:

Implement a Formspec which staff and bailiffs can send to players. Let the command take two paramenters. The first one is the target playername. If the second parameter has no # in it, then send a formspec with a preset question and answers to the user. If it has a # in it, allow creating a new one on the fly

Player position:

{
	x = 2007.6560058594,
	y = 25,
	z = 1294.3950195313
}

Player look:

{
	x = 0.013873598538339,
	y = -0.56063896417618,
	z = -0.82794409990311
}

Player information:

{
	protocol_version = 42,
	lang_code = "de",
	formspec_version = 6,
	ip_version = 6,
	min_rtt = 0.014999999664724,
	avg_rtt = 0.017000000923872,
	minor = 7,
	max_jitter = 0.55400002002716,
	avg_jitter = 0.0019999984651804,
	connection_uptime = 51320,
	serialization_version = 29,
	patch = 0,
	version_string = "5.7.0",
	max_rtt = 0.71899998188019,
	state = "Active",
	min_jitter = 0,
	major = 5
}

Player meta:

{
	fields = {
		["petz:werewolf_vignette_id"] = "19",
		placed_nodes = "23877",
		died = "119",
		crafted = "142",
		hud_state = "on",
		repellant = "0",
		arenalib_infobox_arenaID = "0",
		szutil_watch = "return {}",
		["arena_lib_editor.spawner_ID"] = "0",
		["arena_lib_editor.players_number"] = "0",
		["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}",
		bitten = "0",
		["stamina:poisoned"] = "no",
		["stamina:exhaustion"] = "40.5",
		xp = "0",
		punch_count = "2018",
		["3d_armor_inventory"] = "return {\"\", \"\", \"\", \"\", \"\", \"\"}",
		["petz:werewolf_clan_idx"] = "2",
		["ocean_build.last_warning"] = "1695708624",
		["ocean_build.forbidden"] = "true",
		["ocean_build.ocean_built"] = "12",
		["petz:lycanthropy"] = "0",
		inflicted_damage = "1070938",
		yl_commons_player_created = "1610342909",
		["signslib:pos"] = "(1954,-22,1298)",
		["stamina:level"] = "0",
		["arena_lib_editor.team_ID"] = "0",
		lagometer = "1",
		["petz:werewolf"] = "0",
		digged_nodes = "21652",
		yl_commons_thankyou = "32",
		["petz:old_override_table"] = "return {[\"speed\"] = 1, [\"sneak_glitch\"] = false, [\"sneak\"] = true, [\"jump\"] = 1, [\"gravity\"] = 1, [\"new_move\"] = true}",
		yl_commons_player_joined = "1700273946",
		ui_waypoints = "{\"data\":[{\"active\":false,\"name\":\"Waypoint 1\",\"world_pos\":{\"x\":2002.0,\"y\":8.0,\"z\":1154.0}}],\"selected\":1.0}",
		yl_audio_state = "off",
		["ethereal:fly_timer"] = "-99",
		yl_church = "return {[\"last_death\"] = {[\"z\"] = -2009, [\"x\"] = -983, [\"y\"] = 19}, [\"last_death_portal\"] = 1672529932, [\"last_heal\"] = 1676219630}",
		played_time = "74928263"
	}
}

Log identifier


[MOD] yl_report log identifier = SWfEcnL2qKQ1R9AOZMZX0LTwqO2I0klY

Profiler save:

profile-20231118T163346.json_prettyEE

Status:

# Server: version: 5.7.0-yl-thx-tmm | game: Minetest Game | uptime: 5d 6h 35min 24s | max lag: 0.512s | clients (29/52): ahret, AliasAlreadyTaken, Amelie15, America, Bingo, Boot, chaosKing, CloudZ, daydream, DragonWrangler1, flux, formations52, Heron, Kalek, kona, laira, LucyUnicorn_Queen, Noii, pavlo98, Penelopee, pingu_2, Prismatim, rheo, Service, STEALTH, Tom_Bombadil, Transformers, vavo, XeLNaGa

Teleport command:

/teleport xyz 2008 25 1294

Compass command:

/give_compass Construction SWfEcnL2qKQ1R9AOZMZX0LTwqO2I0klY D2691E 2008 25 1294
Service reports a bug: > Implement a Formspec which staff and bailiffs can send to players. Let the command take two paramenters. The first one is the target playername. If the second parameter has no # in it, then send a formspec with a preset question and answers to the user. If it has a # in it, allow creating a new one on the fly Player position: ``` { x = 2007.6560058594, y = 25, z = 1294.3950195313 } ``` Player look: ``` { x = 0.013873598538339, y = -0.56063896417618, z = -0.82794409990311 } ``` Player information: ``` { protocol_version = 42, lang_code = "de", formspec_version = 6, ip_version = 6, min_rtt = 0.014999999664724, avg_rtt = 0.017000000923872, minor = 7, max_jitter = 0.55400002002716, avg_jitter = 0.0019999984651804, connection_uptime = 51320, serialization_version = 29, patch = 0, version_string = "5.7.0", max_rtt = 0.71899998188019, state = "Active", min_jitter = 0, major = 5 } ``` Player meta: ``` { fields = { ["petz:werewolf_vignette_id"] = "19", placed_nodes = "23877", died = "119", crafted = "142", hud_state = "on", repellant = "0", arenalib_infobox_arenaID = "0", szutil_watch = "return {}", ["arena_lib_editor.spawner_ID"] = "0", ["arena_lib_editor.players_number"] = "0", ["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}", bitten = "0", ["stamina:poisoned"] = "no", ["stamina:exhaustion"] = "40.5", xp = "0", punch_count = "2018", ["3d_armor_inventory"] = "return {\"\", \"\", \"\", \"\", \"\", \"\"}", ["petz:werewolf_clan_idx"] = "2", ["ocean_build.last_warning"] = "1695708624", ["ocean_build.forbidden"] = "true", ["ocean_build.ocean_built"] = "12", ["petz:lycanthropy"] = "0", inflicted_damage = "1070938", yl_commons_player_created = "1610342909", ["signslib:pos"] = "(1954,-22,1298)", ["stamina:level"] = "0", ["arena_lib_editor.team_ID"] = "0", lagometer = "1", ["petz:werewolf"] = "0", digged_nodes = "21652", yl_commons_thankyou = "32", ["petz:old_override_table"] = "return {[\"speed\"] = 1, [\"sneak_glitch\"] = false, [\"sneak\"] = true, [\"jump\"] = 1, [\"gravity\"] = 1, [\"new_move\"] = true}", yl_commons_player_joined = "1700273946", ui_waypoints = "{\"data\":[{\"active\":false,\"name\":\"Waypoint 1\",\"world_pos\":{\"x\":2002.0,\"y\":8.0,\"z\":1154.0}}],\"selected\":1.0}", yl_audio_state = "off", ["ethereal:fly_timer"] = "-99", yl_church = "return {[\"last_death\"] = {[\"z\"] = -2009, [\"x\"] = -983, [\"y\"] = 19}, [\"last_death_portal\"] = 1672529932, [\"last_heal\"] = 1676219630}", played_time = "74928263" } } ``` Log identifier ``` [MOD] yl_report log identifier = SWfEcnL2qKQ1R9AOZMZX0LTwqO2I0klY ``` Profiler save: ``` profile-20231118T163346.json_prettyEE ``` Status: ``` # Server: version: 5.7.0-yl-thx-tmm | game: Minetest Game | uptime: 5d 6h 35min 24s | max lag: 0.512s | clients (29/52): ahret, AliasAlreadyTaken, Amelie15, America, Bingo, Boot, chaosKing, CloudZ, daydream, DragonWrangler1, flux, formations52, Heron, Kalek, kona, laira, LucyUnicorn_Queen, Noii, pavlo98, Penelopee, pingu_2, Prismatim, rheo, Service, STEALTH, Tom_Bombadil, Transformers, vavo, XeLNaGa ``` Teleport command: ``` /teleport xyz 2008 25 1294 ``` Compass command: ``` /give_compass Construction SWfEcnL2qKQ1R9AOZMZX0LTwqO2I0klY D2691E 2008 25 1294 ```
AliasAlreadyTaken was assigned by yourland-report 2023-11-18 16:33:46 +00:00
AliasAlreadyTaken added the
1. kind/enhancement
2. prio/good first issue
labels 2023-11-18 17:02:57 +00:00

Currently we try to talk to people, whose chat may be off or they otherwise have no means of receiving messages. They simply may be not aware of the chat.

I'd like to send them a formspec, with buttons so they can answer.

Currently we try to talk to people, whose chat may be off or they otherwise have no means of receiving messages. They simply may be not aware of the chat. I'd like to send them a formspec, with buttons so they can answer.

Since I've the feeling noone really likes formspecs here, I thought this would be suited for me.
(I've done some formspec mods before, but I never finished them :D)

turned out this is way more complex than I thought (or I added too many features)
https://gitea.your-land.de/tour/chat_formspec

I guess bailiffs should make use of it (ct. #3323 (comment) I guess there was even a more precise issue but I can't find it). If even devs struggle with formspecs, how shall bailiffs do? So I added a gui.
Chatcommands are only used to access this gui. So the feature this mod provides is not exactly what was bugged here. If this is a problem, please let me know!
I'm also not 100% sure what preset answers means (or how that should be handled). If it's just about some buttons which trigger an event (chat message which is sent do the one who invoked the fs) it should be doable quite easily. If it's something else: Then I have coded something useless :D

If this mod is more or less the right direction, I'll try to add more features, such as translations. (check out the issues in the mod :D)

Since I've the feeling noone really likes formspecs here, I thought this would be suited for me. (I've done some formspec mods before, but I never finished them :D) turned out this is way more complex than I thought (or I added too many features) https://gitea.your-land.de/tour/chat_formspec I guess bailiffs should make use of it (ct. https://gitea.your-land.de/your-land/bugtracker/issues/3323#issuecomment-36206 I guess there was even a more precise issue but I can't find it). If even devs struggle with formspecs, how shall bailiffs do? So I added a gui. Chatcommands are only used to access this gui. So the feature this mod provides is not exactly what was bugged here. If this is a problem, please let me know! I'm also not 100% sure what preset answers means (or how that should be handled). If it's just about some buttons which trigger an event (chat message which is sent do the one who invoked the fs) it should be doable quite easily. If it's something else: Then I have coded something useless :D If this mod is more or less the right direction, I'll try to add more features, such as translations. (check out the issues in the mod :D)
Member

https://gitea.your-land.de/tour/chat_formspec

i'm done for the night. remind me to review this if i forget about it, i'm interested.

> https://gitea.your-land.de/tour/chat_formspec i'm done for the night. remind me to review this if i forget about it, i'm interested.
Member

https://gitea.your-land.de/tour/chat_formspec.git

played around with it a bit, this is actually much better than i was imagining! i didn't do a thorough test, but i think it's probably good.

> https://gitea.your-land.de/tour/chat_formspec.git played around with it a bit, this is actually much better than i was imagining! i didn't do a thorough test, but i think it's probably good.
Member

perhaps one thing - the message doesn't indicate who sent it. probably it should, so the player can e.g. /msg the sender.

perhaps one thing - the message doesn't indicate who sent it. probably it should, so the player can e.g. /msg the sender.

After quite some delay I guess I finally understand what Alias meant here tour/chat_formspec#7 and here

allow creating a new one on the fly

Not creating a new formspec but insert a new question and new answer-options into a template

So I threw out hardcoded preset formspecs alltogether and implemented the #-Synax proposed by Alias.
Since this made things much simpler reused 50% of the code and started anew - see https://gitea.your-land.de/tour/chat_formspec-redo for the updated version.

After quite some delay I guess I finally understand what Alias meant here https://gitea.your-land.de/tour/chat_formspec/issues/7 and here > allow creating a new one on the fly Not creating a new formspec but insert a new question and new answer-options into a template So I threw out hardcoded preset formspecs alltogether and implemented the #-Synax proposed by Alias. Since this made things much simpler reused 50% of the code and started anew - see https://gitea.your-land.de/tour/chat_formspec-redo for the updated version.
Member

Yes, this is what Alias meant, but with visual editor addition, nice :)

Only some weirdness I feel is happening when I press buttons in the "preview" area.
Otherwise this is cool, and with translations could work nicely...
Even better if predefined response buttons will work with translations too...

Yes, this is what Alias meant, but with visual editor addition, nice :) Only some weirdness I feel is happening when I press buttons in the "preview" area. Otherwise this is cool, and with translations could work nicely... Even better if predefined response buttons will work with translations too...

Just say when ready for QA :)

Just say when ready for QA :)

Even better if predefined response buttons will work with translations too...

Had to make sure, but that was/is already possible: formspec_escape does not remove translation markers. updated the documentation (57e2520b35)

Otherwise this is cool, and with translations could work nicely...

Added translation for everything the target can see. Note that the sender will now see the preview based on his locale.
Feedback welcome (both the english texts and german translations)
I did not translate the presets since I suspect them to be changed somewhere else.

Only some weirdness I feel is happening when I press buttons in the "preview" area.

Yes, can't avoid that... I use the same code to render the preview and the target fs. IMO there is no need to catch these events, but if ppl see that different I can implement some stuff 🙂

Unless the last point is a blocker: ready for QA

> Even better if predefined response buttons will work with translations too... Had to make sure, but that was/is already possible: `formspec_escape` does not remove translation markers. updated the documentation (https://gitea.your-land.de/tour/chat_formspec-redo/commit/57e2520b35dd81912db9fe71d9a3fbd27847d351) > Otherwise this is cool, and with translations could work nicely... Added translation for everything the target can see. Note that the sender will now see the preview based on his locale. Feedback welcome (both the english texts and german translations) I did not translate the presets since I suspect them to be changed somewhere else. > Only some weirdness I feel is happening when I press buttons in the "preview" area. Yes, can't avoid that... I use the same code to render the preview and the target fs. IMO there is no need to catch these events, but if ppl see that different I can implement some stuff 🙂 Unless the last point is a blocker: ready for QA
flux added the
4. step/ready to QA test
label 2024-02-14 19:21:06 +00:00
AliasAlreadyTaken added this to the 1.1.123 milestone 2024-02-14 19:57:10 +00:00
Crash: your-land/bugtracker#6300
AliasAlreadyTaken added the
ugh/QA NOK
label 2024-02-16 08:48:52 +00:00

crash is (hopefully) fixed...

Only some weirdness I feel is happening when I press buttons in the "preview" area.

Got an idea for this while working on the crash. You can no longer click there. (Note that you can still trigger the weirdness by using tab)

crash is (hopefully) fixed... > Only some weirdness I feel is happening when I press buttons in the "preview" area. Got an idea for this while working on the crash. You can no longer click there. (Note that you can still trigger the weirdness by using tab)
AliasAlreadyTaken modified the milestone from 1.1.123 to 1.1.124 2024-02-23 14:19:28 +00:00
whosit removed the
ugh/QA NOK
label 2024-02-29 08:46:03 +00:00
AliasAlreadyTaken modified the milestone from 1.1.124 to Next 2024-04-22 12:33:33 +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#5513
No description provided.