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

Post new mods and scenarios here.

Moderator: Shannon V. OKeets

mldtchdog
Posts: 63
Joined: Sat Jul 22, 2006 11:05 pm

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

Post by mldtchdog »

Not sure if this has been covered by anyone fully but what I have figured out for some of the variables for the units.

For example,

XII Inf,79,0,1936
0
0,1831,,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0
(Historical description)
10135,10112,0,2487,17407,65535,16384,0,0,0,0,0,0,0,0,0
-1,UndoData


This is the German XII Infantry Corps first available in 1936. This particular unit is in the buildable Force Pool. I know this by the combination of the YES placement (-1) and the value of the 7th field (16384).

so what do the fields mean? what I have figured out so far.

0,1831,,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0
A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T ;value of 7th field

A=unknown
B=unit ID #
C=Name Extension (ex. IL-2++Strum-+ovick)
D=unknown
E=on Map ;0
F=can be Setup on map ;4096
G=Reserve Pool ;6144
H=Build Spiral ;10240
I=Construction Pool ;12288
J=Repair Pool ;14336
K=unknown
L=Available Force Pool ;16384
M=Future Force Pool ;18432
N=unknown
O=unknown
P=unknown
Q=Conquered ;26624
R=unknown
S=Not Included ;30720
T=Turn arrival (0=Jan/Feb,1=Mar/Apr, ect.)

So from the example I could move the XII Inf to the sprial to arrive any turn I want simply by editing so...

XII Inf,79,0,1936
0
0,1831,,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,4
(Historical description)
10135,10112,0,2487,17407,65535,10240,0,0,0,0,0,0,0,0,0
-1,UndoData


Now the XII Inf will arrive as a reinforcement next Oct/Nov

EDITITED for Disclaimer:
Vaules figured out at New Game stage
mldtchdog
Posts: 63
Joined: Sat Jul 22, 2006 11:05 pm

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

Post by mldtchdog »

ORIGINAL: rkr1958

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?

Its in the Section that call National Relations

201,201
201,201
-1,0,-1,0
-1,CSet
0
0
0,0,-1,-1
3,3,1,1,1,1,1,1,1,1,1,1,3,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,0,1,1,1,1,1,1,1,1,1,1,1,0,0,1,0,1,1,0,2,1,2,1,1,1,3,0,1,3,1,1,0,1,1,1,1,1,1,1,3,1,2,0,1,1,1,1,1,2,1,1,1,0,0,0,0,1,2,1,1,1,0,1,0,0,0,1,0,0,0,1,0,2,2,2,0,0,0,1,0,1,1,1,0,1,1,1,1,1,2,1,1,1,1,2,1,0,0,1,0,2,2,2,0,1,2,2,3,2,2,1,1,0,0,0,1,0,1,0,2,0,0,0,2,0,0,0,0,0,2,1,1,2,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,0,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0

0=War, 1=Neutral, 2=Aligned 3=Force Pool

So for the Commonwealth,
Australia is Force Pool, New Zeeland is Force Pool, Papua, New Guinea is Neutral, Solomon Islands are Neutral, ect. Count 80 digits and you will find a 0 for Germany (remember that Australia is zero).

To change the relation you also have to change the target nation.
CL55AMG
Posts: 52
Joined: Thu Nov 21, 2019 2:05 am

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

Post by CL55AMG »

Adding US-Italian trade agreement

Image

Save the game at the start of the US setup phase of the Global War scenario.
Edit the save game.
There is a trade agreement count and a list of trade agreements.
Count at line 9777
The trade agreement list starts at line 9959. Insert the two additional lines at the end of the list before line 9974.
I made the agreement temporary since the game engine cannot enforce the agreement.

17,0
-1,CSet
0,FactoryList
0,-1,-1,-1,-1,-1
0
0,FactoryList
0,-1,-1,-1,-1,-1
0
-1,-1
0
0
0
0
0
0
0
0
0
2,0,0,0,0,0,79,51,-1,0,0
0,0,1,0,0,0,100,79,-1,0,0
0,1,1,0,0,0,120,80,-1,0,0
1,0,0,0,0,0,49,11,-1,0,0
0,2,2,0,0,0,78,201,-1,0,0
0,2,2,0,0,0,78,49,-1,0,0
0,1,1,0,0,0,68,201,-1,0,0
0,2,2,0,0,0,101,79,-1,0,0
0,1,1,0,0,0,101,89,-1,0,0
0,0,3,0,0,0,87,79,-1,0,0
0,0,1,0,0,0,103,79,-1,0,0
0,2,4,0,0,0,11,49,-1,0,0
0,2,7,0,0,0,51,79,-1,0,0
0,3,3,0,0,0,34,201,-1,0,0
0,3,3,0,0,0,34,11,-1,0,0
0,1,3,0,0,0,11,89,-1,0,1
1,0,0,0,0,0,89,11,-1,0,1

4,1939,3,1945,0,0,0,12,0,0,0,0,0,0,0,0,0,0,-1,12,0,-1,0


Italy-USA
The USA and Italy start the game with an agreement in place to lend lease 1
Italian build point to the USA for 3 US resources (TiF option 30: 1 of them
must be oil) to Italy, each turn.
This trade agreement ends immediately when either:
(a) the USA or Italy become active (see 9.1), or
(b) US entry option 34 (see 13.3.2) has been chosen.
From that moment on, both the USA and Italy may use their resources or build
point themselves.
While this agreement is in effect, and to avoid any penalty, the USA must have
enough convoy points in the sea areas from the USA to a sea area adjacent to
the Western Mediterranean sea area to transport the resources and build point.
Similarly, Italy may have enough convoy points in the Western Mediterranean
and the Italian coast sea areas to transport the resources and build point. If
during production (see 13.6), Italy has met her obligation and the US has not
met its then:
• the USA loses the 3 resources, and does not get its promised build point
that turn, which Italy may use herself; and
• Italy must randomly remove 1 entry marker from the Ge/It entry pool
(returning it to the common entry pool). See 13.3.3 if there aren’t any US
entry markers to remove.
If Italy does not meet her obligation then both sides may use their promised
resources or build point themselves this turn.
Attachments
modedtrade.jpg
modedtrade.jpg (324.19 KiB) Viewed 807 times
User avatar
Joseignacio
Posts: 3028
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 »

After patching the latest update, some processes that had happened one or more turns ago, ocurred again. There was a new conquer of NEI by Japan and a new anexation of ICeland, and so on.

Problem is that my mate had bought (after the first conquer) a NEI Terr and he is very pissed offf, and although it makes me shiver to have to do this "programming-like" thingy, I want to give a try.

Can somebody tell me how to identify the NEI Terr, so I can bring it back to game?
User avatar
rkr1958
Posts: 30001
Joined: Thu May 21, 2009 10:23 am

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

Post by rkr1958 »

ORIGINAL: Joseignacio

After patching the latest update, some processes that had happened one or more turns ago, ocurred again. There was a new conquer of NEI by Japan and a new anexation of ICeland, and so on.

Problem is that my mate had bought (after the first conquer) a NEI Terr and he is very pissed offf, and although it makes me shiver to have to do this "programming-like" thingy, I want to give a try.

Can somebody tell me how to identify the NEI Terr, so I can bring it back to game?
Is your game mode solitary?

If so, if you attach a copy of your game file I think we (me or somebody) else can show you how to do this.

If not, we still may still be able to show you but possibly not as certain wrt/your particular situation.
Ronnie
User avatar
Joseignacio
Posts: 3028
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 »

No, it's a netgame.

I have gone through your posts and maybe I could do it, it's just I dont know how to find the code for that (or other unit). Although I am not very sure to be true.
User avatar
paulderynck
Posts: 8485
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 »

Should be able to use beta tools to put that unit in the next turn's reinforcements. But need a saved game file.
Paul
User avatar
Joseignacio
Posts: 3028
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 »

Here it comes, thanks in advance.
Attachments
NP2021_..906CW.zip
(1.48 MiB) Downloaded 17 times
User avatar
paulderynck
Posts: 8485
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 see your game file indicates debug at the top. Do you have a Debug menu at the top when you launch the game? The first item under it is Move/Place Units.

Anyway I used that feature and found the NEI Territorial in Force Pools and moved it to Batavia. The problem is that it still has Dutch colors, not Japanese. So I don't think that change will work. More likely, it will really confuse the program. I can post it if you like, but it's probably not worth the effort.

There should be a Japanese colored NEI Territorial in the Japanese force pool, but there isn't. when did the conquest happen?

BTW, even if you don't have a working debug menu, you can use CTRL-Q to examine all the pools in the game.

If that Territorial shows up in the Japanese force pool with Japanese colors later in the game, then using Move/Place Units should work to put it on the map at zero production cost.
Paul
User avatar
Joseignacio
Posts: 3028
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 »

Well, to be true I dont exactly know what a debug menu is. I know it's some kind of feature for computer people to edit or something.

So, if I have it I dont know why or what for. I mean, one of the versions of the game that we have gone through (not sure if the current one) had that name "debug" and that's all I know.According to what you say it seems I dont have that menu to move/place units. Never saw it at least.

We have been playing very few lately and there has been a stop for August holidays. So I cannot be sure but I think the surrender of NEI was like 2 turns ago, maybe 1 to 3 turns ago. Then my opponent decided to go to the next patch ( latest I believe) I did too but then at the end of that last turn NEI was conquered again and other events that had happened earlier, happened again, I remember USA occupation of Greenland (and N. Ireland?), which had also happened like 2 turns earlier.

When all that happened, the NEI Terr that tha JA had built after the first conquer, dissapeared.

OK, tomorrow we play, I will post something afterwards.
User avatar
Joseignacio
Posts: 3028
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 »

Here is our latest save.

It would be nice if you can deploy that NEI TERR, we had another bug, where my NAV killed two CONV in the Baltic, only that they did not die for MWIF and had to be returned to Kiel as aborted. If you could delete the couple of finnish conv in Kiel as well...

I wanted to post that other bug but I got no save of the sea battle I believe. I have previous to the searchs but I cannot remember the rolls (although they were obviously very one sided to make that damage with a nav of 1 factor).

Attachments
NP - 2021_..100 - Ge.zip
(1.48 MiB) Downloaded 12 times
User avatar
gw15
Posts: 952
Joined: Sun Mar 21, 2010 4:29 pm

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

Post by gw15 »

Paul,
I seem to remember there is a way to change several of the parameters to switch a file from netplay to solitaire and back again. Once a player switches to solitaire and "adjuste" stuff then change the paramaters back to net play and THEN send the files back to your opponent and he can use that file to play.
Peter and I will send our file to the other on rare occasions when our files get out of synch.
Open the game file with Notepad:
4.2.2.10 (Debug),10,2
gw15,Centuur,
Jul/Aug 1940,3,Declare War,On Major Powers,Commonwealth,France,USSR,
|Thursday, Jul 1, 2021 2:56 pm|
1324637403,1657215,2,0,0,Mine,|D:\Matrix Games\World in Flames\Scenarios\Global War\Saved Games\AutoSave\

There are many lines of code after the last line above but I only show the first 5 lines of the file. On the last line the "...,2,0,0,Mine,..." I can't remember but one of those 3 numbers can be changed to make it solitaire.

I may have this all wrong but I believe it has been done before.
Peter - does this "ring a bell" in your memory?

ssiviour
Posts: 773
Joined: Fri Aug 08, 2014 7:14 pm
Location: Australia

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

Post by ssiviour »

ORIGINAL: gw15

Paul,
I seem to remember there is a way to change several of the parameters to switch a file from netplay to solitaire and back again. Once a player switches to solitaire and "adjuste" stuff then change the paramaters back to net play and THEN send the files back to your opponent and he can use that file to play.
Peter and I will send our file to the other on rare occasions when our files get out of synch.
Open the game file with Notepad:
4.2.2.10 (Debug),10,2
gw15,Centuur,
Jul/Aug 1940,3,Declare War,On Major Powers,Commonwealth,France,USSR,
|Thursday, Jul 1, 2021 2:56 pm|
1324637403,1657215,2,0,0,Mine,|D:\Matrix Games\World in Flames\Scenarios\Global War\Saved Games\AutoSave\

There are many lines of code after the last line above but I only show the first 5 lines of the file. On the last line the "...,2,0,0,Mine,..." I can't remember but one of those 3 numbers can be changed to make it solitaire.

I may have this all wrong but I believe it has been done before.
Peter - does this "ring a bell" in your memory?


On the very top row, the very last number designates the mode

2 is Netplay 1 is Head to Head and 0 is solitaire

I find changing the file from Netplay to H2H to be more stable, but there are some difficulties you encounter that only as a solitaire game you can advance past
User avatar
Joseignacio
Posts: 3028
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 »

We are playing right now. I will upload the last version in like 3 hours or less, in case the amendments can be made.
User avatar
Joseignacio
Posts: 3028
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 »

