Modding Castle Crashers Remastered Using Cheat Engine


Disclaimer

The information included in this post is for educational purposes only. Any material on this webpage may not be reproduced, retransmitted, or redisplayed other than for personal or educational use.

Introduction

Video game modding is the process of modifying aspects of a video game so that it functions differently than originally intended. You can use Cheat Engine to do this. To perform any of the modifications included in this post, you will need to follow the following instructions:

1. Launch Castle Crashers Remastered.

2. Open Cheat Engine.

3. In Cheat Engine, left-click on "File", and then left-click on "Open Process". Select the process that reads, "Castle Crashers".

Ensure that both Castle Crashers Remastered and Cheat Engine are running as you follow any of the below instructions. If Castle Crashers Remastered is closed at any point throughout this process, then you will need to re-launch the game and re-attach Cheat Engine to that new process instance of the game. If Cheat Engine is closed at any point throughout this process, then you will need to re-open Cheat Engine and re-attach it to the already-running "Castle Crashers" process.

Cheat Engine Default View

This section concerns cases where it makes the most sense to modify values using the default view of Cheat Engine.

Unlock Any Character

1. While in the main menu, select "Local Game". Then, select "Castle Crashers" so that you are taken to the character selection screen.

2. The default character selection target is Green Knight. Green Knight has the character ID "1", so head to Cheat Engine and type "1" into the "Value" text field. Ensure that "Scan Type" is set to "Exact Value" and that "Value Type" is set to "4 Bytes". Left-click on "First Scan". Cheat Engine will return a list of addresses and their associated values.

3. Return to Castle Crashers Remastered and scroll once so that your character selection target is Red Knight. Red Knight has the character ID "2", so return to Cheat Engine, type "2" into the "Value" text field, and left-click on "Next Scan". Cheat Engine will return a significantly reduced list of addresses and their associated values.

4. Return to Castle Crashers Remastered and scroll once again so that your character selection target is Blue Knight. Blue Knight has the character ID "3", so return to Cheat Engine and type "3" into the "Value" text field and left-click on "Next Scan". Cheat Engine will return an even more significantly reduced list of addresses and their associated values. There should be fewer than five entries in this list, so you can assume that at least one of these addresses is responsible for the ID of the character that you have selected.

5. Refer to this resource to determine which character that you would like to unlock. For example, say that you wanted to unlock Necromancer. Necromancer has the character ID "20", so highlight the addresses in your list, right-click them, and left-click on "Change value of selected addresses". Type "20" into the text field that you are presented with, and left-click on "OK".

6. Return to Castle Crashers Remastered and, without scrolling, select the character that you had left active before you made the modification (in this case, it would be Blue Knight).

7. When you load into Home Castle, you will see that you are Necromancer, rather than Blue Knight. Pause the game and select "Exit To Map" to head to the World Map.

8. At the bottom of the World Map screen, you will see "Saving...". After that transition has completed, then you will have unlocked Necromancer.

9. To verify that the instructions have been performed successfully, return to the main menu, select "Local Game", and select "Castle Crashers" so that you are taken to the character selection screen again.

10. You will see that you can scroll to Necromancer in your character selection screen and select him as you would any other character that you already have unlocked.

Modify Character Experience

1. Head to the character selection screen and select any character. I am going to assume that you selected a character that you have not made any progress on yet, so that character will be level 1 and have 0 experience points.

2. Load into Home Castle and progress to the second area in that level. That will be the first area where enemies spawn.

3. Each successful attack on an enemy yields 1 experience point.

4. Hit one enemy once, pause your game, and then exit to the world map. Head to your "Stats" screen, and you will see that you have 1 experience point.

5. Head to Cheat Engine and type "1" into the "Value" text field. Ensure that "Scan Type" is set to "Exact Value" and that "Value Type" is set to "4 Bytes". Left-click on "First Scan". Cheat Engine will return a list of addresses and their associated values.

6. Load back into Home Castle and, again, hit one enemy once. Exit to the world map. In your "Stats" screen, you will see that you now have 2 experience points. Return to Cheat Engine, type "2" into the "Value" text field, and left-click on "Next Scan". Cheat Engine will return a significantly reduced list of addresses and their associated values.

7. Load back into Home Castle and, again, hit one enemy once. Exit to the world map. In your "Stats" screen, you will see that you now have 3 experience points. Return to Cheat Engine, type "3" into the "Value" text field, and left-click on "Next Scan". Cheat Engine will return an even more significantly reduced list of addresses and their associated values. There should be fewer than five entries in this list, so you can assume that at least one of these addresses is responsible for the selected character's experience points.

