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: 2913
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 »

Captura de pantalla 2024-05-23 122129.png
Captura de pantalla 2024-05-23 122129.png (256.93 KiB) Viewed 727 times
rkr1958 wrote: Thu Mar 30, 2023 6:38 pm (6) Unfortunately, there was only 1 removed CW oil point. So for the 1 saved oil I want added to Montreal I made an exact copy of the Ottawa oil point I just created and pasted that directly below it.

(7) Now, this is important. When you add (or remove) a counter from the game the count must be adjusted appropriately or MWIF was hang on load up of the game. And if that happens you'll have to use Windows task manage to kill MWIF.

(8) The counter count is just before the first game counter. In this example I increased it from 3804 to 3805 to account for the copied CW oil point I added.

(9) Now back to the copies oil point. The only other edit needed is to move it from Ottawa to Montreal (i.e., 30009 to 30011), since it's on the map and of strength.

(10) By the way, for edits like this I tend I verify them after each counter is added. That way if I screw up I don't have to start over.
add-oil-bp-3.png
Using this as an example (and being extra careful), I have been able to delete all the CONVs and OILs that the new bug at the CW DoW on GE brought in one of my games. I hope it will not f*ck anything...
Captura de pantalla 2024-05-23 122323.png
Captura de pantalla 2024-05-23 122323.png (448.88 KiB) Viewed 727 times


https://www.matrixgames.com/forums/view ... 2&t=404053
User avatar
rkr1958
Posts: 29241
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 May 23, 2024 10:18 am Using this as an example (and being extra careful), I have been able to delete all the CONVs and OILs that the new bug at the CW DoW on GE brought in one of my games. I hope it will not f*ck anything...
You're quickly becoming an "Edit Master". Congrats!
Ronnie
User avatar
Joseignacio
Posts: 2913
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 »

LOL, thanks.
User avatar
rkr1958
Posts: 29241
Joined: Thu May 21, 2009 10:23 am

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

Post by rkr1958 »

Adding to the Destroyed Pool (1/2).

(1) Why on earth would one want to do this?
(2) That is, add a unit to MWIF destroyed pool?
(3) For me it's simple.
(4) I overlooked (forgot) to declare and resolve a vital land combat and it's the reorg or air rebase phase until I noticed.
(5) I could go back to an autosave, include that land combat but then have to recreate exactly all the shore bombardment, HQ support, ground support (including air-to-air) and land combat rolls, advance after combat, losses and flips for all other land combats.
(6) Maybe even reorgs and air rebases too depending on when I realized I overlooked a key land combat.
(7) Now if there isn't a lot to recreate then I'll go back to the autosave and redo everything for there within MWIF.
(8) However; in the case where this is a lot to have to recreate then I go another route.
(9) I'll go back to land combat declaration autosave, save that to a temp file and just prosecute the land combat I forgot about.
(10) I then make sure I save the temp game file AFTER FULLY resolving the forgotten land combat.
(11) Then, I copy from that temp game file the full record set(s) of the unit(s) affected by that forgotten land combat and copy those record set(s) over the corresponding record set(s) in my "official" game file.
(12) BAM! The forgotten land combat is forgotten no more!
(13) Well, with one exception that is ...
(14) Any unit(s) destroyed don't show up in the destroyed pool (though they're still actually considered destroyed by MWIF).

Example.
(15) I forgot to carry out a planned automatic blitz with breakthrough vs an isolated & flipped Germany artillery div.
(16) It wasn't until I was half way through my air rebases that I noticed and didn't really want to go back and have to recreate the 4 or 5 other land combats and their support.
(17) So I use the method that I described above to the resolve and include this forgotten land combat.

Game File and Units in Game After "Forgotten" Land Combat Edited In.
game-file-unit.png
game-file-unit.png (111.87 KiB) Viewed 629 times
Edited-Destroyed.png
Edited-Destroyed.png (133.75 KiB) Viewed 629 times
(18) Everything was resolved, except that the artillery division wasn't included in the destroyed pool.
(19) Cosmetic, I know, but hey if it can be edited in then why not?

MWIF Destroyed Pool Form After "Forgotten" Land Combat Edited In.
game-file-destroyed-pool-0.png
game-file-destroyed-pool-0.png (81.15 KiB) Viewed 629 times
Last edited by rkr1958 on Wed Jul 03, 2024 4:25 pm, edited 1 time in total.
Ronnie
User avatar
rkr1958
Posts: 29241
Joined: Thu May 21, 2009 10:23 am

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

