#Patchouli Books 📚

1 messages · Page 1 of 1 (latest)

neon moth
#

This is an add-on for the Patchouli mod that adds various books for different mods, trying to document them as best as possible. Furthermore there are a few more QoL features.

Current Features ❗

  • added HEI/JEI integration (you can now open JEI for every item rendered inside a book using the same keybind as for JEI)
  • backported Pamphlets from the 1.18 version of Patchouli (needs to be enabled in the config)
  • new Page Types (an iteration of most of the existing ones as well as a new custom one for PedestalCrafting/ExtendedCrafting)
  • of course a Patchouli Book explaining the features of this mod
  • documentation for various mods (their respective books will only be loaded if the mod is present)

Future Plans ❓

Related Links 🔗

magic torrent
neon moth
#

I already depend on the rofl edition. 🙂 And yes the JEI thing is definetly on my todo. The things is haven't really worked with jei/hei in such a scale yet. That's why I started with the "look up recipes and uses from an item within a book without having to close the book and search for it in JEI"-thing.

magic torrent
#

yeah that's a big QoL improvement, awesome stuff

#

thank you for your hard work :)

neon moth
#

😊 you're welcome

magic torrent
zinc nacelle
#

Cool.

#

Would be better to put JEI thing and backported stuff to ROFL edition itself.

novel pelican
#

hmmm
throwing in my 2c on Patchouli and my biggest issue with it - information density.
Would love to be able to increase the size of the book on the screen, reduce the font size, and otherwise increase the amount of information on the screen at once.

if you're looking for things to do. :p

neon moth
#

looks like you aren't allowed to simply use reflections in your mod

neon moth
#

Fix is uploaded to curseforge and it's approved

neon moth
#

@magic torrent almost there

magic torrent
#

NICE!!

patent cipher
#

So cool

#

can this be added to just about anything from a tab in jei, or recipes only?

neon moth
#

just about anything is what I'm aiming for, but working with JEI is painful if you want to do more then adding JEI Integration for your mod.

patent cipher
#

I get that

magic torrent
#

i imagine the entry has to be unlocked for that button to appear?

neon moth
#

looks promising so it's not limited to crafting

neon moth
#

sorry for the ping >.< forgot to disable it

rigid oasis
neon moth
#

more rendering stuff 🤮

#

but something along these lines would probably be sufficient

neon moth
#

there we go

plain sorrel
#

An Ender Codex Posting. Rebirth Of The Night Is Real

neon moth
#

aaaaaaaaand it's up on curseforge so everyone whos interested can try it. 🫡 time to get some sleep, been awake for almost 40 hours.

regal zephyr
#

bro was going hard

neon moth
#

Around 10 were modding, 2*8 for work + 2 hours for getting there and back home again ( still couldn’t sleep in between) and another 8 where various errands. So now I’m hopefully tired enough to get some rest. dogeUp

neon moth
# plain sorrel An Ender Codex Posting. Rebirth Of The Night Is Real

I just noticed that some of the textures are from the texture repos from the RotN team, so yeah, I’m not good at art, but I can beat my head at some coding problem until it works so I thought why not use something already made. I have a source file where I link to all the original artist to give credit. And the Codex is the Patchouli Books book where I explain all the features the mod adds. It also displays the new page types so when I create a crafting page in there it’ll show up in jei as well. I just thought about adding another keyword so crafting recipes can be told to not link to jei, but it defaults to true so you don’t have to enable it for each page that uses a crafting recipe.

zinc nacelle
#

@neon moth can i add pamphlets and implement botania inventory scanning to base mod

neon moth
zinc nacelle
#

thought it would be cool to add it to the base mod

neon moth
#

Alright pamphlets will be removed with v0.3.0

neon moth
#

Do you have an eta in mind?

zinc nacelle
#

no honestly

#

I have a TF and Baubles fork I need to release a new version for

pseudo field
zinc nacelle
pseudo field
#

since both it and your fork fix doors

zinc nacelle
#

no I just forked it because someone complained about door textures

pseudo field
#

oh the 2 mods were created just a week from eachother lol

