pwhex

Please post here for questions and discussion about scenario design, art and sound modding and the game editor for WITP Admiral's Edition.

Moderators: wdolson, MOD_War-in-the-Pacific-Admirals-Edition

User avatar
tigercub
Posts: 2026
Joined: Mon Feb 03, 2003 12:25 pm
Location: brisbane oz

pwhex

Post by tigercub »

PWHEX what does this file do?
Image
You have enemies? Good. That means you've stood up for something, sometime in your life
User avatar
msieving1
Posts: 528
Joined: Fri Mar 23, 2007 2:24 am
Location: Missouri

RE: pwhex

Post by msieving1 »

ORIGINAL: tigercub

PWHEX what does this file do?

It defines the terrain in each hex.
-- Mark Sieving
User avatar
LargeSlowTarget
Posts: 4968
Joined: Sat Sep 23, 2000 8:00 am
Location: Hessen, Germany - now living in France

RE: pwhex

Post by LargeSlowTarget »

Also the road and railroad network, rivers, straits and the monsoon / malarial / cold zones.

Can be edited with the PWHEXE_Editor_0.7.exe - forgot where that tool can be found but if you need it, ask.
BPRE
Posts: 623
Joined: Mon Oct 16, 2000 8:00 am
Location: Stockholm,Sweden

RE: pwhex

Post by BPRE »

Try this post: tm.asp?m=2922596

/BPRE
User avatar
tigercub
Posts: 2026
Joined: Mon Feb 03, 2003 12:25 pm
Location: brisbane oz

RE: pwhex

Post by tigercub »

so its just map related? not ships planes and other! I added the new mod map by Topo and my PBEM have different PWHEX files both using standard map size...perhaps I just send him my file?

thx guys
Image
You have enemies? Good. That means you've stood up for something, sometime in your life
User avatar
Symon
Posts: 1885
Joined: Sat Nov 24, 2012 4:59 pm
Location: De Eye-lands, Mon

RE: pwhex

Post by Symon »

Let me make it real simple.
Pwhex underlays the Map. There’s been hundreds of posts about the map and how the pwhex file has to accommodate the map imperitives.
There’s been hundreds of posts about tweaks to the pwhex file in the context of stacking limits, giving life to the universe and everything. Ciao. JWE
Nous n'avons pas peur! Vive la liberté! Moi aussi je suis Charlie!
Yippy Ki Yay.
User avatar
witpqs
Posts: 26376
Joined: Mon Oct 04, 2004 7:48 pm
Location: Argleton

RE: pwhex

Post by witpqs »

Tigercub, look at it this way. The graphics files are the maps that the humans look at on the screen. The pwhex files are what the computer looks at.

BTW, there are three pwhex files that act as a set. You will see them there with similar but slightly different names.
User avatar
tigercub
Posts: 2026
Joined: Mon Feb 03, 2003 12:25 pm
Location: brisbane oz

RE: pwhex

Post by tigercub »

Fixed thx guys
Image
You have enemies? Good. That means you've stood up for something, sometime in your life
User avatar
Symon
Posts: 1885
Joined: Sat Nov 24, 2012 4:59 pm
Location: De Eye-lands, Mon

RE: pwhex

Post by Symon »

ORIGINAL: tigercub
so its just map related? not ships planes and other! I added the new mod map by Topo and my PBEM have different PWHEX files both using standard map size...perhaps I just send him my file?

thx guys
If you go to the Babes website, it sets it all out. The pwhexe is a set of 3 files (pwhexe, pwzlnk, and pwzone). They MUST be linked together to work properly. They are downloaded as a "SET", not individually. There's only a few "SETS" that apply to your version of the game. The Babes website gives all the info that anyone needs and if one is able to read, one can comprehend.

Stock Map: Only works with the stock map. well, duh.
Stock Map with SLs: Stock Map in all respects, but with stacking limits imposed.
Ext Map: Only works with the extended map. well, duh.
Ext Map with SLs: Ext Map in all respects, but with stacking limits imposed.

Has NOTHING WHATEVER to do with a scenario choice. All the scenarios are identified by the specific map they use. In the Babes schema one can play ANY scenario, with ANY map, and ANY choice of SLs or not. It all depends on which map version one chooses to use (forcing the A, or B selection) and which version of SLs one wishes to implement. Is this too hard to understand?

Somebody should make one of those 'Map Guide' pdf things. I've seen this confusing lots of people and a handy guide would be nice.
Nous n'avons pas peur! Vive la liberté! Moi aussi je suis Charlie!
Yippy Ki Yay.
el cid again
Posts: 16983
Joined: Mon Oct 10, 2005 4:40 pm

