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: 29698
Joined: Thu May 21, 2009 10:23 am

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

Post by rkr1958 »

ORIGINAL: jjdenver

Ronnie can you add notes here on how to increase saved oil on map? Say there is 1 oil in Montreal - how to make it 4?

Thanks
Johnny, editing oil points work exactly as editing build points. So just follow these instructions to increase oil points.
ORIGINAL: rkr1958

1. The encoded hex location of the BP, or any RP for that matter, is in the 8th column of the RP status record, or RPSR(8).

2. The value of the BP, or any RP, marker is encoded in the 12th column of that same record (i.e., RPSR(12)). The formula for the encodeing is, RPSP(12) = # BPs (or RPs) x 256.

3. The number of saved BPs by the French at Nantes (i.e., hex [56, 25], encoded hex 28697) is increased by 4 BPs by changing the value of RPSR(12) from 256 to 1024. That is, RPSR(12) = 4 BP's x 256 = 1024.

Image
Ronnie
User avatar
paulderynck
Posts: 8470
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 »

What if there are both oil points and BPs in the hex? How do you know which is being changed?
Paul
User avatar
rkr1958
Posts: 29698
Joined: Thu May 21, 2009 10:23 am

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

Post by rkr1958 »

ORIGINAL: paulderynck

What if there are both oil points and BPs in the hex? How do you know which is being changed?
The very first line inside of the purple box for the BP example above is ,80,70,1936 This tells you not only what type of unit it is but whose unit it is. The second number is the unit type code (see pp's 205 & 206 of the player's manual vol 2). A unit type code of 70 is a build point. Oil points have a unit type code of 69.

The first number is the country id number (see pages 199-202 of vol 2 of the player's manual). In this example the country id is 80, which is France.

The third number by the way is the year. Not sure why it's 1936, but all resource units (e.g., build points, oil points) are year 1936.
Ronnie
User avatar
paulderynck
Posts: 8470
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 »

Thanks.
Paul
hazmaxed
Posts: 105
Joined: Thu Nov 21, 2013 10:08 am
Location: Baton Rouge, LA

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

Post by hazmaxed »

ORIGINAL: rkr1958
The third number by the way is the year. Not sure why it's 1936, but all resource units (e.g., build points, oil points) are year 1936.

If I remember correctly, you could play WiF and DoD as a combined campaign that started in 1936. The coded year for BPs and saved oil points might be set for 1936 for someone who mods the game for an earlier start.
There is no overkill. There is only "open fire" and "reloading."
jjdenver
Posts: 2475
Joined: Thu Nov 01, 2007 11:07 pm

Unable to find AUS Beaufort

Post by jjdenver »

I'm unable to find the AUS Beaufort near Brisbane on an island that is disorganized and OOS. It was mistakenly RTB'ed there and I'd like to reorg it and move it. Hex is
148,182 which is 75958. But when I search the file for 75958 I don't find it. Any ideas?

EDIT: I found the post near mid of previous page of this thread that discussed hex encoded locations greater than 65536 and followed the method there (subtract 65536) to find the unit in the file. So question answered. :)
AARS:
CEAW-BJR Mod 2009:
tm.asp?m=2101447
AT-WW1:
tm.asp?m=1705427
AT-GPW:
tm.asp?m=1649732
jjdenver
Posts: 2475
Joined: Thu Nov 01, 2007 11:07 pm

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

Post by jjdenver »

Also here is a great example of the kind of silly stuff MWIF "intelligent" routing does. This really should be able to be manually controlled (completely) by the player to take the "intelligent-stupid" routing AI out of the equation.

Here US is lending 3 BP to France which has a capitol in Senegal. There are enough res to ship the 3 BP but MWIF has decided France will only get 2. Upon investigation I noticed that MWIF is sending Venezuelan res going to Newcastle improperly.

Proper routing is (Carib->USEC->NAtl) then there is a chain of unused to send the BP to France. However game for some reason routes it (Carib->CAtl->NAtl) thus not leaving room for the BP to US. See yellow highlight on left of screenshot.

