0 votes
by (120 points)
I am working on a story template based off of the DnD model complete with monsters and such. I have been using an SQLite database to store the various monsters and their corresponding stats with the intention of copy/pasting them into the template when I am done converting them into the database. Is there any way to make twine pull info from the database directly instead of moving them one at a time?

2 Answers

0 votes
by (68.6k points)
No.  Twine cannot read your SQLite database and even if it could it wouldn't know how to convert your table into whatever representation you need the data in.
0 votes
by (2.2k points)

For the sake of completeness, there was HTML5 API called WebSQL which got deprecated before it went official, and some browsers still support it (and they even use SQlite internally for that). 

It's not possible to load local *.db files though, so you'll need to export your database tables as JSON (or CSV), load and parse it using custom JS and use resulting objects to get monsters' stats. If you really have a lot of complicated SQL queries you really want to reuse, you probably can achieve that by putting retrieved data into WebSQL and applying those queries, but then again, it will not work in all browsers.

...