Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

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

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> World in Flames >> Mods and Scenarios >> RE: A Layman's Guide to Successfully Editing the MWiF Game File. Page: <<   < prev  1 2 3 4 [5]
Login
Message << Older Topic   Newer Topic >>
RE: A Layman's Guide to Successfully Editing the MWiF G... - 8/7/2020 5:17:57 PM   
rkr1958


Posts: 19803
Joined: 5/21/2009
Status: offline

quote:

ORIGINAL: markb50k

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)

Mark, have you "written" all your knowledge down some where? That is, captured it electronically?

Do you think there's any benefit if we combine what we know (you a heck of a lot and me some but not nearly as much) into a "game file" editing document?

Or should we just continue like this via posts?

I wonder if anyone else in the community is interested in this or is it just us?

By the way I'm finding your knowledge invaluable in coding my game file editors and controllers.

_____________________________

Ronnie

(in reply to markb50k)
Post #: 121
RE: A Layman's Guide to Successfully Editing the MWiF G... - 8/7/2020 6:12:41 PM   
paulderynck


Posts: 7980
Joined: 3/24/2007
From: Canada
Status: offline
It'd be great to see all this research combined in one document. I'm intrigued by what you are doing and have often thought about doing a program to optimize production based on the CP counts in each sea zone at turn end, and respecting all announced lends. But recently there's been work done on improving production, so perhaps it is no longer needed.

I had gone as far as finding where in the game file you can find the number of CPs in each sea zone, but you guys likely already have that cased.



_____________________________

Paul

(in reply to rkr1958)
Post #: 122
RE: A Layman's Guide to Successfully Editing the MWiF G... - 8/7/2020 6:25:31 PM   
rkr1958


Posts: 19803
Joined: 5/21/2009
Status: offline
quote:

ORIGINAL: paulderynck

It'd be great to see all this research combined in one document. I'm intrigued by what you are doing and have often thought about doing a program to optimize production based on the CP counts in each sea zone at turn end, and respecting all announced lends. But recently there's been work done on improving production, so perhaps it is no longer needed.

I had gone as far as finding where in the game file you can find the number of CPs in each sea zone, but you guys likely already have that cased.


Thanks! One thing I'll probably cover in my bots thread next week (hopefully), is a counter's editing controller that allows the user to move counters, change pools, change status (i.e., flip/org) and change CP/saved Oil/BPs size. It's becoming apparent to me that this capability could be used as the foundation in the short term to build controllers, if priority is given, for:
(1) naval/ASW bots,
(2) variety of comma delimited (Excel compatible) reports,
(3) true multi-player (3 - 6) capability where individual players can controller MPs, or theaters (e.g., Western Allies-Asia/Pacific).

Though (3) is not a priority for me but I'd be willing to work with anyone in the community who'd like to see such a capability. I must say that (3) surprised me but after getting to where I am on the counters editor it really doesn't look that daunting. Again, not one of my priorities ...


< Message edited by rkr1958 -- 8/7/2020 6:27:42 PM >


_____________________________

Ronnie

(in reply to paulderynck)
Post #: 123
RE: A Layman's Guide to Successfully Editing the MWiF G... - 8/7/2020 6:36:03 PM   
markb50k

 

Posts: 1224
Joined: 7/1/2004
From: Spring, TX
Status: offline
It's not written down formally, other than the fact that the formulas in my Excel version of my war engine allow me to see what I learned implemented in code.

Putting it all into a document would be fantastic but its almost impossible to get a feel of the level of detail or context that needs to be explained when simply explaining how to change the file. Changing a number is one thing but it really makes more sense to explain why, what the number means, etc. That part has always prevented me from jotting down everything formally.


(in reply to rkr1958)
Post #: 124
RE: A Layman's Guide to Successfully Editing the MWiF G... - 8/7/2020 6:39:31 PM   
rkr1958


Posts: 19803
Joined: 5/21/2009
Status: offline
quote:

ORIGINAL: markb50k

It's not written down formally, other than the fact that the formulas in my Excel version of my war engine allow me to see what I learned implemented in code.

Putting it all into a document would be fantastic but its almost impossible to get a feel of the level of detail or context that needs to be explained when simply explaining how to change the file. Changing a number is one thing but it really makes more sense to explain why, what the number means, etc. That part has always prevented me from jotting down everything formally.


I hear you ... same here too ...


< Message edited by rkr1958 -- 8/7/2020 8:19:28 PM >