#

should i go and submit an issue report about it?

zinc nacelle
#

you can it would help me to not forget about that

pseudo field
#

alright, got it

zinc nacelle
neon moth
# zinc nacelle no honestly

alright so I'll add a few more tweaks to them while staying on v0.2.x, just let me know whenever you get to it so I can remove is on my end so it doesn't cause any issues.

neon moth
#

v0.2.1 with the improved backport of PatchouliButton is now on curseforge along with a few more config options and general tweaks for external books (the ones made by pack-developers)

patent cipher
#

very cool

#

I think with those features added, the hardest part of using Patchouli will be the actual writing/formatting of a Patchouli book

neon moth
patent cipher
#

or alternatively an external program that manages and visualizes a Patchouli book 'project' to handle all the linking, unlocks, images etc and lets you export the json

neon moth
# patent cipher It's probably completely out of scope for this mod, but I always thought Patchou...

This would only ever work for user created books, not for ones shipped with a mod. The problem with that is how patchouli “creates” the books. It scans all the files at once and creates the whole book as a single object. So once you want to change something ingame you have to figure out how to get back to the file of the entry you edited and safe the changes to it. Probably not impossible, but if you format something wrong while editing it ingame you hardcrash when reloading (because patchouli choose to hardcrash on every mis-formatted entry that isn’t the landing page.)

patent cipher
#

I see. Would the external patchouli 'project' editor be a more feasible solution?

zinc nacelle
#

yeah that'd work

neon moth
zinc nacelle
#

no, im busy with 4 projects

#

there was a web-based editor though. We can look what do we need to make it work in 1.12.2 too

neon moth
magic torrent
#

is there something im missing in the entry file

#

there's nothing in the documentation about it

neon moth
magic torrent
#

hmm, i think i'd like the ability to manually set specific recipes that link to specific pages

neon moth
#

How should this be realized? The thing right now just checks if the item is on the “list of interesting items”. And currently an item only gets added to that list if it’s a spotlight or the output of the recipe.

#

I could however add a new key to the page json so you can manually add items to said list.

#

But I don’t know if I can get that working for the default patchouli pages.

#

@zinc nacelle if I make a pr for that would that be feasible? Otherwise I would have to do this with a few more mixins.

zinc nacelle
#

👍

magic torrent
#

newest update doesnt seem to work either

#

no book is showing in JEI

neon moth
# magic torrent newest update doesnt seem to work either

I know. I pr’d a fix to @zinc nacelle it’s already merged but they need to release it.
The PR adds a new “link_item” field to any page. So you no longer need a highlight or spotlight. To be picked up by patchoulibooks. (The last update on my end just fixed a few rendering issues)

magic torrent
#

ah gotcha gotcha, thanks :)

neon moth
#

No worries ablobyes

neon moth
#

@zinc nacelle could you please publish the PR or is there anything else I should take a look at?

magic torrent
#

where do i change the texture for the book icon?

magic torrent
#

nvm

neon moth
regal zephyr
#

@neon moth this is probably be out of scope for your mod specifically, but do you think something like what I’m suggesting here is feasible (in another mod perhaps)?

neon moth
regal zephyr
#

maybe it could trigger based on the stats file, though then if a mod doesn’t track the stats of an action that would be an incompatibility

regal zephyr
#

big if true

#

I’ve wanted this for YEARS

#

would make locking and unlocking entries soooo much easier

#

and it would easily be tunable to whatever progression you have in a pack

neon moth
#

just give me a heads up how you imagine specifing the unlock then? like in each entry instead of "advancement" you use something like

{
  "unlock": {
    "event": "breakBlock",
    "trigger": "minecraft:stone"
  }
}

???

regal zephyr
#

yeah precisely

#

so to give my use case for example

#

ideally players would spawn with the book, and only one category unlocked (an intro category)

#

there would also only be one entry unlocked, and reading to the end of that entry unlocks the next

#

and so on, until they finish the last entry, which then unlocks a few categories

#

and from there entries and categories would be unlocked based on actions like so

#

so entering a new biome? unlocks category

