Custom maps, load?

Take command of air and naval assets from post-WW2 to the near future in tactical and operational scale, complete with historical and hypothetical scenarios and an integrated scenario editor.

Moderator: MOD_Command

Post Reply
overkill01
Posts: 258
Joined: Thu Dec 31, 2015 11:59 am

Custom maps, load?

Post by overkill01 »

Is there a way to auto load custom layers in a scenario, or the game itself?
Also, 1 toggle button for all would be great.
Mark352
Posts: 43
Joined: Thu Jul 25, 2024 2:35 pm

Re: Custom maps, load?

Post by Mark352 »

Assuming you have the georeferenced files (an image file and the associated world file) these steps should help you include and load imagery or a custom map at scenario startup. I've experimented with this a few times. From within the scenario editor;

1. Editor>Scenario Attachments
2. In the Scenario Attachment Window be sure Map Overlay (Single Image) is in the selection field and then click on Create new, of type.
3. Navigate to your image file and load it.
4. The file name will appear in the window, select it and see the ObjectID filed in the Properties of selected: pane. It will be something similar to this - 247bd3e5-9368-4642-81be-c2c24e6d1ad9. This is the name of the subfolder (the GUID) in the AttachmentRepo folder under Command - Modern Operations main folder. The AttachmentRepo folder is where scenario attachments are stored.
5. Now that the attachment is created you need to create an Event with a Trigger and Action to load the attachment when the scenario starts.
6. Add the Scenario is Loaded trigger to the event.
7. Now create an action using Lua to load the attachment - ScenEdit_UseAttachment('247bd3e5-9368-4642-81be-c2c24e6d1ad9' )
8. The script accesses the subfolder 247bd3e5-9368-4642-81be-c2c24e6d1ad9 in the AttachmentRepo folder.
9. When the scenario starts (clock running) the attachment will load.

You can execute the ScenEdit_UseAttachment code in the Lua console to make sure it works. If the clock is ticking the attachment will load.

When the attachment is loaded you can see it in the Custom Layer Manager window. In that window you have the option of turning the layer on and off.

Hope this helps some.

Cheers
overkill01
Posts: 258
Joined: Thu Dec 31, 2015 11:59 am

Re: Custom maps, load?

Post by overkill01 »

That worked out really well, thank you very much for the clear explenation!!
Mark352
Posts: 43
Joined: Thu Jul 25, 2024 2:35 pm

Re: Custom maps, load?

Post by Mark352 »

I mentioned the clock needed to be running to get the attachment to appear. I just discovered that simply moving the map resulted in the attachment showing up. So the clock doesn't necessarily have to be running. I had a recollection that the attachments would load immediately but, I haven't been able to recreate that recently. Might be WAD or it just needs a nudge to load on my PC. Either way, I find being able to load custom imagery and maps is a very useful and cool feature.
User avatar
Mgellis
Posts: 2368
Joined: Sat Aug 18, 2007 2:45 pm
Contact:

Re: Custom maps, load?

Post by Mgellis »

Total beginner with this kind of thing asks...how do you create the initial georeferenced files? Or do you simply get them automatically when you copy the map overlay from whatever source you get it from? What is the process here?

I'm assuming the subfolder you mentioned will include both the image file and the associated world file. Once the Event is triggered, Command will read both files and recreate the map within the scenario. Is this correct?

Thanks in advance for the help!
Mark352 wrote: Wed Jul 23, 2025 2:56 am Assuming you have the georeferenced files (an image file and the associated world file) these steps should help you include and load imagery or a custom map at scenario startup. I've experimented with this a few times. From within the scenario editor;

1. Editor>Scenario Attachments
2. In the Scenario Attachment Window be sure Map Overlay (Single Image) is in the selection field and then click on Create new, of type.
3. Navigate to your image file and load it.
4. The file name will appear in the window, select it and see the ObjectID filed in the Properties of selected: pane. It will be something similar to this - 247bd3e5-9368-4642-81be-c2c24e6d1ad9. This is the name of the subfolder (the GUID) in the AttachmentRepo folder under Command - Modern Operations main folder. The AttachmentRepo folder is where scenario attachments are stored.
5. Now that the attachment is created you need to create an Event with a Trigger and Action to load the attachment when the scenario starts.
6. Add the Scenario is Loaded trigger to the event.
7. Now create an action using Lua to load the attachment - ScenEdit_UseAttachment('247bd3e5-9368-4642-81be-c2c24e6d1ad9' )
8. The script accesses the subfolder 247bd3e5-9368-4642-81be-c2c24e6d1ad9 in the AttachmentRepo folder.
9. When the scenario starts (clock running) the attachment will load.

You can execute the ScenEdit_UseAttachment code in the Lua console to make sure it works. If the clock is ticking the attachment will load.

When the attachment is loaded you can see it in the Custom Layer Manager window. In that window you have the option of turning the layer on and off.

Hope this helps some.

Cheers
Mark352
Posts: 43
Joined: Thu Jul 25, 2024 2:35 pm

Re: Custom maps, load?

Post by Mark352 »

