How to Get the Right Heap Size

Hi,

I’m trying to play the World in Flames CE Module. When I choose “all maps” setup I get a message that I don’t have enough memory and that I need to go to my heap size and increase it. I think I gone all the way up to 999,999MB and it still isn’t working. I notice there are two tabs that give heap size and I’ve increased them both. How do I make this playable?

It sounds to me like you might be adjusting heap preferences for two aspects of the VASSAL program generally, and not a specific module (these are different things). You mention two tabs–does one of them say “Converter” and the other “Tiler”? If so, adjusting those values will not help your situation.

Also, what amount of RAM does your computer have?

1 Like

That won’t work. If you set the max heap to larger than the amount of physical RAM your machine has, you’ll end up with a fallback value of something like 128MB.

The max heap setting you need to adjust is the one you’ll find in the Preferences of the Player after you’ve opened the module.

1 Like

Well, that has made some progress, I increased the Tiler file to 5160 as recommended by AI and did the same on the module’s general file as well. That allows the “all maps” scenario to open.

However, only the US mini-map and European map are opening. It isn’t opening the Asian or Pacific maps. Any advice?

Post the contents of your errorLog from a run where you had a problem.

I’m running the WIF CE Module with “All Maps”. When it loads it gives a list of errors: I don’t know how to fix all this.

Also when the game is loaded I’ve tried to go to File >There are 3 options: 1. Standard CE Maps, 2. Extended CE Maps, 3. SSW Maps. No matter which one I select they all go to > 4 Map Scenarios > Then there are two options that are grayed out These are: 1. Basic Setup CE Map Set 2. 1939 Global War Super Deluxe SSW Maps.

- WiF CE Maps and Units Combo version 1.5.7

  • Bad Data in Module: Source: (Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0))) Error: Possible infinite loop evaluating expression

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

  • Bad Data in Module: Piece: usaBPs Trait: Calculated Property - bpoints Source: {(Math.round((((((usares+usaoil-oilsave)>(usared+usablue)?(usared+usablue):(usares+usaoil-oilsave))-unfacts)*usaprodmult/100.0)+usabps)/(using2maps==“true”?2.0:1.0)))} Error: Expression evaluation error.

Ah ha. I solved the problem and it was a silly mistake. There were more “Options” for maps that I could scroll down and see. I didn’t see that at first. I was able to select a 4 map option and voila. Everything is there.

Greetings. As the module developer, I suggest setting the JVM Max Heap Size to around 4000MB or more. Use the Module Preferences not the Vassal launcher preferences.

The error message(s) are possibly due to the fact that I forgot to refresh the predefined games for version 1.5.7. You should do that as soon as possible.

Version 1.5.8 will out very soon.

1 Like

Note to module developers - Since Vassal 3.7.16 or thereabout, a new feature is available to allow a minimum “JVM Max heap” to be set for your module. Developers will find this under Global Options in the Editor.

2 Likes

Please allow me to make a suggestion. Take the Turn list from WIF FE and move it over to your module. Tracking the phases is helpful.

Games I play we just use the printed RaW. Across the maps, different players can be at different steps. Germany doing a land impulse can still do their stuff even though Japan is doing a naval impulse. I, personally, do not see any advantage of including this ‘function’.

1 Like

Fair enough.

1 Like

FYI, 1.5.8 has been uploaded to google drive. Version changes are in the google doc Combo Module Version Change History - Google Docs

1 Like

So, do I just go to modules > World in Flames CE module and download the new module from the link it gives?

Here is what the link shows in modules:

Does this have 1.5.8 or is this different?

Disregard. I went ahead and downloaded the link again. Sure enough, it’s version 1.5.8. I’ll share on boardgamegeek website as well that an update has been made :grinning_face:

World in Flames is a monster. Although the physical game is also a monster, there are certainly things that can be optimised in the module.

Many of the board images are very large, e.g., the image Asia.png is 12052 pixel × 35410 pixel = .426761320 pixels, or 400 Mega pixels. Each pixel, when in memory is around 24 bits, or 3 bytes, meaning the Asia.png image takes up more than 1 GB of data.

If the board images are scaled down by factor 2 to 6026 pixel × 17705 pixel, which takes up a quarter of the memory - or around 300 MB. It is still a lot, but more more manageable. I know that Vassal tiles the images, and can thereby operate with smaller images, but the data still has to be swapped in and out of memory.

The board images (and consequently the piece images) can easily be down-scaled without loss of resolution - even when the boards are zoomed into 300% or so.

But, that’s only half of the story. The module uses embedded definitions of pieces in Place Marker and Replace with Other traits. That means, when Vassal reads in other pieces with these traits, the embedded marker (typically faction control markers) are replicated for every piece. That means, that the data is duplicated many times over and taking up a lot of memory and a lot of disk-space in the .vsav files of the embedded scenarios.

Of course, if one is to scale down the board and piece images, there are loads of other settings in the module that need to be adjusted too - such as grid sizes, offsets, and so on. That’s a lot of data to modify. Fortunately, one can use pywargame to automatise that tedious job.

I made a version of the module WiF.vmod where I did the downscaling of the module, including the various settings. There might be things that would need adjustments in this version. You can download it from the above link but please take it as soon as possible, as i will remove it from Google Drive in not too long.

The above version of the module isn’t all that smaller (749MB) than the one linked from the library (887MB), even though the image are reduced quite a bit. The reasons for that are multiple

  • I did not use aggressive ZIP compression as done in the other one
  • I did not do optimisation on-disk size of embedded PNGs, as I was more concerned about the run-time consequences.
  • The embedded piece definitions noted above, plus the shear number of pieces, makes the embedded .vsav files blow up in size on disk, and to some extent, also at run-time.

With the reduced board and piece images, the module can be run more comfortably with standard Vassal settings, and it takes a lot less time to open a scenario, irrespective of the minimum heap size set in the module.

Yours,
Christian

1 Like

Thank you, Christian.

I’ve downloaded your version. I’ll check it out.

Question: Why are the maps in WIF CE and WIF Final slightly different?