A Layman's Guide to Successfully Editing the MWiF Game File.

Post new mods and scenarios here.

Moderator: Shannon V. OKeets

User avatar
matrixdavidc
Posts: 2
Joined: Wed Nov 19, 2014 10:11 pm

Re: A Layman's Guide to Successfully Editing the MWiF Game File.

Post by matrixdavidc »

Hi Ronnie

It's a dry lake.
https://en.wikipedia.org/wiki/Lake_Eyre
A man can never have too much red wine, too many books, or too much ammunition.
User avatar
rkr1958
Posts: 32120
Joined: Thu May 21, 2009 10:23 am

Re: A Layman's Guide to Successfully Editing the MWiF Game File.

Post by rkr1958 »

matrixdavidc wrote: Fri Nov 14, 2025 11:50 pm Hi Ronnie

It's a dry lake.
https://en.wikipedia.org/wiki/Lake_Eyre
Cool. Thanks!
Ronnie
User avatar
Joseignacio
Posts: 3206
Joined: Fri May 08, 2009 11:25 am
Location: Madrid, Spain

Re: A Layman's Guide to Successfully Editing the MWiF Game File.

Post by Joseignacio »

Every time we play the game, new and nastier bugs appear.

Today there were many naval searches and some combats.

First, I had the usual problems loading and transporting units, when more than one land unit and in the same naval move.

Then I selected one of the searches, and the game simply skipped it and didn't let me do it or my opponent send Navs to intercept.

In a naval combat a CR with 1 AA with no surprise (I had it, in fact) died but my NAV dissapeared, and couldnt be because of Flak.

So, I understand it probably is because the file is getting somewhat corrupted after so many edits, but I still have hopes that moving to 8.X could help... :roll:

Anyway, is there a way to try to debug it? I guess there is no tool or option in-game, but I cannot see any other way. :?
User avatar
rkr1958
Posts: 32120
Joined: Thu May 21, 2009 10:23 am

Re: A Layman's Guide to Successfully Editing the MWiF Game File.

Post by rkr1958 »

Joseignacio wrote: Thu Dec 11, 2025 5:22 pm Every time we play the game, new and nastier bugs appear.

Today there were many naval searches and some combats.

First, I had the usual problems loading and transporting units, when more than one land unit and in the same naval move.

Then I selected one of the searches, and the game simply skipped it and didn't let me do it or my opponent send Navs to intercept.

In a naval combat a CR with 1 AA with no surprise (I had it, in fact) died but my NAV dissapeared, and couldnt be because of Flak.

So, I understand it probably is because the file is getting somewhat corrupted after so many edits, but I still have hopes that moving to 8.X could help... :roll:

Anyway, is there a way to try to debug it? I guess there is no tool or option in-game, but I cannot see any other way. :?
We can try. Post the game file and enumerate what you need/wish. FYI - we'll have to switch it to single player mode (solitary) to edit; but hopefully you can switch it back?
Ronnie
User avatar
Joseignacio
Posts: 3206
Joined: Fri May 08, 2009 11:25 am
Location: Madrid, Spain

Re: A Layman's Guide to Successfully Editing the MWiF Game File.

Post by Joseignacio »

Thanks a lot for trying, I will upload it tomorrow, after our saturday session

And yes, I can switch it back
User avatar
Joseignacio
Posts: 3206
Joined: Fri May 08, 2009 11:25 am
Location: Madrid, Spain

Re: A Layman's Guide to Successfully Editing the MWiF Game File.

Post by Joseignacio »

Here it goes.

Today the Nav dissapeared again when searched. And went to the Destroyed pool. Since it seems the game wants it to be there, I let it there and brought instead the other version, which had been scrapped earlier. We'll see

The game has started to do very strange things, like not allowing to move a Mot Art to San Diego, from the adjacent hex. I used MAGIC with this.

Regards
Attachments
NP - 2025_12_13_2123 - Jabisbis.zip
(1.49 MiB) Downloaded 45 times
User avatar
Joseignacio
Posts: 3206
Joined: Fri May 08, 2009 11:25 am
Location: Madrid, Spain