Mgellis wrote: Sat Aug 09, 2025 6:31 pm Total beginner with this kind of thing asks...how do you create the initial georeferenced files? Or do you simply get them automatically when you copy the map overlay from whatever source you get it from? What is the process here?
I'm not aware of any free sources on the Internet that provide free georeferenced maps or imagery so I suspect if the user wants custom overlays the overlays will always have to be created. I use GMAP and QGIS to create custom overlays for CMO.

For a beginner GMAP is a pretty easy to use tool. First introduced by Baloogan in 2013-2014 timeframe maybe. I apologize if I don't get the history correct. When I started using CMO (April 24, former Harpoon user) one of the things I was very interested in was the capability to add custom overlays. But, first those overlays had to be created.

I found GMAP thru the forum - see this thread.
https://forums.matrixgames.com/viewtopi ... 2#p3375992

The manual briefly discusses GMAP and provides a brief guide on how to produce a custom overlay. I still use GMAP but, its very limited. Currently it only can access the Bing Satellite Imagery map. That might fine for most users. It's pretty quick and easy to use. You don't need to be a geospatial to create good overlays with it.

Tutorials for GMAP
The Power of Overlays (Baloogan Campaign page)
https://baloogancampaign.com/2015/03/15/power-overlays/

CMANO Custom Overlays (Youtube)
https://www.youtube.com/watch?v=Zjhm6eX9_gw&t=805s

QGIS (Quantum Geographic Information System) is a free, open-source program that allows users to create, edit, visualize, analyze, and publish geospatial information. For our purposes in CMO, create custom overlays.

QGIS is a bit more complicated to explain so this is just a brief snapshot. Having experience with GIS software like MapInfo, ArcInfo or ArcGIS is very beneficial. QGIS has the capability to display satellite imagery from different vendors such as GoogleEarth, Esri and Bing. One of the features it offers is the capability to georeference a map or imagery file so that it can be exported and used in CMO. Georeferencing a map might be helpful for scenario design if you had a map of potential real-world strike targets and wanted to accurately pinpoint those in a CMO scenario. Being able to the view that map in CMO during scenario design would provide accurate target locations adding a touch realism to the scenario. Being able to display imagery and/or maps of airfields, naval bases or other types of facilities in CMO allows scenario designers to create accurate depictions of installations and players the opportunity to better visualize installations during strike scenarios.

QGIS is available at https://qgis.org/
Mgellis wrote: Sat Aug 09, 2025 6:31 pm I'm assuming the subfolder you mentioned will include both the image file and the associated world file. Once the Event is triggered, Command will read both files and recreate the map within the scenario. Is this correct?

Thanks in advance for the help!
Yes, you got it. When you add the attachment via the Scenario Attachment window both the image file and the associated world file will be moved to the subfolder that is created. The event trigger is Scenario is Loaded and the action is the Lua script telling CMO to read those files from that subfolder and display the image. Viola

In some cases the custom overlays may seem simply cosmetic but, I feel in combination with the Sentinal-2 layer and the OpenTopoMap layer (both which I really like) there are times it can add a touch of realism other commercial wargames lack. There are so many things we can do in CMO. A huge sandbox to play in.

As always, hope this information helps.
Mark352
Posts: 43
Joined: Thu Jul 25, 2024 2:35 pm

Re: Custom maps, load?

Post by Mark352 »

Thanks for posting the Github resources. I do use the Maptiler extension in QGIS. Its a good tool to make a quick map. I have not used SAS Planet.

Here is an example map made with QGIS and Maptiler displayed in CMO-

Image

Here is an example map made with Google Earth Imagery in QGIS with facilities displayed in CMO.

Image

Cheers
thewood1
Posts: 10086
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

Re: Custom maps, load?

Post by thewood1 »

Do you see any kind of performance hit with large overlays? And what can you expect file sizes to be? For example, the example you just showed.
Mark352
Posts: 43
Joined: Thu Jul 25, 2024 2:35 pm

Re: Custom maps, load?

Post by Mark352 »

The file sizes are directly related on the resolution and the size of the area you want to cover.

The file for the Yemen map is 827 KB (300 dpi). The overall size of the file for the example of Al Udeid Air Base is 48 MB (96 dpi).

I've not experienced any negative impact on scenario play with custom overlays loaded. I have one sandbox scenario where I display 18 imagery files for a city. All the files are between 60 and 80 MB. The scenario runs fine. In CMO scenarios I play I often load imagery overlays for airfields, ports or potential target areas for some extra visualization and experience no slow down.

One issue with the size of custom overlays had to do with the file size being to large to distribute with a published scenario. There is a process in the tutorials I shared to reduce the size of a file using GIMP (GNU Image Manipulation Program) or a similar image editing software. I have GIMP but, I haven't tried to follow that process yet.

Another example of an overlay I created was to help recreate a scenario depicting the recent Houthi attack on the MV Eternity C. I wanted to accurately position other civilian traffic in the area. For this case I grabbed a screen capture from the Maritime Traffic web site of a map showing the last known position of Eternity C and the other traffic in the area, georeferenced the map with QGIS, exported the .png file (587 KB, 300 dpi) with a .pngw associated world file and displayed it in CMO. This allowed me to realistically reflect where other shipping was in the area for the scenario.

Image
Post Reply

Return to “Command: Modern Operations series”