Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Player Selectable Tier / Rules (pre-defined) #464

Open
Kowantify opened this issue Oct 26, 2023 · 1 comment
Open

Player Selectable Tier / Rules (pre-defined) #464

Kowantify opened this issue Oct 26, 2023 · 1 comment

Comments

@Kowantify
Copy link

Kowantify commented Oct 26, 2023

Is your feature request related to a problem? Please describe.
I'm running into the issue of attempting to have players be able to select their own rules / difficulty level with levelled mobs custom rules
Currently on my server I have 3 buttons that have generic names such as "easy, medium, and hard" and these buttons would apply a luck perms permission to that specific player, which then PAPI would read that as true false, meaning I would need 3 rules essentially for each "difficulty" level, this seemed to be very finicky, and only worked for one ruleset at a time, which is where I stumbled into many issues, I attempted a slew of ideas, but all didn't meet my primary ideas, the ability for the players to select their desired experience, on a permission level

Describe the solution you'd like
----IDEA UPDATED 10-26-2023----
How I would like this to work, (Thanks Buffalo) is that a player would in game type "/lm difficulty "insert vairable here"
This would then, activate a ruleset that has the condition "difficulty-selector: 'variable'"
Example:

 - enabled: true
    name: 'Custom Levelling Hard'

#THE CUSTOM CONDITION BELOW
    condition:  
      difficulty-selector: 'Hard' <-------This would be the variable provided in "/lm difficulty" so that players can select a ruleset

    strategies:
      player-levelling:
        enabled: true
        match-level: false
        use-player-max-level: false
        decrease-level: true
        recheck-players: false
        preserve-entity: 10s
        player-level-scale: 1.0
        level-cap: 50
        merge: false
        tiers:
          1-10: 1-10
        11-20: 11-20
        10-30: 10-30
        31-40: 31-40:
        41-50: 41-50
        variable: '%level%'
 - enabled: true
    name: 'Custom Levelling Easy'

#THE CUSTOM CONDITION BELOW
    condition:  
      difficulty-selector: 'Easy' <-------This would be the variable provided in "/lm difficulty" so that players can select a ruleset

    strategies:
      player-levelling:
        enabled: true
        match-level: false
        use-player-max-level: false
        decrease-level: true
        recheck-players: false
        preserve-entity: 10s
        player-level-scale: 1.0
        level-cap: 25
        merge: false
        tiers:
          1-5: 1-5
        11-15: 11-15
        10-25: 10-25
        variable: '%level%'

Describe alternatives you've considered
I've attempted to use multiple different PAPI placeholders, and with the support of strings it is proving to be very difficult to implement proper rules that include more then just a "yes / no" tier, this would allow for multiple different difficulty levels up to the server owner, and that lets the players decide their own experience

@Kowantify Kowantify changed the title Player Selectable Tier / Rules (pre-defined Player Selectable Tier / Rules (pre-defined) Oct 26, 2023
@UltimaOath
Copy link
Collaborator

Initial first thoughts: https://discord.com/channels/752310043214479462/756850940694495253/1167129863606501446

A new placeholder, %levelledmobs_player-option%, which refers to a new command /lm enable (Default) or /lm disable. For Ops /lm enable <player>, /lm enable all, /lm disable <player>, /lm disable all. This placeholder can be used to populate the Player Level Modifier system with options to pick from. Good for simple off/on setup.

A new config option to use in custom rules or in default rule, which looks like player-optional: ['TRUE', 'Name']; The first option being whether the rule is enabled or disabled by default for players, and the second option being the plaintext name of the rule which players are selecting from as options via the command /lm rules optional <name> enabled or /lm rules optional <name> disabled ; For Ops /lm rules optional <name/all> enabled, /lm rules optional <name/all> enabled <player>, /lm rules optional <name/all> disabled, /lm rules optional <name/all> disabled <player>.

  - enabled: true
    name: 'New Player Optional Rule'
    condition:  
      player-optional: ['TRUE', 'MC Level Based Mobs']
    strategies:
      player-levelling:
        enabled: true
        match-level: false
        use-player-max-level: false
        decrease-level: true
        recheck-players: false
        preserve-entity: 10s
        player-level-scale: 1.0
        level-cap: 50
        merge: false
        tiers:
          1-10: 1-10
          11-20: 11-20
          10-30: 10-30
          31-40: 31-40
          41-50: 41-50
        variable: '%level%'

  - enabled: true
    name: 'New Player Optional Rule 2'
    condition:  
      player-optional: ['FALSE', 'Weighted Random']
    strategies:
      weighted-random: true

This outputs the following command options: /lm rules optional "MC Level Based Mobs" enabled /lm rules optional "Weighted Random" enabled etc. The idea: Rules are optionally turned off and on for players. If a player enables a rule for themselves, it is re-evaluated at the next async task and working in a similar fashion to how Player Level Modifier updates levels for players it can update rules applied to nearby entities for the closest players?

Might even incorporate the permission command so that only the rules available to specific player roles are available for off/on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants