Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Developer Diary #2 - Having fun with randomly generated battles

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

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [Current Games From Matrix.] >> [World War II] >> John Tiller's Campaign Series >> Developer Diary #2 - Having fun with randomly generated battles Page: [1]
Login
Message << Older Topic   Newer Topic >>
Developer Diary #2 - Having fun with randomly generated... - 5/15/2014 4:48:21 PM   
Crossroads


Posts: 14393
Joined: 7/5/2009
Status: offline
As I wrote in Berto's Coder Diary #20, I've never really bought into randomly generated battles. And as I wrote there - my loss!

"Let's do: Battle of Java 1942"


With 2.01 you can open up the Battle Generator timelines to include time periods that previously were not available, such as the Japanese invasion of Manchuria, in 1931.

Then, you can tweak the various Campaign##.oob Order-Of-Battle files to include the correct units to use, if not previously available.

quote:

"##" refers to nation codes, for example Japan with its country code 21 has a Campaign21.oob you can tweak.


If that sounds a bit mysterious, here's a little guide to create random scenarios of your favorite operations.

So, first let us select a battle. I chose the battle of Java. As I am no expert on Pacific ToW, I need something to start with.

Wiki: http://en.wikipedia.org/wiki/Battle_of_Java_(1942)

quote:

Battle of Java takes place in a supported time period, so this is something that can be tried out with 2.00 (or 1.04) as well.



#1 - Package it as a User Modification

quote:

Warning: Changing the content of any of the data files that come with the game can cause errors that lead to a crash.

What I am doing next is altering the Japanese and Dutch Dynamic Campaign Game unit rosters to include only units that were involved in the battle of Java. In order to have the original campaign files available for any other gaming, I will deploy my files as a separate modification, that can be easily installed and uninstalled to and from the game folder. I strongly advice anyone to do the same.

As of 2.01, all the User modifications are packaged in main folder, under \Mods sub folder. To easily have them available, a mod management utility called JSGME.exe will also be located in the main folder, readily available by simply launching the exe. The utility is already included on the 2.00 install, under the \Tools folder, from where it needs to be copied to main folder.

A JSGME User Guide is available there for more information.

Using JSGME is very easy, once you've figured the basics out.


To adhere to my own warning, I will deploy my altered files with the aid of the JSGME mod management tool.

