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

Post new mods and scenarios here.

Moderator: Shannon V. OKeets

User avatar
rkr1958
Posts: 27891
Joined: Thu May 21, 2009 10:23 am

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

Post by rkr1958 »

(17) The 2nd field in the force pool flag record is counter #, which is in sequence from 0 (first counter in the game file) to # of counters minus 1 (e.g., 3806 - 1 = 3805, for our last edited file).

(18) Now, we do NOT have to worry about this count, or counter #, when making edits. Note that the CW oil we copied and moved from Ottawa to Montreal had a duplicate counter # (i.e., Ottawa & Montreal saved oil had the same counter #). And, for the French BP we added in, that number may or may not have been a duplicate but was certainty out of sequence.

(19) Again, this causes us NO worry, because once I save the game file and reload it with MWIF, MWIF renumbers all counters in sequence. That is, MWIF takes care of this and we're happy to let it.
add-oil-bp-6.png
add-oil-bp-6.png (130.61 KiB) Viewed 1277 times
Ronnie
User avatar
rkr1958
Posts: 27891
Joined: Thu May 21, 2009 10:23 am

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

Post by rkr1958 »

By the way my capture document (MW Word) is now up to 36 pages. I thing there are only 2 or more edit sections that I'll need to add and I'll be ready to upload it for review, editing & comments.
Ronnie
User avatar
rkr1958
Posts: 27891
Joined: Thu May 21, 2009 10:23 am

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

Post by rkr1958 »

rkr1958 wrote: Thu Mar 30, 2023 7:20 pm By the way my capture document (MW Word) is now up to 36 pages. I thing there are only 2 or more edit sections that I'll need to add and I'll be ready to upload it for review, editing & comments.
44 pages. Initial (very rough) version ready for review, editing & (re)organization.

Any takers?

The file is 41 MB, which is too big to upload to this forum so I uploaded it to dropbox. Didn't realize I had an account but the site remembered me. I don't know if that's a good thing or a bad thing? Anyway, the link below (hopefully it works) will (should) allow you to view and download the MS Word document.

https://www.dropbox.com/s/2hykgsplj36qm ... .docx?dl=0
Ronnie
User avatar
paulderynck
Posts: 8372
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 was able to download it.
Paul
User avatar
Joseignacio
Posts: 2833
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 dont know if I will be able to use it, but I downloaded it anyway. Thanks for your efforts.
User avatar
Joseignacio
Posts: 2833
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.
I have just gone through the 14 pages of the thread and I think this has not been asked/solved.

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 got this
Untitled.png
Untitled.png (199.33 KiB) Viewed 1191 times
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?

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.
Attachments
Untitled2.png
Untitled2.png (473.46 KiB) Viewed 1191 times
User avatar
rkr1958
Posts: 27891
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 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
force-pool-record.png (49.29 KiB) Viewed 1178 times
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
USR.png (65.85 KiB) Viewed 1178 times
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?
Ronnie
User avatar
Joseignacio
Posts: 2833
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. I need to digest all this tomorrow (about deleting those units).

Anyway, you were almost right, the game told me I had an overstacking and offered me to kill one of my stacks (8 and 2), I obviously opted for the 2, and will increase it later next turn.
User avatar
rkr1958
Posts: 27891
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: Wed Apr 26, 2023 9:32 pm Thanks a lot. I need to digest all this tomorrow (about deleting those units).

Anyway, you were almost right, the game told me I had an overstacking and offered me to kill one of my stacks (8 and 2), I obviously opted for the 2, and will increase it later next turn.
Good to know. Now if you you have, or can, save when it's asking this then you might be able to move the 2 BPs to another city and probably be ok. Again, make a backup before trying this if you can.
Ronnie
User avatar
Joseignacio
Posts: 2833
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
...

In your specific case, the 2 Turkish units will be in force pool #5 (production), which is field #9.
According to your document, it would be :

Force Pool #5. (Field #8). Production ;) I think you had a typo in your document, because following the order, it should in truth be Field #9, as you say here.
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
After reading it a couple of times, I believe this is over my capacities.

