When playing Creeper World 4, you can easily open any map in the editor to view its 4RPL scripts and graphics resources. This can be a great learning tool in order to discover how another map performs some function you may wish to use or modify in your own maps, or just to discover how things work.
The first time you do this, you may need to first create a temporary “test.4rpl” script, and open it with notepad++ (or your other text editor of choice) in order to set the file association.
If you've already set the file association, just follow these steps:
1. Load the mission you want to borrow scripts from.
2. Once the map is loaded, press SHIFT+E to enter editor mode.
3. Press the “Editor” button in the lower right corner of the screen.
4. Go to the “Mods” tab and “Open CPACK Manager.”
5. In the CPACK Manager, click the “Scripts” tab on the left pane, and then click the “E” button next to the script you want to check out. This should open it in the text editor you chose earlier. You may also need to change the selected CPACK if there are multiple on the map. See screenshot below where the 3 relevant buttons for this step are highlighted.
Note that whenever you wish to view a script again later, you don't need to repeat these steps. The scripts of any cpack you've examined in this way will show up in the game's directory under C:\Users\YourName\Documents\My Games\creeperworld4\editor\__UNKNOWN\cpacks
Importing the custom units to your own map is a very similar process. You'll notice the first 4 steps are pretty much identical to those listed above. Here is how to import custom units to your map:
1. Load the mission you want to borrow scripts/units from.
2. Once the map is loaded, press SHIFT+E to enter editor mode.
3. Press the “Editor” button in the lower right corner of the screen.
4. Go to the “Mods” tab and “Open CPACK Manager.”
5. Select the CPACK you wish to borrow using the dropdown menu.
6. Click “Export,” and select a location to export the CPACK to (ideally within your CW4 directory somewhere.)
7. After exporting, return to the map you wish to import the scripts to. Follow the above steps to reach the CPACK manager.
8. Click “Import” in the CPACK manager and browse to the CPACK you exported earlier.
This one is a bit harder, here are the steps:
1. Find the map you want to edit.
In case of Colonies map, for example map number 790 can be found in Documents\My Games\creeperworld4\colonies\maps\700\
2. Copy the map file, in this case 790.cw41)
3. Create a new folder in Documents\My Games\creeperworld4\editor
4. Paste the map file inside that folder.
5. Rename the map file into save.cw42)
6. Now the map should be visible on your mission editor with the name of the folder you created in step 3.