View Full Version : Coding Map Build Script

2007-10-30, 07:59
I've made a simple map building script, which I have not yet fully tested but when packing muttrah it looked to be working perfectly and didn't have to delete any files or anything out of the .zips :)

Requires that you have 7zip (http://www.7-zip.org/) installed on your system, and at the moment with the script it needs to be installed to the default location: "C:\Program Files\7-Zip\7z.exe", but you can edit the script to change it to a diffrent location :)

Build script is pretty strait forward, just dump it into your map folder (/levels/*your map name*/) and run the script, will bring you to a menu and just follow it :D

Download the script here: https://www.dropbox.com/s/3hrdjdwc5oid049/build_pr_map.bat?dl=0

Hope you find this useful and feedback welcome :)

2007-10-30, 09:35
sure sounds nice, even though I might not understand it fully. Maybe I'll appriciate it more when I start doing some small mapping projects...

2007-10-30, 09:50
What exactly does this do?
Sorry I'm noob with all this stuff:-P

2007-10-30, 09:53
I believe it sets up some settings for building a PR map, so he dosnt have to answer too many questions about it in the future :D but its just my theory...

2007-10-30, 10:06
it builds the server and client .zips for the maps, putting the right files in each and making sure files that are not needed are not included to save space/packing time.

2007-10-30, 11:04
so would I do this before,after or during the making of my map?

2007-10-30, 11:07
you will do this when you want to test/play your map on a dedicated server. The map will have to be packed before it can be used in a MP game.

2007-10-30, 11:16
ah okay thank you;)

2007-11-24, 18:49
sounds to complicated ill leave tht up to the experts have fun guys

2008-02-15, 18:24
How exactly do I save this?
When I click the link a pile of text comes up,what do I save it as?

2008-02-15, 21:09
right click on the link, then click on "save link as" then save it on your pc and it will download the file.

2008-02-15, 21:15
Rhino;610564']right click on the link, then click on "save link as" then save it on your pc and it will download the file.


The link seems to be broken now though :o

2008-03-31, 13:16
Thanks for the tool, very useful.

2008-06-20, 16:16
Okay I'm stuck :|

I have downloaded 7zip,and installed it to the default location. I then but the build_pr_map.bat file in /pr_edit/levels/Test1.

How to I run it?

2008-06-20, 16:53
you double click on the .bat and follow the instructions.

2008-10-15, 00:28
Rhino;519233']I've made a simple map building script, which I have not yet fully tested but when packing muttrah it looked to be working perfectly and didn't have to delete any files or anything out of the .zips :)

Hope you find this useful and feedback welcome :)

This tool is to much!!!!!!!!


2008-10-19, 22:03
Hello, did I find this tool "build_pr_lightmaps.bat", is there some tutorial of like it is used?


2008-10-19, 22:44
like what you asked in my visitor messages, you do not need it... I am not going to repeat the details why again!

2008-10-20, 22:48
Rhino;829424']like what you asked in my visitor messages, you do not need it... I am not going to repeat the details why again!

forgives, I did not see that already it was answered.

2008-11-27, 13:10
When I try to run it, the program starts and shuts down in like 2 seconds, any clue to how to fix this?

2008-11-27, 13:20
you dont have 7z installed or you dont have it installed to the default path.

2008-11-27, 13:31
I have it installed in my C:drive, I just saved the file there and copied the .bat file to the map folder. that right or i'm I way off?

2008-11-27, 13:48
C:\Program Files\7-Zip\7z.exe

it should be there.

2009-01-24, 15:59
Every time I click on the link and Save As it downloads it as a text file :S

2009-01-24, 16:08
rename the file from .txt to .bat and it should work, or try anouther downloading app.

2009-05-25, 02:44
just would like to add.....LOVE THIS TOOL

2009-05-26, 18:49
I just tried this out. Very nice tool, thanks for putting it together.

2009-06-12, 15:25
I only get a client file...

Am i supposed to get Client and Server files?

Im going to try it again, and then check if i can run this map on my PR BRB


Well i couldnt find any server file, and i did the same thing again.

And it wasnt in my map list when i wanted to create a local server.

Ill try to check if the file is correct.


So what i found out was that i didnt have "DELETE" so i downloaded it. Not sure what directory its supposd to be in so i put it in C: Programfiler/ DELETE

