Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

MAPGEN (A WITP:AE Map Dumper/Repacker)

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> War in the Pacific: Admiral's Edition >> Scenario Design and Modding >> MAPGEN (A WITP:AE Map Dumper/Repacker) Page: [1] 2 3   next >   >>
Login
Message << Older Topic   Newer Topic >>
MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/12/2017 5:23:15 PM   
RyanCrierie


Posts: 1279
Joined: 10/14/2005
Status: offline
Previously seen on the Ice Age AE thread (HERE)

Gents, here is a very early alpha release of MAPGEN (for lack of a better name).

It's not a fully featured set, but it should work on a lot of things.

Current feature set is:




Link to my website for 24~ MB ZIP download

I apologize if the download size is a bit big, but I included the exact Win32 installer binaries for the programming development environment I used to make it to assist with others who may want to work on it; and/or to reduce bug issues from incompatible builds.

Anyway.....

***STANDARD DISCLAIMER***
This SOFTWARE PRODUCT is provided by THE PROVIDER "as is" and "with all faults." THE PROVIDER makes no representations or warranties of any kind concerning the safety, suitability, lack of viruses, inaccuracies, typographical errors, or other harmful components of this SOFTWARE PRODUCT. There are inherent dangers in the use of any software, and you are solely responsible for determining whether this SOFTWARE PRODUCT is compatible with your equipment and other software installed on your equipment. You are also solely responsible for the protection of your equipment and backup of your data, and THE PROVIDER will not be liable for any damages you may suffer in connection with using, modifying, or distributing this SOFTWARE PRODUCT.

****************************************************************

Description of MAPGEN:

Gents, here is a very early alpha release of MAPGEN (for lack of a better name).

##########REALLY BIG NOTE#####################
## REMEMBER TO BACK UP YOUR ##
## PWZONE.DAT ##
## PWZLINK.DAT ##
## PWHEXE.DAT ##
## FILES BEFORE DOING ANYTHING ELSE ##
## TO AVOID A REINSTALL\REPATCH OF WITP:AE! ##
##############################################

It dumps WITP:AE PWHEXE.dat information to a graphics file, where it can be easily edited with
Paint Shop Pro or Photoshop (and seamlessly overlaid over satellite maps etc so that everything
all matches up), and then it repacks the information back into PWHEXE.dat via analyzing certain
pixels of interest on the graphics file.

It's written in Python 2.7 using the PIL image library for image manipulation.

This release currently requires a Python 2.7 with PIL development environment installed
on your computer.

##########REALLY BIG NOTE##################################################
## If you have a virtual machine, you should install Python into that VM
## and execute MAPGEN and Python from the VM, to avoid pooping up your
## main computer OS with various programming language call-outs in the
## registry. It's what I do when I program.
############################################################################

I would have liked to do a repackaged EXE file using a Python to EXE program that's out there,
but there are some bugs involved with PIL and that program.

Long term objectives:

1.) Add more DUMP/REPACK files (see MAPGEN_FEATURES.gif for what's not done etc)

2.) Maybe make it into an executable, so it doesn't require installation of the Python development
environment and PIL on a target computer.

3.) Maybe run it off my website, as it's a python script, meaning it could run on a webserver? But I don't
know about that, as it would require 15 MB of uploaded graphics files to repack a map. :-\

**************FILE FOLDER LAYOUT**********************

\Dev
A primitive early development item for procedural map generation "Drunkard's Walk" is here.
You may disregard this.

\Docs
Some useful documents are here. (AE Map Documentation, some hexfile information and RGB color information).

\Libraries
This includes the Windows-32 installation binaries for the Python development environment I used
to develop MAP GEN. They are:

PIL-1.1.7.win32-py2.7.exe
python-2.7.12.msi

If you don't trust the files in this download, you can download them from the following places:

