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

Post new mods and scenarios here.

Moderator: Shannon V. OKeets

User avatar
Joseignacio
Posts: 3051
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, today I spent all the afternoon and evening "playing" :cry: with these matters.

1) I was able to change the optional very easily (and by now it doesnt call any warnign). :D

2) I was able to (with the permission of my partner) just in case the game doesnt let me reorg with IT oil, delete one IT oil and reorg several units of Vichy :D

3) I was unable to relocate the NE TRS and the ISO TERR to SA and to ISO respectively, because it seems the TRS has a code that indicates it is loaded (I think there was some literature about this but no answers) so I got both units to their places but the ISO was also in SA and there was an error message that I didnt like a bit. :(

So I did it again sending both to SA and the result was the same error code although of course no duplication.

So I finally decided I will edit them once the units are unloaded (even though this is very much less convenient for the game schedules for meeting to NP).

4) I tried (with the permission of my partner) to deploy the two possible GE ENGs (which were at the force pool) at Brest and Bordeaux, trying to follow the instructions, i.e. changing the -1 to the 4th box and editing the right line 8th field with the new location. To no avail, they do not appear. :(

For 4) can somebody tell me what else I need to do? :?:
User avatar
Joseignacio
Posts: 3051
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, forget 4) I was able to solve it. It seems I forgot I had to set field #7 to 0 besides inputing the location in #8

All that was needed was banging my head on the wall 20 more times... :lol:
User avatar
rkr1958
Posts: 30363
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: Tue Mar 18, 2025 8:18 pm Ok, today I spent all the afternoon and evening "playing" :cry: with these matters.

1) I was able to change the optional very easily (and by now it doesnt call any warnign). :D

2) I was able to (with the permission of my partner) just in case the game doesnt let me reorg with IT oil, delete one IT oil and reorg several units of Vichy :D

3) I was unable to relocate the NE TRS and the ISO TERR to SA and to ISO respectively, because it seems the TRS has a code that indicates it is loaded (I think there was some literature about this but no answers) so I got both units to their places but the ISO was also in SA and there was an error message that I didnt like a bit. :(

So I did it again sending both to SA and the result was the same error code although of course no duplication.

So I finally decided I will edit them once the units are unloaded (even though this is very much less convenient for the game schedules for meeting to NP).

4) I tried (with the permission of my partner) to deploy the two possible GE ENGs (which were at the force pool) at Brest and Bordeaux, trying to follow the instructions, i.e. changing the -1 to the 4th box and editing the right line 8th field with the new location. To no avail, they do not appear. :(

For 4) can somebody tell me what else I need to do? :?:
Joseignacio wrote: Tue Mar 18, 2025 8:38 pm Ok, forget 4) I was able to solve it. It seems I forgot I had to set field #7 to 0 besides inputing the location in #8

All that was needed was banging my head on the wall 20 more times... :lol:
I now bestow on you the title of, "MASTER MWIF EDITOR". Congrats! :D
Ronnie
User avatar
Joseignacio
Posts: 3051
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 »

I have gone through rkr's post in page 14 midpage on how to edit those Turkish units, to see if I could learn a bit more in order to edit a cruiser that should not have died , out from the destroyed pool and into the map.

