-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π add telemetry pagination (#250)
* π add pagination to booth telemetry - keeps track of length of each page (character count) - cuts it off at some value that is still exportable by chat (max 300,000 chars in minecraft, we'll set it lower for safety: 250,000 chars) - starts a new page once we surpass this max value - converted `show` trigger command to iterate through each page instead of showing booth telemetry all at once - `pop` now clears all but the latest page * π dont show player ID map if there are too many entries * π add rudimentary high-level telemetry stats to view immediately - so we dont NEED to process all the data to get this info currently tracking (total and distinct players): - booth visitors - parkour finishes - times joined queue - fights started - fight wins - fight deaths * π₯ error when booth tag is being called by non-players * π fix telemetry ID being reset on joining bossfight - this was causing the player ID map to balloon in size very fast * π add exit tags for `back_cave` and `waterfall_secret` rooms * π fix booth pages not being initialized if `data.booth` was an empty array * π add explicit log for if there is no booth page data to show * β»οΈ rename `telemetry.temp ` -> `telemetry temp.` * π fix bossfight telemetry tags not working - at some point the tick field was initializing AFTER the rest, and we had a hard-to-see `temp set value {}` command that cleared the tick field - so the string would never set * π add pagination to bossfight telemetry - mostly same as booth - only difference is bossfight root.start tags are the only ones that can start a new page * π fix damage tag not working * π fix schema/get always clearing entire `temp` telemetry storage * π use player ID map for bossfight player ID in root tag - saves 14 characters (20 - ~6) per bossfight * π add schema for and minify damage tag's damage source * π fix scheduled functions breaking with some telemetry data - e.g. relative tick, since it can't store the relative time in its `@s omegaflowey.math.0` score (since it's from the server, not an entity) * π fix accidental removal of bossfight instance ID * π β»οΈ move all active player root tag info under single execution instance * β‘οΈ remove unnecessary extra semicolon `;` separator from all telemetry tags * β°οΈ remove nonfunctional "0 pages" log - this never ran because of us initiailizing at least 1 page always in the data * π show total telemetry pages in `stats` trigger - for quick viewing * π add player ID map to bossfight show trigger
- Loading branch information
1 parent
0059359
commit 7a2377f
Showing
64 changed files
with
403 additions
and
99 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...megaflowey/data/omegaflowey.entity/function/directorial/boss_fight/shared/stop.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...gaflowey.entity/function/directorial/boss_fight/summit/phase/attack/initialize.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...flowey.entity/function/directorial/boss_fight/summit/phase/cutscene/initialize.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...megaflowey.entity/function/directorial/boss_fight/summit/phase/soul/initialize.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...megaflowey.entity/function/directorial/boss_fight/summit/phase/warn/initialize.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...megaflowey.entity/function/directorial/boss_fight/summit/player/join_bossfight.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...ta/omegaflowey.entity/function/directorial/boss_fight/summit/player/queue/join.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...packs/omegaflowey/data/omegaflowey.entity/function/player/rejoin/check/success.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
scoreboard players reset @s omegaflowey.player.telemetry.id | ||
execute unless score #omegaflowey.bossfight.skip_reset_telemetry_id omegaflowey.global.flag matches 1 run \ | ||
scoreboard players reset @s omegaflowey.player.telemetry.id | ||
|
||
execute if entity @s[tag=omegaflowey.player.fighting_flowey] run function omegaflowey.entity:directorial/boss_fight/summit/player/active/leave_and_rejoin | ||
execute if entity @s[tag=omegaflowey.player.in_queue] run function omegaflowey.entity:directorial/boss_fight/summit/player/queue/leave_and_rejoin |
5 changes: 5 additions & 0 deletions
5
datapacks/omegaflowey/data/omegaflowey.entity/function/player/room/enter.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
scoreboard players add #omegaflowey.telemetry.stats.total_visitors omegaflowey.global.flag 1 | ||
execute unless score @s omegaflowey.player.summit.has_visited_booth matches 1 run \ | ||
scoreboard players add #omegaflowey.telemetry.stats.total_distinct_visitors omegaflowey.global.flag 1 | ||
scoreboard players set @s omegaflowey.player.summit.has_visited_booth 1 | ||
|
||
function omegaflowey.main:telemetry/booth/add_tag { name: "root.enter" } | ||
tag @s add omegaflowey.player |
2 changes: 1 addition & 1 deletion
2
...flowey/data/omegaflowey.entity/function/player/room/underground/back_cave/exit.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# function omegaflowey.main:telemetry/booth/add_tag { name: "room.underground.back_cave.exit" } | ||
function omegaflowey.main:telemetry/booth/add_tag { name: "room.underground.back_cave.exit" } | ||
tag @s remove omegaflowey.player.room.back_cave |
2 changes: 1 addition & 1 deletion
2
...flowey.entity/function/player/room/underground/back_cave/waterfall_secret/exit.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# function omegaflowey.main:telemetry/booth/add_tag { name: "room.underground.back_cave.waterfall_secret.exit" } | ||
function omegaflowey.main:telemetry/booth/add_tag { name: "room.underground.back_cave.waterfall_secret.exit" } | ||
tag @s remove omegaflowey.player.room.back_cave.waterfall_secret |
4 changes: 4 additions & 0 deletions
4
.../data/omegaflowey.entity/function/player/room/underground/parkour/finish/enter.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
execute unless score @s omegaflowey.player.summit.has_finished_parkour matches 1 run \ | ||
scoreboard players add #omegaflowey.telemetry.stats.total_distinct_parkour_finishes omegaflowey.global.flag 1 | ||
scoreboard players set @s omegaflowey.player.summit.has_finished_parkour 1 | ||
|
||
function omegaflowey.main:telemetry/booth/add_tag { name: "room.underground.parkour.finish.enter" } | ||
tag @s add omegaflowey.player.room.parkour.finish |
2 changes: 1 addition & 1 deletion
2
...omegaflowey/data/omegaflowey.entity/function/soul/soul_5/healer/heal/as_player.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...packs/omegaflowey/data/omegaflowey.entity/function/utils/damage/as_player/died.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## The active player died after being damaged by a Flowey attack | ||
|
||
# Show custom death message | ||
# TAG_SUMMIT_HARDCODED_GLOBAL_VOLUME | ||
tellraw @a[ \ | ||
x=-186, dx=91, y=10, dy=95, z=12, dz=95, \ | ||
tag=omegaflowey.player \ | ||
] [ \ | ||
{ "selector": "@s"}, \ | ||
" was slain by ", \ | ||
{ "text": "Omega Flowey", "color": "green" } \ | ||
] | ||
|
||
# Run outside tvscreen death animation | ||
function omegaflowey.main:summit/room/outside/setup/tv_screen/death_animation with storage omegaflowey:decorative | ||
|
||
# Re-enable `showDeathMessages` if it was enabled previously | ||
execute if score @s omegaflowey.math.0 matches 1 run gamerule showDeathMessages true | ||
|
||
# Summit stats | ||
scoreboard players add #omegaflowey.telemetry.stats.total_deaths omegaflowey.global.flag 1 | ||
execute unless score @s omegaflowey.player.summit.has_died_to_flowey matches 1 run \ | ||
scoreboard players add #omegaflowey.telemetry.stats.total_distinct_deaths omegaflowey.global.flag 1 | ||
scoreboard players set @s omegaflowey.player.summit.has_died_to_flowey 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...omegaflowey/data/omegaflowey.main/function/telemetry/admin/show/booth/get_page.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$tellraw @s [ { "storage": "omegaflowey:telemetry", "nbt": "data.booth[$(page_index)]" } ] |
16 changes: 16 additions & 0 deletions
16
.../omegaflowey/data/omegaflowey.main/function/telemetry/admin/show/booth/iterate.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
execute if score @s omegaflowey.math.1 >= @s omegaflowey.math.0 run return 0 | ||
|
||
tellraw @s [ \ | ||
"", \ | ||
{ "text": "\npage:", "color": "yellow", "underlined": true }, \ | ||
" ", \ | ||
{ "score": { "name": "@s", "objective": "omegaflowey.math.1" }, "color": "aqua" } \ | ||
] | ||
|
||
execute store result storage omegaflowey:telemetry temp.page_index int 1 run \ | ||
scoreboard players get @s omegaflowey.math.1 | ||
function omegaflowey.main:telemetry/admin/show/booth/get_page with storage omegaflowey:telemetry temp | ||
|
||
scoreboard players add @s omegaflowey.math.1 1 | ||
|
||
function omegaflowey.main:telemetry/admin/show/booth/iterate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.