{"action":"created","issue":{"url":"https://api.github.com/repos/MinetestForFun/server-minetestforfun/issues/145","labels_url":"https://api.github.com/repos/MinetestForFun/server-minetestforfun/issues/145/labels{/name}","comments_url":"https://api.github.com/repos/MinetestForFun/server-minetestforfun/issues/145/comments","events_url":"https://api.github.com/repos/MinetestForFun/server-minetestforfun/issues/145/events","html_url":"https://github.com/MinetestForFun/server-minetestforfun/issues/145","id":96449650,"number":145,"title":"Quest system","user":{"login":"gravgun","id":396420,"avatar_url":"https://avatars.githubusercontent.com/u/396420?v=3","gravatar_id":"","url":"https://api.github.com/users/gravgun","html_url":"https://github.com/gravgun","followers_url":"https://api.github.com/users/gravgun/followers","following_url":"https://api.github.com/users/gravgun/following{/other_user}","gists_url":"https://api.github.com/users/gravgun/gists{/gist_id}","starred_url":"https://api.github.com/users/gravgun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gravgun/subscriptions","organizations_url":"https://api.github.com/users/gravgun/orgs","repos_url":"https://api.github.com/users/gravgun/repos","events_url":"https://api.github.com/users/gravgun/events{/privacy}","received_events_url":"https://api.github.com/users/gravgun/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/MinetestForFun/server-minetestforfun/labels/Modding","name":"Modding","color":"006b75"},{"url":"https://api.github.com/repos/MinetestForFun/server-minetestforfun/labels/Priority:%20Medium","name":"Priority: Medium","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"gravgun","id":396420,"avatar_url":"https://avatars.githubusercontent.com/u/396420?v=3","gravatar_id":"","url":"https://api.github.com/users/gravgun","html_url":"https://github.com/gravgun","followers_url":"https://api.github.com/users/gravgun/followers","following_url":"https://api.github.com/users/gravgun/following{/other_user}","gists_url":"https://api.github.com/users/gravgun/gists{/gist_id}","starred_url":"https://api.github.com/users/gravgun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gravgun/subscriptions","organizations_url":"https://api.github.com/users/gravgun/orgs","repos_url":"https://api.github.com/users/gravgun/repos","events_url":"https://api.github.com/users/gravgun/events{/privacy}","received_events_url":"https://api.github.com/users/gravgun/received_events","type":"User","site_admin":false},"milestone":null,"comments":14,"created_at":"2015-07-22T01:03:54Z","updated_at":"2015-11-26T19:47:54Z","closed_at":null,"body":"69ce8e826682e79716c114f7a429e11a4f2fc00b introduced the [quests](/TeTpaAka/quests) framework as well as some API proxy to simulate repeating quests.\r\nHowever, given the things we might want to do, i.e. a quest system *à la World Of Warcraft*, a certain amount of work might be required. The quests should be as follows:\r\n* [x] Able to have an icon\r\n* [x] Able to be periodically renewing\r\n* [x] Have an option to display only specific quests in the HUD\r\n  * [x] Rework the HUD code as it is inflexible\r\n* [x] Can be made of tasks, subquests, counting towards the quest completion\r\n  * [x] Tasks display can be dependent on the level of completion of other tasks, and be disabled under other task conditions, allowing for branching paths in the quest development\r\n  * [x] Have callbacks (`on_available`, `on_disabled`, triggered upon the required conditions are met)\r\n* [x] Have a callback be called upon cancelling the quest\r\n\r\nI've began work on [my fork](/gravgun/quests) and then will do a big PR to the author. The API changes are non-breaking.\r\nUpdate: **DONE!** Was a tedious *task*! (heh, very punny)\r\n\r\nMFF-side code such as the one that handles quest progress must stay on our side, only the relevant changes for [quests] must be made in the fork. From there on, we'll be able to fully harness the possibilities that the mod offers to have the quest system be as fit as we want it. Speaking of our side, here's what must be implemented as possible quest objectives:\r\n**General:**\r\n* [ ] Interaction with node N in list L(N)\r\n  * [x] Digging → `minetest.register_on_dignode`\r\n  * [x] Punching → `minetest.register_on_punchnode`\r\n  * [ ] Right-clicking → ?\r\n  * [x] Placing → `minetest.register_on_placenode`\r\n  * [x] Including groups\r\n  * [ ] With specific tools → callback parameters\r\n    * [ ] Including groups!\r\n  * [ ] At location L in list L(L)\r\n    * [ ] Radius\r\n* [ ] Travel N nodes → timer, each 0.5s or so\r\n  * [ ] Whatever the transportation mean\r\n  * [ ] By walking\r\n  * [ ] By boat\r\n  * [ ] By minecart\r\n  * [ ] Handle the case of teleportation, otherwise it breaks things\r\n    * Implement by doing a distance check (if too much then ignore)\r\n    * Includes nether portal and warpstone-related teleportation\r\n* [ ] Go to a certain location on map → same timer as above\r\n  * [ ] Specified, otherwise default, radius around said point\r\n  * [ ] Possibility to wildcard position on Y axis (i.e. no depth requirement)\r\n* [ ] Go N nodes deep/high → same timer as above\r\n  * [ ] Handle the case of the Nether where it should **not** trigger this objective\r\n    * [ ] Unless explicitly stated. That is, \"Go to the Nether\" quest.\r\n* [ ] Craft N of thing T → `minetest.register_on_craft`\r\n  * [ ] Including groups!!\r\n  * [ ] Using other thing O in list L(O)\r\n    * ~~[ ] Including groups~~ Not this time, not really useful.\r\n\r\n**Extended** (i.e. **knowingly** not possible without further mod modification):\r\n* [ ] Pickup N of thing T in list L(T) → `item_drop` edit to add item pickup callback\r\n  * [ ] Including groups!!!\r\n  * [ ] Have them at the same time in inventory\r\n  * [ ] Also check the bags!\r\n* [ ] Drop N items of thing T in list L(T) → `item_drop` edit to add item drop callback\r\n  * [ ] Including groups!!!!\r\n* [ ] Reach a certain playerstat[us] stat level → Requires `playerstat[us]` to be introduced\r\n\r\n**Hypothetical** (likely possible but need info):\r\n* [ ] Defeat N mobs → ?\r\n  * [ ] Of type T in list L(T)\r\n  * [ ] Using weapon W in list L(W)\r\n    * [ ] Including groups!!!!!\r\n* [ ] Use item I in list L(I) N times → ?\r\n* [ ] Use magical spell M in list L(M) N times → ?\r\n* [ ] Wear pieces of armor A in list L(A) → ?\r\n  * [ ] At the same time\r\n\r\n**3rd party** (impossible/hard/needless to implement in `mff_quests` core itself, callbacks on said mods would be better, used in a `glue.lua` file or something):\r\n* [ ] Speak to NPC N in list L(N) → Requires an NPC mod\r\n  * [ ] Choose dialogue option O in list L(O) → Use NPC mod callback\r\n* [ ] Buy/sell N of items I in list L(I) → NPC / buying/vending-machine mod required with appropriate callbacks\r\n\r\nWhen info is known (or not) about a specific objective's implementation details, it can be moved back and forth between the lists."},"comment":{"url":"https://api.github.com/repos/MinetestForFun/server-minetestforfun/issues/comments/159985391","html_url":"https://github.com/MinetestForFun/server-minetestforfun/issues/145#issuecomment-159985391","issue_url":"https://api.github.com/repos/MinetestForFun/server-minetestforfun/issues/145","id":159985391,"user":{"login":"gravgun","id":396420,"avatar_url":"https://avatars.githubusercontent.com/u/396420?v=3","gravatar_id":"","url":"https://api.github.com/users/gravgun","html_url":"https://github.com/gravgun","followers_url":"https://api.github.com/users/gravgun/followers","following_url":"https://api.github.com/users/gravgun/following{/other_user}","gists_url":"https://api.github.com/users/gravgun/gists{/gist_id}","starred_url":"https://api.github.com/users/gravgun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gravgun/subscriptions","organizations_url":"https://api.github.com/users/gravgun/orgs","repos_url":"https://api.github.com/users/gravgun/repos","events_url":"https://api.github.com/users/gravgun/events{/privacy}","received_events_url":"https://api.github.com/users/gravgun/received_events","type":"User","site_admin":false},"created_at":"2015-11-26T19:47:54Z","updated_at":"2015-11-26T19:47:54Z","body":"@Ombridride That issue you mention with HUD elements was fixed by a dumb fix in 4ea9175240064130923d376b183e3e8ef06d20a1."}}