8. Refer to this resource to determine how many experience points you would like to give the selected character. For example, say that you wanted to give the selected character enough experience points to reach level 99. You would then give the selected character 113,681 experience points. Highlight the addresses in your list, right-click them, and left-click on "Change value of selected addresses". Type "113681" into the text field that you are presented with, and left-click on "OK".

9. Return to your Castle Crashers Remastered character's "Stats" screen and select "Continue" to return to the World Map screen.

10. At the bottom of the World Map screen, you will see "Saving...". After that transition has completed, then the selected character will have 113,681 experience points.

11. To verify that the instructions have been performed successfully, return to the "Stats" screen. You will see that the selected character has 113,681 experience points.

Modify Character Level

1. Follow the instructions pertaining to "Modify Character Experience". The selected character will be level 1 and have 113,681 points.

2. Head to Cheat Engine and type "1" into the "Value" text field. Ensure that "Scan Type" is set to "Exact Value" and that "Value Type" is set to "4 Bytes". Left-click on "First Scan". Cheat Engine will return a list of addresses and their associated values.

3. Because you have enough experience points to level past level 1, each successful attack on an enemy will yield 1 level (until you reach level 99).

4. Load into Home Castle and hit one enemy once. Then, exit to the world map. You will be taken to your "Stats" screen immediately because you have unspent skill points, but disregard those. You will see that the selected character is now level 2.

5. Return to Cheat Engine, type "2" into the "Value" text field, and left-click on "Next Scan". Cheat Engine will return a significantly reduced list of addresses and their associated values.

6. Load back into Home Castle and, again, hit one enemy once. Exit to the world map. In your "Stats" screen, you will see that the selected character is now level 3.

7. Return to Cheat Engine, type "3" into the "Value" text field, and left-click on "Next Scan". Cheat Engine will return an even more significantly reduced list of addresses and their associated values. There should be fewer than ten entries in this list, so you can assume that at least one of these addresses is responsible for the selected character's level.

8. Highlight the addresses in your list, right-click them, and left-click on "Change value of selected addresses". The level of a character is stored as an unsigned byte (range: 0 through 255 decimal), so type "256" or any positive value less than that into the text field that you are presented with, and left-click on "OK". Note that, while the maximum value an unsigned byte can represent is technically 255, because the index of a character's level begins at 1, the range of values that this unsigned byte takes on is offset by +1. If you set the value of a character's level such that it is greater than 256, then an integer overflow with respect to the character's level will occur, making its value wrap around to the least significant value that it can represent (typically, that would be 0, but here it is 1 due to the offset of +1).

9. Select "Continue" to return to the World Map screen.

10. At the bottom of the World Map screen, you will see "Saving...". After that transition has completed, then the selected character will be the level that you indicated in step 8.

11. To verify that the instructions have been performed successfully, return to the "Stats" screen. You will see that the selected character is the level that you indicated in step 8. Note that the selected character will not be able to level up if you set their level to a value greater than or equal to 99 as level 99 is the maximum level that any character can legitimately be. Additionally, note that the selected character will not gain skill points for any level past level 78, so if you set the selected character's level to a value that is greater than or equal to 78, then you will not receive skill points for the levels that you bypassed.

Unlock Any Weapon

1. Ensure that you have at least 32 gold. You can do this by either eliminating enemies until you have accumulated that amount of gold or by following the instructions pertaining to "Modify Character Gold".

2. Ensure that you have unlocked the "Castle Keep" level.

3. Load into Castle Keep and eliminate all the enemies in the area so that the level transforms into a store.

4. Before you purchase the Skinny Sword from the store, it is important to note what weapon your character is currently holding. I am going to assume that your character is currently holding the Thin Sword, the starting weapon of Green Knight.

5. Refer to this resource to determine the weapon IDs of both your current weapon and the weapon that you would like to unlock. For example, say that you wanted to unlock the NG Golden Sword. The NG Golden Sword has the weapon ID "65".

6. The weapon ID of the Thin Sword is "3". Since your character is currently holding that weapon, then head to Cheat Engine and type "3" into the "Value" text field. Ensure that "Scan Type" is set to "Exact Value" and that "Value Type" is set to "4 Bytes". Left-click on "First Scan". Cheat Engine will return a list of addresses and their associated values.

7. Return to Castle Crashers Remastered and purchase the Skinny Sword by pressing the light attack button while standing in front of the Skinny Sword purchase prompt.

8. Your character will now be holding the Skinny Sword. According to the resource mentioned in step 5, its weapon ID is "2".

9. Return to Cheat Engine, type "2" into the "Value" text field, and left-click on "Next Scan". Cheat Engine will return a significantly reduced list of addresses and their associated values.

10. Return to Castle Crashers Remastered and pick up the dropped Thin Sword.

