Thanks everyone for reporting. The issue is fixed in 1.4.3
baj
Creator of
Recent community posts
Hi! Actually I had a regression with that as I’m not very happy with the markdown editor and going back and forth with some tests. In essence I’m stuck now in deciding if the attachment should be serialized in base64 inside the doc as before, or do a proper attachment database, which will allow the users to sync any kind of binaries, even outside of the scope of the GDD text (a video file could be a GDD entry for example,,)
This however, brings the question if it is worth the effort, or the potential performance implications (using a db as a file repository ins not the best idea) and if it is, maybe it would make sense to migrate to a file based repository instead of the database approach…
With this idea, drafft could support any “file” and a simple file/folder hierarchy. Multi user sync would be done with third party apps like dropbox, git or similar… Integration with the game engine would be easier, even the game assets could be centralized and taken directly from the workspace…
Sorry for the brain dump!
As for reference, I have a version in dev which allow to reference any drafft object with a internal link (drafft://actor/actorname drafft://script/id_or_alias) etc, but I got a bit stuck with the previous topic that is related
Thanks for the follow up! Hmmmm this is strange, are you using the portable windows version right? It seems that it is failing to get to the example jpg from the filesystem for a the new actor, for some reason, probably related to the Windows path filesystem and how it is resolved when packaged.
I have a theory, on what could be causing it, does it happen as well in the installer version?
Hello Thanks for the feedback! Unfortunately I cannot reproduce #1 and #3, I’m in Linux. Are you in the latest version? If so, can you check if you get an error in the console when adding the actor and when auto-detecting? (ctrl + shift + I). I suspect is something related to the blob attachment.
About the export, I found a bug and fixed in 1.4.1, thanks! The quick export will start to working after an export has been made. (its the same command without the file picker)
Hello! Some updates about this feature, which is available in v1.4.0
It’s not exactly what we had in mind at first but might be helpful. The problem of running headless is that the local pouchdb is stored in the browser. Also electron requires a display to run headless so it a bit tricky. So for now, we have a REST API that runs when a project is loaded (if enabled in the options) that can get you a game export and a database dump.
Docs: https://drafft.aboni.dev/en/docs/documentation/api_docs.html
Other thoughts:
- I’m planning to make a little cli app does the fetching but any standard GET request method would work. This tool could probably have some mechanism to dump from a remote couchdb instance as well.
Hello there!
The implementation is really up to you! I would parse the graph.nodes
array, locate the “start” node (or any other useful node) and start crawling from there.
Some useful props:
- In the
extras
property you have the type, and the scriptID associated with that node. - Inside each node you have a
ports
array which you can use to get all in and “out” ports (1 for script nodes) so you can build your flow with that. - Once you reach a choice node, you can query its “out” ports to show the different options to the player, the
link
array associated with that port will give you the id of each connection the port has, so you can navigate to the next node.
Basically what you have there is the whole graph serialized. The dialogue player is a (super simple) example on how to implement.
Hope it helps!
Hey, just to let you know that this on my radar, but I was thinking, instead of having a cli command (which may be really helpful with CI/CD and scripts, but may require extra work to run headless) What about having a very simple API that returns the JSON, (and maybe some endpoint to force a sync)
The caveat is that in it will require that the user have the app open. Also, this would mean that this API could be potentially hit from any computer (with network access) Also, this would mean that, it could be possible in theory, and some imagination… to hook up the game engine to use the API directly for some live preview goodness.
Is not a headless/“offline” solution but its definitely simpler to implement!
Yes, “Restore Database from file in a new project” would be the workaround, it’s not really thought to be used as a “portable” save system, but might work! I will add “Customize Install location” as a feature request. Another approach could be just copying/syncing the %APPDATA%/drafft folder (untested)
Thanks! It really means a lot!! I have a few ideas on next features to add, and comment like this are really motivating. I’m really glad you are finding the tool useful.
Well this is definitely weird! I’m on Linux too, using the AppImage version I get this:
{content: Blob, fileName: '/home/baj/Downloads/The goddess of fate..json', content_type: 'application/json', json: {…}}
content: Blob {size: 860384, type: ''}
content_type: "application/json"
fileName: "/home/baj/Downloads/The goddess of fate..json"
json: {total_rows: 68, offset: 0, rows: Array(68)}
I’m a little lost on what else to test, seems like the app cannot open the file to read its content for some reason, or the file is corrupted. If you create a test project, export it (Backup Database) and import it, do you get the same error? Thanks!
Hello! Unfortunately there is no customization yet for project folders: Projects and user settings are saved in Per-user application data directory, which by default points to:
%APPDATA% on Windows
$XDG_CONFIG_HOME or ~/.config on Linux
~/Library/Application Support on macOS
example in Linux:
~/.config/drafft ls -lh
18:35:24
Permissions Size User Date Modified Name
drwxrwxr-x - baj 8 Apr 2:49 backups
drwx------ - baj 8 Apr 0:52 blob_storage
drwx------ - baj 8 Apr 2:50 Cache
drwx------ - baj 12 Dec 2020 Code Cache
.rw-rw-r-- 2,3k baj 8 Apr 2:49 config.json
.rw------- 20k baj 15 Dec 2020 Cookies
.rw------- 0 baj 15 Dec 2020 Cookies-journal
drwx------ - baj 12 Dec 2020 Crash Reports
.rw------- 67 baj 14 Dec 2020 Custom Dictionary.txt
.rw------- 57 baj 14 Dec 2020 Custom Dictionary.txt.backup
drwx------ - baj 12 Dec 2020 databases
drwx------ - baj 12 Dec 2020 Dictionaries
drwxrwxr-x - baj 12 Dec 2020 extensions
.rw-rw-r-- 1,7k baj 24 Feb 19:01 fgf.json
drwx------ - baj 12 Dec 2020 GPUCache
drwx------ - baj 24 Feb 19:27 IndexedDB
drwx------ - baj 12 Dec 2020 Local Storage
.rw------- 1,2k baj 30 Mar 20:09 Network Persistent State
.rw------- 32k baj 8 Apr 2:39 Preferences
.rw------- 53k baj 8 Apr 2:49 QuotaManager
.rw------- 8,7k baj 8 Apr 2:50 QuotaManager-journal
drwx------ - baj 8 Apr 2:22 Session Storage
drwx------ - baj 15 Dec 2020 shared_proto_db
.rw------- 372 baj 17 Dec 2020 TransportSecurity
drwx------ - baj 15 Dec 2020 VideoDecodeStats
I agree it would be nice to make it more portable and customizable! Hope it helps!
Meanwhile a (rather cumbersome) workaround you could try is using exports. but its not what you are asking for.