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
I downloaded the "HTML only" file. I don't know if the others are different.
I see.

The author of X-Change Life has used a Scope Escalation hack in their project to expose Harlowe's internals, because window.Harlowe is not normally a thing in a Harlowe based project. Which is why I missed it when I looked at the project's source.
 

Tamarind69

New Member
Feb 4, 2019
2
0
Does anyone know how to modify the values on Firefox? Just installed firefox and the console opens up fine, sugarcube pulls the values, but you can't change the values.

Not sure what I'm missing.
 

thebumpinthenight

New Member
Jan 20, 2018
4
0
How do you update an array?

Example:
Sugarcube.State.variables.traits Array(3) ["big", "long", "wide"]
0: = "big"
1: = "long"
2: = "wide"
length: 3


I'm trying the search for Array and getting so many hits that don't show what I'm trying to do, I"m wondering if I"m searching for the right keyword?


What would I do to add a 4th entry, something like "bulbous"?
 
Last edited:

peterppp

Active Member
Mar 5, 2020
769
1,359
How do you update an array?

Example:
Sugarcube.State.variables.traits Array(3) ["big", "long", "wide"]
0: = "big"
1: = "long"
2: = "wide"
length: 3


I'm trying the search for Array and getting so many hits that don't show what I'm trying to do, I"m wondering if I"m searching for the right keyword?


What would I do to add a 4th entry, something like "bulbous"?
SugarCube.State.variables.traits.push("bulbous")

note the capital C in SugarCube
 
  • Like
Reactions: thebumpinthenight

J007ss

Newbie
Apr 17, 2021
49
19
You can also use this plug-in. Manually add it to your browser. Use CTRL+SHIFT+H while in-game to open it.
BUG01.png
Can you please tell me how to fix the issue shown in the screenshot above, where some content is not displaying properly and clicking the blank area (below av1) fails to properly expand it? I am using the dev version of Edge browser.
 

RE:dead

Newbie
Sep 4, 2018
17
16
having a sort of specific problem, the game adds variables like "Rachel:true" into the table based on choices, but if you don't make those choices they don't appear in SugarCube.State.active.variables. Is there a way to forcfully add those? (sorry if this is a total noob question)
 

MrBlack ✌

Member
Jun 4, 2017
263
233
"true" is the value of the variable "Rachel", right?
Tried to enter "SugarCube.State.active.variables.Rachel=true" in console (and run)?
 

M#Cntz

Newbie
Sep 7, 2024
22
18
Same here. Both the twinehacker and sugarmelt are not opening in firefox after a fresh install.
Some update screwed it up
As an unupdated browser from over a month ago still works
But auto-updated ones make it so that the twinehacker doesn't even show an error message
 
  • Like
Reactions: CypherWisp

Mee&Mee

Member
Apr 23, 2020
323
486
Hey guys, I know this request is out of topic, but please, I want to know if someone can explain to me this, I mean, I cannot figure it out what the code for this is... thanks in advance
 

yozara

Member
Feb 2, 2018
246
57
When I type "SugarCube.State.active.variables" in the console I get :
VM67:1 Uncaught ReferenceError: SugarCube is not defined
at <anonymous>:1:1
I used to have no problem playing with variable before but it doesn't seem to work anymore
 

Alcahest

Engaged Member
Donor
Game Developer
Jul 28, 2017
3,494
4,337
When I type "SugarCube.State.active.variables" in the console I get :
VM67:1 Uncaught ReferenceError: SugarCube is not defined
at <anonymous>:1:1
I used to have no problem playing with variable before but it doesn't seem to work anymore
What game is it? Not every HTML game uses SugarCube.