eXaminator / kanka-foundry

FoundryVTT module to import information from kanka.io
MIT License
22 stars 8 forks source link

Allowing to add notes from foundry #48

Open jonepatr opened 3 years ago

jonepatr commented 3 years ago

Would be great to add notes from within foundry. Both gm notes that are hidden, but also to players when they have "limited" permission to the journal entry. As in, there might be a location entity, and the players want to write down the facts they know about the location as a note through foundry

eXaminator commented 3 years ago

Interesting idea.

One of the main reasons for the 2.0.0 update (or the changes in it) was, that this enables me to allow people to change an entries (or parts thereof) in foundry and sync them back to Kanka. So one way to go about this would be to allow the creation of new notes (that are saved in Kanka) from within foundry.

That being said, I currently only allow the GM to really interact with the Kanka API (mainly because the GM is the only one to configure their access key, which authenticates the module as their user).

So the current idea is, that the GM sets the correct permissions for data and gives players access accordingly, so that they can see what they need to know. Obviously this doesn't support a lot of variation between different players (so beyond the difference between observer / owner there is no way to show specific information to specific players).

Another approach would be to allow notes that are only saved in foundry itself. There might actually be modules out there that do this (I think there is at least a GM notes one). Maybe there is a way to add support for such a module without having to do this myself.

This one is a bit more special compared to the other ideas you posted, so I won't promise anything on this one, but I will look into this.

jonepatr commented 3 years ago

I think the idea with having kanka as the one true source of information is a sound idea, so if possible creating notes in kanka I think that would be preferable to creating them in foundry.

You can use sockets in foundry to make sure only the GM account is interacting with foundry, i.e. when a player would create a note, it would send out a request over sockets, the GM window would pick this up, check permissions and then interact with kanka. The downside here however, is that this would only work if the GM is logged in to foundry.

eXaminator commented 3 years ago

Well, the bigger problem imho would be, that the note would be created via the GMs Kanka account. And I'm pretty sure I don't have full control over Kankas permission system, so I wouldn't be able to read / write notes that are only visible / owned by specific players - unless I add my own meta-data somehow (maybe hide it within the notes HTML, which could work depending on what Kanka would strip out from the HTML - but that would be a pretty unreliable mechanism).

I will put this feature on hold for now. I do want to implement certain write operations in the future (though currently I'm only planning GM only write access), so I probably have a better idea and understanding of what is possible here and maybe I can leverage those features to come closer to a solution for this request.

Sonny-Crockett commented 2 years ago

Sounds very exciting!

ghost commented 2 years ago

Just started using this and my immediate thought was that a write back option would be nice :) Here´s how I would imagine it. Player writes Session journal in Foundry and saves it when done. GM syncs it back to Kanka and sets the desired permissions within kanka if necessary.

Nedrapter commented 1 year ago

I'm not aware of the limitations this might have but a way to quickly add something in foundry while in a session and have it update/add something in Kanka would be nice.