Image
Attachments
Capture.jpg
Capture.jpg (221.36 KiB) Viewed 648 times
AARS:
CEAW-BJR Mod 2009:
tm.asp?m=2101447
AT-WW1:
tm.asp?m=1705427
AT-GPW:
tm.asp?m=1649732
User avatar
Mayhemizer_slith
Posts: 9359
Joined: Wed Sep 07, 2011 2:44 am
Location: Finland

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

Post by Mayhemizer_slith »

rkr1958, here comes a question I did not find with quick reading:

We forgot to send German oil To Vichy. Now we have one oil in Vienna, it should go to Lyons (or any other city).

This line in oil in Vienna:
10135,10181,0,0,1023,65535,0,29226,0,0,0,256,0,0,0,0

If I change hex, we have German oil in Lyons. How do I change it to Vichy oil?

This line is Vichy BP in Vichy:
26519,26566,0,0,1023,65535,0,29726,0,0,0,256,0,0,0,0

I tested to change second column (10181) into 26566 but that changed it into Vichy BP.
Changing first column does not seem to be doing anything.

EDIT
This line is USSR saved oil in Moscow:
6551,6597,0,0,1023,65535,0,22077,0,0,0,256,0,0,0,0

So maybe I need to change both columns 1 and 2, but to what?

EDIT2
I don't have any save files with Vichy and saved oil [&:]
If your attack is going really well, it's an ambush.

-Murphy's war law
User avatar
rkr1958
Posts: 29698
Joined: Thu May 21, 2009 10:23 am

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

Post by rkr1958 »

ORIGINAL: Mayhemizer

rkr1958, here comes a question I did not find with quick reading:

We forgot to send German oil To Vichy. Now we have one oil in Vienna, it should go to Lyons (or any other city).

This line in oil in Vienna:
10135,10181,0,0,1023,65535,0,29226,0,0,0,256,0,0,0,0

If I change hex, we have German oil in Lyons. How do I change it to Vichy oil?

This line is Vichy BP in Vichy:
26519,26566,0,0,1023,65535,0,29726,0,0,0,256,0,0,0,0

I tested to change second column (10181) into 26566 but that changed it into Vichy BP.
Changing first column does not seem to be doing anything.

EDIT
This line is USSR saved oil in Moscow:
6551,6597,0,0,1023,65535,0,22077,0,0,0,256,0,0,0,0

So maybe I need to change both columns 1 and 2, but to what?

EDIT2
I don't have any save files with Vichy and saved oil [&:]
OK, I think I've figured it out. To change ownership you need to change three numbers. In the example below I change the CW oil in Manchester to a French oil. The records for the oil point start at the line ,201,69,1936 201=CW, 69=oil point and 1936=year of the unit. In my example the first thing I changed was the 201 to 80 which is the country code for France. Next I had to change the first two values on the next to the last record for the oil point (i.e., the record that contains the coordinates of the oil point). This is the change that actually converts the oil point from CW to French. To do that I changed 25751,25797, to 10263,10309,

Now if Vichy were active to change that oil point to Vichy I'd first change the ,201 on the first record to ,207 (Now this change in itself will not convert the oil point). To do that I would then change the 25751,25797, on the next to last record to 26519,26565, which will (should) convert the saved oil point to Vichy.

DISCLAIMER: This is the first time I've tried to edit the game file to change ownership of a resource so I'd caution to use at your own risk.

Image
Attachments
00Change..Example.jpg
00Change..Example.jpg (882.02 KiB) Viewed 650 times
Ronnie
User avatar
Mayhemizer_slith
Posts: 9359
Joined: Wed Sep 07, 2011 2:44 am
Location: Finland

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

Post by Mayhemizer_slith »

Thank you [&o]
If your attack is going really well, it's an ambush.

-Murphy's war law
User avatar
Mayhemizer_slith
Posts: 9359
Joined: Wed Sep 07, 2011 2:44 am
Location: Finland

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

Post by Mayhemizer_slith »

One problem, oil ends up being Free France oil.

80 = Free France and 207 = Vichy France.

I'm not sure sure how to change other two numbers to make it right.

Can you please check it out from our save file? Or if any beta tester finds this first, feel free to fix it if possible [:)]

EDIT: This feels like risky thing to do, so I think safer way to fix this in send oil next turn end and manually reorg 2 ships that are dis org now.
Attachments
4players10..41MAi2.zip
(1.57 MiB) Downloaded 9 times
If your attack is going really well, it's an ambush.

