I built a little tool for building precache scripts for MoHAA. It's a commandline program that reads a .map file and the script and uses the data it finds to create a precache script for you. Due to a parsing deficiency (I'm trying to fix it), reading BSP files is not supported yet.
http://iqstudios.quakedev.com/precacher wrote:MoH Precacher is a simple command line tool to build precache scripts for Medal of Honor Allied Assault maps. Let's take a look at the program's help message:
MoH Precacher v0.1 - a MoHAA precache script builder
Copyright (C) 2006, Leszek Godlewski
Usage: precacher.exe [OPTIONS] <MAPFILE>
Options:
-a, --all Precaches all found models no matter if they're included in
dmprecache.scr or not (i.e. for single player maps).
-b, --bsponly Parses the map file only (skips script parsing).
-s, --single Precaches some common single player map items (forces
--all to be on).
-c, --nocommon Switches off adding some common precached items.
-p, --noprefix Switches off adding the models/ prefix to paths that don't
contain it.
-h, --help Displays this help message.
By default a precache script for a multiplayer map is created. The options are pretty self explanatory. The program takes a filename of a .map file and loads it into memory, then it parses out all the .tik files from it and adds them to the cached item list. After that, it tries to open a script by the same name (but with .scr extension) and parses all the models out of it as well. When all this is done, the final result is written into foobar_precache.scr (for mapfile called foobar.map). There you go!
You can grab the program here. It's released under GPL, which means the source is available as well.
Enjoy!
Last edited by Rookie One.pl on Fri Dec 15, 2006 8:15 pm, edited 2 times in total.
Ah, yeah, I updated the links, the site's still a work-in-progress. But if you went to the main page (http://iqstudios.quakedev.com/) and then to downloads, you would find it.