(ENG) Simple mods: Unlock limits without 70% completion - KCreator/Earth-Defence-Force-Documentation GitHub Wiki

Before starting

You will need the following tools:

  • A hex editor. I personally use XVI32, but any other one will work.
  • A way of extracting files from root.cpk. The simplest way would be CriPakTools, which has a UI for ease of access.

Step 1

Open the game's directory, for example:

C:/Program Files/Steam/Steamapps/Common/EARTH DEFENSE FORCE 5

Inside you should see the following:

SOUND
Chunk01.cpk
DX11.cpk
EDF5.exe
Root.cpk
sdkencryptedappticket64.dll
steam_api64.dll
umbra_sandlot.dll

Create a new folder, ideally called "Mods" so the directory looks like:

SOUND
Mods
Chunk01.cpk
DX11.cpk
EDF5.exe
Root.cpk
sdkencryptedappticket64.dll
steam_api64.dll
umbra_sandlot.dll

Copy Root.cpk into a folder elsewhere, and run a cpk extractor of your choice on it. We want everything in the "Mainscript" folder. Copy these files into the Mods folder.

Step 2

Open "Mainscript.as" in a text editor, such as notepad.

Find this part of the file:

void CheckUnlockArmorWeaponLimit()    
{    
   int clear_ratio = GetAchivementValue_Int("AllClearRatio");    
   if( clear_ratio >= 7000 ) {    
      if( UnlockArmorWeaponLimit() ) {    
         Dialog_Message( "Sys_UnlockArmorWeaponLimit" );    
      }    
   }    
}    

Edit it so it looks like this:

void CheckUnlockArmorWeaponLimit()
{
	int clear_ratio = GetAchivementValue_Int("AllClearRatio");
	if( clear_ratio >= 0 ) {
		if( UnlockArmorWeaponLimit() ) {
			Dialog_Message( "Sys_UnlockArmorWeaponLimit" );
		}
	}
}

And save it.

Step 3:

Make a backup of "EDF5.exe", and open the file in the hex editor. Hit control + g and insert "E8D8E0" in the box.

It should look like this:

Click "edit->overwrite string", make it look like this, the text being "./Mods/Mainscript.as":
Click OK. Click on the left window, where the highlighted character is, and type '00', then save. The final result should look like this:

Save the file, and boot up the game. If all goes well, before long (You might have to complete 1 multiplayer mission) you should get a message saying no limits in unlocked.