11. Return to Cheat Engine, type "3" into the "Value" text field, and left-click on "Next Scan". Cheat Engine will return an even more significantly reduced list of addresses and their associated values. There should be fewer than five entries in this list, so you can assume that at least one of these addresses is responsible for the weapon ID of the weapon that your character is currently holding.

12. Recall that you wanted to unlock the NG Golden Sword and that its weapon ID is "65". Highlight the addresses in your list, right-click them, and left-click on "Change value of selected addresses". Type "65" into the text field that you are presented with, and left-click on "OK".

13. You will see that your character is currently holding the NG Golden Sword. Although you are holding the desired weapon, it will not be stored in and equippable from the Weapons Frog until you pick up the dropped Skinny Sword and then pick up the dropped NG Golden Sword because picking up a weapon is what stores it in the Weapons Frog. After doing this, at the bottom of your screen Blacksmith will say, "Visit me for weapon info." with an image of the weapon below that text. That is your indicator that the weapon is actually unlocked.

14. You can repeat steps 6 through 13 to unlock any additional weapons. Note that if the Skinny Sword despawns or if you exit the area after purchasing it, then you will need to find a new weapon to pickup in order to repeat this process because you are not allowed to purchase the Skinny Sword if you already have unlocked it.

Modify Character Gold

1. Head to the character selection screen and select any character. I am going to assume that you selected a character that you have not made any progress on yet, so that character will have 0 gold.

2. Load into Home Castle. You will see three gold coins above your character.

3. Head to Cheat Engine and type "0" into the "Value" text field. Ensure that "Scan Type" is set to "Exact Value" and that "Value Type" is set to "4 Bytes". Left-click on "First Scan". Cheat Engine will return a list of addresses and their associated values.

4. Return to Castle Crashers Remastered and pick up one gold coin so that your character has 1 gold coin.

5. Return to Cheat Engine, type "1" into the "Value" text field, and left-click on "Next Scan". Cheat Engine will return a significantly reduced list of addresses and their associated values.

6. Return to Castle Crashers Remastered and pick up another gold coin so that your character has 2 gold coins.

7. Return to Cheat Engine, type "2" into the "Value" text field, and left-click on "Next Scan". Cheat Engine will return an even more significantly reduced list of addresses and their associated values.

8. Return to Castle Crashers Remastered and pick up another gold coin so that your character has 3 gold coins.

9. Return to Cheat Engine, type "3" into the "Value" text field, and left-click on "Next Scan". Cheat Engine will return an even more significantly reduced list of addresses and their associated values. There should be fewer than five entries in this list, so you can assume that at least one of these addresses is responsible for the amount of gold that your character currently has.

10. Highlight the addresses in your list, right-click them, and left-click on "Change value of selected addresses". The amount of gold a character has is stored as a 32-bit signed integer (range: −2,147,483,648 through 2,147,483,647 decimal), so type "2147483647" or any positive value less than that into the text field that you are presented with, and left-click on "OK". Note that, if you pick up any gold while having 2,147,483,647 gold, then an integer overflow with respect to the amount of gold that you have will occur, making its value wrap around to the least significant value that it can represent. If you have a negative amount of gold, then you will be unable to purchase any in-game items.

Cheat Engine Memory View

This section concerns cases where it makes the most sense to modify values using the memory view of Cheat Engine.

1. In order to modify values using the memory view of Cheat Engine, you will need to find your character data.

2. Left-click on "Memory View" under the address scanner.

3. In Memory Viewer, left-click on "Search" and then left-click on "Find memory".

4. Select (Array of) byte as your type and leave the "Array to scan" configuration unchanged.

5. Personally, I find that the easiest method to find character data is to follow the instructions pertaining to "Modify Character Experience" such that the character has enough experience points to reach level 99 and then have the character attack enemies until it reaches level 99 (recall that, because the character has enough experience points to level past level 1, each successful attack on an enemy will yield 1 level (until it reaches level 99)).

6. After doing this, maximize each attribute.

7. Determine the hexadecimal values of both the character's currently equipped weapon and animal orb. In the case of a character that is currently holding the Thin Sword and has no animal orb, their IDs' hexadecimal values are 03 and 00, respectively.

8. So, in consideration of steps 5 through 7, type "03 00 19 19 19 19" in the "Find memory" search text field.

