FiresForever
Prince
- Joined
- Sep 30, 2010
- Messages
- 584
**THIS TUTORIAL IS NOT YET COMPLETE**
Extracting .civ5map Data
The most complicated part of adding your own maps is to get the Mappoints, this is the data that we take from the worldbuilder map files.
Programs you will need for Mappoint:
Setup Notepad Macros
To make it easy i have included a number of macros for notepad++, you can find information on setting these up by looking at the"ReadMe - How to add Macros to Notepad++.txt" located at:
Getting the data out of the worldbuilder files
Find the Map you want to add
Load up HxD and then open the Civ5map file
We now need to find out where the information relating to the "mappoint" data begins, scroll down the file until we find something similar to what is in the screen shot. While it might not begin with a "06" it should be quite obvious to identify, 01, 02 etc.
We need to copy this section so place your cursor at the start of this section, in my case 06, and begin highlighting downwards. Depending on the size of the map this might take a while for you to reach the end of this section. The end of this section should also be quite obvious, see screenshot.
When you have highlighted all of these section edit > copy it, open up Notepad++, create a new txt file and then paste, then save. We can now turn on wordwrap if it is not already on, you can find it on the toolbar, it is the 19 icon from the left.
We should now have something similar to the screenshot:
Place cursor at start, go macro, and press "CCTP Map Con Macro", this should create something similar to the following:
Do not move the cursor, we now want to run this macro mulltiple times, go to "Macro" > ""Run a Macro Multiple Times", setup the popup as in the screenshot. I use 1000 as i can then be sure that the program hasn't crashed, you might need to use a lower or higher amount depending on your computer. It takes a while so don't worry if it stops responding, and you will have to run this multiple times until the entire file has been converted. Note: The macro will run beyond the end of your file so make sure to delete the excess code created at the end of the file.
Go back up to the top of the file and place your cursor at the start, we now want to run a second macro multiple times so that we can make it a little more organized. The macro is "CCTP map hex step 2". When complete we should have something like the following, this is now ready to be used, so again save it .
Now grab a drink and celebrate as you have finished the hardest part of adding your own map to CCTP
Extracting .civ5map Data
The most complicated part of adding your own maps is to get the Mappoints, this is the data that we take from the worldbuilder map files.
Programs you will need for Mappoint:
- Notepad++: http://notepad-plus-plus.org/
- A Hex editor I use HxD: http://mh-nexus.de/en/hxd/
Setup Notepad Macros
To make it easy i have included a number of macros for notepad++, you can find information on setting these up by looking at the"ReadMe - How to add Macros to Notepad++.txt" located at:
My Games\Sid Meier's Civilization 5\MODS\Community-Call-To-Power-Mod\CCTP Maps\CCTP\Notepad++ Macros
Getting the data out of the worldbuilder files
Find the Map you want to add
Spoiler :
Load up HxD and then open the Civ5map file
Spoiler :
We now need to find out where the information relating to the "mappoint" data begins, scroll down the file until we find something similar to what is in the screen shot. While it might not begin with a "06" it should be quite obvious to identify, 01, 02 etc.
Spoiler :
We need to copy this section so place your cursor at the start of this section, in my case 06, and begin highlighting downwards. Depending on the size of the map this might take a while for you to reach the end of this section. The end of this section should also be quite obvious, see screenshot.
Spoiler :
When you have highlighted all of these section edit > copy it, open up Notepad++, create a new txt file and then paste, then save. We can now turn on wordwrap if it is not already on, you can find it on the toolbar, it is the 19 icon from the left.
We should now have something similar to the screenshot:
Spoiler :
Place cursor at start, go macro, and press "CCTP Map Con Macro", this should create something similar to the following:
Spoiler :
Do not move the cursor, we now want to run this macro mulltiple times, go to "Macro" > ""Run a Macro Multiple Times", setup the popup as in the screenshot. I use 1000 as i can then be sure that the program hasn't crashed, you might need to use a lower or higher amount depending on your computer. It takes a while so don't worry if it stops responding, and you will have to run this multiple times until the entire file has been converted. Note: The macro will run beyond the end of your file so make sure to delete the excess code created at the end of the file.
Spoiler :
Go back up to the top of the file and place your cursor at the start, we now want to run a second macro multiple times so that we can make it a little more organized. The macro is "CCTP map hex step 2". When complete we should have something like the following, this is now ready to be used, so again save it .
Spoiler :
Now grab a drink and celebrate as you have finished the hardest part of adding your own map to CCTP