RE: A Layman's Guide to Successfully Editing the MWiF Game File. (Full Version)

All Forums >> [New Releases from Matrix Games] >> World in Flames >> Mods and Scenarios



Message


rkr1958 -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (8/23/2019 11:01:47 PM)


quote:

ORIGINAL: TrogusP96

Do you know how to lower div costs?
Sorry ... don't. [:(]




Divadov -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (9/1/2019 3:29:32 PM)

I have found how to change the turn that reinforcements arrives to resolve the bug that you can't put it in a full city.

III SS Arm,178,22,1944
0
100,2275,,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[4] > [0 to 5] 0=Jan/Feb 1=Mar/Apr...
Historical text
22811,22806,0,2931,1023,65535,0,30764,0,0,12,0,224,0,0,0




rkr1958 -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (9/2/2019 2:54:56 AM)


quote:

ORIGINAL: Divadov

I have found how to change the turn that reinforcements arrives to resolve the bug that you can't put it in a full city.

III SS Arm,178,22,1944
0
100,2275,,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[4] > [0 to 5] 0=Jan/Feb 1=Mar/Apr...
Historical text
22811,22806,0,2931,1023,65535,0,30764,0,0,12,0,224,0,0,0

Excellent!




Divadov -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (9/25/2019 10:04:53 PM)

I have a problem with 2CVP in Malta that I can't move; could you help me?

32960,1536,1124,60084,0,0,0,0
Albacore,76,55,1941
96,648,,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.T The Fairey Albacore was a three-seat reconnaissance-torpedo-bomber biplane that entered service with the British Royal Navy in March 1940. Intended as a replacement for the Swordfish, the Albacore was not much of an improvement and was easily outclassed by both Allied and Axis rivals. The Albacore served in Europe and the Mediterranean aboard Commonwealth carriers, but never gained the fame of its predecessor. .H .B The Albacore's 1,130hp (843kW) engine gave it a max speed of 161mph (259kph). .B The aircraft carried a torpedo or up to 2,000lbs (907kg) of bombs and mines. .B Armament consisted of one wing-mounted .303 inch (7.7mm) machinegun, and .B One flex-mounted .303 inch (7.7mm) machinegun for the rear gunner.
9753,42551,0,649,1023,65535,0,38951,0,0,0,0,224,0,0,3151
-1,UndoData

32960,2048,8836,60597,0,0,0,0
Fulmar,76,55,1941
96,700,,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.T The Fairey Fulmar Mk I was a two-seat carrier-based fighter that entered service with the British Royal Navy in May 1940. The Fulmar saw combat primarily in the Mediterranean theatre but also saw action in the Indian Ocean and off of Norway. By early 1943 the Fulmar was being replaced as a frontline fighter by both the Seafire and Corsair and relegated to long-range reconnaissance and night-fighter duties for the duration of the war. .H .B The Mk I's 1,080hp (805kW) engine gave it a max speed of 256mph (412kph). .B The Fulmar could carry a pair of 250lb (113kG) bombs. .B Armament consisted of eight wing-mounted .303 inch (7.7mm) machineguns, and .B One flex-mounted .303 inch (7.7mm) machinegun for the rear gunner.
9753,42551,0,701,1023,65535,0,38951,0,0,0,0,224,0,0,81
-1,UndoData




[image]local://upfiles/63026/CF10B6F709FB4434ADE5AB2F31269D9A.jpg[/image]




rkr1958 -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (9/26/2019 12:58:38 AM)


quote:

ORIGINAL: Divadov

I have a problem with 2CVP in Malta that I can't move; could you help me?

32960,1536,1124,60084,0,0,0,0
Albacore,76,55,1941
96,648,,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.T The Fairey Albacore was a three-seat reconnaissance-torpedo-bomber biplane that entered service with the British Royal Navy in March 1940. Intended as a replacement for the Swordfish, the Albacore was not much of an improvement and was easily outclassed by both Allied and Axis rivals. The Albacore served in Europe and the Mediterranean aboard Commonwealth carriers, but never gained the fame of its predecessor. .H .B The Albacore's 1,130hp (843kW) engine gave it a max speed of 161mph (259kph). .B The aircraft carried a torpedo or up to 2,000lbs (907kg) of bombs and mines. .B Armament consisted of one wing-mounted .303 inch (7.7mm) machinegun, and .B One flex-mounted .303 inch (7.7mm) machinegun for the rear gunner.
9753,42551,0,649,1023,65535,0,38951,0,0,0,0,224,0,0,3151
-1,UndoData

32960,2048,8836,60597,0,0,0,0
Fulmar,76,55,1941
96,700,,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.T The Fairey Fulmar Mk I was a two-seat carrier-based fighter that entered service with the British Royal Navy in May 1940. The Fulmar saw combat primarily in the Mediterranean theatre but also saw action in the Indian Ocean and off of Norway. By early 1943 the Fulmar was being replaced as a frontline fighter by both the Seafire and Corsair and relegated to long-range reconnaissance and night-fighter duties for the duration of the war. .H .B The Mk I's 1,080hp (805kW) engine gave it a max speed of 256mph (412kph). .B The Fulmar could carry a pair of 250lb (113kG) bombs. .B Armament consisted of eight wing-mounted .303 inch (7.7mm) machineguns, and .B One flex-mounted .303 inch (7.7mm) machinegun for the rear gunner.
9753,42551,0,701,1023,65535,0,38951,0,0,0,0,224,0,0,81
-1,UndoData




[image]local://upfiles/63026/CF10B6F709FB4434ADE5AB2F31269D9A.jpg[/image]

CVP's have to be on a CV in order to move during a naval air. Is that what you're trying to do; i.e., move the two CVP's in port at Malta during a naval air? If so, that's not a legal move.




paulderynck -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (9/28/2019 5:37:40 PM)

Originally you could fly CVP missions from land hexes but that was abused heavily, FREX the crappy old CW 3-range CVPs would get dropped off in Africa and react into sea zones to give a 4 surprise point advantage when the CPs there were attacked by subs. So the game had an errata that allowed CVPs on land allowed to only fly rebase missions.




rkr1958 -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (9/29/2019 4:00:02 PM)


quote:

ORIGINAL: paulderynck

Originally you could fly CVP missions from land hexes but that was abused heavily, FREX the crappy old CW 3-range CVPs would get dropped off in Africa and react into sea zones to give a 4 surprise point advantage when the CPs there were attacked by subs. So the game had an errata that allowed CVPs on land allowed to only fly rebase missions.
Interesting. That makes sense.




markb50k -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (1/23/2020 11:41:03 AM)

From reading the tech support and AAR sections, I see there is still quite a need for help and tips on editing save games.

I have been safely and successfully editing my personal game for years so if you have specific things you’d like to learn about please ask here and I’ll answer them best to my knowledge.

Thanks




ssiviour -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (5/25/2020 10:16:02 AM)

I have read somewhere in the forums how to change a saved game from Netplay to Solo.

I haven't been able to find that thread again, but is anyone able to point me in the right direction?

Vaguely, from memory, it is one digit somewhere in the beginning lines of the Gam file.




AxelNL -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (5/25/2020 6:05:26 PM)


quote:

ORIGINAL: ssiviour

I have read somewhere in the forums how to change a saved game from Netplay to Solo.

I haven't been able to find that thread again, but is anyone able to point me in the right direction?

Vaguely, from memory, it is one digit somewhere in the beginning lines of the Gam file.


Change the 2 into a 1 on the last position of the first line




Divadov -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (5/25/2020 7:16:18 PM)

Anybody knows how change the up/down/left/right keys for others? to can move the map with W/S/Q/E.




AxelNL -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (5/25/2020 9:10:57 PM)


quote:

ORIGINAL: Divadov

Anybody knows how change the up/down/left/right keys for others? to can move the map with W/S/Q/E.



AWSD works as well as the arrow keys. Press SHIFT for a bigger step.




ssiviour -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (5/26/2020 12:31:40 AM)


quote:

ORIGINAL: AxelNL


quote:

ORIGINAL: ssiviour

I have read somewhere in the forums how to change a saved game from Netplay to Solo.

I haven't been able to find that thread again, but is anyone able to point me in the right direction?

Vaguely, from memory, it is one digit somewhere in the beginning lines of the Gam file.


Change the 2 into a 1 on the last position of the first line


Thanks, that seems to have worked.




paulderynck -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (5/26/2020 2:41:55 AM)

I 'think' 1 = head-to-head but 0 = solitaire. (Could be vice versa though!)




whizar -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (6/23/2020 12:29:07 PM)

Hello, I need change the Italian Home Nation from Albania to Eritra to avoid a bug.
How I can do it.

Thanks. Whizar




markb50k -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (6/23/2020 12:57:48 PM)

There’s a thread in the bug area where we fix that for someone. Look up my name for a recent post I was involved in




whizar -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (6/23/2020 12:59:20 PM)

Thanks [&o]

I have been able to successfully change the Italian home nation from Albania to Eritrea.
I have used the same solution given for Algeria and Morocco.




davidc -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (7/5/2020 1:59:25 AM)

Someone asked about gearing previously and in my current game USA gearing was reset to zero for everything somehow.

So, in the save game search for the country code in this pattern:
11,11
11,11
That's for the USA.
The only country not matching this pattern is China because of nationalist and communist, so search for this pattern:
53,53
51,53

Searching is easy if you use Notepad++
Bring up the search dialog - Ctrl-F
For USA again us the following search string:
11,11\r\n11,11
\r\n is the Windows end of line markers
On the search dialog check both Regular Expression and Matches New Line



Either 8 or 9 lines below this match is a string of 16 numbers.
4,0,1,0,0,0,0,0,2,0,0,1,0,0,0,0
This is your gearing even though there are only 12 gearing groups.
The format from left is:
Infantry
Cavalry
Armor
Artillery
Supply
Ship
Submarine
?
Air
?
?
Pilot
Factory
Fort
Offensive
?


[image]local://upfiles/27346/1CADDE98D01546289AF869D9134C26D0.jpg[/image]




rkr1958 -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (8/4/2020 7:56:20 PM)

