Temporary Documents
Is there a built-in way to create temporary entities? Like entities wich are not stored in the database, but remains in memory for .update etc
C
Calego•1,015d ago
There is!
https://foundryvtt.com/api/abstract.Document.html#.create
The second arg here is "context":
https://foundryvtt.com/api/global.html#DocumentModificationContext
So basically you can do this:
M
Magus•1,015d ago
wow
i thought it was a long shot
ty!
sadly... it does not work as I intended
M
Magus•1,015d ago
M
Magus•1,015d ago
i cant use setflag nor update with a temporary journal =/
C
Calego•1,015d ago
What are you attempting?
If you know this information when the journal is created, you can set it then right?
M
Magus•1,015d ago
Im building an application wich stores some information in journals (the easiest way I found to store things in the DB)... creating my own entities seemed to much trouble, but can also be used in a default state without any journal being selected.
I thought it would be much easier to create a temporary journal in case no journal is selected
instead of adding complexity to the logic behind it
C
Calego•1,015d ago
Ahhh.
I'm honestly not too familiar with how one manipulates temporary documents, I know it's possible and has uses but they're probably different methods than for ones that exist in the db.
M
Magus•1,015d ago
I see, ty im going to make some research on this, probably there is a way, if I find out I tell you xd
Want results from more Discord servers?
More PostsLogin Via POSTlook at your network tab when you click the join button, you'll see the POST with the data it sends,Crit confirm change targetLooks like Fury merged the thing already, so whatever you do would no longer be relevant for the MR.Actor Sheet ChangesActor Sheet changes:
-**NPC, Character**: `systems/dnd5e/templates/actors/parts/actor-warnings.html`Dors projectTo be clear, I'm very open to the feedback that I'm doing something stupid here, hah. This is my firAC MigrationsAs of 1.4.1 there are two migration scripts for AC related changes:
1. The standard Migration Scrip