RE: pwhex

Post by el cid again »

The pwhexe.dat file is the "real" game map. It is the map from the point of view
of the AE program. What you see, as a player, is mostly art - unless you use
special settings to show SOME of the pwhexe values. If you set "reveal hex side
details" you see the kinds of hex sides each hex has. If you press the R key
you see roads. If you press the Y key you see railroads.

There is normally only one pwhexe.dat file. It must be in the top level AE folder.
However, it is possible to have different ones. The RHS mod has no less than
26 different ones. You use the one for the season and year you are playing (mostly).
A system with just 4 would allow one for each season - repeated every succeeding year.
However, we permit construction of roads and railroads - so that means each year
is different. We also have alternative options - strictly historical and
enhanced construction (which involves historically planned projects not completed -
although they were surveyed and in some cases begun). But even in a strictly
historical context, construction during the war was significant - so it is
more accurate to show that in the map system.

You can modify the pwhexe.dat file using the pwhexe editor. Be very careful to
check after saving a file - the editor sometimes generates errors - particularly
in the last hex edited.
User avatar
wdolson
Posts: 7688
Joined: Tue Jun 27, 2006 9:56 pm
Location: Near Portland, OR

RE: pwhex

Post by wdolson »

You do realize the game engine already has some seasonal weather effects built in such as monsoon season in SE Asia and winter in the far north?

Bill
WIS Development Team
User avatar
Symon
Posts: 1885
Joined: Sat Nov 24, 2012 4:59 pm
Location: De Eye-lands, Mon

RE: pwhex

Post by Symon »

ORIGINAL: wdolson
You do realize the game engine already has some seasonal weather effects built in such as monsoon season in SE Asia and winter in the far north?

Bill
Of course we do. Modders have been tweaking this since 2004. But it's a non-starter to dial through a bunch of pwhexe files depending on conditions. We purposely had Andrew do a special editor for all this - used specially for SLs for Sm Island/Atoll/Island definitions and the Gnarly China Road definitions. Everything and anything is in the box, so one can have a pwhexe file for every day of the year. Always been like that. And frankly, it can do lots more than what Sid is thinking. Perhaps that's because he doesn't understand the present algorithm or have access to the utilities we have developed since 2009.

Ciao. JWE
Nous n'avons pas peur! Vive la liberté! Moi aussi je suis Charlie!
Yippy Ki Yay.
el cid again
Posts: 16983
Joined: Mon Oct 10, 2005 4:40 pm

RE: pwhex - seasonal effects

Post by el cid again »

While code has some seasonal effects built into it,
and I do synchronize the dates of these with the
pwhexe seasonal maps, the effects in the pwhexe file
in all variations of AE except RHS (as far as I am
aware) do NOT permit things like sailing the
Arctic Ocean in the Fall season or the widespread
effects on river navigation. Most places, navigation
in rivers is better in Monsoon and Fall. In the
North it becomes impossible during Winter (frozen)
and Spring (break up). At the same time, ice trails
and ice roads become feasible in places - and some
have extensive and heavy traffic (see Lake Baikal
as the extreme case). River navigation deep into
China is a seasonal creature - no one pwhexe map
can model that. Against what seems logical, river
navigation on the Irrawaddy is WORSE in Monsoon
however - there is TOO MUCH water in the narrow
canyons above Mandalay, and so navigation upriver
isn't possible during what is otherwise the "best"
time for it in other places. The Bering Sea - except
for a three hex 'hole' (polynya) - freezes over
entirely in Winter. Military operations in Northern Canada,
Alaska and Siberia ARE possible in the fall: the US Army
built a radar station at Point Barrow to provide early
warning of just such an operation. I could go on, but
you get my point: it is impossible to accurately model
the entire region well with but one ice cover - that is -
with one pwhexe file.
el cid again
Posts: 16983
Joined: Mon Oct 10, 2005 4:40 pm

RE: pwhex

Post by el cid again »

Of course we do. Modders have been tweaking this since 2004. But it's a non-starter to dial through a bunch of pwhexe files depending on conditions. We purposely had Andrew do a special editor for all this - used specially for SLs for Sm Island/Atoll/Island definitions and the Gnarly China Road definitions. Everything and anything is in the box, so one can have a pwhexe file for every day of the year. Always been like that. And frankly, it can do lots more than what Sid is thinking. Perhaps that's because he doesn't understand the present algorithm or have access to the utilities we have developed since 2009.

Ciao. JWE

