#1
|
||||
|
||||
Twine 2 integration
I just tried it out today (thanks to Kesstryl for suggesting!) and I seriously like it.
For those who don't know, Twine is a free, open-source program used to make interactive/non-linear stories. Today, I'm just giving the instructions on how to integrate an exported project with mysidia. -Step 1- Download Twine 2 from twinery.org. You can possibly use the online version, but I'm unsure how reliable it is in this particular case. Once you do that, read up on the documentation and go ahead with making your story/game. I recommend making something short and sweet at first before integration, just so you get the hang of it before making anything lengthy. -Step 2- Done? Now go ahead and export your story (export should be called "publish"). After that, it should save in the folder of your choice as an html file. Open it up in a code editor, doesn't it look messy and crowded? Good, because that thing's getting cleaned. Create a new folder in your root folder (presumably public_html) to hold all of your twine files. I called mine "explore". Inside, you're going to make a new file called twine.css. -Step 2A- 1. Open up the exported html file then cut-paste that huge wall of code between these tags into twine.css (Do not copy the style tags themselves): Code:
<style title="Twine CSS"></style> 2. Now you need twine.js, just download the file included in the attachments for this one. I edited it so the pop-up error no longer appears when you load the page, but make sure you exported your story with the Harlowe format! -Step 3- Now, inside of any old view file you want to use, paste the remaining code using a $document comment. Like so: PHP Code:
-Step 4- Aaaand that's it, you're done! If you didn't notice, I didn't even include the css file we made. That's because I didn't want it in my case, but you can use it if you wish. As far as I know, you'll never need to do step 2 again once finished, no matter how many files you use Twine in; as long as you remember to reference it that is. What's oh so wonderful about this is you can style it however you want. I've started using bootstrap 4 with mine:
__________________
Last edited by Dinocanid; 12-31-2017 at 05:22 PM. |
|
|
What's New? |
What's Hot? |
What's Popular? |