picking up a certain item? unlocks entry

Etc etc

neon moth
regal zephyr
#

yeah

#

that sound feasible to add?

neon moth
#

kinda funny how all my projects transform into these mega meta mods, same with my selection gui crafting one 😅
but yeah sounds very feasable

regal zephyr
#

🙏

#

i shall eagerly await

regal zephyr
#

is there an option for the jei/hei integration for blacklisting certain books from appearing next to recipes?

#

would be useful for pack devs that have disabled the patchouli books that come default with mods

neon moth
#

Not yet but should be very easy to add.

regal zephyr
#

no pressure

neon moth
#

Probably sketch out something during my next coding session to see how feasible my implementation is, if it is gonna send it all the way.

neon moth
# regal zephyr any update on this?

Just noticed you've been talking about the blacklist not the quest stuff, that's way easier to implement and doesn't need any sketching at all

regal zephyr
#

gotcha

neon moth
#

done. 😄

pseudo field
#

Just 10 minutes 😯

neon moth
#

black- and whitelist are super easy to implement in general

pseudo field
#

Still seems impressive to me!

neon moth
#
"requirements": [
        {
            "type" : "breakBlock",
            "trigger": "minecraft:stone"
        },
        {
            "type": "gamestage",
            "trigger": "my_first_stage"
        }
    ],

locking a page already works, now the fun part is to do the actual unlock stuff and test for what the player is doing.

#

but work comes first. PepeSad

neon moth
#

Now thinking about it, gamestages support is probably all I need to add, as you can give the player a gamestage for basically anything.

#

That way I don’t have to track persistence of data or implement my own way of it as it would be very similar to gamestages.

#

But feel free to correct me if I’m wrong.

regal zephyr
neon moth
#

the thing is I would reimplement a "data saver" similar to gamestages otherwise each time you reload the book all unlocked pages would be locked again. gamestages are saved per player already, want to unlocka page when breaking a block? grant the player a gamestage for it and use that to unlock the patchouli entry. otherwise I would do the same just not calling it gamestages, but I would still need to keep track of what the player had done.

#

i mean it definetly isn't the most elegeant way, but at this point I could just fork patchouli and implement all the required changes into the base mod, because right now most of that stuff is done through mixins.

regal zephyr
neon moth
#

I still have a few hours of work to get through so maybe I can come up with an implementation that wouldn't rely on gamestages.

regal zephyr
#

i could be wrong, though im fairly sure from what i remember, stacking a ton of gamestages can lead to pretty bad performance

neon moth
#

didn't know that, which is quite strange as they basically contain almost no data at all

regal zephyr
#

well, i could be wrong as i said

#

that’s just what i remember discussing with the other people in the rotn team a few years ago

neon moth
#

guess I would have to come up with a similar save file system to patchouli uses for the "histroy" of books just to keep track of what is already unlocked. that's also the reasonwhy patchouli only uses advancements, they are static and saved per default

#

that's why game stages where my first thought.

regal zephyr
rigid oasis
#

It's true when the stages are being used

neon moth
#

also forking patchouli is off the table as I already have plans for a spiritual successor so I don't want to maintain another documentation mod.

rigid oasis
#

Basically, it's not the stages themselves that are laggy, but for example having a bunch of stages being checked by Incontrol and other similar mods.

#

But the line for that is blurry to me.

neon moth
#

I would only check them once per opening the book, but I get your point

rigid oasis
#

It's the issue with them being cumulative instead of something else (like a single unit that's modified, not sure if that makes sense). At a point, if you have say 200 stages, opening and closing the book would cause some stuttering. Pair it with advancements, ore stages, InControl, etc, all checking the same, and you have TPS/FPS hell.

#

But I personally don't have a better implementation in mind.

#

I guess something like storing the combination of different milestones in a single variable that gets modified? I don't know how difficult that would get, but I assume it would be plenty.

regal zephyr
#

the one implementation i could think of would be to track the stats file, however there would be incompatibility issues if certain things aren’t tracked in the stats

#