I think I have read this post like 20 times, the combination of English (not my native language), technical terms, and my reluctancy towards anything that smells of programming (in spite of how useful I deem it to be) :( has made it very difficult for me to understand it. I had to go back to page 1 to understand again the term USR, record # and field # for example and how are they related.

Ok, so finally I think I understood it somehow.

We have a CR that shouldnt have died, so I changed it's location like in the usual moves within the map, and then I did reverse to what was explained in page #16 to include a unit in the destroyed pool (because else I had simply duplicated the unit), and so I decreased the number of units inside it and deleted the number of that unit. It worked. I hope I didnt f*ck anything up, but I got no error and it seems to run well with the review visualization.

So if nobody says the opposite, this would be a way to extract a killed unit from destroyed to the map in case of a bug or a mistake.

Edit: we played today and it went fine.
User avatar
rkr1958
Posts: 30363
Joined: Thu May 21, 2009 10:23 am

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

Post by rkr1958 »

Convoy Route Editing. (Advanced Editing)

(1) Back in the earlier versions of MWIF, instruction of which are still included in the tutorials, was the ability to reroute a RP to factory.

(2) Somewhere along the upgrade versions that ability to reroute was loss (unintentionally I believe).

(3) I have successfully been able to edit the game file to reroute a non-trade RP.

(4) I considering what I'm about to share with you a straight forward but advance editing technique to reroute non-trade RPs.

(5) The following is an actual and recent situation in which I found this edit very useful.

Pre Rerouting Situation.
CW Production.
(6) Full production, all is good; but why do I have a 3 unused CP chain from the US to the UK.

(7) Oh Well, I can use that chain to save an additional (US traded oil) to the UK vs saving it to Canada.
01-convoy-route-editing.png
01-convoy-route-editing.png (220.13 KiB) Viewed 2485 times
French Production.
02-convoy-route-editing.png
02-convoy-route-editing.png (205.28 KiB) Viewed 2485 times
(8) NO! The French should have 11 factories producing NOT 10.

(9) Why is the Kayes, Senegal RP idle?

(10) Because all CPs in Cape Verde Basin are being used.

The Culprit.
03-convoy-route-editing.png
03-convoy-route-editing.png (150.67 KiB) Viewed 2485 times
(11) The Dutch Guyana (Paramaribo) RP is being routed through Cape Verde Basin instead of the Central Atlantic, using up the CP designated for the Kayes, Senegal RP and blocking that RP from getting to a French factory.

(12) So, there is an edit to reroute the Dutch Guyana (Paramaribo) RP through the Central Atlantic vs Cape Verde Basin, which then will allow the Kayes, Senegal RP to be routed as planned.

(13) As always, make a backup of your game file before attempting any edits; especially advanced edits such as this.

(14) By the way, the following edit allowed me to take a land with the CW vs having to choose between (a) combine to get an "extra" CP out to the CVB in order to route the Kayes, Senegal RP or (b) land (which I wanted and really needed to take with the CW) and then likely loose 1 PP (and 1 to 2 BPs) of additional French production (there was an 80% chance this was the last impulse of the turn). So me getting another impulse this turn was not much above 0%; especially if my opponent chose to pass then in which case it would be 0%.
Ronnie
User avatar
rkr1958
Posts: 30363
Joined: Thu May 21, 2009 10:23 am

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

Post by rkr1958 »

Convoy Route (Advance Editing). Editing Steps.

(1) Make Sure your Non-trade RP is defaulted to the factory that wish it routed.
(2) In this specific case, Parmaribo, Dutch Guyana RP was defaulted to Coverntry (UK blue factory).
03-convoy-route-editing.png
03-convoy-route-editing.png (150.67 KiB) Viewed 2483 times
(3) Next, search your game file for the section that contains the RP routing information.

(4) The search key is, column, row of the RP; in this case 334, 110

(5) NOTE. This convention is the reverse of the row, column shown for the RP in the production form (above).
04-convoy-route-editing.png
04-convoy-route-editing.png (52.09 KiB) Viewed 2483 times
(6) You will likely run into your search string a couple of times before you find the section that contains the routing information.

(7) The routing section you're searching for contains the nodes (land hexes & sea boxes) used to route the RP, which in this case is 8 nodes (4 land hexes, 4 sea boxes).
05-convoy-route-editing.png
05-convoy-route-editing.png (39.72 KiB) Viewed 2483 times
(8) In this case all we wish to do is to change the route from Cape Verde Basin AL[0] sea box (column=0, row=102) to Central Atlantic AL[0] sea box (column=88, row=339).

(9) In this specific case, since we're just replacing one node (i.e., CVB AL[0]) with another node (i.e., C. Atlantic AL[0]) then all we need to do is edit the column, row of the CVB AL[0] node to that of the C. Atlantic AL[0] node.

(10) As noted in this graphic, I have successfully reroute where I added additional nodes, in which case I had to renumbered the nodes and edit the number of nodes to that consistent with the reroute.
06-convoy-route-editing.png
06-convoy-route-editing.png (20.76 KiB) Viewed 2483 times
Ronnie
User avatar
rkr1958
Posts: 30363
Joined: Thu May 21, 2009 10:23 am

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

Post by rkr1958 »

Convoy Route (Advance Editing). Result.
07-convoy-route-editing.png
07-convoy-route-editing.png (154.08 KiB) Viewed 2482 times
(1) Paramaribo, Dutch Guyana successfully rerouted through the Central Atlantic.
09-convoy-route-editing.png
09-convoy-route-editing.png (160.08 KiB) Viewed 2482 times
(2) Kayes, Sengal RP now routed to a French Factory.
10-convoy-route-editing.png
10-convoy-route-editing.png (372.93 KiB) Viewed 2482 times
(3) In fact, an additional French factory producing via oil that was saved but not used in production.

(4) More significantly, I was able to fix French production as I wanted without having to take a CW combine or lose 1 BP.
Ronnie
User avatar
rkr1958
Posts: 30363
Joined: Thu May 21, 2009 10:23 am

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

Post by rkr1958 »

Editing US Entry Chits.

(1) Search 0,USEntry

(2) Don't know what the next line, -1,1,3,4,5,6,7,-1,USEOptions in specific case, is

(3) However; 2nd line after is Ge/It Entry Pool (# Chits & chit values in ascending order)

(4) 3rd line after is Jp Entry Pool (# Chits & chit values in ascending order)

(5) 4th line after is Ge/It Tension Pool (# Chits & chit values in ascending order)

(6) 5th line after is Jp Tension Pool (# Chits & chit values in ascending order)
00-editing-US-Entry-Chits.png
00-editing-US-Entry-Chits.png (199.72 KiB) Viewed 2442 times
Ronnie
User avatar
rkr1958
Posts: 30363
Joined: Thu May 21, 2009 10:23 am

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

Post by rkr1958 »

Link (below) to the latest version of my MWIF game file editing document. Will keep it up until I upload another update or run out of room on my google drive.


https://docs.google.com/document/d/12IG ... sp=sharing
Ronnie
User avatar
Joseignacio
Posts: 3051
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 »

Great! Downloaded

Eager to see the new possibilities as soon as I end this game session.
User avatar
Joseignacio
Posts: 3051
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 »

It seems it is more or less annexing the last inputs. Which is no small thing.
User avatar
rkr1958
Posts: 30363
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: Mon Jul 07, 2025 8:45 pm It seems it is more or less annexing the last inputs. Which is no small thing.
I think it's a language difference ... don't understand what you mean by, "annexing the last inputs"?
Ronnie
User avatar
Joseignacio
Posts: 3051
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 »

I mean that the newer additions seem to be the latter innovations , i.e.: rerouting convoys and editing USE

Sorry, the use of last instead of latter was a mistake because of English not being my native language.
User avatar
rkr1958
Posts: 30363
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: Tue Jul 08, 2025 9:43 pm I mean that the newer additions seem to be the latter innovations , i.e.: rerouting convoys and editing USE

Sorry, the use of last instead of latter was a mistake because of English not being my native language.
Thanks for the clarification!

Very few of us faithful MWIF players left. That saddens me compared to the enthusiasm over this game now we'll over 15 years ago. :(
Ronnie
User avatar
Joseignacio
Posts: 3051
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 »

rkr1958 wrote: Tue Apr 25, 2023 5:23 pm
Joseignacio wrote: Mon Apr 24, 2023 11:32 pm Because of a bug of the game, already informed of - but not solved, the game gave me a couple of units from a USSR aligned Turkey in my random buy of USSR Mechs and Garrs. These units should not have been in te USSR pool to be randomly selected.

I am a regular computer user but not very skillful in programming so, I decided to do the minimal possible changes and edit the saved BPs in USSR and delete the two units, but I have not seen how to do it. Can somebody explain how to select them and delete them?
DISCLAIMERS. (1) Always make a backup of your game file before attempting any edits so if something goes horribly wrong you won't be cursing me. (2) Where provided screen CAPs differ from the editing document, the screen CAPs take precedent as they're from later versions of that document not yet uploaded. (3) AND, just updated my editing captured document in dropbox to represent the latest of my edits. https://www.dropbox.com/scl/fi/1j9h2xx2 ... 3yoa5pfexf

You need to edit two values in 2 records for each of the 2 Turkish units you wish to remove from the production pool. A description of all 6 records, including these 2, are on pages 6 - 8 of my "MWIF-Game-File-Editing-Capture-Document", which you downloaded earlier.

The records you'll need to edit are record #2 (Force Pool Record=FPR) and record #4 (Unit Status Record=USR).

In your specific case, the 2 Turkish units will be in force pool #5 (production), which is field #9. So in your case the value in field #9 will be -1. You'll need to set that field to 0 and the field corresponding to which force pool you wish to place the unit in to -1. For example, to remove the units from the game you could set field #19 (force pool #15) to -1. Or if you wanted to scrap them set field #18 (force pool #14) to -1. The below screen CAP is for a unit that's in the future force pool (force pool #9, field #13).
force-pool-record.png

The edit you need to make to the USR record is the value in field # 7. This field is equal to a unit's force pool x 2048 + wrap_flag (0 or 1). wrap_flag is only applicable if the unit is on the map (i.e., force pool #0). In your case, the value of this field for the Turkish units in the production pool (pool #8) will be 5 x 2048 = 10240. You'll need to change this to corresponding to whichever force pool you edited record 2 to. For example, removed -> FP #15 -> 15 x 2048=30720. scrapped -> FP #14 -> 14 x 2048=28672. The below screen CAP is (also) for the unit that's in the future force pool (FP #9) so, in this example, field #7 = 9 x 2048 = 18432.
USR.png
Joseignacio wrote: Mon Apr 24, 2023 11:32 pm Then, I know that in Moscow you can only save up to 8 points (capital city but not port), but I had previously 3 there and I didnt want to make another edit next turn or buy sth I may not need like an extra pilot, so I added BPS till it reached 10 (3 original ones + 5 for Mech + 2 for Garr. Will this give any problems? Of course I can wait till next game and see but I would prefer to know in advance and solve before the game.
Not 100% sure on this but I believe you'll only be able to use 8 of those 10 BPs for builds. The other 2 should still be there and usable next turn?
Rkr: When you say you need to input the record in field #7, the number is that of the pool where the unit goes to or the one it reaches? I.e. if I send a unit to the map it would be 0 x 2048 =0?

And the wrap the same, is it the wrap associated to the original pool or the one corresponding to the destination ( in this case 1 because it would be On Map)?

Thanks in advance
The edit you need to make to the USR record is the value in field # 7. This field is equal to a unit's force pool x 2048 + wrap_flag (0 or 1). wrap_flag is only applicable if the unit is on the map (i.e., force pool #0). In your case, the value of this field for the Turkish units in the production pool (pool #8) will be 5 x 2048 = 10240.

You'll need to change this to corresponding to whichever force pool you edited record 2 to. For example, removed -> FP #15 -> 15 x 2048=30720. scrapped -> FP #14 -> 14 x 2048=28672.

The below screen CAP is (also) for the unit that's in the future force pool (FP #9) so, in this example, field #7 = 9 x 2048 = 18432.
User avatar
Joseignacio
Posts: 3051
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, looking at an existing on map unit, it seems it is the destination pool, and a 0 if it is on map.
User avatar
Joseignacio
Posts: 3051
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 »

It was easy to deploy the Königsberg MIL at Königsberg , but I am getting crazy to move some units to Kwajalein. Is there some else to consider when talking on the Pacific?
User avatar
rkr1958
Posts: 30363
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: Sat Nov 08, 2025 2:37 pm
Rkr: When you say you need to input the record in field #7, the number is that of the pool where the unit goes to or the one it reaches? I.e. if I send a unit to the map it would be 0 x 2048 =0?
Correct
Joseignacio wrote: Sat Nov 08, 2025 2:37 pm And the wrap the same, is it the wrap associated to the original pool or the one corresponding to the destination ( in this case 1 because it would be On Map)?

Thanks in advance
Not correct. The wrap flag should only be set by MWIF and deals with the encoded hex location in the next field (#8). I include that info in the document in case you're trying to locate a unit in the game file by location. For example, so you're trying to locate a unit in the game file at row=156, column=166 (i.e., located in Port August, AUS). The (unwrapped) EHL = 80038; however, since it's > 65536, the EHL in the game file would be 80038 - 65536 = 14502 & the wrapped flag in the previous field would be set (in addition to the pool that the unit is in). I know that sounds complicated; but let MWIF worry about all that complication.

Let me give a converse; and hopefully clear/specific example.

(1) Suppose you wish to "deploy" the 2nd AUS Inf corps in the future force pool to Port August, AUS.
999-AUS-2nd-inf.png
999-AUS-2nd-inf.png (163.12 KiB) Viewed 91 times
(2) First we need to find this unit in the game by searching for 2nd Aus Inf,0,0,1942

2nd Aus Inf,0,0,1942
0
0,1345,,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0
.P This counter represents the infantry divisions of the 2nd Australian Imperial Force (AIF).
26,0,0,2001,17407,65535,18432,0,0,0,0,0,0,0,0,0
-1,UndoData
0,1079

(3) Next, let's edit the unit to Port August & don't worry about encoded hex location exceeding wrap (i.e., > 65536)

2nd Aus Inf,0,0,1942
0
0,1345,,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.P This counter represents the infantry divisions of the 2nd Australian Imperial Force (AIF).
26,0,0,2001,17407,65535,0,80038,0,0,0,0,0,0,0,0
-1,UndoData
0,1079

(4) Look, we got the unit on the map and where we wanted it be.
999-AUS-Port-August.png
999-AUS-Port-August.png (650.46 KiB) Viewed 91 times
(5) When the save the game file, MWIF takes care of wrapping the encoded hex location.

2nd Aus Inf,0,0,1942
0
0,1345,,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.P This counter represents the infantry divisions of the 2nd Australian Imperial Force (AIF).
26,0,0,2001,1023,65535,1,14502,0,0,0,0,0,0,0,0
-1,UndoData
0,1079
Ronnie
User avatar
rkr1958
Posts: 30363
Joined: Thu May 21, 2009 10:23 am

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

Post by rkr1958 »

I just noticed something unrelated about the Map. Look 4 hexes north of Port August. I see the text for, "Lake Eyre"; but I don't see any lake? Am I missing something?
Ronnie
User avatar
Joseignacio
Posts: 3051
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

Pretty clear.

As for the Lake, maybe it gives the name to an area in the real life but it is too insignificant to appear in MWIF? The map was converted from Asian Hexes in the original to European hexes in MWIF, and the conversion was made by Steve and maybe others, on their own, so maybe they considered the lake too small to appear.
Post Reply

Return to “Mods and Scenarios”