Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

How do you edit the PWHEX file?

 
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 >> How do you edit the PWHEX file? Page: [1] 2   next >   >>
Login
Message << Older Topic   Newer Topic >>
How do you edit the PWHEX file? - 3/26/2017 8:34:58 AM   
GaryChildress

 

Posts: 6830
Joined: 7/17/2005
From: The Divided Nations of Earth
Status: offline
It's been a long time since I've delved into the PWHEX file. I've forgotten how to edit it. I don't think I've ever edited the AE version. Can anyone advise me on how to edit the PWHEX file so I can make my own map?

Thanks.

_____________________________

Post #: 1
RE: How do you edit the PWHEX file? - 3/26/2017 12:11:44 PM   
GaryChildress

 

Posts: 6830
Joined: 7/17/2005
From: The Divided Nations of Earth
Status: offline
I tried opening the file with notepad but it's all gibberish. I also tried changing it into a CSV file but that was all gibberish too. Is there a way to open up the file so I can make edits?

Thanks.

_____________________________


(in reply to GaryChildress)
Post #: 2
RE: How do you edit the PWHEX file? - 3/26/2017 12:35:04 PM   
tbothy

 

Posts: 22
Joined: 4/8/2012
Status: offline
http://www.matrixgames.com/forums/tm.asp?m=2632394&mpage=1&key=񋹕

There may be even a later version.... I think I have seen 0.7 somewhere....

found it http://www.matrixgames.com/forums/tm.asp?m=2922596

< Message edited by tbothy -- 3/26/2017 12:42:03 PM >

(in reply to GaryChildress)
Post #: 3
RE: How do you edit the PWHEX file? - 3/26/2017 4:49:59 PM   
dwbradley

 

Posts: 197
Joined: 3/21/2004
Status: offline
Nearly a year ago, El Cid contacted me and requested some bug fixes and some changes to accommodate his elderly laptop. The latest releases for the three editors are included in the zip file at this link:
https://www.dropbox.com/s/d0xed5dfwdf26ms/Map_data_editors032617.zip?dl=0

The previous incarnations of the editors are included also. Please accept and use these for what they are. That is, simple (read: crude) editors that allow you to do some things with the map data files but probably not everything you might wish for. To the best of my understanding they have received use from very few folks, hence they are relatively untested. Please back up anything you wish to change.

Good luck with your editing and cheers!

Dave Bradley

(in reply to tbothy)
Post #: 4
RE: How do you edit the PWHEX file? - 3/26/2017 7:29:22 PM   
GaryChildress

 

Posts: 6830
Joined: 7/17/2005
From: The Divided Nations of Earth
Status: offline
Many thanks. I'll give the latest version a try!

_____________________________


(in reply to dwbradley)
Post #: 5
RE: How do you edit the PWHEX file? - 12/15/2017 1:14:34 PM   
el cid again

 

Posts: 16922
Joined: 10/10/2005
Status: offline
The latest changes are at
https://1drv.ms/f/s!Ap7XOIkiBuUwhPxFuII1ZkrVQefJBQ

These are all pwhexe.dat changes

(in reply to dwbradley)
Post #: 6
RE: How do you edit the PWHEX file? - 12/16/2017 7:55:08 PM   
Vipersp

 

Posts: 144
Joined: 12/6/2014
Status: offline

quote:

ORIGINAL: dwbradley

Nearly a year ago, El Cid contacted me and requested some bug fixes and some changes to accommodate his elderly laptop. The latest releases for the three editors are included in the zip file at this link:
https://www.dropbox.com/s/d0xed5dfwdf26ms/Map_data_editors032617.zip?dl=0

The previous incarnations of the editors are included also. Please accept and use these for what they are. That is, simple (read: crude) editors that allow you to do some things with the map data files but probably not everything you might wish for. To the best of my understanding they have received use from very few folks, hence they are relatively untested. Please back up anything you wish to change.

Good luck with your editing and cheers!

Dave Bradley

Hi Dave,

it seems the program doesnt fit well on my screen since I cannot see the upper menus in order to load a pwhex file on it..is any way to resize it to fit on the screen?

Cheers,

Vipersp

Attachment (1)

(in reply to dwbradley)
Post #: 7
RE: How do you edit the PWHEX file? - 12/16/2017 8:06:43 PM   
el cid again

 