9. If you did this correctly, then the top line of your search result will display most of your character data (the character data begins six bytes before the weapon ID's hexadecimal value, so you can go up one line to see the rest of it).

Character Data Memory Structure

Save data for a particular character is structured in memory as follows:

You can edit your character data while in Castle Crashers Remastered's main menu and then load into the game as the character to see how your modifications have been applied.

"f_LoadLevelUnlocks" Array Values

Note that level unlock progress is handled in the same way for both Normal Mode and Insane Mode. Additionally, note that any level that precedes an unlocked level is both unlocked and completed.

First level_unlocks Array Values:

Array Value Description
0x00 Unlocks Home Castle
0x01 Unlocks Blacksmith and Barbarian War
0x03 Unlocks Forest Entrance and Dock
0x07 Unlocks Abandoned Mill
0x0F Unlocks Tall Grass Field
0x1F Unlocks Industrial Castle and Flowery Field
0x3F Unlocks Cyclops' Cave
0x7F Unlocks Lava World
0xFF Lava World Completed

Second level_unlocks Array Values:

Array Value Description
0x01 Industrial Castle Completed
0x03 Unlocks Desert
0x07 Unlocks Sand Castle Interior
0x0F Unlocks Flooded Temple. Additionally, adds the map to the character's inventory.
0x1F Marsh and Corn Boss Completed
0x3F Unlocks Full Moon
0x7F Unlocks Snow World
0xFF Unlocks Wizard Castle Takeoff

Third level_unlocks Array Values:

Array Value Description
0x01 Wizard Castle Takeoff, Wizard Castle Interior, and Final Battle Completed
relic_unlocks Array Values

Normal Mode:

Array Value Description
0x00 No Relics
0x01 Compass
0x02 Wheel
0x03 Compass + Wheel
0x04 Telescope
0x05 Compass + Telescope
0x06 Wheel + Telescope
0x07 Compass + Wheel + Telescope
0x08 Horn
0x09 Compass + Horn
0x0A Wheel + Horn
0x0B Compass + Wheel + Horn
0x0C Telescope + Horn
0x0D Compass + Telescope + Horn
0x0E Wheel + Telescope + Horn
0x0F Compass + Wheel + Telescope + Horn

Insane Mode (Includes Compass, Wheel, Telescope, and Horn for Normal Mode):

Array Value Description
0x1F Compass
0x2F Wheel
0x3F Compass + Wheel
0x4F Telescope
0x5F Compass + Telescope
0x6F Wheel + Telescope
0x7F Compass + Wheel + Telescope
0x8F Horn
0x9F Compass + Horn
0xAF Wheel + Horn
0xBF Compass + Wheel + Horn
0xCF Telescope + Horn
0xDF Compass + Telescope + Horn
0xEF Wheel + Telescope + Horn
0xFF Compass + Wheel + Telescope + Horn
Character Data Memory Structure Example

The following byte sequence is an example of a character who is unlocked; is level 99; has 113,681 experience points; currently has the NG Golden Sword equipped; whose current animal orb is Snoot; has maximized attributes; completed Normal Mode; has seven health potions; has eight bombs; has nine sandwiches; has all the relics in both Normal Mode and Insane Mode; has 9,999,999 gold; has Insane Mode unlocked; completed Insane Mode; and has a golden skull:

80 62 00 01 BC 11 41 11 19 19 19 19 FF FF 01 07 08 09 FF 00 98 96 7F 01 FF FF 01 02,

where 80 is the byte representing the character unlock flag; 62 is the byte representing the character's level; 00 01 BC 11 is the sequence of bytes representing the character's experience points; 41 11 is the sequence of bytes representing both the character's weapon and animal orb IDs; 19 19 19 19 is the sequence of bytes representing the character's attributes; FF FF 01 is the sequence of bytes representing the character's level unlock progress in Normal Mode; 07 08 09 is the sequence of bytes representing the character's health potions, bombs, and sandwiches; FF is the byte representing the character's relic unlock progress; 00 98 96 7F is the sequence of bytes representing the character's gold; 01 is the byte representing whether or not Insane Mode is unlocked for the character; FF FF 01 is the sequence of bytes representing the character's level unlock progress in Insane Mode; and 02 is the byte representing the character's skull.

You can use this example to aid in your character data modifications pertaining to unlocking any animal orb; modifying character attributes; modifying Normal Mode level progress; modifying health potion, bomb, and sandwich counts; modifying relic progress; unlocking Insane Mode; modifying Insane Mode level progress; and modifying a character's skull. Note that any animal orbs you unlock using this method will not be stored in and equippable from the Animal Ark. If you exchange the animal orb you unlocked using this method for a different animal orb, then you will not be able to re-equip the animal orb that you unequipped. Refer to this resource to determine the animal orb ID of the animal orb that you would like to unlock.

Additional Resources

Visit this resource to convert decimal numbers into their hex equivalents. Visit this resource to convert hex numbers into their decimal equivalents. Visit https://kb.iu.edu/d/afdl to access a decimal-hexadecimal-binary conversion table pertaining to numbers 0 to 255 decimal.