To add my little mod there, I first create a folder with the name of my mod. The end result is the following folder (see Step #3 as how it will look):

C:\Matrix Games\John Tiller's Campaign Series\Mods\RS - Battle of Java 1942 BG Mod

Under that folder, I recreate the installation path the tool will use. This is the end result:

C:\Matrix Games\John Tiller's Campaign Series\Mods\RS - Battle of Java 1942 BG Mod\Rising Sun

Under the \Rising Sun folder there, I will copy the two Campaign##.oob files from the actual Rising Sun folder: Campaign11.oob file for the Dutch forces, and Campaign21.oob for the Japanese forces.

It is these ones (not the original ones in actual Rising Sun folder!) that I tweak:



As 12/1941 to 3/1942 is included in the Battle Generator timelines, now in a file called timelines.dat, I will not need to tweak that. Otherwise I would have copied that file under this mod package as well.


Attachment (1)

< Message edited by Crossroads -- 10/20/2017 4:43:56 PM >


_____________________________

Visit us at: Campaign Series Legion
---
CS: Vietnam | CS: East Front 1939-1941 IN-THE-WORKS
CS: Middle East 1948-1985 Fully reimaged v2.0 available now!
Post #: 1
RE: Developer Diary #2 - Having fun with randomly gener... - 5/15/2014 5:01:01 PM   
Crossroads


Posts: 14393
Joined: 7/5/2009
Status: offline
#2 - Campaign##.OOB files: Putting In The Proper Order-of-Battle!

Looking at the two Campaign##.oob files, I can see their content is very generic for the time period. I delete the content of the Dutch file first, and looking at the OoB files included in Rising Sun, I quickly locate the Dutch Java Defence Force from the Dutch Corps11.oob. I add that to Campaign11.oob in my mod folder instead.

Then, having studied the Wiki article, I will need to add the British and US formations as well. After some time looking at the British (09) and US (10) OOB files, I include the necessary lines into the Dutch Campaign file (yes, you can do this!).

I first looked at the UK Hussars armored formations, found the 7th Hussars, and included it here. Then, I looked at the AA formations of the time period, and included those units there as well. Finally, located the unit to act as the US Lost Battalion of the battle. Added it too.

The end result is as follows, with correct unit names entered where one was not available:

quote:


Campaign11.oob :

[------------------------NEI Corps Formation------------------------------]
[----------------------- Battle of Java 1942 -----------------------------]
41 12 42 03 K1152001 6 Java Defense Force
41 12 42 03 P11306 Java Defense Force HQ
41 12 42 03 D1142002 1st KNIL Infantry Division
41 12 42 03 D1142003 2nd KNIL Infantry Division
41 12 42 03 D1142004 3rd KNIL Infantry Division
41 12 42 03 B0918028 77th Heavy AA Regt
41 12 45 08 B0918024 21st Light AA Regt (Army Troops)
41 12 45 08 B0918024 48th Light AA Regt (Army Troops)
42 03 42 03 B0910005 3rd Hussars
41 12 42 03 B1011043 2/131st Field Artillery Battalion (75mm Tow Art)
41 12 42 03 B1119006 Mobiele Eenheid
41 12 42 03 B1118006 Anti-Aircraft Battalion (Mixed)
41 12 42 03 B1118007 Anti-Aircraft MG Battalion


Note the Brits (09) and US (10) organizations there as well

Then, I will need to do the same for the Japanese organizations.

Again, I read the Wiki article to learn which units were used, and again I quite easily locate their Southern Army OoB from Corps21.oob, and add it to the Campaign21.oob in my mod folder. Renaming the other division as 2nd Infantry Division, it is good to go there:

quote:


Campaign21.oob :

[------------Southern Army 1941 - 1942----------]
41 12 42 05 K2152023 8 14th Army
41 12 42 05 P21306 # Army HQ
41 12 42 05 D2142004 2nd Infantry Division
41 12 42 05 D2142008 48th Infantry Division
42 01 42 05 G2132004 65th Independent Mixed Brigade
41 12 42 05 B2110004 4th Tank Regiment
41 12 42 05 B2110004 7th Tank Regiment
41 12 42 05 B2115003 3rd Engineer Regiment
41 12 42 05 B2115003 21st Engineer Regiment
42 01 42 05 C2105014 3rd Separate Engineer Company
41 12 42 05 R2121013 1st Heavy Artillery Regiment (150mm Gun - Army Troop)
41 12 42 05 R2121009 8th Heavy Field Artillery Regiment (150mm How - Army Troop)
41 12 42 05 B2111027 9th Ind Hvy Fld Art Battalion (150mm How - Army Troop)
41 12 42 05 B2118004 45th Field Anti-Aircraft Artillery Battalion
41 12 42 05 B2118004 47th Field Anti-Aircraft Artillery Battalion
41 12 42 05 B2118004 48th Field Anti-Aircraft Artillery Battalion
41 12 42 05 C2108003 30th Ind Fld Anti-Aircraft Company (Army Troop)
41 12 42 05 C2108003 31st Ind Fld Anti-Aircraft Company (Army Troop)
41 12 42 05 B2117007 15th Med Mortar Battalion (150mm Mtr - Army Troop)
41 12 42 05 B2111030 3rd Ind Fld Artillery Battalion (75mm Fld Gun)
41 12 42 05 B2111030 8th Ind Fld Artillery Battalion (75mm Fld Gun)
41 12 42 05 B2111030 9th Ind Fld Artillery Battalion (75mm Fld Gun)
41 12 42 05 B2111030 10th Ind Fld Artillery Battalion (75mm Fld Gun)


quote:

Note to myself: I really should trim down these OOBs further more. If I play at Battalion size mostly, why would I have full Army Corps as a starting point? Then, the randomly generated battles would have a better chance to actually include the actual specific fighting units I want.



< Message edited by Crossroads -- 5/16/2014 7:47:24 AM >


_____________________________

Visit us at: Campaign Series Legion
---
CS: Vietnam | CS: East Front 1939-1941 IN-THE-WORKS
CS: Middle East 1948-1985 Fully reimaged v2.0 available now!

(in reply to Crossroads)
Post #: 2
RE: Developer Diary #2 - Having fun with randomly gener... - 5/16/2014 5:57:50 AM   
Crossroads


Posts: 14393
Joined: 7/5/2009
Status: offline
#3 - Installing and Uninstalling the Modified Files

I double click at the JSGME.exe, and promply locate my RS - Battle of Java 1942 BG Mod mod in the left window. I select it, and move it to right window. The modified files now replace the original files of the same name for the duration the mod remains enabled.

Once I get tired of this, or want to play with original files, I simply fire up JSGME again and move the mod from the right window to left window, disabling it.

The modified files will be gone from the original Rising Sun folder, while the original files are returned there.

This is how its done:




quote:

For this to work, the JSGME.exe must be located at: C:\Matrix Games\John Tiller's Campaign Series\JSGME.exe. That it is how it will be packaged in 2.01. With 2.00, you need to manually copy it from the \Tools folder into this location.



Attachment (1)

< Message edited by Crossroads -- 10/20/2017 4:43:41 PM >


_____________________________

Visit us at: Campaign Series Legion
---
CS: Vietnam | CS: East Front 1939-1941 IN-THE-WORKS
CS: Middle East 1948-1985 Fully reimaged v2.0 available now!

(in reply to Crossroads)
Post #: 3
RE: Developer Diary #2 - Having fun with randomly gener... - 5/16/2014 5:58:11 AM   
Crossroads


Posts: 14393
Joined: 7/5/2009
Status: offline
#4 - Battle Generator Time!

Ready to Rock and Roll!

Firing up the Rising Sun Main Menu, and selecting the Generate Battle option, I try out the following:

As the British Hussars unit within the original OoBs was not available until 3/1942, the last month of the battle of Java, I put that as the date.

Then I select Japan vs Dutch, as it was the Dutch Campaign11.oob files I put the Commonwealth and US troops in.

Then, I select Battalion size, Tropical, Delaying Action, and Lt Hills with Md Jungle to go with it.

Press the button, and there we go, our very first battle of Java 1942 generated!

Proper units, if otherwise hypothetical

Before playing, I will add one further step though...

I exit the battle without playing it. Why?


< Message edited by Crossroads -- 5/16/2014 8:09:08 AM >


_____________________________

Visit us at: Campaign Series Legion
---
CS: Vietnam | CS: East Front 1939-1941 IN-THE-WORKS
CS: Middle East 1948-1985 Fully reimaged v2.0 available now!

(in reply to Crossroads)
Post #: 4
RE: Developer Diary #2 - Having fun with randomly gener... - 5/16/2014 5:58:29 AM   
Crossroads


Posts: 14393
Joined: 7/5/2009
Status: offline
#5 - A Bit More Order to the (Random) Chaos

As I have generated battles before, looking at the Rising Sun folder I see the new three files having appeared there: Random5.scn (scenario file), Random5.map (map file) and Random5.org (organization file).

quote:

The file numbering will start from zero, so the very first random battle you'll generate will have Random0 as file names. Then, up it goes. This was my sixth Random Battle, hence the number 5 in file names.


I then fire up Organization editor (Edit Order of Battle, from Main Menu), and have a look at the Random5.org. The game engine has properly input all organizations there.

Per Berto's reminder, let us not forget the generated map file either. Fire up the Map Editor from Main Menu, look at the Random5.map. Modify and add details, then save it.

Then, I fire up the Scenario editor (Edit Scenario, from Main Menu), to look at the units and how they were randomly input into map, in scenario file Random5.scn. Also, any changes you did to the map file are now taken into account.

Often the generated files are not optimal, but in any case I am happy to find out the Dutch are there, together with the Lt tanks of the 3rd Hussars.

The 2./131st Artillery Regt is not there, so I input the Forgotten Battalion there myself, from the Scenario Editor's Unit Dialog. I also input a better name for the scenario, so I can easily find this when opening up the battle via the Rising Sun menus. Then: save, exit.

A long story, but simple steps to get here. And here we go:

A nice little counter attack by the ABDA Command Force taking place in the jungles of Java!




Attachment (1)

< Message edited by Crossroads -- 10/20/2017 4:45:54 PM >


_____________________________

Visit us at: Campaign Series Legion
---
CS: Vietnam | CS: East Front 1939-1941 IN-THE-WORKS
CS: Middle East 1948-1985 Fully reimaged v2.0 available now!

(in reply to Crossroads)
Post #: 5
RE: Developer Diary #2 - Having fun with randomly gener... - 5/16/2014 5:58:58 AM   
Crossroads


Posts: 14393
Joined: 7/5/2009
Status: offline
#6 - Conclusions

It took me far longer to write this diary, than to actually come up with a nice set-up for firing up random battle after random battle of the Battle of Java

Lessons learned:

The more limited the timescale, the more precise the units you put in your parameter files, the more control you will have with the end result of the random battle.

A quick tweak with the Editors to tidy up everything will probably be worth the effort. Transports especially may end up in silly places.

Importantly:

I hope this gave you some ideas as how to get a bit more fun out from the good old battle generator. I have not tested the formations (Campaign##.oob files) thoroughly, but at least with a couple of Battalion sized battles I tried out all went well.

Being somewhat familiar with various OOB files, and having a nice text editor with a good Find tool, all this took me something like 30 minutes, including reading the Wiki article for the first time.

Now, anytime I want, I can quickly create more Java 1942 battles , using the various options on the Battle Generator menu. Any modified scenarios can also be saved and put aside for later replay fun


To battle stations!



< Message edited by Crossroads -- 5/16/2014 7:52:34 AM >


_____________________________

Visit us at: Campaign Series Legion
---
CS: Vietnam | CS: East Front 1939-1941 IN-THE-WORKS
CS: Middle East 1948-1985 Fully reimaged v2.0 available now!

(in reply to Crossroads)
Post #: 6
RE: Developer Diary #2 - Having fun with randomly gener... - 5/16/2014 5:59:12 AM   
Crossroads


Posts: 14393
Joined: 7/5/2009
Status: offline
Next, to have real fun, I encourage everyone to mod the Battle Generator to include the August 1945 Russo-Japanese war.

quote:

You have not fought a hard battle until you lead your Type 95 HA-GOs against the late war Soviet armor!




To be able to do that, you'd need to tweak the timelines.dat too. So that has to wait until 2.01 is out.




_____________________________

Visit us at: Campaign Series Legion
---
CS: Vietnam | CS: East Front 1939-1941 IN-THE-WORKS
CS: Middle East 1948-1985 Fully reimaged v2.0 available now!

(in reply to Crossroads)
Post #: 7
RE: Developer Diary #2 - Having fun with randomly gener... - 5/16/2014 6:53:14 AM   
berto


Posts: 17245
Joined: 3/13/2002
From: metro Chicago, Illinois, USA
Status: online

quote:

ORIGINAL: Crossroads

I exit the battle without playing it. Why?

I would also pause, take the opportunity to tweak the random battle map. Some of the towns and roads especially in random battles can be ... annoyingly odd.

Editing random battles before playing them -- brilliant idea.

_____________________________


(in reply to Crossroads)
Post #: 8
RE: Developer Diary #2 - Having fun with randomly gener... - 5/16/2014 7:31:12 PM   
Warhorse


Posts: 5600
Joined: 5/12/2000
From: Birdsboro, PA, USA
Status: offline
I used to do this routine with every DCG scenario!!

_____________________________

Mike Amos

Meine Ehre heißt Treue
www.cslegion.com

(in reply to berto)
Post #: 9
RE: Developer Diary #2 - Having fun with randomly gener... - 5/17/2014 8:10:50 PM   
berto


Posts: 17245
Joined: 3/13/2002
From: metro Chicago, Illinois, USA
Status: online

This opens up new shared modding possibilities -- distributing custom random battle packs, sans .map & .scn files, but including the needed Campaign##.oob, timelines.dat (and other?) files -- for modeling all sorts of obscure "sideshow" campaigns. (For example, a "Liberation of Mindanao 1945" random battle pack.) I love it!

< Message edited by berto -- 5/17/2014 11:27:14 PM >


_____________________________


(in reply to Warhorse)
Post #: 10
RE: Developer Diary #2 - Having fun with randomly gener... - 5/17/2014 11:39:01 PM   
Warhorse


Posts: 5600
Joined: 5/12/2000
From: Birdsboro, PA, USA
Status: offline
Setting up next battle in a DCG for a friend, good stuff as well!!


_____________________________

Mike Amos

Meine Ehre heißt Treue
www.cslegion.com

(in reply to berto)
Post #: 11
RE: Developer Diary #2 - Having fun with randomly gener... - 5/18/2014 11:57:06 AM   
Crossroads


Posts: 14393
Joined: 7/5/2009
Status: offline

quote:

ORIGINAL: berto

This opens up new shared modding possibilities -- distributing custom random battle packs, sans .map & .scn files, but including the needed Campaign##.oob, timelines.dat (and other?) files -- for modeling all sorts of obscure "sideshow" campaigns. (For example, a "Liberation of Mindanao 1945" random battle pack.) I love it!


Liberation of Mindanao 1945 Random Battle Pack

What a neat idea! I would definitively like to see them being created and shared as well

Before the write up, I never thought to combine several nations into a selected nation's Campaign##.oob

Who's the first to create the West Front: Battle of Narvik May 1940 Random Battle Pack?

On the Allied Side: The Norwegian units, together with the Allied Expeditionary Force of French, British and Polish units. That's four nations.
On the Axis Side: those particular German formations that were involved.

Packaging them as user modidifications, limiting the timeline to the specific battle, and keeping the OOB short and sweet to assist the Random Battle Generator. Possibly tidying up a few scenarios and put them in the Random Battle Pack(tm) as well.

Who's first to give it a go?

_____________________________

Visit us at: Campaign Series Legion
---
CS: Vietnam | CS: East Front 1939-1941 IN-THE-WORKS
CS: Middle East 1948-1985 Fully reimaged v2.0 available now!

(in reply to berto)
Post #: 12
RE: Developer Diary #2 - Having fun with randomly gener... - 5/18/2014 12:13:42 PM   
Crossroads


Posts: 14393
Joined: 7/5/2009
Status: offline
Regarding the JSGME (JoneSoft Generic Mod Enabler), the whole installation package is available under the /Tools folder as of 2.00. Included is the user manual as well (JSGMEUG.pdf).

The brief examples I've tried to describe in my diaries won't probably be enough to explain the tool. Please see the User Guide there for more information.

I just realised it is possible to put a little "readme.jsgme" text file into each Mod folder, to provide a quick help window when hovering the mouse over each mod available.

So when packaging the Random Battle Packs, that can be used to make the basic information available to the users.

See the pic below:




I wish I would have been aware of this earlier, I could have put a little help file there to describe each of the User Mod that is included in the install.

Oh well, let us input those as of next release...


Attachment (1)

< Message edited by Crossroads -- 5/18/2014 1:16:15 PM >


_____________________________

Visit us at: Campaign Series Legion
---
CS: Vietnam | CS: East Front 1939-1941 IN-THE-WORKS
CS: Middle East 1948-1985 Fully reimaged v2.0 available now!

(in reply to Crossroads)
Post #: 13
RE: Developer Diary #2 - Having fun with randomly gener... - 5/18/2014 5:40:45 PM   
Crossroads


Posts: 14393
Joined: 7/5/2009
Status: offline

quote:

ORIGINAL: Crossroads

Who's first to give it a go?


Another one I would like to see: The First Indochina War Random Battle Pack

Modifying maybe the Thai and Red China oob files vs a modified French oob.


_____________________________

Visit us at: Campaign Series Legion
---
CS: Vietnam | CS: East Front 1939-1941 IN-THE-WORKS
CS: Middle East 1948-1985 Fully reimaged v2.0 available now!

(in reply to Crossroads)
Post #: 14
RE: Developer Diary #2 - Having fun with randomly gener... - 6/8/2014 5:49:04 PM   
Crossroads


Posts: 14393
Joined: 7/5/2009
Status: offline
Here's hoping everyone's enjoying the new 2.01 UPDATE

It took a while coming, with lots of effort put into the front end applications this time around, Random Battle Generation and Dynamic Campaign Games for most part.

With that, there's a few changes to how things played out before. Going forward, as described in the Coder Diaries, and in preparation of the coming Modern Wars titles, the error handling and logging in general is being tightened. Common code base, remember. Happened here too.

For an example, with engagement Sizes, there's been a few questions around already.

In 2.00 and before, there was code in place to fish around for different levels if the game data doesn't support the requested level. There we identified problems where the code might go into an endless loop (effectively a freeze), or crash, or create mismatches: pitting a regiment vs. a brigade or even higher.

Now, there's logic in code now for a level playing ground. No more Regiments vs Bridgades. Or whatever the game engine picked from the selected countries' unit data.

On the other hand, the data in OOBs should now allow for level engagement sizes as well.

Therefore, one can't randomly generate any battle, any combatants, any size, with a perfect chance of success where there was success with earlier versions.

Some sets of choices will fail to work now. But others will do. Try try again.

There's a commitment for continuous improvement on unit data, this will take time.

For an example; the tricky thing with the Russians in that in 1943, there weren't a lot of division organizations. For armoured forces, they were mostly Corps, which you'll be given a notification (not an error) for in DCG's, but not in the Battle generator. So if someone picks regiment and tries to generate an armoured fight with regiments, it automatically will fail because Russian forces are organized into Brigades.

So, if there's a certain era, certain nations, consider creating specific oobs for specific eras ("Random Battle Packs"). Something that adds a bit more realism to random battles, and something the community could share among themselves.

Or, keep the 1.04 around if you so prefer. The good and the bad will work as they did before.

As for the development team effort. The coding for Middle East, then Vietnam will now proceed. For CS, any code additions will have wait until 2.1 is out, after them.

If there's a need, we can easily provide hot-fixes for data, though. And what you are seeing with 2.01, are data issues. In a couple of weeks time I will post a detail Developer Diary regarding the Battle Generator / DCG unit creation. Stay tuned.


_____________________________

Visit us at: Campaign Series Legion
---
CS: Vietnam | CS: East Front 1939-1941 IN-THE-WORKS
CS: Middle East 1948-1985 Fully reimaged v2.0 available now!

(in reply to Crossroads)
Post #: 15
Page:   [1]
All Forums >> [Current Games From Matrix.] >> [World War II] >> John Tiller's Campaign Series >> Developer Diary #2 - Having fun with randomly generated battles Page: [1]
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.133