Posts: 16922
Joined: 10/10/2005
Status: offline
The size issue remains to this day. I use the older version of the editor most of the time,
and the newer one when certain things are needed not possible with the older one. I prefer
to see the whole screen easily - so I use version 7 most of the time. But one can navigate
with difficulty in version 8. For features missing from 7, I use 8. A different workaround
is to use Vista and/or a different monitor. The SCEN editor has a few features that ONLY
work with Vista, and Bradley didn't write it - so he can't fix it. I keep XP and Vista machines -
offline to avoid infection - for special tasks.

(in reply to Vipersp)
Post #: 8
RE: How do you edit the PWHEX file? - 12/16/2017 11:41:21 PM   
Vipersp

 

Posts: 144
Joined: 12/6/2014
Status: offline

quote:

ORIGINAL: el cid again

The size issue remains to this day. I use the older version of the editor most of the time,
and the newer one when certain things are needed not possible with the older one. I prefer
to see the whole screen easily - so I use version 7 most of the time. But one can navigate
with difficulty in version 8. For features missing from 7, I use 8. A different workaround
is to use Vista and/or a different monitor. The SCEN editor has a few features that ONLY
work with Vista, and Bradley didn't write it - so he can't fix it. I keep XP and Vista machines -
offline to avoid infection - for special tasks.

Thanks for the clarification Sid;

(in reply to el cid again)
Post #: 9
RE: How do you edit the PWHEX file? - 12/17/2017 2:48:35 PM   
dwbradley

 

Posts: 197
Joined: 3/21/2004
Status: offline

quote:

ORIGINAL: Vipersp


quote:

ORIGINAL: dwbradley

Nearly a year ago, El Cid contacted me and requested some bug fixes and some changes to accommodate his elderly laptop. The latest releases for the three editors are included in the zip file at this link:
https://www.dropbox.com/s/d0xed5dfwdf26ms/Map_data_editors032617.zip?dl=0

The previous incarnations of the editors are included also. Please accept and use these for what they are. That is, simple (read: crude) editors that allow you to do some things with the map data files but probably not everything you might wish for. To the best of my understanding they have received use from very few folks, hence they are relatively untested. Please back up anything you wish to change.

Good luck with your editing and cheers!

Dave Bradley

Hi Dave,

it seems the program doesnt fit well on my screen since I cannot see the upper menus in order to load a pwhex file on it..is any way to resize it to fit on the screen?

Cheers,

Vipersp

Hi Vipersp,
Sorry to hear you are having difficulties with the programs. Questions about the editiors come so rarely that it can take quite a bit of time to dive back down into the details and see what is going on. Before I do that let me ask a couple of questions, if you don't mind?

The programs require a fixed window of x by y pixels. 1280 x 1024 for the 0.7 version and 1024 x 640 for the 0.8 version. If your screen size is smaller than that there is a problem. The 0.8 version I made for Cid may also have scroll bars (IIRC).

1. Does the problem exist for all of the versions of the editor?
2. Is it possible that you have some Windows scaling factor turned on that MAY be making the window bigger than it needs to be?

Cheers
Dave

(in reply to Vipersp)
Post #: 10
RE: How do you edit the PWHEX file? - 12/18/2017 11:50:48 AM   
Vipersp

 

Posts: 144
Joined: 12/6/2014
Status: offline
Hi Dave,

My laptop resolution is 1366X768; the version at your download link is the .5 so I am not sure about the screen requirements for that one;


Cheers

Vipersp

(in reply to dwbradley)
Post #: 11
RE: How do you edit the PWHEX file? - 12/18/2017 1:08:51 PM   
Dili

 

Posts: 4708
Joined: 9/10/2004
Status: offline
For me the 0.7 opens okay but the 0.8 open with scroll bars which are unnecessary in my case.

(in reply to Vipersp)
Post #: 12
RE: How do you edit the PWHEX file? - 12/18/2017 1:21:18 PM   
dwbradley

 

Posts: 197
Joined: 3/21/2004
Status: offline

quote:

ORIGINAL: Vipersp

Hi Dave,

My laptop resolution is 1366X768; the version at your download link is the .5 so I am not sure about the screen requirements for that one;


Cheers

Vipersp

Hi Vipersp,
Me neither (version 0.5 was a long time ago)

Are you downloading from this link?
https://www.dropbox.com/s/d0xed5dfwdf26ms/Map_data_editors032617.zip?dl=0

Cheers
Dave

(in reply to Vipersp)
Post #: 13
RE: How do you edit the PWHEX file? - 12/18/2017 1:58:46 PM   
Vipersp

 

Posts: 144
Joined: 12/6/2014
Status: offline

quote:

ORIGINAL: dwbradley


quote:

ORIGINAL: Vipersp

Hi Dave,

My laptop resolution is 1366X768; the version at your download link is the .5 so I am not sure about the screen requirements for that one;