If there is anything modders do not understand, it may be related to the lack of documentation describing how things work, or how they have been modified. As far as I am aware, the official manuals have never been updated. Nor is what they say in every case true in fact. A very senior programmer says "you have all the tools we do - there is no secret set of tools or documentation." If that isn't the case, perhaps you might enlighten all of us? Programmers and modders would love to know in detail how every sort of "algorithm" works. I have a background as a machine language programmer: with a hex editor I can read anything in any file. With various professional tools one can turn what you see into commented lines. But the size of the program and its complexity - never mind its many authors and nearly total lack of documentation in a professional sense - mean it would take more than a lifetime to comprehend the program (even if it were never changed a bit). And, quoting the programmer (of AE) again,
"it is very hard to understand what code means when you read it - testing should yield at least a good a grasp of how it really works" - even when you can read it at high level.

There is little point in returning to the bad old says of trying to say people here are ignorant or stupid. No one here is and you know that perfectly well. We also are bound by our terms of use agreements - never mind by honor - to be civil. Besides - quoting Ben Franklin -
"ignorance is a curable disease" - not a vice. If you really know something I do not - you have the power to fix it! If you have good will and want the best for everyone in the community.
User avatar
Symon
Posts: 1885
Joined: Sat Nov 24, 2012 4:59 pm
Location: De Eye-lands, Mon

RE: pwhex

Post by Symon »

To the serious modders out there, there's a ton of documentation. If one wishes some specifity, we have always been here. There are no manuals for pwhexe files, except for what's put in txt in Christian Maas' editor program.

There is no such thing as "high level' code in the game. Code is source or it is not. Developers have access to source, and Sid does not. Please don't try to tell people you have access, You no NOT.

The code is very convoluted and has implications across many subroutines. A simple one-vector test will put you into a toilet. But then you are someone who simply consults the internet and posts your conclusions on that basis, complete with 10,000 word citations, that you quote often and religiously, and which are utterly irrelevant for anything resembling a nominal input for an AE scenario.

You could get your crap together and talk to us. Knowing you, you won't take that path. Oh well ... you get what you pay for. My issue is that you keep telling people how to do things that are non-functional within the AE system. That hurts both them and you. The AE scenario development modders are totally open to giving hints and, often, instructions as to how to deal with the new code. Unfortunately, you seem caught up in your 2004 RHS paradigm, which just doesn't quite seem to work with the new stuff. Neither you nor any of your "team" have ever engaged with anyone having knowledge of the AE system. Even though we offer our best to anyone who asks.

A simple PM or email might help you more than you could possibly imagine.

Ciao. JWE
Nous n'avons pas peur! Vive la liberté! Moi aussi je suis Charlie!
Yippy Ki Yay.
el cid again
Posts: 16983
Joined: Mon Oct 10, 2005 4:40 pm

RE: pwhex

Post by el cid again »

[quote]To the serious modders out there, there's a ton of documentation.
If one wishes some specifity, we have always been here. There are no manuals
for pwhexe files, except for what's put in txt in Christian Maas' editor program.
There is no such thing as "high level' code in the game. Code is source or it
is not. Developers have access to source, and Sid does not.

REPLY: I will make one attempt to clarify your misunderstanding. And based on
that misunderstanding, your misrepresentation of what I said. I did not claim to
have access to source code. I claimed instead that one who knows how can display
the ACTUAL code in ANY file. Also that there are automated tools which can turn
hexadecimal into a more readable form - in several different senses.

For the record source code IS "high level code" in technical computer jargon. Symon
has forgotten the fundamentals. Perhaps he never knew that - not many are taught
"low level" coding in this age. I teach it in college to every student of computer
science - but I think that is unusual in this age.