I don't know how to "tell the script" which are the Turkish units I want to alter, since they are not on the map and I have no coordinates.
Of course I know they are in the Production Circle, which is an specific "place", but don't know how to identify them to operate on them.
You mention they are in the Production field (field #9 ) Force pool #5, but wouldn't they really be in the "arriving from production or construction" field #20?

Anyway, if a higher level is needed, after all, it is not a big problem, since I can always let them stay, we are like 4 turns from the end of the game so it is not so bad.

And thanks a lot for your time.
User avatar
rkr1958
Posts: 27891
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: Wed May 03, 2023 10:39 am
rkr1958 wrote: Tue Apr 25, 2023 5:23 pm
...

In your specific case, the 2 Turkish units will be in force pool #5 (production), which is field #9.
According to your document, it would be :

Force Pool #5. (Field #8). Production ;) I think you had a typo in your document, because following the order, it should in truth be Field #9, as you say here.
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
After reading it a couple of times, I believe this is over my capacities.

I don't know how to "tell the script" which are the Turkish units I want to alter, since they are not on the map and I have no coordinates.
Of course I know they are in the Production Circle, which is an specific "place", but don't know how to identify them to operate on them.
You mention they are in the Production field (field #9 ) Force pool #5, but wouldn't they really be in the "arriving from production or construction" field #20?

Anyway, if a higher level is needed, after all, it is not a big problem, since I can always let them stay, we are like 4 turns from the end of the game so it is not so bad.

And thanks a lot for your time.
These are advance edits and made harder by my poor set instructions. For the past 3-years I've been saying to myself that I'm going to finish my python based editor. However; when I open the Spyder IDE and start working on the code, I realize that I can spend my time doing that or playing the game. Playing the game always wins out in my book.
Ronnie
User avatar
Joseignacio
Posts: 2833
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 »

Even if you are not, now that I just retired I have became a procastinator, so I understand your decision too well.
Doing something you can always wait to do, against playing? Hmmmm :lol:
User avatar
rkr1958
Posts: 27891
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 04, 2023 7:42 pm Even if you are not, now that I just retired I have became a procastinator, so I understand your decision too well.
Doing something you can always wait to do, against playing? Hmmmm :lol:
I retired 3-years ago and at the time said to myself hey I can play and develop the editor too. Playing is just so much more fun!
Ronnie
User avatar
Courtenay
Posts: 4390
Joined: Wed Nov 12, 2008 4:34 pm

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

Post by Courtenay »

Does anyone know what edits should be made to get in a hex to a carrier at sea? What if that plane will be the second plane on a carrier?
(There is a CVP sitting on a Truk that should be on a CV in Coral Sea, and I am not going back two impulses to fix the mistake.)

I've taken a look at the save file, and, except for the number to indicate which hex the CV and CVP are in, I am making very little sense of what I am seeing.

Thanks.
I thought I knew how to play this game....
User avatar
rkr1958
Posts: 27891
Joined: Thu May 21, 2009 10:23 am

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

Post by rkr1958 »

Courtenay wrote: Sun Nov 12, 2023 8:01 am Does anyone know what edits should be made to get in a hex to a carrier at sea? What if that plane will be the second plane on a carrier?
(There is a CVP sitting on a Truk that should be on a CV in Coral Sea, and I am not going back two impulses to fix the mistake.)

I've taken a look at the save file, and, except for the number to indicate which hex the CV and CVP are in, I am making very little sense of what I am seeing.

Thanks.
I know exactly what you're talking about and have looked at this type of edit in some detail. This is a difficult DIRECT edit to make, one I hadn't figured out how to do yet. However; I do have what I consider an elegant and fairly simple INDIRECT edit (or work around) for this situation.

(1) Go back, two impulses in your case, and make a "working" copy of that game file at whatever phase in which you can put the CVP on the carrier.

(2) Save the "working" file and end that phase.

(3) Make a copy of the ENTIRE game file record set for the CV and it's cargo (2 CVP's in your case).

(4) Carefully copy these game file record sets (3 in your case) over the respective CV, CPVs in the game file you wish to have make the edits.

(5) As always make a backup copy of the game file you wish to edit.
Ronnie
User avatar
Courtenay
Posts: 4390
Joined: Wed Nov 12, 2008 4:34 pm

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

Post by Courtenay »

Thank you.
I thought I knew how to play this game....
User avatar
Courtenay
Posts: 4390
Joined: Wed Nov 12, 2008 4:34 pm

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

Post by Courtenay »

I tried changing action limits available using the method described on page 11 of this thread. I found the German section (country code 79,79) and a line
3,0,3,255,255 followed by the line
4,0,3,255,255.

This looked like the right place. I changed the 3 to a 4, and restarted the game. German still was at 3 of 4 air actions. What did I do wrong?
I thought I knew how to play this game....
User avatar
rkr1958
Posts: 27891
Joined: Thu May 21, 2009 10:23 am

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

Post by rkr1958 »

Courtenay wrote: Sun Nov 26, 2023 12:18 am I tried changing action limits available using the method described on page 11 of this thread. I found the German section (country code 79,79) and a line
3,0,3,255,255 followed by the line
4,0,3,255,255.

This looked like the right place. I changed the 3 to a 4, and restarted the game. German still was at 3 of 4 air actions. What did I do wrong?
P.S. Just noticed that you changed the bottom number. The Activities remaining is the top line (number).
999-Editing-Action-Limits-2.png
999-Editing-Action-Limits-2.png (920.08 KiB) Viewed 377 times
999-Editing-Action-Limits-3.png
999-Editing-Action-Limits-3.png (184.42 KiB) Viewed 377 times
Is Vichy installed? If so, did Germany install Vichy? If yes to both then you have to edit both German (cid=79) and Vichy (cid=207) actions since they both share the same actions. Check out the last paragraph (in red) of the page below.
999-Editing-Action-Limits.png
999-Editing-Action-Limits.png (84.1 KiB) Viewed 381 times
Ronnie
User avatar
Courtenay
Posts: 4390
Joined: Wed Nov 12, 2008 4:34 pm

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

Post by Courtenay »

Ah! I missed the fact that I had to change Vichy, too. Thank you. (All I was using the action for was a rebase, so I just changed the location manually.) But now I know. And this should teach me to read. (Repeating a lesson I have had approximately 3,873 times. If only being taught something meant I actually learned it. :) )
I thought I knew how to play this game....
User avatar
rkr1958
Posts: 27891
Joined: Thu May 21, 2009 10:23 am

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

Post by rkr1958 »

Courtenay wrote: Sun Nov 26, 2023 9:33 pm Ah! I missed the fact that I had to change Vichy, too. Thank you. (All I was using the action for was a rebase, so I just changed the location manually.) But now I know. And this should teach me to read. (Repeating a lesson I have had approximately 3,873 times. If only being taught something meant I actually learned it. :) )
I have the same problem learning. Actually, it takes me doing something several times, often making mistakes, before I learn to do it correctly and/or efficiently.
Ronnie
Post Reply

Return to “Mods and Scenarios”