Cheers

Vipersp

Hi Vipersp,
Me neither (version 0.5 was a long time ago)

Are you downloading from this link?
https://www.dropbox.com/s/d0xed5dfwdf26ms/Map_data_editors032617.zip?dl=0

Cheers
Dave



Hi Dave,

Nope..this dropbox link is dead; I got it at this post :
http://www.matrixgames.com/forums/tm.asp?m=2632394&mpage=1&key=񋹕

Cheers

Viper

(in reply to dwbradley)
Post #: 14
RE: How do you edit the PWHEX file? - 12/18/2017 4:23:51 PM   
dwbradley

 

Posts: 197
Joined: 3/21/2004
Status: offline
[/quote]


Hi Dave,

Nope..this dropbox link is dead; I got it at this post :
http://www.matrixgames.com/forums/tm.asp?m=2632394&mpage=1&key=񋹕

Cheers

Viper
[/quote]

To quote the late, great Ed McMahon, "You are correct sir". Dropbox had not been used for a while and is giving me troubles today. Let's see if this one works (may be edited several times until I give up and try another way):
https://www.dropbox.com/s/k0fvfdq99ecro93/Map_data_editors032617.zip?dl=0
Cheers
Dave

edit: OK, screw dropbox, I am tired of messing with it.

edit2: PM sent Vipersp; respond with your email address and I will get the files to you the old-fashioned way. Gotta go run some errands so might be later today


< Message edited by dwbradley -- 12/18/2017 4:32:42 PM >

(in reply to Vipersp)
Post #: 15
RE: How do you edit the PWHEX file? - 12/19/2017 1:15:24 AM   
RyanCrierie


Posts: 1461
Joined: 10/14/2005
Status: offline
I wrote a map editor program for this.

_____________________________


(in reply to dwbradley)
Post #: 16
RE: How do you edit the PWHEX file? - 12/19/2017 2:22:12 AM   
Dili

 

Posts: 4708
Joined: 9/10/2004
Status: offline
Yeah people should look at Mapgen too, here is the Mediterranean Map - this are the colors that define the terrain types.


(in reply to RyanCrierie)
Post #: 17
RE: How do you edit the PWHEX file? - 12/19/2017 2:29:32 AM   
Dili

 

Posts: 4708
Joined: 9/10/2004
Status: offline
Here is a close up of the Libya,Egypt main roads, not finished yet. As can be seen it is the Hexside that is painted here. The color defines the road type.


(in reply to Dili)
Post #: 18
RE: How do you edit the PWHEX file? - 12/20/2017 11:08:21 PM   
RyanCrierie


Posts: 1461
Joined: 10/14/2005
Status: offline
This is the current terrain dump from the stock PWHEXE.dat in MAPGEN v2.00 which I'm working on, to try and fix a memory error Dili is having.

On my relatively modern i7 (from 2015ish), it takes about 115 seconds to dump all the PWHEXE.dat information to map images.

This is a dump of terrain types.




Attachment (1)

_____________________________


(in reply to Dili)
Post #: 19
RE: How do you edit the PWHEX file? - 12/20/2017 11:09:46 PM   
RyanCrierie


Posts: 1461
Joined: 10/14/2005
Status: offline
Dump of the Malaria Zone




Attachment (1)

_____________________________


(in reply to RyanCrierie)
Post #: 20
RE: How do you edit the PWHEX file? - 12/21/2017 12:14:06 AM   
RyanCrierie


Posts: 1461
Joined: 10/14/2005
Status: offline
Basically how it works is simple. It analyzes your map file, and then outputs them in a graphical file format (multiple PNG files), so that all you have to do is use a program like photoshop (or the later versions of paint shop pro which are 64 bit) is "paint" what you want to edit; then save the graphical image.

Then a complimentary program analyzes that graphic image and alters the hex file accordingly.

_____________________________


(in reply to RyanCrierie)
Post #: 21
RE: How do you edit the PWHEX file? - 12/21/2017 1:26:26 AM   
Dili

 

Posts: 4708
Joined: 9/10/2004
Status: offline
You paint hexes and hexsides in a certain colors -explained in manual what each color means- to say to the repacker program the modified information it should inject in pwhexe.dat file.

Example:
So you want to modify Tokyo Terrain Type from Heavy Urban to Forest- you replace the heavy urban color which is Red (RGB 255,0,0) to Forest which is Green(RGB 0,255,0). Then you save the image in DUMP directory and use MAPGEN_REPACK.exe to inject that new information into pwhexe.dat from the image you painted just by replacing the color.

