[Mod] CheatMenu [v0.6.4] for The Twist [0.29Final]

dsconstructor

Active Member
Modder
Sep 26, 2017
231
288
#1
206616_CM_SShot.jpg
Overview:
This mod adds a collapsible cheat menu to the game.
It allows you to add/subtract values of the gamestate, such as NPC score, quest progression, money, energy, gentle/rough score, etc, see "Useful variable names" and the "Variables Guide"​

Updated: Jan 20, 2019
Game/Creator: The Twist /
Modder: dsconstructor
Mod Version: 0.6.4
Game Version: 0.29Final
Language: English

Features:
LeftClick = change value by 1 or 0.05 for Int and Float respectively
Shift+LeftClick change by 10 or 0.1
Ctrl+Shift+LeftClick change by 100 or 1.0
Debug->Dump Current - Save game logic to a SCENENAME.dmp file for the current scene (saves to: .\TheTwist_Data\...)
Debug->Dump All - Attempts to load and dump every scene in the game, note this might take awhile depending on system specs.

Installation:
(Optional)Backup TheTwist_Data\Managed\Assembly-CSharp.dll
Extract to game folder and overwrite.

Useful variable names:
momscr, *scr - NPC Score
momq, *q - Quest Progression
momdom, *dom - Rough/Gentle Score
momloc, *loc - NPC Location
momfc, *fc - Times Fucked
total_energ - Max Stamina
energ - Stamina
lube - 3 = Full Lube
suncream - 3 = Full Suncream
condoms - 3 = Full Condoms
money

Variables Guide(By )


Change-Log:
0.6.4
Port to .29Final
Added idiot proofing (game version check)

0.6.3
Port to .28Final
Added Commands tab
Added option to load a scene by name

0.6.2
Added scaling based on window size
Minor GUI cleanup

0.6.1
Port to .27Final
Trim newlines for SetText
Add parsing for InvokeEvent(type and method name)
Extended Increment/Decrement modifiers, see:"Features"
Minor cleanup and better exception handling

0.6.0
Port to .26Final
Added SetText and RandomInteger handling (for scene dumps)

0.5.9
Port to .25Final
Added a option to Dump All scenes
Added a way to modify float values, leftclick changes it by 0.05 shift+leftclick changes it by 0.1
Changed the appearance of bool values, to hopefully make it more intuitive

0.5.8
Port to .24Final

0.5.7
Port to .23Final

0.5.6
Port to .22Final

0.5.5
Port to .21Final

0.5.4Beta
Port to .20Final

0.5.3Beta
Port to .19Final

0.5.2Beta
Port to .18Final

0.5.1Beta
Port to .17Final

0.5Beta
Port to .17Beta3
Dump Scene now correctly indents statements in blocks, Say commands have newlines removed, misc improvements to output.

0.4Beta
Port to .17Beta1(works for Beta2 as well)
Improved Debug info
Debug->Dump Scene - logs more verbose game logic.

0.3Beta
Save changes to persistent storage(this means inventory changes should persist between scenes)

0.2Beta
First release

Source Code:
 

Attachments

DrSmith

Well-Known Member
Donor
Game Developer
Apr 21, 2017
1,067
1,947
#2
Hey, nice work!
I'm trying this out now and so far it's working nicely :D
This would solve a lot of problems!
 
Likes: MrLee

dsconstructor

Active Member
Modder
Sep 26, 2017
231
288
#3
Thanks bro. I had a problem were i sold the mom's panties to billy before using them and i used your cheat menu to get them back, so thank you for saving me from restarting the game :)
Glad it worked for you!
There is still the issue of inventory changes not being permanent but in a scene it should work like in your case.
Hey, nice work!
I'm trying this out now and so far it's working nicely :D
This would solve a lot of problems!
Thanks, except for the things mentioned in the "Known issues" it should be fully functional.

After some digging i now know why inventory state does not save on scene changes, the game only writes the item to persistent storage(where it survives a scene load) when the game gives or takes it from you.
All the game logic is implemented with Fungus, a flowchart logic library, kinda like visual programming.
This makes it pretty painful to cleanly call the same functionality from code.
Edit: Seems Fungus is open-source so that helped, i believe i fixed the inventory persistence, next release should have this fixed.
 
Last edited:
Likes: AngelOfDeath
Jun 28, 2017
15
24
#4
When you solve permament inventory changes, you probably are on a good way to manipulate time (hour of the day) in the same way. If you change hour's value in the registry, it doesn't save during scene change. Changing hour of the day would really help in moving the plot forward without unnecessary grinding (e.g. visiting pharmacy on 14th hour)
 

dsconstructor

Active Member
Modder
Sep 26, 2017
231
288
#5
When you solve permament inventory changes, you probably are on a good way to manipulate time (hour of the day) in the same way. If you change hour's value in the registry, it doesn't save during scene change. Changing hour of the day would really help in moving the plot forward without unnecessary grinding (e.g. visiting pharmacy on 14th hour)
The persistence(inventory) fix i made also seems to work with the time variable.
Changing the time also influences other gamestate though like the location of mom etc as a byproduct of the game logic running in the background.
I can foresee things breaking if the game logic is running a scene and you start messing with the time.
So take care when you change it around.

Version 0.3b is up.
 

GoGo13

Formerly 'ElGoGo'
Jul 6, 2017
49
6
#6
Could you tell me what variable is for the shady guy ? i have problems in the game with him and i want to try and fix them using this cheatmenu
 

bit

Member
Mar 9, 2017
41
49
#7
@dsconstructor Hi, you can upgrade your cheat injecting it in game, is explained how to do. (language of programming is )
This method have advantages, you don't need to rebuild cheat for every release of game. (Of course, if the variables do not change)
PS. If you want help write in PM.
 