never mind ... thought I'd figured something out but haven't ran it through all the way. [:(]




rkr1958 -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (8/5/2020 5:32:42 PM)


quote:

ORIGINAL: Divadov

I have found how to change the turn that reinforcements arrives to resolve the bug that you can't put it in a full city.

III SS Arm,178,22,1944
0
100,2275,,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[4] > [0 to 5] 0=Jan/Feb 1=Mar/Apr...
Historical text
22811,22806,0,2931,1023,65535,0,30764,0,0,12,0,224,0,0,0

Thanks again for this. Question for ships, transports and amphs with two build cycles. Do you know where the indicator is for the first or second build cycle is?




markb50k -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (8/6/2020 3:30:52 AM)

It’s on the last line for ships. Just do a new Global War scenario and compare ships like the Saratoga and Bismarck to see how they differ




markb50k -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (8/6/2020 3:37:11 AM)


quote:

ORIGINAL: rkr1958


quote:

ORIGINAL: Divadov

I have found how to change the turn that reinforcements arrives to resolve the bug that you can't put it in a full city.

III SS Arm,178,22,1944
0
100,2275,,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[4] > [0 to 5] 0=Jan/Feb 1=Mar/Apr...
Historical text
22811,22806,0,2931,1023,65535,0,30764,0,0,12,0,224,0,0,0

Thanks again for this. Question for ships, transports and amphs with two build cycles. Do you know where the indicator is for the first or second build cycle is?


Oh and to change where on the production cycle the ship is you do have to change that last digit on that line like Divadov says but you also may need to change the 12 in that example he shows. That represents the year from 1932. So For example on stuff that shows up on Nov/Dec 1939 you’d see a 5 on the Last slot on 2nd line, and a 7 in the slot bolded above




rkr1958 -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (8/6/2020 6:25:34 PM)

quote:

ORIGINAL: markb50k

It’s on the last line for ships. Just do a new Global War scenario and compare ships like the Saratoga and Bismarck to see how they differ

Ok, I give. I flunked the test. [:(]

Below is the last record (fields 1-7) for a number of ships in their 1st cycle, 2nd cycle and for the Saratoga in the repair pool. I just don't see a pattern that tells me the difference between the three (i.e., 1st vs 2nd vs repair).

Well, unless it's in column 3? 4000's indicate 1st cycle, < 1000 2nd cycle and 8000's repair? Is that it?

By the way, are you a teacher/professor? Force you students to figure out the answer instead of giving it to them? [:D]

[image]local://upfiles/31901/D75E0D03D83640A7A46B13ACD6033E19.jpg[/image]




markb50k -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (8/7/2020 3:00:58 AM)

Lol sorry. I normally read the boards on my phone and usually when I’m about to go to bed. So I can’t give specific answers since I don’t have the game or save files readily available at the time.

I’ll look on my laptop tomorrow and tell you where it’s at.




markb50k -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (8/7/2020 3:09:52 AM)

Oh and FYI repair pool isn’t on that line. By and large the pool of a unit whether that’s Force pool, future force pool, repair pool, construction pool etc are represented in two ways

For ships on the second line there’s a bunch of zeroes. The position of the -1 in that line represents the pool. In Addition the 7th number on the 4th line shows that as well. For units in non map pools you’ll see multiples of 2048 in that slot.




markb50k -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (8/7/2020 1:31:51 PM)

Here's what I've figured out. Using process of elimination I figured out the 1st cycle (face down) indicator

On the sixth line of a ship entry, looks like this

45312,1360,0,1024,0,0,0

1st number is sum of:
(2ND CYCLE COST) * 8192
(RANGE) * 512
(MOVEMENT) * 32

2nd number is sum of:
(BOMBARDMENT) * 4096
(AA) * 256
(ATK) * 1
(AIR FACTORS) * 4096
(DEFENSE) * 16
(notice both Bombardment and Air Factors use the same mechanic, normally this is bad since the game couldn't discern which is which, but since a ship can't have both, the game knows based on the unit type)

3rd number is sum of:
(BUILD TIME OVERRIDE?) * 2048 (boolean, either yes 2048 or no 0)
(In 1st Cycle of production?) * 4096 (boolean 4098 or 0) (this means face down)
There is something else included in this number, and I am not positive, but evidence says it represents something about the date it is sunk
Here's my guess based on the data, about 99% sure
(SUNK HISTORICALLY?) * 1 (not if its sunk in your game, just the historical data) (boolean yes 1 or no 0)
(day of month sunk) * 32
(month of year sunk) * 2
(damaged currently?) * 8192 (just figured this one out, see below)

4th number is sum of:
(BUILD TIME) * 256
(Year of sinking) * 2048 (the question is from what year to start with, the math says 1922, no clue why)

The date sunk stuff I just figured out but the math works

The only thing that isn't fully explained here is the 8192 for the Saratoga in the 3rd slot. I THINK that may mean either:
- is currently in Repair Pool
or
- start scenario in Repair Pool

The reason why there's a question here is that repair pool, like i mentioned is determined by other numbers

Saratoga,11,39,1920
0,2464,,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0
(HISTORICAL DESCRIPTION)
1423,1447,0,4048,17407,65535,14336,0,0,0,0,0,0,0,0,5725
-1,UndoData
35008,17234,8192,1536,0,0,0

Repair pool is the "7th pool" and so the -1 is the 7th slot of the zeros on line 2 (you dont count the first 0 in the 4th slot, i think thats for AT SEA indicator) and the slot on 4th line is 7 * 2048

So its Possible the 8192 ALSO means repair pool but i dont have enough data to confirm. BB Maryland and BB California also have the 8192 so it must have something to do with being in repair pool, but to prove it you need to put a ship in the repair pool during normal game play and see if the 8192 shows up in that slot. if it doesn't then 8192 must mean "Starts the scenario in repair pool"

UPDATE: Or, and this just occurred to me, it may just mean damaged. Yeah, thats probably it.

Anyway hope this helps





rkr1958 -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (8/7/2020 4:26:31 PM)

quote:

ORIGINAL: markb50k
In Addition the 7th number on the 4th line shows that as well. For units in non map pools you’ll see multiples of 2048 in that slot.
Thanks! By the way, I think I finally figured out that this [7th number] is the key to determining whether or not the encoded target hex, which is just after this number, is wrapped. Let me explain.

I've named this record the USR=unit status record. For land units this is record #5 in its game file sequence. So for this unit, which is the UK 2nd Inf division, it's encoded hex is stored in USR[8]=10933. For the sake of those who don't remember the encoded hex is given by the formulas,

USR[8] = 512*row + column, for row < 128
USR[8] = 512*row + column - 128*512, for row >= 128

However, one could edit the file and move a unit to row=149, column=181 by setting USR[8]=149*512 + 181 = 76469 without worrying about the wrapping. However, once the game is loaded (and saved again) MWiF will dutifully set USR[8]=10933 while the unit remains in row 149, column 181.

So let's look at the converse of this. Suppose we pull this (wrapped) encoded hex coordinate for this unit out of the game file and convert it using the formulas,

row = floor(USR[8]/512) = floor(10933/512) = 21,
column = USR[8] - 512*row = 181.

The question is how would we know to unwrap the row, i.e., row = 21 + 128 = 149. The answer is in the field just before USR[8]. That is, it's in USR[7]. If USR[7] is odd then you need to wrap the row. So the formulas for converting an encoded hex coordinate to a row, column are:

row = floor(USR[8]/512) = floor(10933/512) = 21,
column = USR[8] - 512*row = 181,
if USR[7] is odd, row = row + 128.

Note that you only unwrap the row (if applicable) after you calculate column.


Record 1: 2nd Inf Div,76,0,1936
Record 2: -1
Record 3: 96,1756,,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Record 4: [historical text]
Record 5: 9815,9728,0,2412,5119,60398,1,10933,0,0,0,0,224,0,52099,16384
Record 6: -1,UndoData
Record 7: 0,65




rkr1958 -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (8/7/2020 4:35:19 PM)


quote:

ORIGINAL: markb50k
Here's what I've figured out. Using process of elimination I figured out the 1st cycle (face down) indicator

...

Anyway hope this helps

THANKS! Extremely impressive how you've figure all this out and EXTREMELY helpful!

[&o]




markb50k -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (8/7/2020 4:48:48 PM)

Actually, those two fields act very close to what you are saying. I actually posted this somewhere else a while ago I think.


Essentially, the 7th element in that row has a 1 added to it if the hex its in is in the Southern half of the map, or >= row 128.

The 8th field (and i believe all fields) have a max value of 65536 which is a common limit in programming for hexadecimal kinds of values. So to get around that, Steve just broke up the map into 128 rows for group 1 (index 0) and the rest in group 2 (index 1).

Just like you said,
1st group of hexes: USR[8] = 512*row + column, for row < 128
2nd (southern) group of hexes: USR[8] = 512*row + column - 128*512, for row >= 128

but for the 2nd group you had to remove the 128*512 so how do you keep track of that, well, by putting the 1 in the 7th slot.

You'll notice that all other things that get put into that 7th slot are even. So the 1 is available to designate 2nd group of hexes:

Sea Zone Id * 2
Sea Box * 256
pool * 2048
(second set of hexes ?) * 1 (boolean)




rkr1958 -> RE: A Layman's Guide to Successfully Editing the MWiF Game File. (8/7/2020 5:09:11 PM)

quote:

ORIGINAL: markb50k
So its Possible the 8192 ALSO means repair pool but i dont have enough data to confirm. BB Maryland and BB California also have the 8192 so it must have something to do with being in repair pool, but to prove it you need to put a ship in the repair pool during normal game play and see if the 8192 shows up in that slot. if it doesn't then 8192 must mean "Starts the scenario in repair pool"

UPDATE: Or, and this just occurred to me, it may just mean damaged. Yeah, thats probably it.
Here's a the Mar/Apr 1941 repair pool for I game I'm playing (when I'm not coding all this.)

I've include a (work in progress) snipped of a counter summary report produced by my editor and imported into excel. The "Pool_Wrap" column (in yellow) is the 7th field of the 4th ship record (i.e., USR[7]) and they "Cycle" column (in orange) is the 3rd field in the last line for ships (i.e., LL[3]).

I think you're right on the money with all this. Thanks again for your help. [:)]

[image]local://upfiles/31901/165BBD5854304701A866CFA1C4E8262D.jpg[/image]




Page: <<   < prev  2 3 [4] 5 6   next >   >>

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
1.609375