Post by rkr1958 »

Adding to the Destroyed Pool (2/2).

(18) You'll need the game file id (not unit id) of the unit to be edited into the destroyed pool.
(19) This is the 2nd value on either 2nd or 3rd line of the game file record set for that unit.
(20) The first line follows the format: Unit Name (sometimes blank),Country ID, Unit Type, Unit Year.
(21) For the German artillery div: name = 150 mm, Country Id = 79 (for Germany), Unit Type = 25 (for Artillery) and year = 1939 -> 150 mm,79,25,1939
(22) In this case the line following (i.e., 2nd line) = -1, so game file id is the 2nd value on the line below "-1" or the 3rd line of that unit's game file record set.
(23) In other cases the "-1" isn't there so the game file id would be on the 2nd line of the unit's record set.
(24) In this example the unit's game file id is 1927
(25) Note that game file id is a dynamic value, can and will often change through out the game for a given unit.

Unit Record Set & Current Game File Id
game-file-unit.png
game-file-unit.png (111.87 KiB) Viewed 620 times
(26) To find the destroyed pool in the game file search for ",Stack"
(27) You'll find a half dozen or so, the one you want is way down near the end of the game file and just before the line sets with ",SavedBPs" "BuiltConvoys","BuiltPilots", etc.

Destroyed Pool in Game File.
game-file-destroyed-pool-0.png
game-file-destroyed-pool-0.png (81.15 KiB) Viewed 620 times
(28) You'll need to change two numbers, the number of units in the destroyed pool (2 lines above the ",Stack" line) and the ",Stack" line.
(29) In this example, I changed the number of destroyed from 10 to 11 and then added the game file id (1927) of the German artillery division to the ",Stack" line.
game-file-destroyed-pool-1.png
game-file-destroyed-pool-1.png (81.31 KiB) Viewed 620 times
MWIF Destroyed Pool Form (Post Editing).
(30) Destroyed Pool now includes the German artillery division destroyed via the forgotten land combat fix.
Destroyed-Pool-1.png
Destroyed-Pool-1.png (148.68 KiB) Viewed 620 times
Ronnie
User avatar
Joseignacio
Posts: 2913
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 »

Hi guys, here goes my question of today:

In our game I sent an IT unit to Paris as well so that I could set Vichy controlled by Italy. Unfortunately, when I was asked if I wanted to declare Vichy, I said YES and then I waited for the game to ask me whether I wanted to form it as controlled by GE or by IT.

Alas, it seems you need to see the grey colour of the Screen and guess you need to say NO (because it is asked to GE) and wait for it to become green and then say YES. I still dont know if it works like this because I said simply YES to VIchy and nothing more (that I knew of). Or maybe the game asked me if I wanted to declare Vichy with GE and I didnt realise it.

