CREATE YOUR AI CUM SLUT ON CANDY.AI TRY FOR FREE
x

Tutorial HTML How To Debug(Or Cheat) Twine{SugarCube} Variables

greyelf

Well-Known Member
Nov 16, 2016
1,088
817
Which Twine project were you trying to run?

note:
The Twine 2.x application comes includes a number of Story Formats that an Author/Developer can use for their project, SugarCube being one of them.

If Author/Developer selected one of the other story formats for their project then the TwineHacker extension won't be able to find SugarCube's debug interface.
 

SirRichard

New Member
May 29, 2017
11
3
Right ok so I was installing twinehacker to my new laptop today and kept getting a manifest version 2 error. I reinstalled it a few times with no luck I couldn't get it to work on any game. until I discovered I didn't have the keyboard shortcut set up. Once I did that it all works now there is still an error but it's working.
 

AJLee7385

Well-Known Member
Game Developer
Jun 25, 2019
1,419
802
so does anyone know to do the manual loadding of passages as well?

i think its somthing like Sugercube.state.play("passage_name")
 

AJLee7385

Well-Known Member
Game Developer
Jun 25, 2019
1,419
802
so i need some help one the games i play has a new game plus mod im trying to tinker with it to effect my game but

}
save.energy = save.maxenergy;

sessionStorage.setItem('college_daze_player_stats', JSON.stringify(save));
}

function loadDataFromSession () {
const load = sessionStorage.getItem('college_daze_player_stats');

if (load) {
sessionStorage.removeItem('college_daze_player_stats');
Object.assign(SugarCube.State.variables, JSON.parse(load));
$('#story-caption').empty().wiki(SugarCube.Story.get('StoryCaption').processText());
}
}`this bit there i do not know to find for my game
 

greyelf

Well-Known Member
Nov 16, 2016
1,088
817
I can't seem to get "SugarCube.State.active.variable" to work on anything.
Which project are you trying to use the SugarCube debug interface on?

Not all HTML or Twine projects are built using SugarCube, and for those that are built using SugarCube 2.x you don't the .active part of the Console command you are using.
 

greyelf

Well-Known Member
Nov 16, 2016
1,088
817
so i need some help one the games i play has a new game plus mod im trying to tinker with it to effect my game but

}
save.energy = save.maxenergy;

sessionStorage.setItem('college_daze_player_stats', JSON.stringify(save));
}

function loadDataFromSession () {
const load = sessionStorage.getItem('college_daze_player_stats');

if (load) {
sessionStorage.removeItem('college_daze_player_stats');
Object.assign(SugarCube.State.variables, JSON.parse(load));
$('#story-caption').empty().wiki(SugarCube.Story.get('StoryCaption').processText());
}
}`this bit there i do not know to find for my game
If you have technical questions about adding functionality to a project built with Twine, then I suggest asking them on their Official Discord server. The invite link to it can be found on the Twine web-site.

We would need more information about your project to fully answer your question in more detail, but the basic theory behind creating a "New Game+" like feature is:

A. At the end of the current play-through:
  1. Gather the game progress data you want to persist across to the new start.
  2. Store that data in the web-browser's LocalStorage cache, using an identifier key that is unique to your project.
  3. If you have auto-saves enabled, then delete the auto-save.
  4. Use the story format's "Restart" feature to programmatically restart the game.
B. At the end of your project's normal start-up:
  1. Check if the web-browser's LocalStorage cache contains a record associated with your project identifier key, if it does then show the "New Game+".
  2. After the "New Game+" is selected, load the previous playthrough's data stored in LocalStorage cache.
  3. Update the project's default variable values with those from the previous playthrough.
  4. Delete the record associated with your project identifier key from the web-browser's LocalStorage cache.
 

Aloo7009

Newbie
May 29, 2017
17
20
I think i managed to find it but it is manifest v2 as it was not updated in years and it is not loading. If someone who can code is willing to change it to manifest v3 we should be able to get it to work. Here is the link:
Guys I had this extension for a very long time and I had imo the best version but I forgot to copy it when I was installing windows and now, I don't have the version anymore. I've installed a couple of versions but none of them are the version that i had. The version had the option to show a changelog of variables that has recently changed so it was a godsend for quickly looking up variable names and just finding the right variable in the options. Does anyone know if it is available anywhere or is there any similar alternative? As far as I know this version on does not have that option.
ooooof, I actually still have it on my old PC but it's a pain in the ass to wire it up again and me back kinda broke so I can't physically lift anything for 3 months :D good times ahead.

Thankfully I didn't format that old thing, but didn't realize that version of the hacker isn't online anymore.
 

greyelf

Well-Known Member
Nov 16, 2016
1,088
817
How to for Godot?
If you are asking:
  • for help with debugging, or cheating in, a project built with the Godot game engine
  • how to use the "Twine Hacker" or "SugarCube Hacker" extensions for Chrome on a game built with Godot
...then you are likely asking your question in the wrong thread.

Because this thread is specifically about debugging / cheating in a Story HTML file built with the "Twine" related toolchain, combined with the SugarCube story format.
 

The456123

New Member
May 25, 2022
8
2
If you are asking:
  • for help with debugging, or cheating in, a project built with the Godot game engine
  • how to use the "Twine Hacker" or "SugarCube Hacker" extensions for Chrome on a game built with Godot
...then you are likely asking your question in the wrong thread.

Because this thread is specifically about debugging / cheating in a Story HTML file built with the "Twine" related toolchain, combined with the SugarCube story format.
It was the first, apologies regarding the disorganization, I will do better. Thank you - no remorse
 

greyelf

Well-Known Member
Nov 16, 2016
1,088
817
looks like no support win11
work in win10
View attachment 3053111
It's more likely the brand & version of the web-browser you are using, than the version of Windows, that is causing the issue.

eg. Your installation of Windows 11 likely has a different version of the specific brand of web-browser than the Window 10 installation. Which likely means those two versions of web-browser support different versions of JavaScript.
 
  • Thinking Face
Reactions: kidderyao

JohnTyler3

New Member
Mar 21, 2018
4
0
could anyone help me install this in the opera browser?
if it makes a difference im using windows 11. no clue how to add it.
 

whalat

Newbie
Sep 27, 2017
53
65
Did anyone get Sugarcube hacker working recently?
I've been trying it on both chrome and firefox and it seems to install just fine it still doesn't do anything.
 
Last edited: