Speed coding maps
Select messages from
# through # Forum FAQ
[/[Print]\]

Close Combat Series -> Modding Workshop

#1: Speed coding maps Author: ScnelleMeyer PostPosted: Fri Jul 13, 2018 11:46 am
    —
Just found this technique to code maps pretty quickly so I would like to share for anyone still making or recoding maps..

The basis is your maps that is made in Gimp or Photoshop and is layered with each main element on its own layer. Floors on one layer, outer walls on another and so on.
First make new layers and fill each element with its own solid colours like this:



Colour indexing main elements in paint programme.jpg
 Description:
Colour indexing windows and doors is not needed at this stage.
 Filesize:  380.07 KB
 Viewed:  7512 Time(s)

Colour indexing main elements in paint programme.jpg



#2: Re: Speed coding maps Author: ScnelleMeyer PostPosted: Fri Jul 13, 2018 12:01 pm
    —
The next step is coding interior walls and interior doors with the pen tool then lock these elements to stop them being overwritten.

Use the color based flood fill tool to select floors. (or any other element, but I have used houses for this example.) The standard tolerance should be good if you picked contrasting colours in the previous step. Adjust it if the tool doesnt select what you want.



2 Color based flood fill tool.png
 Description:
Pick the element for filling
 Filesize:  1.6 MB
 Viewed:  7505 Time(s)

2 Color based flood fill tool.png



#3: Re: Speed coding maps Author: ScnelleMeyer PostPosted: Fri Jul 13, 2018 12:08 pm
    —
Third step for coding buildings is using the BORDER FILL tool to quickly code walls.
For wall coding just remember to pick the right level so it corresponds to the floor level.

In the picture below interior walls got coded as exterior walls as well. This is wrong, but it was because I didnt code them in the second step.



Use border fill tool to create exterior wall elements.png
 Description:
Border fill
 Filesize:  397.77 KB
 Viewed:  7500 Time(s)

Use border fill tool to create exterior wall elements.png



#4: Re: Speed coding maps Author: ScnelleMeyer PostPosted: Fri Jul 13, 2018 12:19 pm
    —
Fourth step is using the pen tool to code in windows and doors and do any touch ups.

There are a few errors in the coding on this picture because it was done as a quick mock-up.

The main point is that this is a really quick way to code maps with Mafis 5CC, taking full advantage of its functionality.
The technique can be adapted to re-code existing maps as well.
See this thread for how to code correct and fix coding errors on most stock maps (Not just WaR) http://www.closecombatseries.net/CCS/modules.php?name=Forums&file=viewtopic&t=6539&highlight=maps



Pen tool to manually code windows and doors.PNG
 Description:
Touch up step
 Filesize:  501.36 KB
 Viewed:  7495 Time(s)

Pen tool to manually code windows and doors.PNG



#5: Re: Speed coding maps Author: pvt_GruntLocation: Melbourne, Australia PostPosted: Fri Jul 13, 2018 11:29 pm
    —
ScnelleMeyer wrote (View Post):


There are a few errors in the coding on this picture because it was done as a quick mock-up.



Less errors than the original games !  Razz

#6: Re: Speed coding maps Author: ScnelleMeyer PostPosted: Sun Jul 15, 2018 9:00 am
    —
At least all the walls are coded solid like they should. Except for that one floor without walls that is Rolling Eyes

Using this method with borderfilling the floors ensures solid wallcoding.

#7: Re: Speed coding maps Author: Jagre3-3 PostPosted: Sun Jul 28, 2019 9:15 pm
    —
Using GIMP or Photoshop, and with the free select tool, I imagine you could fill buildings and such out quickly in thos programs. I might adapt this sort of technique on my small maps mods. An efficient method, for sure.

#8: Re: Speed coding maps Author: ScnelleMeyer PostPosted: Sun Jul 28, 2019 10:33 pm
    —
You do not have to re-code anything if all you want to do is reduce the map size. With Mafis 5CC program cutting down maps is easy peasy.

#9: Re: Speed coding maps Author: Jagre3-3 PostPosted: Sun Jul 28, 2019 10:51 pm
    —
Explain  Shocked  If I'm reducing the map size to a particular area (like TIK did with his small map mod), are you saying I can pretty much just copy data over? If that's the case you better throw the info my way right this second!  :lol:

EDIT: Figure it out. Shrink/Expand under data actions.

#10: Re: Speed coding maps Author: ScnelleMeyer PostPosted: Sun Jul 28, 2019 11:33 pm
    —
Load the map up in 5CC, under the Actions menu you will find the means to reduce the map. Save your reduced map with a new name to avoid overwriting.
Not in front of my PC at the moment so this is all I can explain right now.

#11: Re: Speed coding maps Author: Jagre3-3 PostPosted: Sun Jul 28, 2019 11:38 pm
    —
ScnelleMeyer wrote (View Post):
Load the map up in 5CC, under the Actions menu you will find the means to reduce the map. Save your reduced map with a new name to avoid overwriting.
Not in front of my PC at the moment so this is all I can explain right now.


It's fine. Figured it out before you replied. Take the pixels you want reduced by, divide by 10 from whatever direction, click the button, whole map reduces. If you hadn't mentioned it I wouldn't have been tinkering with the program to figure it out. Much obliged, friend!

#12: Re: Speed coding maps Author: PeteLocation: Nijmegen, Netherlands PostPosted: Tue Jul 30, 2019 5:58 am
    —
ScnelleMeyer wrote (View Post):
You do not have to re-code anything if all you want to do is reduce the map size. With Mafis 5CC program cutting down maps is easy peasy.


You mean Mafi's CC2Tools, right? That is what i am using.

#13: Re: Speed coding maps Author: PeteLocation: Nijmegen, Netherlands PostPosted: Tue Jul 30, 2019 6:09 am
    —
I wrote a tutorial on how to reduce maps some time ago. I have reduced and cut-out sections from maps of our mods to make them suitable for COI and the tutorial was written with COI in mind but it can be applied to other versions as well:

Bear in mind that you have to select the correct elements conversion table first.

Open the app CC2Tools. Go to : Map-Convert / Shrink/ Expand/ Rotate.
Select tab ‘Convert/Shrink’ . Select the correct elements conversion table at point ‘1’ here.
At “2:” click “Select file” and select the txt file of the map of your choice.
At 3 and 4 you see the map’s dimensions expressed in elevation tiles (3) and deployment tiles (4). 2880 pixels corresponds with 24 deployment tiles. If the dimensions on either axis are max 24 tiles then no shrinking is required (applies to COI only).
If on either axis the 24 deployment tiles are exceeded then the map has to be shrunk along that axis. To shrink it to 24 deployment tiles simply select the number in the dropdown field of the axis you need shrunk. You will notice that the number of elevation tiles is automatically updated.
Now, changing the dimensions by only adjusting the number of deployments tiles at point 4 reduces the map on right side of the horizontal axis and on the top side of the vertical axis. This may not be convenient. If you want to shrink the map from the other direction then you have to do this under step ‘3’ by reducing the elevation tiles, which requires a bit more planning.

Example of how I do it: I export the bgm file to jpg. Open in PSP/Photoshop/Gimp , add a grid of 120x120 pixels and simply count the number of tiles to determine where to crop the map.
My map’s size is 3840x3240
On the Convert/Shrink tab I find this:
3: Elevation tiles: (40x40)
horizontal left = 1 ; right = 96
Vertical top = 1 ; bottom = 81
4: Deployment tiles (120x120)
horizontal = 32 ; vertical = 27.
To cut the map at the bottom of the vertical axis from 27 to 24 deployment tiles, change 81 into 72 (3 deployment tiles correspond with 9 elevation tiles (81-9=72) . To cut the map from the top change 1 into 10 (1+9=10). It is possible to decrease both sides at the same time, for instance 1 tile at the top and 2 tiles at the bottom.
The same principle applies to the horizontal axis.

From the start:
Start at ‘1’ to select the correct elements conversion table. Click on the ‘Select Terrain-Elements Translation table’ dropdown menu and select ‘select external table’. Then go to the elements translation tables folder of CC2Tools v5.02: CC2Tools v5.02\ElementsTranslationtables and select the appropriate file. The tool comes standard with a number of files but it is possible to create your own as I have done.
So, if your map is a CC5 map select CC5toCOI.txt. This speaks for itself. Leave ‘Input file format’ on ‘autodetect’. Then select the appropriate Output file format.
At 2 Select your map’s text file
At 3 or 4 Change horizontal and/or vertical elevation tiles.
After that follow the steps below
• Click Shrink – save the file under a new name.
• Click Shrink LOS – select the LOS file - save the file under a new name.
• Click BGMap - select the BGM file - save the file under a new name.
• Click MMMap - select the BGM file again - save the file under a new name with .mmm extension.
• Click OVMap - select the BGM file again - save the file under a new name with .ovm extension.
• Click Roof… - select the rfm file - save the file under a new name.
All 6 files (btd files are excluded because they are not used in COI) must be named identical. See stock maps as an example. Do not use more than 8 characters.
So, the tool does most of the work for you. Just make sure to save the files properly.

#14: Re: Speed coding maps Author: Jatke PostPosted: Tue Jul 30, 2019 9:31 am
    —
Easier use the Shrink feature in 5CC as the using the Visibility/Grid function on the original map lets you better visualize the final product.


Shrink.jpg
 Description:
Actions/Data Actions/Expand-Shrink
 Filesize:  32.11 KB
 Viewed:  6091 Time(s)

Shrink.jpg



#15: Re: Speed coding maps Author: PeteLocation: Nijmegen, Netherlands PostPosted: Tue Jul 30, 2019 6:49 pm
    —
Jatke wrote (View Post):
Easier use the Shrink feature in 5CC as the using the Visibility/Grid function on the original map lets you better visualize the final product.

First reaction: Damn howcome didn't I know about this feature. Second reaction: shouldn't maps be the size of a multiple of deployment tiles (120x120 px) . Also, for the CC5 conversions to COI I might not have saved much more time.  Still, interesting option.

#16: Re: Speed coding maps Author: ScnelleMeyer PostPosted: Tue Jul 30, 2019 8:07 pm
    —
Pete: The program wont allow you to enter any other values than in multiples of 12 elements : - 120 Pixels increments.

You probably found out this now, but for others...

What makes the time savings in 5CC compared to CC2Tools is the ability to load the map ONCE and complete any elements conversion and expanding/shrinking in quick succession IE within the same program menu:)

#17: Re: Speed coding maps Author: Jatke PostPosted: Tue Jul 30, 2019 10:11 pm
    —
You can enter values other than multiples of 12 elements but the totals for top/bottom and right/left must be multiples of 12.
eg. -13 Top and -95 Bottom = 108 elements total (12 x 9)



Close Combat Series -> Modding Workshop


output generated using printer-friendly topic mod. All times are GMT

Page 1 of 1