i dont think being able to unlock an entry by getting to the last page of an entry would be possible either, neither with gamestages or through the stats obviously

neon moth
#

right know I can lock entries, when extra requireents are specified. right now a requirement consists of two string a type and a value.
These type can be used to parse the requirement to rach type of requirement, while the value contains the information required to fullfill the requirement.
To check if a requirement each type of requirement needs to listen to a special event handler. So once all requirements are satisfied the packe unlocks.
The problem then is as soon as you reload the book / restart the game all progress is lost as it regenerates all requirements on load and all pages would need to be unlocked again.

regal zephyr
#

so you would just need to have it not do that then?

#

is there a reason it does that in the base mod?

neon moth
#

so your opening page could basicall be

{
  "type": "openPage",
  "trigger": "modname:bookname:pagename:sitenumber"
}
#

who does what in the base mod?

#

reloading all the books? because they are parsed from json files so this needs to happen each time the pack gets restarted

regal zephyr
neon moth
#

that's just how patchouli works because it also generates all pages each time and the requirements are parsed from the json files as well

#

so all of this raises the question how to keep track of all of that data so it persits between restarts / reloads.

regal zephyr
#

stats file would be the only thing i can think of then, outside of just a custom solution

#

the stats could at the very least track block breakage and mob kills

#

honestly a stats mod seems like a good way to go about this, not sure how difficult that would be comparatively

neon moth
#

the default stats system is like pretty bad in general and also doesn't track most of the stuff you would be interested in when using the patchouli unlock feature. but I'm not going to write another mod just to make this feature feasible. 😅 I already have too many projects and even more are on their way, so I also don't need any more ideas for possible mods. I'm still a single dev after all (most of the time).

regal zephyr
#

yeah, totally fair

#

i didn’t realize how annoying implementing something like this would be, i thought there was at least an easy way to detect events like that and hook to them with patchouli

magic torrent
#

i really think you guys will be fine with advancements or gamestages

#

been using it just fine for trepidation

neon moth
#

Wasn’t there a ping somewhere mentioning me that the issue with the patchouli books was found or am I hallucinating? catblobcozystars

regal zephyr
#

huh?

pseudo field
#

yup, there was, just in a different channel

magic torrent
#

yeah i made a bug report about it on rofl edition but idk if it has to do with your mod instead

neon moth
#

[0.2.6] - 2025-08-15

Changes

  • entries can now be locked via gamestages
  • entries can now be visible only when the player is in a specific gamemode
  • entries can now be visible only when the player is in a specific dimension
  • fixed an error with the ic2 book as it's still WIP and should not have been registered

Syntax for your page json files:

{
  "name": "Crafting Test",
  "icon": "minecraft:crafting_table",
  "category": "test_category",
  "requirements": [
    {
      "type": "gamemode",
      "trigger": "creative"
    }, {
      "type": "gamestage",
      "trigger": "test"
    }, {
      "type": "dimension",
      "trigger": "the_nether"
    }
  ],
  "pages": []
}

If anyone is still interested in the locking stuff, sorry that it tool so long. Life is currently way too busy for my likings.

regal zephyr
#

are these the only 3 requirements atm?

neon moth
#

Yep any ideas for more? Please keep in mind that I currently don’t have any possible to “save” things in the mod. That’s why I added gamestage support. As it already safes stuff on a per player base.

regal zephyr
neon moth
#

I would have access to player data, but I don’t save anything on it. Currently read only.

regal zephyr
#

I’m having trouble thinking of what could be implementable then

sterile mica
#

Gamerule?

neon moth
#

interesting idea, definetly possible

#

so depending on the gamerules set different pages show up in the book?

sterile mica
#

Essentially a world-wide gamestages is the idea I had. For page unlocks that should be shared amongst all players. Allowing to see different pages is even more powerful. You could, for instance, have a hard mode gamerule which would show different pages (that hard mode gamerule can be created and modified with CT via my addon)

magic torrent
#

@neon moth hey can i give you a feature suggestion? I have so many players that end up skipping or forgetting about the guidebook button, many ppl dont even realize it's there

