# How to start modding Cruelty Squad *Works as of the November 14, 2021 patch* ## Requirements - [The game](https://store.steampowered.com/app/1388770/Cruelty_Squad/) - [Godot Engine](https://godotengine.org/download) - Use the standard version, the Mono version might not work - [Godot RE Tools](https://github.com/bruvzg/gdsdecomp/releases/tag/v0.0.7) - Your text editor of choice with find in folder and replace functionality ## Updating your project if you already followed this guide previously Make a new folder, do the game file ripping and script decompiling steps again into that folder, then copy and replace everything **except the `addons` folder** into your existing project. ## Ripping the game files Open up Godot RE Tools and go to *PCK > Explore PCK archiveā€¦*, which will open this dialog box. You can navigate to the .pck in your game folder, or you can copy it somewhere else like I did here. ![Godot RE Tools PCK opening dialog box](https://i.imgur.com/xRejpXY.png) If it tells you that some files have malformed names, ignore it. Go ahead and extract it somewhere. ![PCK explorer dialog box](https://i.imgur.com/N7DleG2.png) ## Setting up Godot Open up Godot and create a new project with the *New Project* button. ![Godot new project view](https://i.imgur.com/iRL1rqr.png) Copy over the files you ripped into your new project's folder, replacing any files that were already there. Quit out of the project to the project list (*Project > Quit to Project List*), and load it again. This should automatically load the project's settings. You can tell if it starts up with the Cruelty Squad splash screen, goes to the *Consumerintro* scene, and looks like this when you open up the project settings (*Project > Project Settingsā€¦* in the top-left of Godot): ![Fresh project with automatically loaded settings](https://i.imgur.com/WcWCLOM.png) <br /> :::spoiler **If the settings didn't automatically load for some reason** Once that's done, go to your project settings, go to *Run* under the *Application* section, and make sure the main scene is `res://Cutscenes/Consumerintro.tscn` like so: ![Godot project settings](https://i.imgur.com/xiqRpQF.png) Next, go to the *Input Map* tab, and if they aren't present, add the following actions: - movement_forward - movement_left - movement_right - movement_backward - mouse_1 - movement_jump - crouch - reload - zoom - Use - kick - Lean_Left - Lean_Right - weapon1 - weapon2 - weapon3 - switch_weapon - Tertiary_Weapon - drop - Suicide - Stocks - Vision and click the plus next to each of them to add key bindings. When you're done, it should look something like this: ![My added input map key bindings](https://i.imgur.com/uGztumh.png) If it isn't already there, go to the *AutoLoad* tab and add the following entry: - Path: `res://Entities/Game_Manager.tscn` - Node Name: `Global` ![AutoLoad setting](https://i.imgur.com/TVfyKfD.png) and you're done with Godot setup for now. ::: ## Next steps At this point, get the [project setup tool](https://github.com/crustyrashky/crus-project-setup-tool). Alternatively, you can manually decompile and fix all of the project scripts yourself if you're working on an old version of the game, aren't using Windows but can't write your own small command-line script to copy and delete files, or just like to do things that way. :::spoiler Doing things automatically with the project setup tool <br /> Once you've downloaded the setup tool, extract the `_SETUP_PROJECT_` folder into the project root folder like so. ![_SETUP_SCRIPTS_ folder extracted into the project root](https://i.imgur.com/yi6hi5i.png) Open it, run `setup_scripts.bat` and wait until it says *Script setup complete*. Go back to Godot and run the game by hitting F5 or clicking the play button in the top-right and it should work. You're done, unless you want to get the intro working. ## Getting the intro working The scripts bundled with the setup tool already have all the script-based changes to make it work included, so all that's left is to open up `Cutscenes/Consumerintro.tscn` in Godot (assuming it isn't already open), click the *Spatial* node at the top of the *Scene* tab on the left, and set *Next Scene* in the Inspector tab on the right to `res://Cutscenes/Cutscene1.tscn`. ![Setting next scene](https://i.imgur.com/fczBn9I.png) You can also click the *Timer* node right under it and set its *Wait Time* to 5 seconds, if you want the startup logo to last long enough to see it all like normal. I have no idea why these properties get reset when the game is ripped. ::: :::spoiler Doing things manually {%hackmd l3rp_mG8QzGW71BNVGyufw %} ::: ## Conclusion ![Everything working as intended](https://i.imgur.com/ZIbpRPR.png) After fixing whatever errors pop up, your very own Cruelty Squad project to hack away at is complete. Now that you effectively have the game's source code at your fingertips, please don't do anything stupid and/or copyright-infringing enough for the dev to consider making the process harder. Want to try your hand at mapping? Take a look at [this guide](https://hackmd.io/@OsM6oUcXSwG3mLNvTlPMZg/SkYQwbONu). Thanks for reading, and expect one or two more tutorials on actually making a mod in the future. Also, if someone could write something to automate this process, that would be cool. ## Notes - Since your modding project will share the same user data folder as the actual game by default, making a backup of your saves in `%appdata%\Godot\app_userdata\Cruelty Squad` is strongly recommended before really getting into modding - If you want to change the project's settings, delete `project.binary`, otherwise the settings will reset once you close the project ### Not errors These don't affect the project and are mostly caused by not having the original development assets. All you can do is ignore them, or if you're adventurous and neurotic enough, compile a version of Godot that doesn't have them. - Can't preload resource at path: ... ![Can't preload resource at path](https://i.imgur.com/lLCwgsV.png) - Anything involving _get_modified_time ![Get modified time](https://i.imgur.com/8YrfArd.png) - Any error where the dot is yellow and not red (that's just a warning) ![Warning examples](https://i.imgur.com/uiPAfoz.png) - Unable to enable addon plugin at: 'res://addons/BitmapFontCutter/plugin.cfg' parsing of config failed. ![BitmapFontCutter warning](https://i.imgur.com/8IIJchf.png) ## Links [Cruelty Squad official discord](https://discord.gg/PnEKUZp2H8) [Developer (Consumer Softproducts) twitter](https://twitter.com/CSoftproducts) [CRUELTY SQUAD MOD LOADER](https://github.com/crustyrashky/crus-modloader) [My youtube channel](https://www.youtube.com/channel/UC2j_rbOpdyTMTX2jjGHvYWw)