(OTOH, if this happens to a veteran player, imagine how a newbie will feel unless he has memorized and worked out t he implications of the rules, but that is another story: making the game friendlier to a wider public, I guess Steven will have to work that too, too many situations don't tell you what happens next if you do or dont do something.)

We dont want to make again all the rolls for the Administrative Groups or the sorting of the counters, so:

Is there a way to edit Vichy allegiance, and be controlled by IT not by GE? I find it much more interesting to be controlled by someone not making Land impulses most of the time.
User avatar
rkr1958
Posts: 29241
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: Fri Aug 23, 2024 11:28 pm Hi guys, here goes my question of today:

In our game I sent an IT unit to Paris as well so that I could set Vichy controlled by Italy. Unfortunately, when I was asked if I wanted to declare Vichy, I said YES and then I waited for the game to ask me whether I wanted to form it as controlled by GE or by IT.

Alas, it seems you need to see the grey colour of the Screen and guess you need to say NO (because it is asked to GE) and wait for it to become green and then say YES. I still dont know if it works like this because I said simply YES to VIchy and nothing more (that I knew of). Or maybe the game asked me if I wanted to declare Vichy with GE and I didnt realise it.

(OTOH, if this happens to a veteran player, imagine how a newbie will feel unless he has memorized and worked out t he implications of the rules, but that is another story: making the game friendlier to a wider public, I guess Steven will have to work that too, too many situations don't tell you what happens next if you do or dont do something.)

We dont want to make again all the rolls for the Administrative Groups or the sorting of the counters, so:

Is there a way to edit Vichy allegiance, and be controlled by IT not by GE? I find it much more interesting to be controlled by someone not making Land impulses most of the time.
That's well beyond anything I've looked at so far. Maybe someone else has?
Ronnie
User avatar
Joseignacio
Posts: 2913
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 thought it would be easier. O well, ... thanks all anyway
User avatar
Joseignacio
Posts: 2913
Joined: Fri May 08, 2009 11:25 am
Location: Madrid, Spain

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

Post by Joseignacio »

rkr1958 wrote: Tue Aug 11, 2020 1:03 pm Two more questions for markb50k or anyone else who wishes to answer. 1 easy and 1 hard, I assume. I'll ask the easy one first.

(1) Where can I find which countries are axis and which are allied. I guess, specifically I'm asking how can I determine which side (if any) the minors are aligned?

(2) This second question includes a screen cap. Take, for example, the Japanese transport 4443 carrying the 20th inf army in the 2-box of the China Sea. In the 4th field (highlighted in blue) in what I'm calling the USR (unit status record) is the uid (unit id) except when carrying or loaded as cargo. This also applies to CVs and loaded CVPs. Do you know how uid is modified in these cases? Do you know of any other fields in this or other records that indicate carry or loaded as cargo?

IJN TRS 4443 Record Set
,49,48,1930
255,2860,,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
[descriptive text]
6292,6320,0,20828,193,42471,652,41626,0,0,0,0,224,0,32768,3245 <==> USR
-1,UndoData
26240,336,16384,768,0,0,0

IJA 20th Inf Record Set
20th Inf,49,0,1938
0
255,1504,,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
[descriptive text]
6296,6272,0,34928,1023,60203,652,41626,0,0,9,0,224,0,54163,57344 <==> USR
-1,UndoData
0,1077

Image
Nobody has figured out for good how to modify these (in order to unload a unit or rebase a FTR or CVP)?
User avatar
rkr1958
Posts: 29241
Joined: Thu May 21, 2009 10:23 am

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

Post by rkr1958 »

I've spent several hours over the last 3 or 4 years trying to figure out how cargo and their carriers work. I've gained some insight but still far from figuring it out

My workaround is to make a temp copy of the game file at some phase prior then either load or unload the cargo depending on the edit I wish. I then end that phase and save the temp file.

Next, I copy the full record sets of the cargo(s) and carrier from the temp file and copy those over their corresponding records in the game file in which I want the edits.
Ronnie
User avatar
Joseignacio
Posts: 2913
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.

We are too far advanced from that to repeat that, but we'll try to do that the next time.
User avatar
Joseignacio
Posts: 2913
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: Wed Jul 03, 2024 3:48 pm Adding to the Destroyed Pool (1/2).

(1) Why on earth would one want to do this?
(2) That is, add a unit to MWIF destroyed pool?
(3) For me it's simple.
(4) I overlooked (forgot) to declare and resolve a vital land combat and it's the reorg or air rebase phase until I noticed.
(5) I could go back to an autosave, include that land combat but then have to recreate exactly all the shore bombardment, HQ support, ground support (including air-to-air) and land combat rolls, advance after combat, losses and flips for all other land combats.
(6) Maybe even reorgs and air rebases too depending on when I realized I overlooked a key land combat.
(7) Now if there isn't a lot to recreate then I'll go back to the autosave and redo everything for there within MWIF.
(8) However; in the case where this is a lot to have to recreate then I go another route.
(9) I'll go back to land combat declaration autosave, save that to a temp file and just prosecute the land combat I forgot about.
(10) I then make sure I save the temp game file AFTER FULLY resolving the forgotten land combat.
(11) Then, I copy from that temp game file the full record set(s) of the unit(s) affected by that forgotten land combat and copy those record set(s) over the corresponding record set(s) in my "official" game file.
(12) BAM! The forgotten land combat is forgotten no more!
(13) Well, with one exception that is ...
(14) Any unit(s) destroyed don't show up in the destroyed pool (though they're still actually considered destroyed by MWIF).

Example.
(15) I forgot to carry out a planned automatic blitz with breakthrough vs an isolated & flipped Germany artillery div.
(16) It wasn't until I was half way through my air rebases that I noticed and didn't really want to go back and have to recreate the 4 or 5 other land combats and their support.
(17) So I use the method that I described above to the resolve and include this forgotten land combat.

Game File and Units in Game After "Forgotten" Land Combat Edited In.
game-file-unit.png
Edited-Destroyed.png

(18) Everything was resolved, except that the artillery division wasn't included in the destroyed pool.
(19) Cosmetic, I know, but hey if it can be edited in then why not?

MWIF Destroyed Pool Form After "Forgotten" Land Combat Edited In.
game-file-destroyed-pool-0.png
In our recent game, the battle was made, but the game suddenly blurred forward and passed on to Advance After Combat without letting me select my loss. I got no loss although I should have had one.

There were more combats that we dont want to repeat, as well as more phases, so we would like to send the unit to Destroyed.

I guess I should do (9), (10), and (11)? Guess that if it is too complex, since I am going to build that MIL again would be better to relocate it and deduct 2 BPs in the production phase?
User avatar
paulderynck
Posts: 8426
Joined: Sat Mar 24, 2007 5:27 pm
Location: Canada

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

Post by paulderynck »

I saw in a prior saved game it appears you are using the Debug version. If so, you can use Debug/Move-Place units to take the unit off the map and place it in the country's force pool. I have found no problems in my games by doing that.

Of course if it's a Netplay game, both players need to start the next session with the modified game save.
Paul
User avatar
rkr1958
Posts: 29241
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: Fri Nov 08, 2024 11:37 am
rkr1958 wrote: Wed Jul 03, 2024 3:48 pm Adding to the Destroyed Pool (1/2).

(1) Why on earth would one want to do this?
(2) That is, add a unit to MWIF destroyed pool?
(3) For me it's simple.
(4) I overlooked (forgot) to declare and resolve a vital land combat and it's the reorg or air rebase phase until I noticed.
(5) I could go back to an autosave, include that land combat but then have to recreate exactly all the shore bombardment, HQ support, ground support (including air-to-air) and land combat rolls, advance after combat, losses and flips for all other land combats.
(6) Maybe even reorgs and air rebases too depending on when I realized I overlooked a key land combat.
(7) Now if there isn't a lot to recreate then I'll go back to the autosave and redo everything for there within MWIF.
(8) However; in the case where this is a lot to have to recreate then I go another route.
(9) I'll go back to land combat declaration autosave, save that to a temp file and just prosecute the land combat I forgot about.
(10) I then make sure I save the temp game file AFTER FULLY resolving the forgotten land combat.
(11) Then, I copy from that temp game file the full record set(s) of the unit(s) affected by that forgotten land combat and copy those record set(s) over the corresponding record set(s) in my "official" game file.
(12) BAM! The forgotten land combat is forgotten no more!
(13) Well, with one exception that is ...
(14) Any unit(s) destroyed don't show up in the destroyed pool (though they're still actually considered destroyed by MWIF).

