infernalstudios / Questlog

Other
2 stars 0 forks source link

[Suggestion] Multiple Different Completion States for Quests #25

Open nekomaster1000 opened 1 month ago

nekomaster1000 commented 1 month ago

Image As-is, Questlog has one set of Objectives that, when fulfilled, will trigger one Completion State - 'Completed'.

This suggestion proposes that multiple different Objectives (And Rewards) can be set, and whichever is completed first will trigger whatever Completion State that user has assigned to it - For example, 'Failed' and 'Abandoned' as alternatives.

Whichever Objective is completed first would finish the quest and veto the ability to fulfill the requirements of the other Objectives (Unless the quest was reset via command rewards, or whatever.)

Declaring unique objective names would be optional, but unnecessary for single-objective quests. Idea brought about by Elithris on Discord.

Here's an example of what the JSON syntax for this could possibly look like:


{
  "display": {
    "title": "Multiple-Choice.",
    "description": "Kill either a Villager or a Pillager to cement your path forward.",
    "icon": {
      "item": "minecraft:diamond_sword"
    }
  },
  "objectives": [
    {
      "kill_villager": [
        {
          "type": "questlog:entity_kill",
          "total": 1,
          "entity": "minecraft:villager",
          "display": {
            "name": "Kill a Villager",
            "icon": {
              "item": "minecraft:rose"
            },
            "questlogCompletionStatus": {
                "name": "Slain",
                "textColor": "#a83250"
            }
          }
        }
      ]
    },
    {
      "kill_pilager": [
        {
          "type": "questlog:entity_kill",
          "total": 1,
          "entity": "minecraft:pillager",
          "display": {
            "name": "Or... Kill a Pillager",
            "icon": {
              "item": "minecraft:crossbow"
            },
            "questlogCompletionStatus": {
                "name": "Defeated",
                "textColor": "#25a138"
            }
          }
        }
      ]
    }
  ],
  "rewards": [
    {
      "kill_villager": [
        {
          "type": "questlog:item",
          "item": "minecraft:iron_ingot",
          "display": {
            "name": "You Monster...",
            "icon": {
              "item": "minecraft:iron_ingot"
            }
          }
        }
      ]
    },
    {
      "kill_pillager": [
        {
          "type": "questlog:item",
          "item": "minecraft:experience_bottle",
          "display": {
            "name": "You're a Hero, Brian!",
            "icon": {
              "item": "minecraft:experience_bottle"
            }
          }
        }
      ]
    }
  ],
  "triggers": []
}