We were not able to effectively play due to several game stopping bugs in the new hotpatch, so the last version is the one already uploaded.
User avatar
paulderynck
Posts: 8485
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 »

ORIGINAL: ssiviour

ORIGINAL: gw15

Paul,
I seem to remember there is a way to change several of the parameters to switch a file from netplay to solitaire and back again. Once a player switches to solitaire and "adjuste" stuff then change the paramaters back to net play and THEN send the files back to your opponent and he can use that file to play.
Peter and I will send our file to the other on rare occasions when our files get out of synch.
Open the game file with Notepad:
4.2.2.10 (Debug),10,2
gw15,Centuur,
Jul/Aug 1940,3,Declare War,On Major Powers,Commonwealth,France,USSR,
|Thursday, Jul 1, 2021 2:56 pm|
1324637403,1657215,2,0,0,Mine,|D:\Matrix Games\World in Flames\Scenarios\Global War\Saved Games\AutoSave\

There are many lines of code after the last line above but I only show the first 5 lines of the file. On the last line the "...,2,0,0,Mine,..." I can't remember but one of those 3 numbers can be changed to make it solitaire.

I may have this all wrong but I believe it has been done before.
Peter - does this "ring a bell" in your memory?


On the very top row, the very last number designates the mode

2 is Netplay 1 is Head to Head and 0 is solitaire

I find changing the file from Netplay to H2H to be more stable, but there are some difficulties you encounter that only as a solitaire game you can advance past
In this case I was able to open the game in "Review" mode, make changes with the debug tool and then save the game. To ensure the change "took", I then opened the game in "Review" mode again and saw the added unit. The file could then be sent back for both players to use.

So I did not have to mess around with changing the game from Netplay to Solitaire (or H2H) and then back to NetPlay.

Edit: Upon further thought however, allowing a Netplay game in Review mode to be altered and then saved is probably not a really good idea.
Paul
User avatar
craigbear
Posts: 769
Joined: Tue Jan 21, 2020 2:30 am
Location: Calgary, Alberta

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

Post by craigbear »

I am trying to figure out how to add a resource/BP without simply adding it to already existing chits. Dur to the proclivities of the convoy system, USSR lost 5 BP that should have arrived there. I saved a BP and can easily add 5 extra to that existing BP with some editing; however, only one BP of the saved BP can be spent next turn according to the rules... this could be critical to USSR well being. I wish to place BP directly in other cities.

To do so, I first copied the Vlad BP entry and pasted it after the last resource entry, and changed the amount to 256 (green) to reflect 1 BP. I then changed the hex (64,161 (VLad)), 32929, to the other city hex (56,163), 28835, (in red). Finally, I noticed that the resources seem to have a step number (blue)... I changed this to the number of the last listing I could find in this slot (4358). Unfortunately, the game would not open, so I had to restore my saved/unedited copy.

6551,6598,0,0,1023,65535,0,32929,0,0,0,1536,0,0,0,0
-1,UndoData
,53,69,1936
1
53,4344,,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

So did I miss something, or is it not possible without increasing and an already existing BP.
User avatar
paulderynck
Posts: 8485
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 »

It can be done with beta tools. Send a game file and which cities to place them.
Paul
User avatar
craigbear
Posts: 769
Joined: Tue Jan 21, 2020 2:30 am
Location: Calgary, Alberta

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

Post by craigbear »

Thanks for the offer... not a serious enough problem to bother someone else with. I was simply wondering if it was possible to do it myself, and you answered it succinctly. Also, turns out that 3 BP were usable, not 1 at a time. I must have misread the rules on that.
User avatar
craigbear
Posts: 769
Joined: Tue Jan 21, 2020 2:30 am
Location: Calgary, Alberta

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

Post by craigbear »

I foolishly saved a Chinese BP in Sian, and now it has become Russian and is unusable. I even have tried to save another Chinese BP in another city, and get the opportunity to move the BP during the BP save phase, but an error comes up when I try to pick the BP up.

I recall somewhere that this has been dealt with by modding, but I cannot seem to find the entry and am uncertain of the search terms needed. Does anyone recall how I can change the BP to Chinese owned, and move it to a nationalist city?

I know it is easy enough to change 1 BP to 2 in the Nationalist city, but what do I do about the unusable one in Sian? I suppose if Japan eventually captures it, they can voluntarily destroy it, but that lacks elegance.

Can anyone point me the way?
Post Reply

Return to “Mods and Scenarios”