Page 1 of 3

BSPPack - ending your packaging worries? [UPDATED]

Posted: Fri Oct 15, 2004 4:49 pm
by NRGizeR
Hey,

I just wrote a little Java program for packaging maps. It can be used for packaging your own map for distribution, or f.ex. if you want to send a map (any map) to a friend.

get it here: http://www.nrgizer.com/apps/BSPPack.zip

It works pretty much like this:
- Reads the BSP and determines what files are needed.
- Finds these files.
- If anything is missing, it asks you about it.
- Puts it all together in a .zip file.

It hasn't really been tested at all (other than on my own computer where it seems to be working fine), so I can't make any guarantees that it will work... but it should :P

It doesn't read .pak files, so if you don't have your textures/sounds/skies unpacked, this won't work, also it also tries to find files that is included in the q2 .pak files (if those are used/needed) so it might report those as missing, but you don't have to worry about that :)

It uses the Java VM, so if you don't have that, go to http://java.sun.com/j2se/1.4.2/download.html to get the latest JRE.

And oh yeah, read the readme.txt.

feedback is very welcome!

tutorial found at: http://www.nrgizer.com/apps/bsppack.html

P.S. I do know that MapSpy can also compile a list over files needed, but in my experience, it's still somewhat time consuming (and sometimes difficult) to package maps anyway... If there are other programs out there that will do this exact thing, I haven't heard about them :)

[edit]replaced the URLs since my uni account will be deleted shortly.[/edit]

Posted: Fri Oct 15, 2004 4:55 pm
by Ballhead
Sounds good :)

Posted: Fri Oct 15, 2004 4:59 pm
by Serpent
/me luvs NRGizer <3

Posted: Sat Oct 16, 2004 4:15 am
by NRGizeR
serpent: :mrgreen:

what I have on my todo list still:

* adding an ignore list (a simple text file containing files to ignore, i.e. not put in the .zip archive, this would in practice be files already in the q2/aq2 paks..)
* possibly adding a GUI to it all...
* add more sanity checks to make sure that the correct files are chosen, and that all required files are included...

EDIT: As of now, this is all added and updated...


Anything to add? Suggestions? Improvements? :)

-NRG

Posted: Sat Oct 16, 2004 10:35 am
by ghoulert
Dude, that rocks, i've been waiting for such a program for ages :) Never actually tried to find one on the net tho -_-

good work :hop:

Posted: Sat Oct 16, 2004 10:51 am
by TenchiXD
auhm... sounds good...

I try it... :bday:

Posted: Sat Oct 16, 2004 3:59 pm
by Royal^
Nice

Posted: Sun Oct 17, 2004 1:35 pm
by Flunx
awesomeness! :bday:

Posted: Mon Oct 18, 2004 4:25 am
by zakath
holy crap, good job. <3

Posted: Mon Oct 18, 2004 5:12 am
by n99
I have added this program to the links > tools section on the aq2world site. Please notify me if there are any changes in the location or name of this file.

Posted: Mon Oct 18, 2004 8:50 am
by Haudrauf
One thing always comes to my mind when talking about map-packages...

Are all file-links in the .bsp files correct? Does the link fit? On case-insensitive operating-system like on windows it does fit. But it does not on, for example, Linux.

Of course this is more the map-makers job to check for it. But sometimes they screw up and refer to a lowercase filename whereas the textures were packaged as uppercase, which screws it all up.

There can be many solutions to this:

- Do it right the first time: the map-bsp refers to lower-case textures and the textures are all lowercase.
- Make the clients case-insensitive by matching files for EvErY case.
- Let the .bsp refer to the right filename with its real upper/lowercase - and thus textures are to be correctly packaged.


The last point is for this program I suppose.
First, searching the .bsp for the referred filenames.
Second, finding the files on the filesystem, whether they are in the right CaSe or not.
Third, if the files aren't in the right upper/lowercase then it should rename the files to the name the .bsp really refers to before they get packaged.

Posted: Mon Oct 18, 2004 9:18 am
by NRGizeR
Haudrauf wrote:Are all file-links in the .bsp files correct? Does the link fit? On case-insensitive operating-system like on windows it does fit. But it does not on, for example, Linux.
Since the program is written in java, this will depend on what platform you are running it... MapSpy can be used for rename (why not keep all files in lowercase to begin with? :P) so I didn't add it to BSPPack, shouldn't be hard to do tho... I was also somewhat scared to actually change a file since that would also mean the risk that a bug would do damage to textures or maps, which would make me a very impopular guy :) Still recommend backing maps often (for many different reasons) :) You managed to write quite a long post just talking about case sensitivity tho :) (no offence!)

Any bugs found yet? There has to be some in there... There has to be.... I wrote the damn thing :mrgreen:

Posted: Mon Oct 18, 2004 10:54 am
by Haudrauf
I was also somewhat scared to actually change a file since that would also mean the risk that a bug would do damage to textures or maps, which would make me a very impopular guy.

Just rename the files for the packaging process.. of course, don't rename it in the gaming-directories. :/

And, remember, it's not the right way to change the contents of a .bsp to fix the links to the external files as a third party. (Only the map-maker is 'allowed' to re-release his own maps)
Because, changing the .bsp would change the checksum .. so you wouldn't be allowed to change the .bsp with your program :)...

that's a reason why I took the time to write the possible options. :)

Any bugs found yet? There has to be some in there... There has to be.... I wrote the damn thing Mr. Green
A directory searcher would be nice :)

Posted: Tue Oct 19, 2004 3:48 am
by NRGizeR
Hehe... now that you mentioned it I had to check, and BSPPack DOES keep the case as in the .bsp, which means that it should be compatible with all platforms... (at least my code says so :mrgreen: )

I still made a new NEW VERSION tho, 1.3, which has the following:

1.2 --> 1.3
- Added a browse function for the .bsp (didn't add one for the paths, because the java file dialog
doesn't support choosing a directory)
- Added an include list.
- Fixed a few bugs.

url is the same as before: http://www.abo.fi/~cbjorkel/apps/BSPPack.zip

the include/ignore lists are situated in include.txt and ignore.txt respectively.. The old version used ignorelist.txt so it's safe to delete that file if you want to. For more info on the ignore/include list, read the readme.txt...

Posted: Tue Oct 19, 2004 3:49 am
by n99
Very offtopic, but since the workings of this program might be somewhat similar (heck, I dunno) I wanted to ask you to write something else. I have like 8-9 pak's at the moment. Whenever a new pak comes out, with textures, conbacks, hairs or whatever, I download it, give it the last number, than delete the files I do not like. What's the problem you ask me? Well I want to have them all in one pak, so it's easy for me to bring along, to, for instance, uni. How about a progam that starts at the last pak and works back to the first, extracting them all in one folder, then packing them back into one pak, would that be hard?