And then i ran the file bUild pr mad.bat and an error message comes saying ti cannot find the Server.zip. Hmmm

Maybe it will work, its not done yet.


Ok so ive moved the Delete stuff into the zipie thingye 7 zip.

And i created a zip folder in "mylevel" called server. And the error message no longer showes, but still no Server file, just client.... HELP!?


i figured it out, i just switched the server.zip thingy infront to be C: programfiler/ etc. Instead of Program files. It works now.. Sorry

2010-03-21, 19:22

I used the script recently to pack a map with SP support, it packs SP stuff wrong, I'm guessing you didn't take those files into account?

First, one minor, script packs the Water folder into server.zip but thankfully without the envmap.dds file

The AI and AIPathFinding are supposed to go into the server.zip, but script also packs them into the client.zip

The GTSData is also server.zip only, but nobody packs that file except DiCE so it can be left out completely.

2010-03-21, 19:27
No it dose not support the AI files.

2010-03-21, 19:41
Umm... could you update it? :p

2010-08-22, 02:33
Bump, could you reupload it somewhere?

EDIT: Found an old copy of it lying around on my HDD.


2010-10-07, 22:07
Link is broken

2010-10-07, 22:09
try the one of Scr3amX2 its workin for me

2010-10-07, 22:30
Thanks I missed that one.
Guess I should look a little more carefully next time.
My bad

2011-01-09, 12:52
url is dead ...

2011-01-09, 13:03
Amok@ndy;1460029']try the one of Scr3amX2 its workin for me

if you had read my post :razz:

2011-01-09, 13:52

the script is included in teh pr_edit download


2011-08-08, 15:49
Not to be a pest or anything, but for some reason this script tries to pack files that are not even in the EA games folder for me. :S

2011-08-08, 16:00
everyone sets their files up differently, if theres extra files getting put into your server and client zips, just delete them after its packed

2011-08-08, 16:03
Ill get you a screenshot 1 sec...


Nevermind i seemed to have got it to work, just had to not run it in admin mode.

2011-12-13, 18:47
do you have an alternative DL link?

2011-12-14, 02:19
do you have an alternative DL link?

Its included in the pr_edit.rar from the Setting up the BF2 Editor for PR mapping tutorial (https://www.realitymod.com/forum/f189-modding-tutorials/14468-tutorial-setting-up-bf2-editor-pr-mapping-modding.html#post254101).


Its in mods>pr_edit>levels>build_pr_map.bat if thats the only file you need.

2012-05-09, 06:59
Not sure but the script doesn't do anything for me...started it from inside the map folder.

When I check the .bat I see that it states: 7zip and DELETE need to be installed and in your system path.

Sooo...what is DELETE and what is meant by "in your system path"?

Only reason I need to know that is because I can't see my changes appearing when testing the map in a local server. *confused*

Please help!

2012-05-09, 08:58
Do you have 7zip installed?

2012-05-09, 17:14
Yes...nothing happening though. BTW who doesn't have that or actually paid to end the winrar trial :)

I am not even sure if I had to zip it already...I placed about 130 caches and I can't get them to load...it still loads the .con that is way old and not even there anymore...I mean I replaced the gameplayobjects in "editor", "WIP" and "gamemodes" but it still only loads the old, already placed caches.

EDIT: was able to test my work anyway...the script is still not working though...I mean why would it suddenly anyway :)

2012-05-09, 20:14
make sure the paths are directing to the right 7zip so check /Program Files/ or /Program Files (x86)/

2012-05-10, 03:49

many thanks @ndy...should have seen that on my own really...didn't even think about it though! cheers

2012-12-24, 16:15
Link is dead

2012-12-24, 16:22
Link is dead

Try this: http://dl.dropbox.com/u/10481708/build_pr_map.bat

2012-12-24, 16:26
Thanks AF

2013-01-09, 15:34
I tried using this, i nstalled 7zip into the default at program files 86x and theni put the .bat file into my level folder and pressed it, cmd window appeared and i was able to choose 1 and press enter, then the window disappeared and nothing happened, anybody knows what the problem is ?

2018-05-02, 22:32
Updated OP with working link. I uploaded a simplified version of the original script which simply runs instead of asking you if you wanna run it or quit.