Skip to content

Commit e70c038

Browse files
committed
Add more instructions for decompiling the game.
The previous instructions automatically assumed the reader knew everything about the command line. This commit hopes that the reader knows some basic command line commands.
1 parent 58e59fa commit e70c038

File tree

1 file changed

+56
-11
lines changed

1 file changed

+56
-11
lines changed

decompiling.md

Lines changed: 56 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,57 @@
1+
Fortunately, this game can easily be extracted and decompiled. This makes modding much easier--if it was hard, there probably would be no modding framework.
12

2-
## Getting what you want in spite of everyone else.
3-
Reverse engineering is a fact of life, and while I will do my best to make modding AWSW as painless as possible, it will still need to be done. Luckily, you have all the information you need right here.
4-
5-
* Extract the archive with Rpatool: [Rpatool](https://github.com/Shizmob/rpatool)
6-
Move rpatool into the same folder as archive.rpa (normally located in AWSW's game/ folder) and run with ```python rpatool.py -x archive.rpa```. It is recommended that you move rpatool and archive.rpa into a subdirectory first, as rpatool extracts the archive into the **current directory**.
7-
* Decompile rpyc files (the game's code) with unrpyc: [UnRpyc](https://github.com/CensoredUsername/unrpyc)
8-
Move the contents of the git repository into a folder in the directory where the extracted archive files are. Decompile the rpyc files with ```python unrpyc.py ../*.rpyc```. See how the developers did it. (You'll also need this to figure out the handles for the characters and stock images.)
9-
* Look at the example code!
10-
* Look at the ren'py engine code (just kidding)
11-
* When in doubt, see the the Ren'py docs: [Docs](https://www.renpy.org/doc/html/index.html)
12-
* If none of the above options help: hold tight for the debug overlay, or ask for help!
3+
### Prerequisites
4+
5+
You will need a working Python 2 installation. To check, open up a Powershell, command prompt, terminal, or equivalent and execute `python --version`.
6+
7+
If you get an error such as
8+
9+
'python' is not recognized as an internal or external command, operable program or batch file
10+
11+
then you have improperly installed Python.
12+
13+
If you get an output that starts with `Python 3`, you have installed the incorrect version of Python.
14+
15+
If you get an output that starts with `Python 2`, you have installed the correct version of Python.
16+
17+
## Getting media and compiled source code
18+
*This assumes you know the basics of command line, such as changing directories.*
19+
20+
* Open up a Powershell, command prompt, terminal, or equivalent
21+
* Make a new folder anywhere and change directories to the new folder
22+
* Copy the archive.rpa from the game directory in the installation folder into the new folder
23+
* [Download rpatool](https://github.com/Shizmob/rpatool/archive/master.zip) and extract the file `rpatool` into the new folder.
24+
* Run `python rpatool -x archive.rpa`. It might take a while
25+
26+
After the command is executed, a whole plethora of files and folders are made in the new folder. For now, ignore all files with the .rpyc file extension.
27+
28+
Some notable folders include:
29+
| Location | Purpose |
30+
| --------------- | --------------------------------------------------------------- |
31+
| achievements | Contains all the achievement icons |
32+
| bg | Contains all the backgrounds |
33+
| bg/in | Contains backgrounds that take place inside |
34+
| bg/in/apts | Contains apartment backgrounds |
35+
| bg/in/facility | Contains backgrounds that take place in the production facility |
36+
| bg/out | Contains backgrounds that take place outside |
37+
| bg/out/facility | Contains backgrounds that is right outside the facility |
38+
| bg/out/np | Contains backgrounds that take at night time |
39+
| bg/out/town | Contains backgrounds of various places in the town |
40+
| cg | Contains all the characters' CGs among other stuff |
41+
| cg/extra | Contains all the cards and image gallery photos |
42+
| cg/lorem | Contains extra pictures of Lorem and Ispum |
43+
| cr | Contains all the characters expressions |
44+
| fx | Contains the sound effects |
45+
| mx | Contains all the music the game has to offer |
46+
| se/sounds | Contains more sound effects |
47+
| sy | Never before seen photos! |
48+
49+
## Getting the source code
50+
51+
Source code is the human-readable version of the game. All dialog options, games, and spoilers are in these files.
52+
However, the code is compiled into Ren'Py compiled files. They have an extension of .rpyc.
53+
To get the source code, we need to decompile the game. The source code has an extension of .rpy
54+
55+
* [Download unrpyc](https://github.com/CensoredUsername/unrpyc/archive/master.zip) and extract the zip file into the new folder
56+
* Run `python unrpyc.py .`
57+
* *Optional* Remove the .rpyc files

0 commit comments

Comments
 (0)