Re: A Layman's Guide to Successfully Editing the MWiF Game File.

Post by Joseignacio »

Here it goes.

Today the Nav dissapeared again when searched. And went to the Destroyed pool. Since it seems the game wants it to be there, I let it there and brought instead the other version, which had been scrapped earlier. We'll see

The game has started to do very strange things, like not allowing to move a Mot Art to San Diego, from the adjacent hex. I used MAGIC with this.

Regards
Attachments
NP - 2025_12_13_2123 - Jabisbis.zip
(1.49 MiB) Downloaded 42 times
User avatar
rkr1958
Posts: 32120
Joined: Thu May 21, 2009 10:23 am

Re: A Layman's Guide to Successfully Editing the MWiF Game File.

Post by rkr1958 »

Joseignacio wrote: Sun Dec 14, 2025 12:34 am Here it goes.

Today the Nav dissapeared again when searched. And went to the Destroyed pool. Since it seems the game wants it to be there, I let it there and brought instead the other version, which had been scrapped earlier. We'll see

The game has started to do very strange things, like not allowing to move a Mot Art to San Diego, from the adjacent hex. I used MAGIC with this.

Regards
(1) Is it the CW NAV that was erroneously destroyed?

(2) If so, I can place it where ever you wish.

(3) Do you wish that?

(4) If so, where?
999-CW-NAV-Question.png
999-CW-NAV-Question.png (166.26 KiB) Viewed 2673 times
Ronnie
User avatar
Joseignacio
Posts: 3206
Joined: Fri May 08, 2009 11:25 am
Location: Madrid, Spain

Re: A Layman's Guide to Successfully Editing the MWiF Game File.

Post by Joseignacio »

Yes. That plane is the one that I brought twice to the map and twice dissapeared.

Then I let it be and instead brought its "twin" to the location from the Scrap. Itwas the 2 box in the South China sea. Use this or the other as you like, the problem for me is not putting the plane in the map which I can do but keep it there because it always go when there is a search, even the first time when I had not tangled with it. And it is not the only counter with which this has happened, IIRW, a CR loaded with a div (I think that one was solved, we'll see if they have an interception later on...) and maybe more.

I would say better not touch that one, because I brought it back ... but in truth, maybe I did something wrong.

I deleted the number (449) from the ",stack" line,
changed the number of destroyed units 2 lines above
changed the -1 of the (I think) appropriate line to the 4 field (on map)
set the location in the usual line
set the field wrapped number to 0 because pooll 0 x 2048 = 0
User avatar
Joseignacio
Posts: 3206
Joined: Fri May 08, 2009 11:25 am
Location: Madrid, Spain

Re: A Layman's Guide to Successfully Editing the MWiF Game File.

Post by Joseignacio »

Never mind.
User avatar
Joseignacio
Posts: 3206
Joined: Fri May 08, 2009 11:25 am
Location: Madrid, Spain

Re: A Layman's Guide to Successfully Editing the MWiF Game File.

Post by Joseignacio »

So that people know, the spanish Cartagena MIL doesn't deploy if you align the country.

The game shows it, and alleges there is no place to deploy, although Cartagena only hosts 1 div at the moment (plus a couple of ships), and it is not a city -but it wasnt either in the WIFFE map, and maybe it hasnt been noticed because aligning Spain is not frequent.

I am going to deploy it from the Pool
Captura de pantalla 2026-02-01 171251.png
Captura de pantalla 2026-02-01 171251.png (80.86 KiB) Viewed 2396 times
Captura de pantalla 2026-02-01 173443.png
Captura de pantalla 2026-02-01 173443.png (553.44 KiB) Viewed 2396 times
Captura de pantalla 2026-02-01 174216.png
Captura de pantalla 2026-02-01 174216.png (192.81 KiB) Viewed 2396 times
Captura de pantalla 2026-02-01 175125.png
Captura de pantalla 2026-02-01 175125.png (236.64 KiB) Viewed 2396 times
User avatar
Orm
Posts: 33858
Joined: Sat May 03, 2008 7:53 pm
Location: Sweden

Re: A Layman's Guide to Successfully Editing the MWiF Game File.

Post by Orm »

If there a bug that it can not be placed when it arrives as a reinforcement, I humbly suggest that it is posted as a bug along with a save.
Attachments
0000.jpg
0000.jpg (264.64 KiB) Viewed 2385 times
Have a bit more patience with newbies. Of course some of them act dumb -- they're often students, for heaven's sake. - Terry Pratchett

A government is a body of people; usually, notably, ungoverned. - Quote from Firefly
User avatar
Joseignacio
Posts: 3206
Joined: Fri May 08, 2009 11:25 am
Location: Madrid, Spain

Re: A Layman's Guide to Successfully Editing the MWiF Game File.

Post by Joseignacio »

Orm wrote: Mon Feb 02, 2026 9:52 am If there a bug that it can not be placed when it arrives as a reinforcement, I humbly suggest that it is posted as a bug along with a save.
I thought about that but since it is so atypical to align Spain...
But ok, I will post it. ;)
User avatar
rkr1958
Posts: 32120
Joined: Thu May 21, 2009 10:23 am