Example.
(15) I forgot to carry out a planned automatic blitz with breakthrough vs an isolated & flipped Germany artillery div.
(16) It wasn't until I was half way through my air rebases that I noticed and didn't really want to go back and have to recreate the 4 or 5 other land combats and their support.
(17) So I use the method that I described above to the resolve and include this forgotten land combat.

Game File and Units in Game After "Forgotten" Land Combat Edited In.
game-file-unit.png
Edited-Destroyed.png

(18) Everything was resolved, except that the artillery division wasn't included in the destroyed pool.
(19) Cosmetic, I know, but hey if it can be edited in then why not?

MWIF Destroyed Pool Form After "Forgotten" Land Combat Edited In.
game-file-destroyed-pool-0.png
In our recent game, the battle was made, but the game suddenly blurred forward and passed on to Advance After Combat without letting me select my loss. I got no loss although I should have had one.

There were more combats that we dont want to repeat, as well as more phases, so we would like to send the unit to Destroyed.

I guess I should do (9), (10), and (11)? Guess that if it is too complex, since I am going to build that MIL again would be better to relocate it and deduct 2 BPs in the production phase?
Honestly, my approach is to take the easiest route. Since you're going to rebuild the MIL anyway. I'd just edit the file to move the MIL to it's city and then during production don't spend, don't save 2 BPs.
Ronnie
User avatar
Joseignacio
Posts: 2913
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 »

paulderynck wrote: Fri Nov 08, 2024 6:00 pm I saw in a prior saved game it appears you are using the Debug version. If so, you can use Debug/Move-Place units to take the unit off the map and place it in the country's force pool. I have found no problems in my games by doing that.

Of course if it's a Netplay game, both players need to start the next session with the modified game save.
I honestly don't know why in some earlier patches the game showed I was supposedly using the Debug version. I never installed any version other than the offered in the original CD or the MY PAGE section, plus the official patches.
I always thought the patches modified to a Debug version (whatever it was supposed to be) and at the time, or/and that every person version was like that, and I was not very happy to have something that brought the idea of a possible BETA to my head.

