Fetchr

Fetchr

556 Downloads

Add player configuration

NeunEinser opened this issue · 5 comments

commented

Already partly in the code, but the interface was awful and I decided to not include it in alpha1 (yes that's how long it's been sitting there untouched)

Completely customizable settings for start items and potion effects, similarily to Bingo 3.1 by Brian.

commented

I agree 👍

commented

Just dropping my thoughts here for this long term improvement, based on Bingo 3.1 and your current untouched settings (and some of my personal preferences 😁)

All these settings are global ones, and thus not per-player.

Preset options

  • [Speedrun]: enables/disables the below options according to the speedrun rules (including hiding seed)
  • [Underwater]: Frostwalker, Depth Strider, Water Breathing.
  • [Beginner]: keepInventory, Starting tools, Depth Strider, Water Breathing

General settings (enable/disable)

  • [Show Seed]
  • [keepInventory]

Starting items and effects settings (enable/disable)

These settings can be used in combination, e.g. [Starting tools] and [Icarus] can both be enabled.

For the case of [Frostwalker] and [Depth Strider], they can't both be on boots in regular minecraft, however for simplicity's and customisability's sake I don't think it's necessary to enforce that restriction. So if a player wants both enchantments they can do so.

  • [Starting tools]: axe, pickaxe, shovel
  • [Icarus]: unbreakable elytra + 64 rockets (flight duration 3)
  • [Boats Boats Boats]: 3 boats
  • [Frostwalker]: unbreakable leather boots
  • [Depth Strider]: unbreakable leather boots
  • [Soul Speed]: (for nether runs) unbreakable leather boots
  • [Water Breathing]
  • [Custom Starting Tools/Effects]: configured by player somehow? This will disable the other options above, as they could contradict these ones.

These are of course just my suggestions, so you might have other plans/ideas for this feature.

commented

A lot of this stuff is currently commented or unused in the code

These are the configurations I had pre-programmed:

data modify storage bingo:player configurations append value {name: '{"translate": "bingo.lobby.settings.player.configuration.empty"}', inventory: [], effects: [], fixed: true}
data modify storage bingo:player configurations append value {name: '{"translate": "bingo.lobby.settings.player.configuration.night_vision"}', inventory: [], effects: [{Id:16b, Amplifier: 0b, Duration: 2147483647, Ambient: 0b, ShowParticles: 0b, ShowIcon:0b}], selected: true}
data modify storage bingo:player configurations append value {name: '{"translate": "bingo.lobby.settings.player.configuration.boats"}', inventory: [{Slot: 8b, id: "minecraft:oak_boat", Count: 1b}, {Slot: 17b, id: "minecraft:oak_boat", Count: 1b}, {Slot: 26b, id: "minecraft:oak_boat", Count: 1b}, {Slot: 35b, id: "minecraft:oak_boat", Count: 1b}], effects: [{Id:16b, Amplifier: 0b, Duration: 2147483647, Ambient: 0b, ShowParticles: 0b, ShowIcon:0b}]}
data modify storage bingo:player configurations append value {name: '{"translate": "bingo.lobby.settings.player.configuration.elytra"}', inventory: [{Slot: 8b, id: "minecraft:firework_rocket", Count: 64b}, {Slot: 102b, id: "minecraft:elytra", Count: 1b, tag: {Unbreakable: true}}], effects: [{Id:16b, Amplifier: 0b, Duration: 2147483647, Ambient: 0b, ShowParticles: 0b, ShowIcon:0b}]}
data modify storage bingo:player configurations append value {name: '{"translate": "bingo.lobby.settings.player.configuration.frostwalker"}', inventory: [{Slot: 100b, id: "minecraft:leather_boots", Count: 1b, tag: {Unbreakable: true, Enchantments:[{lvl: 2s, id: "minecraft:frost_walker"}]}}], effects: [{Id:16b, Amplifier: 0b, Duration: 2147483647, Ambient: 0b, ShowParticles: 0b, ShowIcon:0b}]}
data modify storage bingo:player configurations append value {name: '{"translate": "bingo.lobby.settings.player.configuration.underwater"}', inventory: [{Slot: 100b, id: "minecraft:leather_boots", Count: 1b, tag: {Unbreakable: true, Enchantments:[{lvl: 3s, id: "minecraft:depth_strider"}]}}], effects: [{Id:13b, Amplifier: 0b, Duration: 2147483647, Ambient: 0b, ShowParticles: 0b, ShowIcon:0b}, {Id:16b, Amplifier: 0b, Duration: 2147483647, Ambient: 0b, ShowParticles: 0b, ShowIcon:0b}]}

Ofc there can be more than this, this is just what I added way back, and night vision is from before I adjusted brightness via dimension settings, so that's not needed anymore.

There was supposed to be a way where you could get into creative in a certain spot in the lobby, get stuff from the creative inventory, apply potions effects to yourself, and lay out your inventory how it would be layed out once you respawn. You could then save that configuration with a name and apply it.

commented

Yeah, I came across some unused translations when I was searching the code

{
    "bingo.lobby.settings.player.configuration.boats": "Night Vision + Boats Boats Boats",
    "bingo.lobby.settings.player.configuration.elytra": "Night Vision + Elytra",
    "bingo.lobby.settings.player.configuration.empty": "Empty",
    "bingo.lobby.settings.player.configuration.frostwalker": "Night Vision + Frost Walker",
    "bingo.lobby.settings.player.configuration.night_vision": "Night Vision",
    "bingo.lobby.settings.player.configuration.underwater": "Night Vision + Water Breathing + Depth Strider",
    
    "bingo.lobby.settings.player.save.new.explanation": "Set the name for your new configuration by renaming the nametag you just received using the anvil underneath this sign.\nWhen you are done, simply drop the nametag.\nIn case your inventory is full, you can temporarily drop something in front of the anvil to pick it back up when the nametag is inside of the anvil's GUI.",
    "bingo.lobby.settings.player.tutorial.part1": "These settings allow you to manipulate with which items and effects the player spawns.\nAll potion effects are permanent.",
    "bingo.lobby.settings.player.tutorial.part2": "There are already some pre-configured presets you can use by clicking the “Select/Preview Config” sign to the right.",
    "bingo.lobby.settings.player.tutorial.part3": "To make your own configuration, simply change the items in your own inventory or drink a potion to add a permanent status effect. To get rid of your effects, use milk.",
    "bingo.lobby.settings.player.tutorial.part4": "Stand on the chiseled quartz block to gain creative mode for easy access to all the items.\nIf you are an operator, or are playing singleplayer, you can also use the /give and /effect commands.",
}

It sounds like a decent approach.

Is your plan to allow per-player configurations, or would this be a global setting?
If it's per player, then this could be used as a handicap feature for two people playing against each other.
Although then it would then be a pain if someone wants to set the same custom starting items for everyone.

commented

Is your plan to allow per-player configurations, or would this be a global setting?

Globally, as I see that as the most common usecase. Not even sure how it'd work per player, as "preferences" are supposed to be sth that doesn't really affect gameplay and any player can adjust as they please without interfering with what another player may define as "cheating". But I suppose there could be a setting "allow starting configuration overrides per player", but yeah I think it's probably better to just focus on making this global and then maybe if there are usecases think about other things as well.