PIL (http://www.pythonware.com/products/pil/)
http://effbot.org/downloads/PIL-1.1.7.win32-py2.7.exe

Python:
https://www.python.org/ftp/python/2.7.12/python-2.7.12.msi

\PreDumped
This folder contains already pre-dumped graphics images from the latest
official PWHEXE.DAT.

\Scripts
This contains the programs for dumping and repacking the map(s).

Once you've installed Python 2.7.12 and PIL 1.1.7 you should just click on a Python file to run it:

e.g

MAPGEN_COASTWATCH_JAP_DUMP.py

##################################################
############BIG NOTE##############################

At this current level of development, there's little error protection.

it assumes you have

WITP_AE_Grid_Black_32Bit.tif
WITP_AE_Grid_Blank_32Bit.tif

and

pwhexe.dat

inside your /Scripts folder.

If not, it probably breaks.

##################################################
############BIG NOTE II###########################

Because users are users; I've included a copy of the latest
WITP:AE map files in:

PWHEX_Pristine.zip

in /Scripts. I'm unsure of the legality of this; but it
should help save you from having to reinstall your game
should something mess up.

Attachment (1)

< Message edited by RyanCrierie -- 3/12/2017 5:26:39 PM >


_____________________________

Post #: 1
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/12/2017 5:30:27 PM   
RyanCrierie


Posts: 1279
Joined: 10/14/2005
Status: offline
Terrain Hex Type Dumped.

This is a resample down from the original 9900 x 8000 pixel image for web display.




The 9900x8000 pixel size of the dumped graphics files kind of necessitates having a heavy duty
64-bit version of Photoshop to handle it all; but it also means you can cut and paste direct
map graphics images from WITP:AE over the dumped graphics near seamlessly.

via Imgflip GIF Maker

Attachment (1)

< Message edited by RyanCrierie -- 3/12/2017 5:37:58 PM >


_____________________________


(in reply to RyanCrierie)
Post #: 2
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/12/2017 8:24:43 PM   
Dili

 

Posts: 3950
Joined: 9/10/2004
Status: offline
Wonderful. Ryan i am making a Mediterranean map, this would help me in graphics alone or also would also help me in editing the hexes? i mean changing sea hexes to land hexes etc. From the list you have above it seem the hex terrain is repackable.


Wouldn't this work with Krita? For some stuff i found it faster than Photoshop.

(in reply to RyanCrierie)
Post #: 3
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/13/2017 11:13:00 AM   
cardas

 

Posts: 178
Joined: 4/8/2016
Status: offline
Great work, I will certainly test this out in a bit. I've actually thought about coding up an map editor (along with an improved scenario editor) but unlike you I'm lazy and never gotten to it.

I haven't actually tested it yet, so the following comment are assumptions; If you intend to do a fully functional editing tool then you really need to create either a full interface or more than one bitmap. Doing basic terrain data is fine with a single one, but I at least imagine that it will become an issue if you want to edit all hex information (stacking limit 0-255, nation, Entry zone ID etc.).

Note that currently you indicate that Hexside Straits are repackable, but not Hex Strait Size. But if you have a Hexside Strait then the Hex Strait also needs to be set for the Hexside Strait to actually function! E.g. if hex 100, 100 has Hexside Strait East: 01 (Wide), then hex 100, 100 should also have Hex Strait Size: 01 (Wide).
Actually I'm not sure if Hexside Strait and Hex Strait has to be the same, it might still function if one is 02 (Narrow) and the other is 01 (Wide). I'm certain it won't work if Hex Strait Size is 00 (None) though.

I'm not looking forward to editing such a large bitmap either. I got a much newer laptop that is my "main" computer, however I generally do all my graphic stuff on a 10+ year old desktop with 2 GB RAM (and a CRT screen... yeah). From personal experience I can say that it's possible to edit such a large bitmap regardless if you are patient though

(in reply to Dili)
Post #: 4
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/16/2017 12:12:06 AM   
RyanCrierie


Posts: 1279
Joined: 10/14/2005
Status: offline
quote:

Note that currently you indicate that Hexside Straits are repackable, but not Hex Strait Size. But if you have a Hexside Strait then the Hex Strait also needs to be set for the Hexside Strait to actually function!


Hex Side Strait Dumping capability is TBD. I decided to release something now; rather than wait until it's perfect, in order to get feedback.

quote:

E.g. if hex 100, 100 has Hexside Strait East: 01 (Wide), then hex 100, 100 should also have Hex Strait Size: 01 (Wide).


This is something i found out while testing hexside rivers.

quote:

I'm not looking forward to editing such a large bitmap either. I got a much newer laptop that is my "main" computer, however I generally do all my graphic stuff on a 10+ year old desktop with 2 GB RAM (and a CRT screen... yeah). From personal experience I can say that it's possible to edit such a large bitmap regardless if you are patient though


I think I can help you there though. I just completed a study of the WITP:AE BMP map files.

I think I can "cut up" the huge 9000~ pixel map in much the same way the official in game bitmap images were cut up, for people with older computers like you and then restitch it together;.


Attachment (1)

_____________________________


(in reply to cardas)
Post #: 5
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/16/2017 1:00:08 AM   
RyanCrierie


Posts: 1279
Joined: 10/14/2005
Status: offline
I've just also completed tests on Python 3.4.4; which required me to update the image library from PIL to Pillow, a code fork of PIL; which kind of broke some things and will require some re-work to make my code work again -- I just got a limited proof of concept working again in 3.4.4/Pillow.

But the good news. The change to the newer libraries was to get PyInstaller support, which will enable me to build an executable with everything needed bundled into it; so you won't need to install Python or the dependencies onto your computer; which is good. Only downside is a simple program is about 8~ MB.

But I guess this is OK in a world where we can devote 400~ MB to the map images for WITP.

_____________________________


(in reply to RyanCrierie)
Post #: 6
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/16/2017 5:30:20 PM   
cardas

 

Posts: 178
Joined: 4/8/2016
Status: offline
quote:

I think I can help you there though. I just completed a study of the WITP:AE BMP map files.

I think I can "cut up" the huge 9000~ pixel map in much the same way the official in game bitmap images were cut up, for people with older computers like you and then restitch it together;.

That'd make it much easier to work with. The conceptual idea on how to code that doesn't really seem difficult either (says the lazy one who hasn't even bothered to take a stab at it).


quote:

But the good news. The change to the newer libraries was to get PyInstaller support, which will enable me to build an executable with everything needed bundled into it; so you won't need to install Python or the dependencies onto your computer; which is good. Only downside is a simple program is about 8~ MB.

Having Python installed is no issue for me. An standalone executable is still much more user friendly, so good choice.


quote:

But I guess this is OK in a world where we can devote 400~ MB to the map images for WITP.

Weeeeell about that... No, even the (in computer era terms) fossil I'm talking about has enough space to spare for that.

(in reply to RyanCrierie)
Post #: 7
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/16/2017 6:23:46 PM   
Dili

 

Posts: 3950
Joined: 9/10/2004
Status: offline
Any reason you don't work in new laptop? it would be night and day.

(in reply to cardas)
Post #: 8
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/16/2017 7:45:04 PM   
cardas

 

Posts: 178
Joined: 4/8/2016
Status: offline
Only Windows machine I got around and I'm not about to install any Windows virtual machine on the laptop. I could of course still do the graphics stuff on the laptop, however I prefer to keep all the WitP stuff on the Windows machine as that's where I'll play the game anyway. Furthermore I often have something else going on on the laptop at the same time.

(in reply to Dili)
Post #: 9
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/16/2017 9:07:56 PM   
RyanCrierie


Posts: 1279
Joined: 10/14/2005
Status: offline
Got my code ported from 2.7/PIL to 3.4.4/Pillow and the result is significantly slower than PIL.

As in 110 seconds to dump an image versus about 10.

But there is a solution -- I tested two methods by running them 300 times to provide a good baseline

"Draw each pixel individually" (current solution) takes about 1.77 seconds per 300 hexes.

whereas

"Paste a hex image in (Alternate solution)" takes about 0.05 seconds per 300 hexes.

It's about a 35.4x speed difference, or the difference between dumping a map in 276 seconds versus 7.8 seconds.

< Message edited by RyanCrierie -- 3/16/2017 9:12:58 PM >


_____________________________


(in reply to RyanCrierie)
Post #: 10
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/16/2017 11:06:26 PM   
Dili

 

Posts: 3950
Joined: 9/10/2004
Status: offline
Okay cardas.

(in reply to RyanCrierie)
Post #: 11
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/18/2017 1:02:36 AM   
RyanCrierie


Posts: 1279
Joined: 10/14/2005
Status: offline
After much cursing, and some avenues that didn't pan out; I managed to get the dump/draw speed back...mostly.

It takes 25~ "in compiler" seconds to dump a map now in Python 3.4, versus about 10~ for Python 2.7; but I can live with a mere 2x computational time increase, as opposed to 12x; especially with the abilities python 3.4 gives me.

_____________________________


(in reply to Dili)
Post #: 12
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/18/2017 1:42:06 AM   
RyanCrierie


Posts: 1279
Joined: 10/14/2005
Status: offline
Here's a super alpha of a compiled executable that does one thing:

Dumps Terrain Hex Types.

It's more of a "proof of concept" to see if there are any unforeseen issues.

Link to 9 MB ZIP

Apologies for the size, but it packs a near complete python interpreter into it to let it run on your systems without any "additional dlls".

Anyway; I used it to dump the old "War in the West" mod at:

https://tanciky.cz/uv/witw_english/screen/index.php?page=maps

And it looks pretty neat; and you can see how the creator simply pasted it over the existing WITP:AE map.





Attachment (1)

_____________________________


(in reply to RyanCrierie)
Post #: 13
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/18/2017 2:36:06 PM   
RyanCrierie


Posts: 1279
Joined: 10/14/2005
Status: offline
Super Alpha v2 of the dumper for Terrain Types only:

LINK

8.3~ MB ZIP; no longer needs a pre-compiled map TIFF image; instead, it builds one from scratch, and speed has been vastly improved from 20~ seconds for a map build down to about 3.5~ seconds.

_____________________________


(in reply to RyanCrierie)
Post #: 14
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/19/2017 3:35:36 AM   
RyanCrierie


Posts: 1279
Joined: 10/14/2005
Status: offline
3 March 2017 Alpha:

5.8~ MB ZIP LINK

A bit faster plus smaller now; and will dump all hex-types. (Terrain Type, Terrain Hex Type, Malaria zone, etc)

(Hex Sides are TBD refactored).

< Message edited by RyanCrierie -- 3/19/2017 3:36:06 AM >


_____________________________


(in reply to RyanCrierie)
Post #: 15
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/19/2017 8:30:28 PM   
Dili

 

Posts: 3950
Joined: 9/10/2004
Status: offline
Hi Ryan

It shows the Ms-dos windows and then it appears dead. No exe running in task manager.

I have a windows 7, nvidia GPU from 2013.

Edit: i could catch the Cmd Window.




Attachment (1)

< Message edited by Dili -- 3/19/2017 8:40:14 PM >

(in reply to RyanCrierie)
Post #: 16
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/19/2017 9:47:00 PM   
RyanCrierie


Posts: 1279
Joined: 10/14/2005
Status: offline
Dili, it's because it's looking for PWHEXE.DAT to dump the map data from, but since it can't find it; it crash/closes.

Copy PWHEXE.dat from your WITP:AE folder to the folder you have MAPGEN in and it should work.

I need to make this a bit more user friendly. :-P

_____________________________


(in reply to Dili)
Post #: 17
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/19/2017 10:17:53 PM   
Dili

 

Posts: 3950
Joined: 9/10/2004
Status: offline
Thanks, still no go. I have a permission error: Error no13 so does not write the png file.

I tried to fix it in executable properties i had to unblock the exe and i also run it has administrator but the result is the same.

< Message edited by Dili -- 3/19/2017 10:18:30 PM >

(in reply to RyanCrierie)
Post #: 18
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/19/2017 10:44:12 PM   
RyanCrierie


Posts: 1279
Joined: 10/14/2005
Status: offline
Give me a chance to try this on a W7 laptop I have to see if I can reproduce the error.

_____________________________


(in reply to Dili)
Post #: 19
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/19/2017 11:02:44 PM   
Dili

 

Posts: 3950
Joined: 9/10/2004
Status: offline
Thanks.

(in reply to RyanCrierie)
Post #: 20
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/19/2017 11:08:51 PM   
RyanCrierie


Posts: 1279
Joined: 10/14/2005
Status: offline
Ran it on my W7 laptop, it worked fine. It works on my development environment (Win XP), and my normal W10 environment plus W7.

The only thing that I can think of is it's related to user rights -- I did some googling and one answer I could find for this was:

The program has to have the same user as the folder that you want to save in.

Try running it from a generic folder on your hard drive.

Right Click on the folder you have it, select PROPERTIES in the drop down menu then the SECURITY tab -- see if the user account you're running it under has permission to write (and/or) modify that folder.




_____________________________


(in reply to RyanCrierie)
Post #: 21
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/19/2017 11:42:22 PM   
Dili

 

Posts: 3950
Joined: 9/10/2004
Status: offline
Thanks. I have found the reason for this behavior i think. I was using it from an external USB3 drive. But i use other applications without problem. I moved the directory to a drive in the laptop and it gave me this screen. I click any key and goes down is this supposed to happen?





Attachment (1)

< Message edited by Dili -- 3/19/2017 11:56:30 PM >

(in reply to RyanCrierie)
Post #: 22
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/20/2017 12:12:01 AM   
RyanCrierie


Posts: 1279
Joined: 10/14/2005
Status: offline
Dili, no reason to worry.

That's the normal "finish screen"

All PWHEXE.DAT data that's currently dumpable been dumped, it took 77~ "in compiler" seconds to run.

It's waiting on a keypress so that the console screen doesn't disappear instantly.

I need to make it a bit more clearer what's going on at that HOLDING...

_____________________________


(in reply to Dili)
Post #: 23
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/20/2017 6:36:57 PM   
Dili

 

Posts: 3950
Joined: 9/10/2004
Status: offline
Okay. Just a .txt will do.

edit:

two questions

1: If i make a map of the size of WITP map the coordinates will respect the WITP coordinates numbers? My issue is that i already have given the coordinates to the locations and units so it is not viable to change them even if it is just one hex to the side.

2: What initial quality the image should have, is Google Maps image for reference good enough to recognize the features? I guess no issue between land vs and sea vs desert vs green. But what about mountains with forest? The idea is to edit the map to ease the application work. Not as the final graphic map.

< Message edited by Dili -- 3/20/2017 7:39:25 PM >

(in reply to RyanCrierie)
Post #: 24
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/20/2017 8:18:24 PM   
cardas

 

Posts: 178
Joined: 4/8/2016
Status: offline
Finally had time to test it out and it seems to work fine. Good work so far.

As for the weather zones I can't say anything definitive not having really used Python myself. The first thing to catch my eye though is your use of ord() though, maybe the issue is that hexadecimal 97 is outside the standard ASCII table? As I said, not that familiar with Python so maybe I'm completely on the wrong track.

Shouldn't the Falklands weather zone be x98 and not x09?

(in reply to Dili)
Post #: 25
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/20/2017 10:36:45 PM   
RyanCrierie


Posts: 1279
Joined: 10/14/2005
Status: offline
quote:

ORIGINAL: cardas
Shouldn't the Falklands weather zone be x98 and not x09?


The documentation and program(s) for editing WITP:AE maps is uncertain on this.

Anyway, I recently wrote a subroutine to dump all hex values to an output file:

quote:


char = HexFileData.read(1) # Read One Byte from file as a character.
byte = ord(char) #convert to Character.

if char == '\x00': #x00 Main Map
MapImage.paste(Hex_MediumGreen, (int(PIXLOC_X_MODIFIER),int(PIXLOC_Y_MODIFIER)), Hex_AlphaChannel)

if char >= '\x01': #This is a Sub Map.
with open ("Output.txt", "a") as text_file: #a means append
print(byte, file=text_file) #We use the byte number.


Running this in a loop against every hex in the game resulted in a fairly long output file which I used EXCEL to do data analysis, and it resulted in the following values being used for submaps by WITP:AE.

3 equals 03
5 equals 05
6 equals 06
10 equals 0A
11 equals 0B
12 equals 0C
20 equals 14
21 equals 15
30 equals 1E
40 equals 28
41 equals 29
51 equals 33
52 equals 34
60 equals 3C
61 equals 3D
62 equals 3E
70 equals 46
71 equals 47
72 equals 48
80 equals 50
81 equals 51
82 equals 52
90 equals 5A
91 equals 5B
92 equals 5C
101 equals 65
102 equals 66
103 equals 67
104 equals 68
255 equals FF

I'll run it on the weather zones to get a list of just what the main zones are.

EDIT. Created a new analysis tool 5~ MB ZIP Download

Give it an offset, and it'll dump everything into two files in decimal form:

MAPGEN_VALUE_DUMP.txt (raw file)
MAPGEN_VALUE_DUMP_CLEAN.TXT (with duplicates deleted)

Analyzing offset 34 (Hexagon Strait Types) with the tool results in this list:

0 (KNOWN = NONE)
1 (KNOWN = WIDE STRAIGHT, TSUSHIMA)
2 (KNOWN = NARROW, SHIMONOSEKI)


Analyzing Offset 36 (Weather Zones) results in this list:

000 Hex = x00 temperate weather zone
101 Hex = x65 cold weather zone Tibet
102 Hex = x66 cold weather zone North Central China
103 Hex = x67 cold weather zone Siberia
105 Hex = x69 cold weather zone Aleutians
106 Hex = x6A cold weather zone in Canada
255 Hex = xFF off map
732 Hex = 0x2DC??? <-- Falklands.
8212 Hex = 0x2014??? <--- South Pole


(Confirmed the 732/8212 by writing a new script in my Weather Zone Dump subprogram that was)

quote:

if char is not '\x00' and char is not '\x65' and char is not '\x66' and char is not '\x67' and char is not '\x69' and char is not '\x6A' and char is not '\xFF':
DumpFile = open("WEATHER_UNK_HEXES.txt", "a") #Opens this file in append mode.
print( str(HEXLOC_X) + "," + str(HEXLOC_Y) + " // " + str(byte) + " (Byte)", file=DumpFile)


which gave me a list of hexes displaying "odd" behavior.


< Message edited by RyanCrierie -- 3/21/2017 12:10:45 AM >


_____________________________


(in reply to cardas)
Post #: 26
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/21/2017 12:17:14 AM   
RyanCrierie


Posts: 1279
Joined: 10/14/2005
Status: offline
Success!

quote:

if char is not '\x00' and char is not '\x65' and char is not '\x66' and char is not '\x67' and char is not '\x69' and char is not '\x6A' and char is not '\xFF':
DumpFile = open("WEATHER_UNK_HEXES.txt", "a") #Opens this file in append mode.
print( str(HEXLOC_X) + "," + str(HEXLOC_Y) + " // " + str(char) + " (char)", file=DumpFile)


Yielded the following code, which successfully dumped the two missing weather zones:

quote:

if char == '—': #South Pole
MapImage.paste(Hex_White, (int(PIXLOC_X_MODIFIER),int(PIXLOC_Y_MODIFIER)), Hex_AlphaChannel)

if char == '˜': #xFalklands
MapImage.paste(Hex_White, (int(PIXLOC_X_MODIFIER),int(PIXLOC_Y_MODIFIER)), Hex_AlphaChannel)


_____________________________


(in reply to RyanCrierie)
Post #: 27
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/21/2017 12:46:03 AM   
RyanCrierie


Posts: 1279
Joined: 10/14/2005
Status: offline
quote:

1: If i make a map of the size of WITP map the coordinates will respect the WITP coordinates numbers?


It should. AFAIK, there's only one WITP:AE map size; and making maps bigger or smaller is done through the scenario file setting XLOC and YLOC; it's how the "War in the West" European Map was done.

quote:

My issue is that i already have given the coordinates to the locations and units so it is not viable to change them even if it is just one hex to the side.


I highly advise you not do any real changes right now using MAPGEN; I still need to:

1.) Refactor the hexside dump/repack routines to work in Python 3+ and with the new "paste blitted image" engine used now for speed.

2.) Check on the Repacker routines for them all.

