Yay, cool! The HUD is now much better. Double-yay for progress bars. :-)
Oh, and the example quest should have its dependendy on default listed.
I discovered a bug: If you have an empty quest list (no matter which tab) in the quest dialog and hit “Info”, Minetest freezes.
Further HUD suggestions:
- When there are no open/failed/finished quests in a tab, don't show a textlist or table (whatever formspec element you used), show a label instead saying something like “There are no open quests.”.
- When there are no more open quests and no more quest which have been just finished or aborted or failed, the HUD should say something like: “No more open quests.”, maybe it gets automatically hidden after 10 seconds or so, so it does not get in the way (auto-hide should be configurable).
- Quests which have been “just finished” become green in the HUD and are auto-hidden after a few seconds. I like this. But I think there is still a minor flaw in it, because the quest which has been just finished is still listed under a label which says “Open Quests:”, which is of course untrue at this moment. It's not very important, but a possible “fix” for this would be to create another list saying “Just finished quests:”, which only appears when there is at least one such quest. The downside of this is that the quest info tends to “jump around” in the HUD. The lazy and probably saner fix would be to simply rename the label “Open Quests:” to “Quests:”. This would not be a problem, because the state of a quest can already be inferred from its color (yellow=open, green=finished, red: failed or aborted).
Other comments:
- I do not like how the long quest descriptions are implemented. Currently, it is just a text field, which can be edited, but it should be read-only. This is not really your fault, however, since the engine does not provide multi-line text labels at the moment. I have made an issue on GitHub about that already:
https://github.com/minetest/minetest/issues/2249
There is an ugly workaround, however: Simply by using a textlist instead, but then you have to align each line of text manually, or you move this responsibility to the modder, which is even worse. So its best to just stay with (the ugly) textfields for now and lets hope multiline labels get implemented some day. ;-)
Edit:
I have tried out the API now and played around with sample_quest a bit, and it seems weird.
So at the beginning you register 4 quests, all with auto-accept. To my understanding, an auto-accept quest is active immediately, no need to call start_quest, right?
But if that's the case, why is it that at the beginning, only the quest “Walk 200 nodes” is active, but not the other ones? I have not seen any start_quest for the walk quest. So how could the mod possibly have known that you intended to only start the first “autoaccept” quest, but not the other 3? This doesn't look right.