Now that Squiffy is finally getting a bit of the love it deserves from it's creators and maintainers, anybody wanna teach us how to make this capability happen?
Looks like the code in that other thread provides a way to dynamically insert text and JavaScript, but you couldn't use it to create new sections or passages, is that right?
Can you explain a bit more about what you want to achieve? There's no @import
in the online editor because there's no way for it to create or access other files than the one it's currently editing, and it's hard to see how to overcome that.
Wow! The man himself! Thanks so much for Squiffy!
I'm STILL grateful for the day years ago when you taught me how to use HTML <input>
!
Yes, that's right. The weird method in that forum post works either with curly bracket Squiffy or javascript, but not both at the same time, and certainly cannot import new sections and passages.
But I find it very useful. I keep my class schedule with students rosters in a text doc to insert random student names into stories. I keep scripts that I don't feel like constantly copying and pasting. APIs with real facts and data that Squiffy translates into ESL-ese.
It would be nice to just quickly type something like @import = Process DateTime.txt
if I wanna access a text file in the same game folder, and maybe @import = https://media.textadventures.co.uk/games/RqcHuj3DvUexd6K__SR8Zw/NCYES%20API/Process DateTime.txt
if its in a different game folder.
Just, thank you so much. Squiffy changed my life. Not exaggerating. I can code a little now and make the things I want to make, only because of you.
Following up on this cause this would indeed be very handy.
And also to say that the same way you, IFfor Classroom, idolize Alex Warren, the true God of our squiffs, I owe so much to you. You've answered so many questions, chased so many new ideas, and kept the forums alive and running.
Thanks so much to both of you! :D
broadwaydude, I'm right flattered, seeing that your TWET is at the top of the most popular games on this site. I've played it a couple times, and definitely F12-ed it several times.
Hahaha F12! You'd find nothing that you probably didn't write already! I just went to town with if else statements, css, setTimeout functions, and just a touch of ui. It's crazy to think that ALL of my programming skills came out of trying to make a cool game and winding up in the squiffy forums with you fellers. I am right flattered right back :)
For the online editor, perhaps having a specific place for public libraries (Squiffy or JavaScript) that can be imported might work?
Alternatively, with cloud storage in the editor the option to import another squiffy file from the same account.
Basically having specific cases where @import
can work in the online editor. But running the editor locally should give fuyll @import
support for people that don't want to use the command line for everything.
Though even with the offline editor having some nicer @import
support would be very nice. Imported JavaScript files can't extend the actual Squiffy engine by default, which is something I really think they should. And with the new Squiffy runtime in development it has even less exposed.
While I understand those changes to be a good idea, having a specific entry point for imported libraries to alter the Squiffy runtime would be very useful I think.