So there could be something like if there's an unread entry, then the button would glow and pulse, or just have that "unread icon" on the button itself. Something to bring attention to it

#

either way it should be incredibly obvious and annoying until the player reads those unread entries lol

neon moth
#

Sure I can come up with something to annoy players. >:3

magic torrent
#

youre amazing

#

ive had this idea for awhile idk why im just suggesting it now

#

ik rotn faces the same issues too

magic torrent
neon moth
#

Probably around next Thursday

neon moth
#

@magic torrent are you using my inventory button or the default patchouli one?

neon moth
#

So you only link to your own ingame guide?

magic torrent
#

yeah i only have 1 book

neon moth
#

Alright. Just so I target the right button. 😅

neon moth
#

well guess what, patchouli already has this feature 😅 @magic torrent

magic torrent
#

oh yeah but people still miss that

neon moth
#

it blinks, how can you miss this 🙃

magic torrent
neon moth
#

So there could be something like if there's an unread entry, then the button would glow and pulse, or just have that "unread icon" on the button itself. Something to bring attention to it

I mean this is literally what you suggested

neon moth
#

alright I added another small feature. you can play a sound every few seconds while in the inventory, if there are unread entries. I hope this helps. @magic torrent

neon moth
#

0.2.8 is published

magic torrent
#

so wait when you open your inventory you just hear a sound

#

does anything else happen

#

ppl are gonna be like "why tf do i hear this sound every time i open my inventory" lol

neon moth
#

It loops while the inventory is open. Tbh I already get way to annoyed by the ! Symbol on the book, which is why I remove them from my books instantly. I have no idea how you could simply “not see it”

magic torrent
#

idk but it's a common complaint

rigid oasis
#

What about a toast when the inventory is opening? A GUI element similar to JEI or FTB Quest buttons that appears to remind you you have unread entries, then goes away, and it pops up on a corner every time you open the inventory (preferably with a cooldown to not be too obnoxious).
Something explicit like:
You have unread guide entries
click on 📔 to read them

neon moth
#

@magic torrent @rigid oasis
That was a great idea, will be in 0.3.0

#

will re-appear every x seconds / whenever you open the inventory

magic torrent
#

perfect!

neon moth
#

Also one more note, title and subtitle obviously are lang keys so feel free to tweak them.

rigid oasis
#

I was hoping for that meow_heart

rigid oasis
#

Is it currently possible to mark a page as the one that's opened by JEI/HEI for an item?
Currently, pages that show the recipe for an item are automatically linked to, but what about all the items that don't have a crafting table recipe? Some sort of tag that could be added to custom or spotlight pages to quickly access them would be super useful 👀

neon moth
#

I thought I already did add that? let me check my code real quick

rigid oasis
#

If it is, I couldn't find documentation

neon moth
#

yeah writing docs... that would be useful.
my spotlight page implementation called "spotlight+" auto adds the link to the spotlight item.

#

which reminds me I was still contemplating, if instead of hacking my way around patchouli it would be easier to fork the whole mod and just replace the stuff to make my stuff working

rigid oasis
#

I mean, if it keeps compat with existing books, that would be sick

neon moth
#

that would be the number one priority

#

the thing is now I have to implement my own page types for most things as I can't easily edit the existing ones and add new features to them

rigid oasis
#

Another thing I noticed, right now I have pre-read set to true in the config, but on a new world, for some reason, entries are divided half and half between read and unread.
And there's no consistent differences between those that are and aren't

#

so this is really weird

neon moth
#

is you book a patchouli book or a patchoulibooks book?

rigid oasis
#

uuuuh, is there a way to create a book from zero using Patchouli books that I'm unaware of? Or what do you mean exactly

neon moth
#

wait a minute, there is no way as a pack dev to create a patchoulibooks book. so the pre-read tweak should depend on your page.json pre-read flag. the config states that this tweak only pre-reads all of my books as I didn't wanted to add a "read_by_default": true, to all entries

rigid oasis
#

Ah, I thought I could take advantage of that setting to be lazy trolley

neon moth
#

I mean there is nothing that stops me from making it available for you. I just thought people weren't interested in something like that

