Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Tools documentation  (Read 1962 times)

0 Members and 1 Guest are viewing this topic.

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1530
Tools documentation
« on: June 21, 2017, 03:07:31 AM »

As I create the tools and techniques used for the game, I will post HOWTO's in this thread.

This is partly so I can remember how to do things, and partly so that eventually you can use it to mod the game.

Well that is the plan  :P
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1530
Re: Tools documentation
« Reply #1 on: June 21, 2017, 03:38:56 AM »

Map Generation

Firstly install the tool Universal Map downloader. http://www.allmapsoft.com/umd/
 
Use this to create a map of the region of the globe you are interested in. I use zoom level 7 and specify a 10 degrees of latitude/longitude area. I also use yahoo maps as a source, I think they work better.

In the directory you specify in the tool, you will find a directory with the name of your map.

In this there are a bunch of files.
 
Obviously we have the actual map, but you also have a log file. Open that in your favorite text editor.

In that you will find a call to gdal_translate

On that line you will see four numbers which are the actual latitude and longitude of the map.

If you asked for a map from latitude 40, longitude 0 to 50,10  .. you don't get a map from 40,0. You get a map that contains your desired region. The actual extents are the ones in the log file.

Copy these four numbers into your scratch pad and copy the bitmap into the games Maps folder.

Then in your text editor create a new file and create two lines of text (with carriage returns at the end).

Code: [Select]
"map name without extension"
"start longitude" "start latitude" "end longitude" "end latitude"

So it will look like this

Code: [Select]
Maps/yahoo2
-11.25 60.25398111661686 0 48.9224992600023

Save this in the maps folder.

That's it. The map is now in the game. I scan all the text files in this directory and build an atlas which the game can query to get a map of anywhere in the globe.

You only have to do this once. Once the map is in the game it can be used in any mission regardless of timescale. The only thing that matters is that the region of the globe is covered.

I will also be using the same technique for height maps. All you have to do is change the map source in the map downloading tool to be height map data instead of map data.

I hope that is clear.


Logged

andoodle

  • member
  • Offline Offline
  • Posts: 55
Re: Tools documentation
« Reply #2 on: June 23, 2017, 03:01:13 PM »

Excuse me, Mr. Stainless.

I am starting to like this tool, but I have one concern that is in the form of a question. Would this work with IL-2 Sturmovik: 1946? I wish to know. Thanks.
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1530
Re: Tools documentation
« Reply #3 on: June 26, 2017, 02:19:29 AM »

Well if you are a map maker, yes I guess it would.

You can use it to get a coloured map and a height map at the same resolution based on latitude and longitude.

You still have all the other tasks to complete, but as a starting point I think it would be great.

You just need to play with the "Maps type" setting to get one you like.
Logged
Pages: [1]   Go Up
 

Page created in 0.123 seconds with 28 queries.