gigaherz / Guidebook

Minecraft book API and library
https://www.curseforge.com/minecraft/mc-mods/guidebook
Other
31 stars 16 forks source link

[Suggestion] More conditions/Document them #73

Open TomaszewskiPatryk opened 6 years ago

TomaszewskiPatryk commented 6 years ago

Conditions are great, but there are 2 big problems. 1) They aren't documented on the wiki nor in the in-game guide, meaning only way to know how to use them is to analyze the example book from the wiki, which isn't ideal solution. 2) From what is written on mod overview (because again, there is no documentation about conditions) and example book on the wiki, there are only three types of conditions available: mod presence, game stage and advancement.

So I present to you a list of possible conditions that would allow for making better books which are also more cross-modpack friendly.

gigaherz commented 6 years ago

Yes I agree that I lack documentation. It is something that has always been an issue to me: I don't enjoy writing docuimentation at all, and with my mods being a hobby project, I neglect those tasks.

Some comments about the conditions:

Some of these conditions would require storing separate statistics. I don't think it's Guidebook's place to keep track of such things. But I would be OK with supporting an external API, like I did for Game Stages.

Also, dynamic conditions are perfectly doable. In fact, both gamestages and advancement conditions need to be reevaluated every time you open the book, to see if they changed since last time. So dynamic conditions are perfectly supported.

As for "can be fished"/"drops from a mob"/"generates"/... I would also prefer to keep the implementation of such things separate from Guidebook. If no library mod exists for those things, then an addon to guidebook could be created.

As for "item exists", that's already a thing. This is the list of conditions: image

All others, I will keep them in mind.

TomaszewskiPatryk commented 6 years ago

Here you go, I documented conditions for you :)