- Oct 28, 2021
- 54
- 16
have you tried use my extension? Google keeps rejecting it, but Moziila Store has itWhile it it technically possible to gain access to the variable State of a Harlowe based project, doing so requires a lot more effort than it does with a SugarCube based project. Because Harlowe's engine:
1. has been deliberately designed to restrict an Author's ability to use JavaScript to access its internals.
2. has no documented JavaScript API, nor a "debug" object like SugarCube does.
3. uses a different type of History system than SugarCube, and if you don't know what you're doing it is easy to corrupt the historical state of "collection" based objects like Array & Data-map.
So if you're willing to edit the contents of the generated Story HTML file, or to de-compile and re-create your own HTML file. Then adding the following Scope Escalation Hack code to the Story JavaScript area of the project...
...will allow you to useCode:if (!window.Harlowe){ window.Harlowe = {"State": State}; }
Harlowe.State
within your web-browser's Console to access the engine's State object.
What you do once you have access to the State object is not totally clear, because its structure was changed in the most recent versions of the Story Format.
There are a number of different Story Formats (think game engines) that be used when creating a Twine based project, and the developer of each Story Format decides what features its engine includes and what run-time debugging options (if any) are available to the end-user.
Besides SugarCube, none of the other major Story formats include a run-time "debug" JavaScript API, and even SugarCube's is undocumented and hidden. So unless the Author of a project (that uses something other that SugarCube) decided to implement such (a) then you'll likely need to manually edit the Story HTML file itself. Or use your web-browser's Web Developer Tools to discover if parts of the project or the engine were unintentually left exposed.
(a) it is possible for a Harlowe project's Author to use a JavaScript Scope escalation hack before they generate the Story HTML file, which will make (some) of the engine's internals available at run-time.
Exactly =)NEVER MIND I JUST EDIT IT WITH DEVELOPER TOOLS
( ctrl + Shift + I )
There are two series of SugarCube:Some new SugarCube-based versions don't allow you to even call up the "SugarCube.State.active.*" instruction, simply and without some modifications.
SugarCube.State.active
within a web-browser's Console, and the "current" state of all known Story variables be using SugarCube.State.active.variables
SugarCube.State.variables
.Well to be honest i tried i thought that i was successed but turns out that also was fale,Exactly =)
I'm not a web developer, so I cannot say to have insight into what SugarCube & Harlow actually do (aside from facilitating all the different states and providing the features we enjoy so much during play) - so take my words with the necessary grains of salt: Some authors have probably reacted to manipulation vectors like this.
Some new SugarCube-based versions don't allow you to even call up the "SugarCube.State.active.*" instruction, simply and without some modifications. The Harlow Format - usually - works. If not consider Greyelf's cool hack - which can also be "injected" via the console inside the Web dev tools of your browser.
I had that too SugarHack the name, i formated my pc and now it doens't work anymore, when click it nothing happens, you can try, not sure if it will work for you.My old mac had a version of Twine that was an extension on chrome. All I had to do was click the icon an a menu for the variables popped up that I could manually input.
Anyone know where I could find that version?
Which Twine based project were you trying to hack?Anyone here knows why the twine hack and sugarhack extensions dont work anyome? I tried the twine in both chrome and firefox and it just dont work for me, the sugarhack too i used to be so easy to use.
It work now using the version of SugarHack from page 11.Which Twine based project were you trying to hack?
(Not all projects built with Twine use the SugarCube Story Format)
I use this extension with many HTML games, so yes, you can use it with other games.I didn't know him, definitely an important help. thank you so much for sharing it.
just one question: can I use it with other games too, or does it only work with this one (which is already a lot of stuff)
It would help if you stated which game it was, then we could look at it for you, as there is no "standard" way to structure the variables of a project.having problems in some games.