It still says that (7.00.01 Debug) and I still don't know why or how to Debug/Move-Place units. Can you explain how to do it, please? If I could do that, that would be very helpful.

In case there is supposed to be an option in the console, I seem to have only the usual ones AFAIK
Attachments
Captura de pantalla 2024-11-09 133828.png
Captura de pantalla 2024-11-09 133828.png (816.13 KiB) Viewed 188 times
Last edited by Joseignacio on Sat Nov 09, 2024 12:39 pm, edited 1 time in total.
User avatar
Joseignacio
Posts: 2913
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: Fri Nov 08, 2024 8:11 pm Honestly, my approach is to take the easiest route. Since you're going to rebuild the MIL anyway. I'd just edit the file to move the MIL to it's city and then during production don't spend, don't save 2 BPs.
Brilliant! I was thinking of editing the file to somehow deduct those 2 BP but you answer is even cleaner.
User avatar
rkr1958
Posts: 29241
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 09, 2024 12:34 pm
I honestly don't know why in some earlier patches the game showed I was supposedly using the Debug version. I never installed any version other than the offered in the original CD or the MY PAGE section, plus the official patches.
I always thought the patches modified to a Debug version (whatever it was supposed to be) and at the time, or/and that every person version was like that, and I was not very happy to have something that brought the idea of a possible BETA to my head.

It still says that (7.00.01 Debug) and I still don't know why or how to Debug/Move-Place units. Can you explain how to do it, please? If I could do that, that would be very helpful.

In case there is supposed to be an option in the console, I seem to have only the usual ones AFAIK
This was a public beta release "mistake" by Steve. At the time I wasn't a beta tester and enjoyed the heck out of this functionality while it lasted (i.e., became obsolete by a later version).

Steve has at least two compiling options, one for the general public (hence public beta) and one for his beta testers. The latter gives you that debug functionality, which the beta tester versions have.
Ronnie
User avatar
paulderynck
Posts: 8426
Joined: Sat Mar 24, 2007 5:27 pm
Location: Canada

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

Post by paulderynck »

Joseignacio wrote: Sat Nov 09, 2024 12:34 pm
I honestly don't know why in some earlier patches the game showed I was supposedly using the Debug version. I never installed any version other than the offered in the original CD or the MY PAGE section, plus the official patches.
I always thought the patches modified to a Debug version (whatever it was supposed to be) and at the time, or/and that every person version was like that, and I was not very happy to have something that brought the idea of a possible BETA to my head.

It still says that (7.00.01 Debug) and I still don't know why or how to Debug/Move-Place units. Can you explain how to do it, please? If I could do that, that would be very helpful.

In case there is supposed to be an option in the console, I seem to have only the usual ones AFAIK
My mistake, the designer has named this version with the word Debug included, but it is not an actual Debug version which normally includes the function I spoke about. As a beta tester I do have a version that has the Move/Place Unit ability and I can help others with this type of thing if requested. (It also has the ability to change hex control although that use is quite dangerous for hexes containing units, resources, or rail lines.)

For this situation my suggestion is simple enough, but involves sending the file back and forth. The edit suggested above is easier.
Paul
Angeldust2
Posts: 404
Joined: Tue Apr 28, 2020 4:24 am

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

Post by Angeldust2 »

Not really important, but just for the record: If I remember correctly, Steve once mentioned, a new compiler version used by him, was automatically renaming new versions of the code as "debug". He spent some time and effort with customer service of the company maintaining the compiler, but gave up later when there was no easy fix and still no real problem with code. So it just looks strange, but does not matter in any way.
User avatar
jesperpehrson
Posts: 839
Joined: Sat Jul 29, 2006 4:48 pm

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

Post by jesperpehrson »

Heya!
In our netplay game the chinese got a partisan that sneakily could be placed in Canton where there were two japanese transports.
For some reason the game rolled for each trs twice. The first set of rolls sunk one and aborted the other, the second set of rolls sunk the other and aborted the first one. So both TRS were destroyed.
I don´t think there should have been two rolls per TRS so I think one TRS should be safely back in a japanese harbour.

Is it possible to fix?
PBEMgames played
- Korea 50-51 MV as communist
- Agonia y Victoria xx as Republican
- Plan Blau OV as Soviet
- The great war xx as Central Powers
- DNO XX as Soviet
Post Reply

Return to “Mods and Scenarios”