rigid oasis
#

And that makes sense. But we have a case of a guide that grew out of control why we weren't marking stuff as read.
But you are right though, better to just go through all pages and do that on a case by case

rigid oasis
#

Are you aware of a potential bug or feature that makes it so, for some reason, read entries seem to preserved between saves?
I just noticed now that when creating a new world, all previously read entries are kept as read, which is an actual issue.

Kinda related, actual feature that would be great to have is a button to "Mark all currently unread entries as read," perhaps with a double confirmation.

neon moth
#

for the first part: as in patchouli itself? or specificly related to #1303453407905976451 ?
also yes, great idea.

rigid oasis
#

Patchouli itself

magic torrent
#

@neon moth hey ender, so i noticed there are a lot of mods that add their own custom coded guide book that doesnt use patchouli. I was wondering if patchouli books button that shows all patchouli books could have a config option to add other modded books. when clicking it in the UI, it'd do something like simulating right click to open up the book.

some examples are:

  • Valkyrie Lib digital guide
  • Refraction gude book
  • End Expansion guide book
  • HBM's guide book
#

also, minor thing, many books dont seem to have the correct tooltip name (like your alchemistry fork). figured you can just use the name that's already there instead

#

And if you can, maybe decrease the font size/icon size? most books have longer titles and end with "..."

You could probably fit more books in a single page by doing that as well

neon moth
magic torrent
#

i appreciate it! it would be hugely useful for tons of packs to have a "single source of truth" button, yknow?

rigid oasis
#

So, TIL that apparently, and advancement that's marked as hidden (in the case of Triumph, setting it as alwaysHidden()) will not unlock locked Patchouli entries, no matter what.
Meaning that any gated entry requires the advancement to be visible, which is extremely inconvenient, especially when you have a bunch of really specific ones.
@neon moth is this something that could somehow be fixed through this addons or some other way? Were you by chance aware of this behavior and whether it is intentional or not? (I know you are not a dev of patchouli specifically, but you are honestly the closest to a maintained of the mod)

#

For the record, I'm not 100% certain that this is the cause of locked entries not unlocking. Testing this has proven to be rather difficult as sometimes the book doesn't update with the advancements, and requires additional relogging, which is confusing

neon moth
#

I wasn’t aware of it. But I can look into it. Are you sure the advancement gets granted in the first place? The thing is afaik triumph is closed source, so I can’t really investigate what is going on behind the scenes.

It would depend on, if the hidden advancements still are available through the vanilla methods, when checking against them and if patchouli at one point filters out checking hidden advancements. I’ll report back after investigating and trying to come up with a fix.

rigid oasis
#

Using the command for granting every advancement would still leave any of the hidden advancement entries as locked

neon moth
rigid oasis
#

Also for the record, for the past years we've haven't added advancement mod IDs to the patchouli config, as it didn't have trouble recognizing them. But even adding triumph the result is the same. Just to discard that option

rigid oasis
#

@neon moth I did some extra testing and I think I got a more consistent behavior. Removing alwayshidden() and using instead setHidden(true) seems to reliably unlock and lock the pages. Curiously enough, setHidden(true) is only supposed to hide the advancement until it is unlocked, yet it remains hiddens regardless, but that's Triumph/Advancement shenanigans, not Patchoulli.
Regardless, although the page detection is a bit finnicky since sometimes getting the advancement doesn't unlock it, I think this works """fine""", so I write that here for anyone in the future.

#

If the page unlocking was a little more aggressive with detecting the advancements, it would be seamless, but I think you've mentioned something about that being difficult to EliteMeats before.

rigid oasis
#

Is adding unavailable methods within the scope of the mod? Particularly, "negate_advancement" for specific pages, which doesn't really do anything unless applies to the whole entry

neon moth
rigid oasis
#

Entries don't work either, I meant to say that neither work whatsoever. I don't even think it's a proper 1.12 feature for pages or entries.
But also, yes, that's what the behavior would be. With that, you could "update" pages as you get advancements, blocking outdated versions and unlocking pages with new info