I’ve been working on developing a Firefox extension to add a bunch of functionality to Choicescript games, including
A back button;
notifications on variable changes;
in-browser viewing of the exact code responsible for a particular line or section of text;
autosaving on dashingdon/moody.ink;
transferring saves across browsers;
assorted animation improvements/fixes;
and probably a couple of other things that I’m forgetting.
I’ve mostly been promoting this on my tumblrupdated link to csgt specific tumblr, and to be honest I’ll probably continue to do most communication about this there but I thought I’d make a topic about it here in case anybody’s interested! Please reach out if you have any issues with it, or if there’s any other features that you’d appreciate!
I am working on something similar, but as an extension for Chrome. What are the odds? I’m including these 2 features, plus a “generate feedback” that creates a report text from template with the file and approximate line number that people can post straight to the forum here and help the author better locate the issue.
Oh, that’s awesome! I’ve been meaning to try porting this over to Chrome as well, but I haven’t wanted to figure out Manifest V3 so I keep procrastinating Automatically composing the feedback report seems like a fantastic feature, I’d love to see your extension once it’s ready!
That part was a fun challenge! The source for my code is open, so you’re welcome to look through and borrow any bits that looks useful! (You might find this section useful for that particular problem.) I think my solution can still use a bunch of work, but for now it works.
This works like a freaking charm. I was waiting on a db restore to run and started a game. Everything works so far. No bugs at all! I’ll give it a thorough testing and let you know if I run into anything. The fact that it scrolls to the choices you’re on when you click “Code” is an especially nice trick!
@cup_half_empty If you get it working for Chrome, I’ll grab yours, too. And be happy to test it.
This is just so awesome!! Saves a lot of back and forth with the code. I’d love it if you updated here as well as tumblr, btw. But I get it if you don’t have time.
I’m so glad it’s working well for you! Another fun trick is if you highlight some text on the page before clicking the “Code” button, the code responsible for generating that text will be highlighted (it will also scroll to that code by default)! I’ve found it helpful when trying to track the flow through particularly dense passages.
I’m happy to update here as well as the Tumblr, it’s honestly a better avenue for this sort of stuff anyway!
Hey folks! It’s been a minute, but I’ve got a new update just about ready! Added features in this new update are:
Ability to make custom saves in CSGT
Ability to delete CSGT saves you’re not using
Ability to load CSGT saves directly
Increased compression of CSGT saves (~52% → ~40%)
Use IndexedDB instead of localStorage
That last point is actually super important and why I’m posting prior to publishing the update, as it has the potential to be slightly disruptive. It’s important because it can entirely eliminate the QuotaExceeded errors that you may have seen when playing/loading some games (especially paid games, as they cache the scene data). I don’t know if many other people encounter this issue, but I certainly have and find it very annoying. It’s slightly disruptive because any data that is stored while CSGT is active will now be invisible if it isn’t active. This is only really relevant when playing games published on choiceofgames.com, so if you play a game while using CSGT and later disable CSGT then your save will be lost.
I’m not sure how much of an issue this would be for people, so I posted a poll on the CSGT tumblr to ask about it, and I’d love to hear any feedback you may have here.
Not a stupid ask at all! Chrome (and chromium-based browsers generally) have presented something of a challenge for me. Firstly there’s some features which behave differently across the browsers, including some syntax which needs to change for it to work on Chrome. On top of that Manifest V3 is a headache, and in fact I used Firefox specifically because Chrome kinda sucks to develop for.
All that said I would actually like to get this working on Chrome, it’s just kind of a daunting task that I haven’t wanted to tackle yet. I don’t have an estimate on when I might do that, but I’ll definitely post here when I get to it!
I’ve just published the newest version 1.6.0! It should update automatically soon after it goes live. As mentioned, the QuotaExceeded error has been entirely resolved by switching to use IndexedDB. Additionally, you can now make, load, and import custom saves from in any game (casually adding saves to games published via CoG), although the interface kinda sucks right now so I think I’ll probably revisit that in the near future.
I had said that the compression rate was increased, but I discovered within the last couple of hours that the library I was using had a pretty severe memory leak. I wanted to put out what I had so y’all can start playing around with that, and I can continue running my head into this particular wall some other day.
Please let me know if you encounter any bugs! I would also love feedback if there’s other features that you would find useful.
Excellent question! The items that were stored in localStorage (now stored in IndexedDB) will still be cleared if you clear your browser history. However, both your autosaves and your custom saves are persisted in the extension storage, and unless I’m very mistaken they should remain when you clear your cookies.
Yes, absolutely! That’s an excellent idea, and I’ve added it to the list of tasks for 1.6.1.
So funny story, it does actually support Android currently (that’s where I primarily use it actually), but Mozilla has some stupid rules around add-ons for Android. Namely, there’s a very very limited whitelist of addons that you can install on the basic Firefox for Android. However, on Firefox Nightly and Firefox for Android Beta you can install it using a custom collection, and they describe the process here. A quick summary of that process (assuming you’ve installed Firefox Nightly / Beta):
Create a collection with whatever extensions you would like on Firefox for Android Beta
Note the number and name in the collection URL
In Firefox Nightly / Beta, go to Custom Add-on collection and input the number and name.
Your extensions should now be installed!
It’s a major pain in the ass, but unfortunately it’s totally out of my hands. I have added some specific support for mobile, but it’s pretty much just enough to get it working as until Mozilla changes their policies my hands are pretty much tied. Also note that cross-browser syncing doesn’t work on mobile (again Mozilla), but it does work between games on the same browser. So for example if you made a save for TWC 2 on mobile, you could import that into TWC 3 (or the demo!) on mobile. I want to add export to/import from a file functionality so I can at least somewhat bypass that restriction of Firefox, so that might also happen in 1.6.1 (my numbering is extremely haphazard, sorry y’all).
Also real quick aside about TWC 2 saves: if you try to load a save from the end of TWC 2 into TWC 2, you can export on the page where it says “Unfortunately, this save was created […]” and that’s a valid import into the TWC 3 demo, just import immediately after the character creation is complete!