Tutorial RAGS How To Edit RAGS Games

JSheppard

Newbie
Respected User
Aug 5, 2016
55
21
can anybody tell me how to change stats in the game wife trainer almost all variables seem to be changeable except for the ones like client submission desire and so on i change them let it reload by doing anything but it reverts to old values
Look like it's not just a simple values. It's sum of anothers, so you must change not this stats. You need change hiden from player stats.
 

Pararock

Member
Aug 17, 2016
316
373
IIRC, the values stored in an array are harder to change since it store everything as string(even number). When you edit it in the debug window, it create a new string since they are immutable in c#, but the array still point to the unchanged string. Only way I found was to be really really fucking patient and use cheatengine just after loading your save since everything is tighly packed together and is easy to find with cheatengine. Once you start playing and values are modified, it move all around and it become really hard to find.

I started working on a save editor a long time ago, but the RAGS code is so bad I shift+deleted everything and never looked back. I still have nightmare about it.
 

Pararock

Member
Aug 17, 2016
316
373
Is there any way to Extract images alone from RAGS games?
I did a powershell script a long time ago that take the .xml exported from the games and dump all the images. Give me 1 day and I'll find it.

Edit:
So, copy paste this into a file. I suggest ExtractRags-Image.ps1

You don't have permission to view the spoiler content. Log in or register now.

Open your file in the editor and then file -> export and make sure to check images.

Then, open a powershell prompt and write
Code:
.\ExtractRags-Image.ps1 -InputXML .\images.xml -OutputFolder ./images
 
Last edited:

selectivepaperclip

Active Member
Modder
Respected User
Donor
Feb 19, 2017
524
3,411
If you've cracked the RAGS Designer to not require a password, the content you get when you open a game in the designer and "File -> Save to Web Format" should include all the images.
 
  • Like
Reactions: Lemir

Pararock

Member
Aug 17, 2016
316
373
Not sure why you don't have all the images. Can you open the .xml in a text editor like notepad and verify they are there?
 

Corambe37

New Member
Jun 10, 2017
3
0
Hello,
followed exactly the instruction to edit a rag.file but each time i press enter (after written RagsPsw nameofmyfile.rag), it says "error not specified" but i got a bak.file in the folder though which i cant edit w/o psw ofc.
So to be clear i got the original rag.file plus the bak one but none of it can be edited w/o psw

What i am doing wrong here ?

Ty in advance for your help
 

selectivepaperclip

Active Member
Modder
Respected User
Donor
Feb 19, 2017
524
3,411
It's not exactly the same as 'editing' a RAGS game, but I've been developing a new JavaScript-based RAGS player that I'm looking for feedback on:



It has built-in cheat capabilities so you can freeze values such as energy or money in place if you want
 

Slavesama

Member
Sep 6, 2016
179
93
For extract game you don't need go in command, just move your game.rag on RagsPsw.exe and windows work for you ^^
 

grev

Active Member
Modder
Jun 10, 2017
604
672
Well all of a sudden I am getting undefined error when trying to use the unpacker. i've redownloaded it reinstalled rags but it just wont work anymore. any suggestions? cant release the new mod of WT6c without fixing this

NVM it was just an sql issue reinstalled and its working now..
 

anon4862

New Member
Jun 20, 2017
4
0
Well all of a sudden I am getting undefined error when trying to use the unpacker. i've redownloaded it reinstalled rags but it just wont work anymore. any suggestions? cant release the new mod of WT6c without fixing this

NVM it was just an sql issue reinstalled and its working now..
Sorry, but how did you fix it? I'm getting that same error
 

Thjis

Member
May 19, 2017
393
190
You can crack it yourself easily with DNSpy =>

Download it and open the designer. Go to
RagsDesigner =>WPFRagsDesigner => RagsDesigner => wait for it to decompile and click ctrl+f and search RagsDesigner.TheGame.bPasswordProtected you should get to the function a( string A_0) right-click and click edit IL. You shuold see ldc.i4.0 followed by stloc.s and ldc.i4.0 change the first ldc.i4.0 to ldc.i4.3 and the second ldc.i4.0 to ldc.i4.1. After this save the module(might have to save to the desktop and copy it after, due to permission) and run.





Edit: Doh, that only for the password, give me a few minutes for the read only protection.
Here:
I am trying to follow these steps. I am confused on the "go to RagsDesigner=>WPFRagsDesigner=>RagsDesigner. I have tried to run Ilspy and ragspaws but both for some reason the command windows for both programs immediately close. These steps are very much above my skill set, but I always want to learn. So if anyone can walk me though this one.. I prefer to learn so I don't have to beg for help :)
 
  • Like
Reactions: HGH152

Pararock

Member
Aug 17, 2016
316
373
I am trying to follow these steps. I am confused on the "go to RagsDesigner=>WPFRagsDesigner=>RagsDesigner. I have tried to run Ilspy and ragspaws but both for some reason the command windows for both programs immediately close. These steps are very much above my skill set, but I always want to learn. So if anyone can walk me though this one.. I prefer to learn so I don't have to beg for help :)
Dnspy link is now working, you should use it instead of ilspy. The note about dnspy repo not working have long been solved. You need to open the designer executable with the dnSpy. For the 3.x version of rags, the path should be something close to "C:\Program Files (x86)\Rags Game LLC\Rags Player\RagsDesigner.exe"

By the go to, this is what I mean.


Once you clicked on RagsDesigner, you should see code on the right window. Switch focus to that window and do ctrl+f and paste RagsDesigner.TheGame.bPasswordProtected



Right click on the line 153 with bool flag2 = false and click edit IL. If your version don't match mine, the line number might be different. Find the ldc.i4.0 followed by stloc.s and ldc.i4.0 on the bottom of the window(the IL instructions that match the one you had selected are highlighted, in my case line 128-130) change the first ldc.i4.0 to ldc.i4.3 and the second ldc.i4.0 to ldc.i4.1. And click OK



Before/After the change



So we change the default value of i from 0 to 3 and the value of flag2 from false to true.

For the copy protection, I leave you with the old gif if you have any other question, just ask.
 

Thjis

Member
May 19, 2017
393
190
Will look at this closer when I get home, yhanks for response. I was getting dnspy to work, i kust had no idea what to do as the imgs no longer wotked. Want to break in some older 2.6 games that are noy being developed and play with alteting them.