-Murphy's war law
User avatar
rkr1958
Posts: 29698
Joined: Thu May 21, 2009 10:23 am

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

Post by rkr1958 »

I was able to move the German oil in Vienna to Vichy and change ownership from Germany to Vichy by changing the values highlighted in red to those highlighted in green.

Image
Attachments
00Change..toVichy.jpg
00Change..toVichy.jpg (494.61 KiB) Viewed 647 times
Ronnie
User avatar
rkr1958
Posts: 29698
Joined: Thu May 21, 2009 10:23 am

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

Post by rkr1958 »

I know it's OBE now but attached is your game file with those edits.
Attachments
4players10..i2Mod.zip
(1.46 MiB) Downloaded 13 times
Ronnie
User avatar
Mayhemizer_slith
Posts: 9359
Joined: Wed Sep 07, 2011 2:44 am
Location: Finland

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

Post by Mayhemizer_slith »

Great work, once again!
If your attack is going really well, it's an ambush.

-Murphy's war law
User avatar
Mayhemizer_slith
Posts: 9359
Joined: Wed Sep 07, 2011 2:44 am
Location: Finland

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

Post by Mayhemizer_slith »

We faced again same BP problem: China had saved one BP to nationalist city and another one communist city. Game gave that communist BP to USSR and nobody was able to use it.

Easy to fix with Ronnie's instructions by changing first, second and eight number.

6807,6854,0,0,1023,65535,0,35434,0,0,0,256,0,0,0,0 Nationalist Chinese BP in nationalist city.
(6807,6853,0,0,1023,65535,0,35434,0,0,0,256,224,0,0,0 Nationalist Chinese saved oil in nationalist city.)

6551,6598,0,0,1023,65535,0,38019,0,0,0,256,0,0,0,0 Communist Chinese (USSR) BP in communist city.
6807,6854,0,0,1023,65535,0,45698,0,0,0,256,0,0,0,0 Communist Chinese (USSR) BP in communist city moved to Nationalist Chinese.

Thanks again [:)]
If your attack is going really well, it's an ambush.

-Murphy's war law
User avatar
Majorball68
Posts: 506
Joined: Thu Nov 21, 2013 11:47 pm

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

Post by Majorball68 »

Appear to have lost a USSR factory railed from Kiev. Is it possible to edit a green factory or edit a single green factory to have 2 in the hex to compensate?

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

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

Post by rkr1958 »

ORIGINAL: Majorball68

Appear to have lost a USSR factory railed from Kiev. Is it possible to edit a green factory or edit a single green factory to have 2 in the hex to compensate?

Don't know about that one ... but you never know until you try. The way I'd go about it would be to go back to a previous saved game and move two factories into the same hex that you currently have a green factory in. Then, I'd examine the difference between a hex with one green factory and the hex with two green factories. If the difference is obvious then I'd edit the game file to create this two green factory hex. As always, backup your original game file before editing.
Ronnie
User avatar
Majorball68
Posts: 506
Joined: Thu Nov 21, 2013 11:47 pm

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

Post by Majorball68 »

ORIGINAL: rkr1958

ORIGINAL: Majorball68

Appear to have lost a USSR factory railed from Kiev. Is it possible to edit a green factory or edit a single green factory to have 2 in the hex to compensate?

Don't know about that one ... but you never know until you try. The way I'd go about it would be to go back to a previous saved game and move two factories into the same hex that you currently have a green factory in. Then, I'd examine the difference between a hex with one green factory and the hex with two green factories. If the difference is obvious then I'd edit the game file to create this two green factory hex. As always, backup your original game file before editing.

Railed factories are a little more complicated than that I think. Not easy to duplicate as there seem to have set parameters and look like they have set numbers already reserved.


sfreudig
Posts: 6
Joined: Sun May 21, 2017 6:05 am

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

Post by sfreudig »

Hello !
I have a problem with the gearing limit of the USSR that trop to 1 for every unit class. Is it possible to fix it easily by editing the file ?
Thank's for answer !
S.
User avatar
paulderynck
Posts: 8470
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 »

Are you sure it's not because either no attacks were made by Germany west of Siberia or there are no in supply German units in that area?
Paul
Post Reply

Return to “Mods and Scenarios”