Feywild

Feywild

5M Downloads

Make the quest system more scalable

noeppi-noeppi opened this issue ยท 2 comments

commented

I see a few problems the current quest system (especially the way how it is represented in datapacks):

  • It uses magic numbers and thus does not allow datapacks to insert a quest between two builtin quests. Also the amount of quests per faction is limited to 100
  • Multiple datapacks adding quests will not really work together if they use the same id
  • You need to specify the amount of lines instead of splitting one big translation automatically. As some texts are shorter or longer in different languages, this can be a problem. Maybe take a look at how JEI does this in its info category.
  • you can't easily add more complicated stuff to extraData.

My suggestions on what to change:

  • Don't use magic numbers but resource locations to identify a quest.
  • Give quests priority numbers and always leave like 100 between two builtin quests. (It will still take time to hit the integer limit :P). Then each datapack can add their own priority. When loading the quests, sort them by priority and if two quests have the same priority, sort them alphabetically by their id.
  • Use a single text component json instead of lines. This for example allows to add keybind text components to the description. The resulting text should then be wrapped automatically.
  • Make extraData a json object and make it possible for other mods to add their own types of task.

I hope my suggestions help redesigning the quest system.

commented

1.2.4 has been released

commented

Thanks for the feedback ๐Ÿ˜Š

1.I think I am stupid, after I rewrote the line dispaly I forgot I could have just made it automatically know when a new line is needed and the lines field was there for another reason and will most likely be taken out.

  1. These are good ideas will keep them in mind. Back to the drawing board I guess. :P