Re: A Layman's Guide to Successfully Editing the MWiF Game File.

Post by rkr1958 »

Saved Oil – Changing the number of oil points saved.
Lvieira wrote: Wed Aug 05, 2026 2:44 pm Need to deduct 1 Oil from a 6 Oil counter.

Thanks
Luís
(1) As I always recommend make a backup copy of your game file before attempting any edits.

(2) In the example below I'm going to reduce the number of saved oil in London from 3 to 2.

(3) Calculate the encoded hex location (EHL) of where the oil is saved (e.g., London EHL = 25116)
999-CW-Oil-Edit-1.png
999-CW-Oil-Edit-1.png (645.96 KiB) Viewed 1202 times
(4) Next, locate the oil point counter by searching on EHL (e.g. 25116 = London).

(5) EHL is the 8th value of the unit status record (i.e., USR(8)).

(6) If the oil counter is stacked with other game counters (in my case US HQ), you'll encounter this value in USR(8) a number of times before you'll run across the oil counter.

(7) The first record for the game records set for the oil counter will be of the form: ,CID,69,1936

(8) In this specific case, CW CID =201 so the first record for my oil counter of interest was: ,201,69,1936

(9) The number of oil points is defined in USR(12) = 256 x # Oil points.

(10) Use that formula to reduce/increase the number of oil points at that location; which in my example I set USR(12) = 512
999-CW-Oil-Edit-2.png
999-CW-Oil-Edit-2.png (104.25 KiB) Viewed 1202 times
(11) Load your edited game file to confirm.

(12) If you didn't get it right then you can continue editing until you do or screw up your game file beyond repair in which out of sheer frustration you'll just go back to your backup copy of your game file.
999-CW-Oil-Edit-3.png
999-CW-Oil-Edit-3.png (540.84 KiB) Viewed 1202 times
Ronnie
User avatar
Joseignacio
Posts: 3206
Joined: Fri May 08, 2009 11:25 am
Location: Madrid, Spain

Re: A Layman's Guide to Successfully Editing the MWiF Game File.

Post by Joseignacio »

Ok I am going to try to contribute. I made some edits and it worked well AFAIK, I hope and think I didnt mess with the rest of the game features.

In our game, with the Japanese complete surrender, unfortunately many Chinese and Manchurian hexes kept on being JA. Some we edited with Magic, those with railroad or of a strategic importance, leaving the others for the Chineseor USSR units to walk on them.

At por Arthur laid the rest of the JA fleet. As per rules, when overrun, the game asked me to decide which country these units would belong from there on.

Initial situation:
Captura de pantalla 2026-10-18 141721.png
Captura de pantalla 2026-10-18 141721.png (454.41 KiB) Viewed 228 times
Considering that some CVs could reach Spanish Sahara, while others no, I made 2 ships Italian (controller of Spain) and the rest Vichy units, so they could reach Papetee, a Vichy major port.

