KatsBits Community

Creating mapsize data for Quake 4 MP maps

kat · 1 · 5381

0 Members and 1 Guest are viewing this topic.

Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2659
    • KatsBits
What is 'mapsize'?
If you look at the *.def file for a Quake 4 multi player map it has a section similar to the text below;

Code: [Select]
"size0"  "130932507"
"size1"  "130932507"
"size2"  "130970639"
"size3"  "444323314"

This is the mapsize data. The game uses this information so it knows how much memory the map and it's assets take up when loaded into Quake 4. Although for the most part it doesn't appear to be uber necessary for custom maps it's always a good idea (and good practice) to generate the data whenever possible.

How do I create mapsize data?
To create the mapsize data you need to use a special *.bat file (a file that can be 'executed' in a similar wat to the Quake 4 short cut icon) that contains a number of cvar commands and the path/name of the map the data needs to be generated for. The file is saved to the games asset folder; q4base/ and then executed from there (double click on the file).

Creating mapsize.bat
Copy, paste and amend the following text so it points to your Quake 4 map; change the name and folder location where appropriate (make sure you use the correct file path);

Code: [Select]
@echo off
quake4.exe +com_updateloadSize 1 +si_map mp/kat_q4dm1.map +si_pure 0 +spawnserver +wait

Then save the file as mapsize.bat to the q4base (or your mod) folder. You should end up with a path to the bat file similar to this;

Code: [Select]
Quake 4/q4base/mapsize.bat
Once in place double click the file to execute it. Quake 4 should open and the map being referenced should load. Close Quake 4. If you then find the maps *.def file (in the def folder) you should have a new or amended entry there; size0 to 4 will have been updated or changed depending on what quality settings you were just running the game at.
Rinse and repeat for each quality setting

Design note : After you run the script, you might find it easier to then change the quality setting before closing the game and then restarting the bat file. You can add various cvar commands to the bat file to do this but the file above has been kept simple for the sake of ease of use.

You can download mapsize_bat.zip from here if you have problems copy/pasting the text above. Simply extract or drag and drop the file to your q4base folder and use as described above. Visit iddevnet for more information >>