ShaowWolf

New Member
Jan 25, 2022
2
0
Here is an updated version:
Code:
var cheatgirlname = "zahira"
var cheatgirl
for (const [key, value] of Object.entries(SugarCube.State.active.variables.npc)) {
    if (value.hasOwnProperty("girlname")) {
        if (value.girlname.toLowerCase() == cheatgirlname.toLowerCase()) {
            cheatgirl = eval("SugarCube.State.active.variables.npc."+key)
            console.log(value.girlname+' identified as SugarCube.State.active.variables.npc.'+key)
            console.log('Modify like this: SugarCube.State.active.variables.npc.'+key+'.age = 40')
            console.log('Or like this: cheatgirl.age = 40')
        }
    }
}
You don't have permission to view the spoiler content. Log in or register now.

Is there by chance an updated version as all I get is "Undefined" when I try this in Chrome, or am I missing something obvious ?
 

Porrvald

Member
Sep 12, 2020
475
489
Is there by chance an updated version as all I get is "Undefined" when I try this in Chrome, or am I missing something obvious ?
That is the updated version.
You are supposed to use it like this:
1. Paste code blob, replace Zahiras name with the npc you want to modify
2. Press enter
3. Type cheatgirl.something = some value
4. Press enter
5. Optionally repeat 3, 4 as many times as you like for other values (arrow key up on keyboard is very useful for this)
6. Done
You don't have permission to view the spoiler content. Log in or register now.

If not working, please share screenshot from console.
 
4.50 star(s) 117 Votes