_____________________________

Ronnie

(in reply to markb50k)
Post #: 125
RE: A Layman's Guide to Successfully Editing the MWiF G... - 8/7/2020 6:42:12 PM   
markb50k

 

Posts: 1224
Joined: 7/1/2004
From: Spring, TX
Status: offline

quote:

ORIGINAL: rkr1958

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.





One thing that I've learned can confuse things is the fact that the game doesn't clear things when it needs to. For instance, notice that the Australia has 14340 in its 7th slot vs 14336. 14336 is the standard value for repair pool. Where does the 4 come from? Well, its left over from when the ship was at sea. If i remember correctly, 4 would mean seazone 2 (remember its 2 * sea zone id), and i believe thats Western or Eastern Med. So i would guess that the Australia was damaged while in that sea area. Even though the ship is no longer at sea, it didnt need to clear that value out so someone like us trying to figure out what that 4 is for would be mislead unless they figured out what I just mentioned.

Its fun figuring this out, but its essentially a black box we are trying to reverse engineer in many ways lol.

(in reply to rkr1958)
Post #: 126
RE: A Layman's Guide to Successfully Editing the MWiF G... - 8/7/2020 7:51:59 PM   
rkr1958


Posts: 19803
Joined: 5/21/2009
Status: offline

quote:

ORIGINAL: markb50k
Its fun figuring this out, but its essentially a black box we are trying to reverse engineer in many ways lol.
I personally have to take care not to jump down the rabbit hole chasing after interesting things that aren't directly related to my task(s) at hand. I don't need to understand everything in the "black box" only those things I need to change in order to build the controllers and bots that I wish to build. I have to keep reminding myself that.


_____________________________

Ronnie

(in reply to markb50k)
Post #: 127
RE: A Layman's Guide to Successfully Editing the MWiF G... - 8/8/2020 12:44:34 AM   
jjdenver

 

Posts: 2075
Joined: 11/2/2007
Status: online
Is there a post somewhere on how to turn off an optional rule (or on) once the game has started?

(in reply to rkr1958)
Post #: 128
RE: A Layman's Guide to Successfully Editing the MWiF G... - 8/8/2020 1:58:57 AM   
rkr1958


Posts: 19803
Joined: 5/21/2009
Status: offline

quote:

ORIGINAL: jjdenver

Is there a post somewhere on how to turn off an optional rule (or on) once the game has started?
I thought it was covered in the thread you started?


_____________________________

Ronnie

(in reply to jjdenver)
Post #: 129
RE: A Layman's Guide to Successfully Editing the MWiF G... - 8/8/2020 6:20:36 PM   
jjdenver

 

Posts: 2075
Joined: 11/2/2007
Status: online
You are right ty!! Apparently I'm a spammer. :)

(in reply to rkr1958)
Post #: 130
RE: A Layman's Guide to Successfully Editing the MWiF G... - 8/11/2020 4:03:33 PM   
rkr1958


Posts: 19803
Joined: 5/21/2009
Status: offline
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




Attachment (1)

_____________________________

Ronnie

(in reply to jjdenver)
Post #: 131
RE: A Layman's Guide to Successfully Editing the MWiF G... - 8/11/2020 7:17:30 PM   
rkr1958


Posts: 19803
Joined: 5/21/2009
Status: offline
Ok. I think I've figured out half of question 2. For the cargo carriers (i.e., CVs, TRS, Amphs, ATRs, SCSs), the unit id (uid) field value is calculated as,

uid = uid0 + 8192*number_of_cargo, where uid0 is the cargo carriers id in the Standard Units *.csv file(s) and number_of_cargo is the number of units loaded onto the carrier.

So it looks to me that the uid for the cargo has to map back to what's carrying it. Will let you know when/if I (think I) figure this part out.

_____________________________

Ronnie

(in reply to rkr1958)
Post #: 132
RE: A Layman's Guide to Successfully Editing the MWiF G... - 10/22/2020 6:57:51 PM   
ssiviour

 

Posts: 69
Joined: 8/8/2014
From: Australia
Status: offline
Hi. I have a problem with a Lend lease Unit not appearing in the CW force pool. It is reported in the Netplay Tech support forum.

Wondering if there is a way to manually fix it?

Thanks

(in reply to rkr1958)
Post #: 133
RE: A Layman's Guide to Successfully Editing the MWiF G... - 10/22/2020 8:44:33 PM   
rkr1958