It can be seen in Terrain Type map i posted the red color of London,Berlin and others which says to repacker program those hexes should be Heavy Urban.

It is basically changing the pwhexe.dat information by painting/changing color in hexes and hexsides. There are several maps. A map for Malaria, another for Weather, etc...

Another paint application good for this is the freeware Krita. https://krita.org/en/

< Message edited by Dili -- 12/21/2017 1:29:55 AM >

(in reply to RyanCrierie)
Post #: 22
RE: How do you edit the PWHEX file? - 12/22/2017 11:16:33 PM   
el cid again

 

Posts: 16922
Joined: 10/10/2005
Status: offline
Now I have refreshed my memory on pwhexe.dat editing

The newest form of the pwhexe.dat editor is only needed for modern
laptops or monitors with unusually wide screens - by historical standards.
It (version 8) permits moving to see anything in the editor. Version 7
permits one to see everything at once - but only on a screen more square
than the newest types are.

(in reply to GaryChildress)
Post #: 23
RE: How do you edit the PWHEX file? - 12/22/2017 11:17:47 PM   
el cid again

 

Posts: 16922
Joined: 10/10/2005
Status: offline
Irfan View is powerful, and free. It permits very detail editing of almost any form of graphics imaginable.


quote:

ORIGINAL: RyanCrierie

Basically how it works is simple. It analyzes your map file, and then outputs them in a graphical file format (multiple PNG files), so that all you have to do is use a program like photoshop (or the later versions of paint shop pro which are 64 bit) is "paint" what you want to edit; then save the graphical image.

Then a complimentary program analyzes that graphic image and alters the hex file accordingly.


(in reply to RyanCrierie)
Post #: 24
RE: How do you edit the PWHEX file? - 12/23/2017 3:04:16 AM   
Dili

 

Posts: 4708
Joined: 9/10/2004
Status: offline
Can you paint with Irfanview? From its webpage you can't, it is an useful viewer/batcher like xnview and others. Cid are you sure you understood how Mapgen works?

First Mapgen unpacks the map in PNG graphic files maps - each of these maps have a function: weather,terrain, strait, road, rail... these graphic file have an overlay of hex and hexsides for the user to paint on with colors that the Mapgen repack can interpret and inject in pwhexe.dat

See the Via Balbia in Libya above? can you paint that in irfanview?



< Message edited by Dili -- 12/23/2017 3:05:04 AM >

(in reply to el cid again)
Post #: 25
RE: How do you edit the PWHEX file? - 12/23/2017 1:58:58 PM   
el cid again

 

Posts: 16922
Joined: 10/10/2005
Status: offline
Irfanview is not a paint program. But I "paint" using it using various tools. You can copy and paste at the
pixel level. You can draw and fill. There are probably other ways. It is a very sophisticated program
AND its author supports you via email in English (never mind he is German) for free. There are books on it -
but only in Polish and German last I knew.

I never heard of Mapgen - so I do not understand it. I also manage vast numbers of files and only make map art
when needed - in the original game style - because no one else is supporting me in this area. Originally I teamed
with an artist. When he died, I teamed with a different one. He is now too sick to draw. An offer to do the map
system was started but never completed. So I use "temporary" maps just modifying what is in stock art - to show
critical features not in other mods (like sea ice cover, the locations of roads and railroads, and colored letter
codes to clue players about something special in a hex). If I tried to do an entire map system, it would take
years - but I might one day. I am getting better. Note I HAVE modified the strategic map to show RHS entry-exit
points and I DO use a lot of third party art, some of which affects maps to a degree.

Since I am not trying to do entire maps from scratch, I don't have to paint much. I find the ability to put what
I want at the pixel level is powerful enough for almost anything. I even create entirely new airplane art by
modifying some similar aircraft at the pixel level. I had to do that when we wanted some types that no one else
has done. I have only one type I am unable to draw - it is very unusual in shape - a rather fine late war
Japanese transport - Ki-97. I use a historical charcoal drawing - the only extant image - for the side. I did
create an acceptable top.

I do not see Via Balboa although I see Libya. Sounds like "Balboa Road" - but I don't see roads. But I can
and do draw roads - and did today.



quote:

ORIGINAL: Dili

Can you paint with Irfanview? From its webpage you can't, it is an useful viewer/batcher like xnview and others. Cid are you sure you understood how Mapgen works?

First Mapgen unpacks the map in PNG graphic files maps - each of these maps have a function: weather,terrain, strait, road, rail... these graphic file have an overlay of hex and hexsides for the user to paint on with colors that the Mapgen repack can interpret and inject in pwhexe.dat