dsconstructor

Active Member
Modder
Sep 26, 2017
231
288
#8
@dsconstructor Hi, you can upgrade your cheat injecting it in game, is explained how to do. (language of programming is )
This method have advantages, you don't need to rebuild cheat for every release of game. (Of course, if the variables do not change)
PS. If you want help write in PM.
Looks kinda neat, not that into python myself though, so if i went the patch route i would go with something like

This mod is easy to port to a new version though, one base class has code injected to create the CheatMenu GameObject and make it persistent.
CheatMenu class itself is standalone so for a new version i can copy paste it pretty much.
 
Likes: AngelOfDeath

Alascato

Active Member
Oct 23, 2017
330
41
#10
do u know know how i can fix this? i had to blame rick for stealing the necklace but if i always stay next to emma i just jump back into the pool
 

dsconstructor

Active Member
Modder
Sep 26, 2017
231
288
#11
do u know know how i can fix this? i had to blame rick for stealing the necklace but if i always stay next to emma i just jump back into the pool
Hard to figure out without more information.
If you can upload the save and tell me how to reproduce the problem from there i'd be willing to look into it.
 
Likes: AngelOfDeath
Jun 2, 2017
2
0
#13
View attachment 46246
Info

This mod adds a collapsible cheat menu to the game.
It allows you to add or subtract values of the gamestate, think npc score, quest progression, money, energy, gentle/rough score, etc, see "Useful variable names"
Shift + Click - adds/subtracts 10 every click

Useful variable names
momscr, *scr - NPC score
momq, *q - Quest progression
momdom, *dom - Rough/Gentle score

total_energy - Max Stamina
energ - Stamina

Known issues
- Editing strings is not yet supported, things such as current day of the week are stored this way.
- You can go over limits, such as score or even go into negative money, this is because there are no known limits, rough/gentle can go negative so unless i hard-code every variable's limit this is not going to change.

Important
Backup!
- Saves or save to a new slot after using, since it allows you to change any variable there's a chance of breaking saves if you change the wrong thing.
- TheTwist_Data\Managed\Assembly-CSharp.dll
The mod replaces the game assembly dll so if you want to uninstall the mod restore from backup.
Only works for the version noted in the zip filename(currently .16Final and .17Beta are available)

Installation
Extract to game folder and overwrite.
Uninstallation
restore Assembly-CSharp.dll from backup, Assembly-CSharp-BACKUP.dll included incase someone forgets to backup.
Changelog
CheatMod 0.4Beta
Port to .17Beta
Improved Debug info
Debug->Dump Scene - logs more verbose game logic (saves to: .\TheTwist_Data\SCENENAME.dmp)

CheatMod 0.3Beta
Save changes to persistent storage(this means inventory changes should persist between scenes)

First release 0.2Beta
Technical Info(for modders/programmers)
I added a new Monobehavior CheatMenu(source included), which gets added to a GameObject at game start and set to persist scene changes, and from then on out CheatMenu.OnGUI() handles the bulk of the work.
I need really specific directions because I'm not use to modding.
 

dsconstructor

Active Member
Modder
Sep 26, 2017
231
288
#14
I need really specific directions because I'm not use to modding.
It should be as easy as extract zip to the game folder and say yes to overwrite existing file
Then a button shows up in game to open the cheatmenu, and you click the + or - to add or subtract, see "Useful variable names" for what you might want to change.

@dsconstructor hi bro can you make git on ?
ps. is more easy to view updates and help if you want.
I'll look into it
Edit:
 
Last edited:
Likes: AngelOfDeath

Yvi

New Member
Dec 17, 2017
10
0
#15
Hi,
does using this help me skip some of the quest progress like:
in walkthrough im in step 45 but then 46 is bugging out.
Can I use this to skip the 46? so that I can go to 47
Note: the steps are just examples
 

dsconstructor

Active Member
Modder
Sep 26, 2017
231
288
#16
Hi,
does using this help me skip some of the quest progress like:
in walkthrough im in step 45 but then 46 is bugging out.
Can I use this to skip the 46? so that I can go to 47
Note: the steps are just examples
In theory, however in practice you're often dealing with a more complex set of variables not just a single "*q" quest variable.
Though you can dump the game logic and compare what is required with the current gamestate.
Debug->Dump Scene, then in .\TheTwist_Data\ a SCENENAME.dmp is created with the game logic for that scene(plain text), you can search for some text that occurs in the game to find roughly where you are in the logic. and what might be stopping the progression
 

dsconstructor

Active Member
Modder
Sep 26, 2017
231
288
#19
how do you install the cheat menu
From the OP:
Installation
Extract to game folder and overwrite.

More detailed:
The zip has the correct directory structure so you should be able to extract to game folder and be ready to go
If you're unable to extract with the folder structure intact:
Extract the zip and move Assembly-CSharp.dll to .\TheTwist_Data\Managed\ say yes to overwrite.
 
Likes: AngelOfDeath

dsconstructor

Active Member
Modder
Sep 26, 2017
231
288
#20
Not sure if anyone uses the Dump Scene feature but i've been working on making it output better readable code, this feature is quite powerful and can help find where you're stuck at.
If people have an interest in this i'll push this update for Beta2, otherwise it's probably going to be when next game release will be.

61125_DumpScene_Indentation.jpg

Had to push CheatMenu 0.5Beta for .17Beta3, unlike Beta1 & 2 for which the game assembly did not change it did for Beta3
So be sure to use the latest for .17Beta3
 
Last edited:
Likes: AngelOfDeath

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.