3.) Develop a Map Legend Feature -- when a map is dumped, create a legend file; e.g for:

WITPAE_DUMP_HEXTYPES.PNG,

the following file would get created:

WITPAE_DUMP_HEXTYPES_LEGEND.PNG

which would have an example hex and a legend next to that example hex; so that you know what color does what, rather than guessing (Important on the oddball maps)

4.) Find the right mix of colors for the Terrain Type Map. There's a lot of terrain types to cover and I want to find the right mix of colors that are distinct from each other yet suggestive of the type of terrain there.

5.) Make a map splitter mode (Optional) to split the map into 41 different images that align with the WPEHxx.bmp and WPENxx.bmp graphics files in /ART.

quote:

2: What initial quality the image should have, is Google Maps image for reference good enough to recognize the features? I guess no issue between land vs and sea vs desert vs green. But what about mountains with forest? The idea is to edit the map to ease the application work. Not as the final graphic map.


Well, google maps/earth satellite should be good enough to tell what type of terrain it is. Biggest issue you (or anyone) will face is correctly resizing the image so that it's accurate to the hex scale of the dumped map.


_____________________________


(in reply to Dili)
Post #: 28
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/21/2017 12:52:24 AM   
RyanCrierie


Posts: 1279
Joined: 10/14/2005
Status: offline
Current MAPGEN basic starting screen with warnings added.

Anyone remember the good old days of ASCII?




Attachment (1)

_____________________________


(in reply to RyanCrierie)
Post #: 29
RE: MAPGEN (A WITP:AE Map Dumper/Repacker) - 3/21/2017 12:58:41 AM   
RyanCrierie


Posts: 1279
Joined: 10/14/2005
Status: offline
Current MAPGEN basic program end screen. I hope this makes it a bit clearer what's going on.




Attachment (1)

_____________________________


(in reply to RyanCrierie)
Post #: 30
Page:   [1] 2 3   next >   >>
All Forums >> [New Releases from Matrix Games] >> War in the Pacific: Admiral's Edition >> Scenario Design and Modding >> MAPGEN (A WITP:AE Map Dumper/Repacker) Page: [1] 2 3   next >   >>
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.164