See the Via Balbia in Libya above? can you paint that in irfanview?





< Message edited by el cid again -- 12/23/2017 2:14:42 PM >

(in reply to Dili)
Post #: 26
RE: How do you edit the PWHEX file? - 12/23/2017 6:11:51 PM   
Dili

 

Posts: 4708
Joined: 9/10/2004
Status: offline
With MAPGEN we do not paint the map, we do paint the map code.


Via Balbia in post #18 See those brownish painted hexsides ? It means major road.



(in reply to el cid again)
Post #: 27
Obscure codes in the electronic map - 12/24/2017 4:00:11 PM   
el cid again

 

Posts: 16922
Joined: 10/10/2005
Status: offline
I look at AE as a system. Originally an electronics technician and
machine language programmer, and a pioneer of early digital computers
(even pre-electronic digital computers, which used relays), I think in
terms of how the program works more than in terms of art. Most of my
time involved with maps is down at the level of the codes which define
the "real map" from the computer's point of view. Art is simply what
players see and has essentially nothing to do with how the program works.

Reworking some pwhexe.dat files to fold in improvements designed for
RHS Level II, I discovered I needed to look at weather zone, country code
and sub-map numbers in an area where these were not defined by stock.
Essentially RHS Level I is based on stock maps and ignores these codes
for "off map areas." But RHS Level II uses Andrew Brown's "extended map"
art - and needs to have corresponding pwhexe.dat files for three rows of
hexes. Unlike Andrew's pwhexe.dat files - mine make every visible hex
in his map art functional.

Because AE was not properly documented by its original programmers, there
are probably functions for these codes that we do not know about. In any
case, it is good professional practice to define every field as it should
be in the context of the design. This means that every function using a field
will work as well as possible (to the extent the code functions as designed),
and that any future code seeking to exploit that field data will also work as
intended.

Because of these codes, and many others, I am skeptical about the idea of using
the AE engine with non-AE map systems. However, to the extent it can work, it
is probably a good idea to think about the values in these (and other fields).
In the context of modifying an AE map of some kind, it is certainly a good idea.
Do not ignore these codes, particularly in the original "off map area" where their
definitions will not work for a new on map area.

(in reply to GaryChildress)
Post #: 28
Reply to Dili: - 12/25/2017 7:52:30 AM   
el cid again

 

Posts: 16922
Joined: 10/10/2005
Status: offline
Dili: The problem is that code in scripts needs to be neutralized for a non WITP game.
Otherwise all sorts of weird effects will happen. Probably a "dummy, neutral" script
can be made using the editor. For a non-Pacific game, I think this is a minimal
requirement. Better would be an entirely new script FOR THE GAME you design. Doing
that well might take a couple of years of work.

Sid



It might be more generally useful if there was a generator for scripts. If one
wants a new game (not WITP) - one should kill the script and generate a new one.
The existing ones are sufficiently "dumb" (AI is a misleading name) that we might
be better off if we could create new ones from scratch.

Changing what the map looks like is purely cosmetic and does not change the basic
functioning of the game. When I alter a map, it is for game function reasons, not
cosmetic reasons. The only reason I care about map art is to help players know what
is in a given place?

If automatic code generators can be adapted, is there a way to make new scripts easier
than by hand?


quote:

ORIGINAL: Dili

With MAPGEN we do not paint the map, we do paint the map code.


Via Balbia in post #18 See those brownish painted hexsides ? It means major road.






< Message edited by el cid again -- 1/1/2018 4:35:58 PM >

(in reply to Dili)
Post #: 29
RE: How do you edit the PWHEX file? - 12/25/2017 8:02:24 PM   
Dili

 

Posts: 4708
Joined: 9/10/2004
Status: offline
El cid read my words, this has nothing to do with map art. MAPGEN converts the map CODE into colors, we paint those colors as we like to change the CODE and MAPGEN repacks it.

I don't know about your question, maybe a specific example of an idea you have in mind.


quote:

However, to the extent it can work, it
is probably a good idea to think about the values in these (and other fields).
In the context of modifying an AE map of some kind, it is certainly a good idea.


yes that is why i am using the more common map zones as well, i made it on propose that Tokyo hex 114/60 is a coastal Italian city that is an important naval base.

(in reply to el cid again)
Post #: 30
Page:   [1] 2   next >   >>
All Forums >> [New Releases from Matrix Games] >> War in the Pacific: Admiral's Edition >> Scenario Design and Modding >> How do you edit the PWHEX file? Page: [1] 2   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.718