I also said that reading machine code that is time prohibitive. Because it is.
I also said - and I was quoting a very senior Matrix
programmer - that reading source does not make it clear what code is trying to do.
He once wrote "I thought I had a handle on how land combat works - after two years
specializing in it. Yesterday I found a branch I didn't know existed. Now I am
sure of nothing!" AE is apparently the third iteration of PacWar Code. It was
not written on a modular basis. It was not documented. Over time, many programmers
have altered parts of it - none of them with a complete picture. And except at
the very lowest level (something few programmers ever see) are the effects of code
entirely clear - until tested. Matrix - for sound financial reasons - does not
test very much. It is hard to understand how things work. And - again quoting
my senior programmer at Matrix - "you can get at least as good an understanding of
how code works by testing as you can by reading code". In the context of the
complex, undocumented code of AE, he is dead right. And I am a test engineer.
At times I get asked by him how something really works? Because I can figure it
out even if I don't know. It is just a matter of time and effort. Not one
thing I said should be read to say I have formal access to source code. It remains
that there are no secrets from machine coders and few from testers: if you tell
a computer what to do, in a known machine language, you can reverse compile the
code issuing those instructions. If you have the code to execute in tests over
and over - eventually you can figure out how it really works (often more clearly
than even the programmer who wrote the routine grasps - as how things interact
is often different form the intention of the code writer). These are philosophical
concepts - in practical terms in this age - with huge programs it would take
decades to actually build the entire program (if ever). As well, we agree
in our licences not to try. For practical reasons, I use testing - and reading
documentation when it exists - and asking questions - to solve problems. And
for reasons of personal philosophy I try to avoid insulting people - although
sometimes I fail in that regard - at least it was not intentional. In this
thread we are only trying to throw light on the pwhexe file relationships.
I doubt anyone, anywhere does more AE pwhexe.dat coding than I do. I have
26 different pwhexe files in service. They work well and - privately - someone
has admitted (to Mifune - you may ask him) that it was a mistake not to have
an even larger number easily and automatically switched in the AE design.
You may not agree - but that is at least an opinion from inside the Matrix
programming community. I am not here to start or participate in a flame war -
and I have said what I thought might help readers understand what pwhexe is -
so I am not going to revisit this thread any longer. And mostly I think
Symon misunderstood what I said. His impression I said I had source code
is incorrect. I said I could figure out what it says. I don't bother.
I am more interested in how it works - which may not be what the writers
intended. Even that is time prohibitive - it is far better to help each
other understand - to the extent we can do that. I believe in positive
relationships, and in spreading understanding. Even things that are imperfect -
and AE is full of them - do not justify being negative. It is the greatest
program of its sort ever made available to the public. It is somewhat open
to feedback and modding. Lets all help each other make it even better.
User avatar
Symon
Posts: 1885
Joined: Sat Nov 24, 2012 4:59 pm
Location: De Eye-lands, Mon

RE: pwhex

Post by Symon »

Gosh, woof!! Okey dokey, then !! Golly, what an an incredible diatribe. Knew this girl in college who could launch and talk for an hour and a half without taking a breath. Took a couple whites to get her going, but still, an incredible experience once she got rolling. So thousands of words with little punctuation, and no paragraph marks, are kid stuff.

Once again, I offer you a way to phone home. I hope you take it, or maybe one of your "team" will take it. Either way, player's choice, cold new deck.

Ciao. JWE
Nous n'avons pas peur! Vive la liberté! Moi aussi je suis Charlie!
Yippy Ki Yay.
User avatar
wdolson
Posts: 7688
Joined: Tue Jun 27, 2006 9:56 pm
Location: Near Portland, OR

RE: pwhex

Post by wdolson »

So el Cid, are you saying that an unnamed "senior coder" at Matrix asks you for advise on how things work in AE? I find that a bit hard to believe since I know everyone who has the source code to AE and none of them work directly for Matrix.

Maybe I misunderstood you.

Bill
WIS Development Team
User avatar
Nikademus
Posts: 22517
Joined: Sat May 27, 2000 8:00 am
Location: Alien spacecraft

RE: pwhex

Post by Nikademus »

wait for it........I sense an impending delivery of alleged JoeW quotes.


User avatar
witpqs
Posts: 26376
Joined: Mon Oct 04, 2004 7:48 pm
Location: Argleton

RE: pwhex

Post by witpqs »

You guys are misreading the machine code.

It's all about context. The notion that you might not get a full appreciation of outcomes from only reading the source and would supplement that with testing is certainly reasonable and I can see a rational developer saying that about some aspects of AE/WITP et al. Taking that out of context and applying it to this topic is not reasonable, but is the norm for that poster. Long irrelevant arguments, sometimes containing some degrees of truth (even relevant truths), are put forth to back up false assertions. One recent post asserted that US Marines "literally translates" into the German for 'the American SS', which it does not, and goes on to conflate the notions of Sturmtruppen - storm troops - and Schutzstaffel - the SS. If you don't either already know better or look into it, you can be misled by the sometimes outright wrong/sometimes irrelevant citations.

I have no trouble believing that some AE developer, sometime, in some specific context made a statement to the effect that testing would reveal behavior he did not readily predict from merely reading the source code. Heck, that's one reason that software gets tested, not just for typographical error-type bugs. That is quite different than applying such a comment to any AE topic of the moment.

So it's not about whether such a statement was ever made, it's about whether it's relevant to the current topic.
Post Reply

Return to “Scenario Design and Modding”