The problem is that when doing so, the game wouldnt let us move any of the units because it kept the CVPs on them, with JA nationality (the rules say they should be destroyed, CVP and pilot), so they could not enter Spanish or Vichy port. For some reason the image of the JA CVP appeared and blocked the move even when we tried to move BBs or CRs.

So we decided to take note of all the rolls, and then sink the ships. When they go to the Destroyed pool, they lose their planes and pilots. Point one solved.

Then we had to edit to bring them to the map from the destroyed pool. For this I had to combine two of Rkr's excelllent recipes.

First I had to use the Pools instructions, to bring them back to the map. We dont know where the Destroyed Pool is (maybe nowhere, just the note at the end of the game that we'll see later) but I put a -1 in the fourth space of record 2, which refers to On Map, pool number 0
Captura de pantalla 2026-10-18 134925.png
Captura de pantalla 2026-10-18 134925.png (91.96 KiB) Viewed 231 times
Then edited record 4 in the seventh space setting to 0 (0*2048) and eigth with the encoded location (512 x Row # + Column #).

Captura de pantalla 2026-10-18 135059.png
Captura de pantalla 2026-10-18 135059.png (106.16 KiB) Viewed 211 times
This goes as usual when you want to move a unit from a pool to the map (or opposite if viceversa).

(continues in next post)
Last edited by Joseignacio on Sun Oct 18, 2026 4:35 pm, edited 4 times in total.
User avatar
Joseignacio
Posts: 3206
Joined: Fri May 08, 2009 11:25 am
Location: Madrid, Spain

Re: A Layman's Guide to Successfully Editing the MWiF Game File.

Post by Joseignacio »

AFAIK there is no Destroyed Pool, only a relation of the destroyed units id as per in a "cosmetic" edit in RKR's paper:
Captura de pantalla 2026-10-18 140159.png
Captura de pantalla 2026-10-18 140159.png (71.71 KiB) Viewed 229 times
Captura de pantalla 2026-10-18 140206.png
Captura de pantalla 2026-10-18 140206.png (20.48 KiB) Viewed 229 times
Captura de pantalla 2026-10-18 140404.png
Captura de pantalla 2026-10-18 140404.png (24.7 KiB) Viewed 229 times
So I edited the number of units deleting the game file id of those I wanted to "revive" and changed the number of destroyed units accordingly.

However, most of the units still didnt show in the map so I decided to use brute force, considering that the numbers after field 4 of the record 4 were not defining the unit but it's position and status, I copied that part of the line from some of the same nationality units that were previously safe at any fiendly port and pasted them, even if they were not at the desired port. It worked.


Finally all I had to do is use Magic
(could be done by hand as well) to move these units to the ports that they could really reach.

Final state:
Captura de pantalla 2026-10-18 142034.png
Captura de pantalla 2026-10-18 142034.png (312 KiB) Viewed 227 times
User avatar
Joseignacio
Posts: 3206
Joined: Fri May 08, 2009 11:25 am
Location: Madrid, Spain

Re: A Layman's Guide to Successfully Editing the MWiF Game File.

Post by Joseignacio »

And the Vichy units at Papetee.

The game seems to keep working normally (up to what the game works normally). :evil:
Attachments
Captura de pantalla 2026-10-18 142240.png
Captura de pantalla 2026-10-18 142240.png (170.16 KiB) Viewed 226 times
User avatar
Joseignacio
Posts: 3206
Joined: Fri May 08, 2009 11:25 am
Location: Madrid, Spain

Re: A Layman's Guide to Successfully Editing the MWiF Game File.

Post by Joseignacio »

Ronnie; I succesfully edited the Trade Agreements and it worked. It is so easy...

I cannot thank you enough all that you do for us. I would probably would not be able to play MWIF without these amendments of so may wrong functionalities.

All members: Now we can go back to 3.2 (and back if we want to) and avoid some nerve-breaking bugs like the DUMB-LAG.
Post Reply

Return to “Mods and Scenarios”