Posts: 19803
Joined: 5/21/2009
Status: offline

quote:

ORIGINAL: ssiviour

Hi. I have a problem with a Lend lease Unit not appearing in the CW force pool. It is reported in the Netplay Tech support forum.

Wondering if there is a way to manually fix it?

Thanks
If it were a solitaire game file I'd say yes. Not sure how edits work with netplay game files.


_____________________________

Ronnie

(in reply to ssiviour)
Post #: 134
RE: A Layman's Guide to Successfully Editing the MWiF G... - 10/23/2020 7:45:53 PM   
ssiviour

 

Posts: 69
Joined: 8/8/2014
From: Australia
Status: offline

quote:

ORIGINAL: rkr1958


quote:

ORIGINAL: ssiviour

Hi. I have a problem with a Lend lease Unit not appearing in the CW force pool. It is reported in the Netplay Tech support forum.

Wondering if there is a way to manually fix it?

Thanks
If it were a solitaire game file I'd say yes. Not sure how edits work with netplay game files.


As I understand it, editing a particular file is the same as a solo game. The difference is, once done the file will have to be emailed to the opponent so both players load the same game and are in sync.

(in reply to rkr1958)
Post #: 135
RE: A Layman's Guide to Successfully Editing the MWiF G... - 10/24/2020 3:48:40 PM   
Centuur


Posts: 8461
Joined: 6/3/2011
From: Hoorn (NED).
Status: offline

quote:

ORIGINAL: ssiviour


quote:

ORIGINAL: rkr1958


quote:

ORIGINAL: ssiviour

Hi. I have a problem with a Lend lease Unit not appearing in the CW force pool. It is reported in the Netplay Tech support forum.

Wondering if there is a way to manually fix it?

Thanks
If it were a solitaire game file I'd say yes. Not sure how edits work with netplay game files.


As I understand it, editing a particular file is the same as a solo game. The difference is, once done the file will have to be emailed to the opponent so both players load the same game and are in sync.


You're correct.


_____________________________

Peter

(in reply to ssiviour)
Post #: 136
RE: A Layman's Guide to Successfully Editing the MWiF G... - 10/26/2020 12:46:55 AM   
rkr1958


Posts: 19803
Joined: 5/21/2009
Status: offline

quote:

ORIGINAL: Centuur


quote:

ORIGINAL: ssiviour


quote:

ORIGINAL: rkr1958


quote:

ORIGINAL: ssiviour

Hi. I have a problem with a Lend lease Unit not appearing in the CW force pool. It is reported in the Netplay Tech support forum.

Wondering if there is a way to manually fix it?

Thanks
If it were a solitaire game file I'd say yes. Not sure how edits work with netplay game files.


As I understand it, editing a particular file is the same as a solo game. The difference is, once done the file will have to be emailed to the opponent so both players load the same game and are in sync.


You're correct.


Well if that's the case I think I know how to do it. Give me a bit of time to see if I can "successfully" do this with a solitary file and if so I'll post the edit instructions.

< Message edited by rkr1958 -- 10/26/2020 12:47:19 AM >


_____________________________

Ronnie

(in reply to ssiviour)
Post #: 137
RE: A Layman's Guide to Successfully Editing the MWiF G... - 10/26/2020 1:19:46 AM   
rkr1958


Posts: 19803
Joined: 5/21/2009
Status: offline
I'm afraid it's not as simple as I thought it might be. I was hoping that only a couple of line per air unit lent leased would change, with the exception of file saved timestamp. However, the lending of 2 air units resulted in 18 lines that changed in addition to the timestamp line 4 and also line 5 for some reason. So this looks to be more involved and "risker" that I had hoped. I guess my advice at this point is to live with the it as is and make the lend leases at your first opportunity.




Attachment (1)

_____________________________

Ronnie

(in reply to rkr1958)
Post #: 138
RE: A Layman's Guide to Successfully Editing the MWiF G... - 10/26/2020 2:13:46 AM   
ssiviour

 

Posts: 69
Joined: 8/8/2014
From: Australia
Status: offline
Oh well, thanks anyway Ronnie ... pity it's a handy little plane for the CW

(in reply to rkr1958)
Post #: 139
Page:   <<   < prev  1 2 3 4 [5]
All Forums >> [New Releases from Matrix Games] >> World in Flames >> Mods and Scenarios >> RE: A Layman's Guide to Successfully Editing the MWiF Game File. Page: <<   < prev  1 2 3 4 [5]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.164