WorldStuffer 1.0
by John Doppler Schiff · 09/05/2006 (11:21 pm) · 1 comments
Download Code File
Q: What is it?
A: WorldStuffer is a command line utility for inserting a block of attributes into the WorldSpawn entity of a .MAP file.
Q: Why?
A: The utility was designed to supplement Leadwerks' 3D World Studio 5.49, for easier use with Torque. 3DWS generates a minimal worldspawn, but that entity cannot be edited within the program. To add advanced attributes like light_geometry_scale or detail_number, it's necessary to tab out of the program, edit the .MAP file by hand, then manually run map2dif on it. WorldStuffer eliminates that handicap.
Q: How?
A: WorldStuffer reads in an attributes file, then inserts that content directly below the worldspawn definition of your .MAP file. It's a simple program that doesn't do any advanced parsing or validation: it simply locates the worldspawn in your .MAP file, and jams your attributes straight up its entity.
Q: What's an attributes file?
A: It's just a text file that has the worldspawn attributes in it, one per line. You can copy these from an existing .MAP file, or use one of the attached templates as a starter. The attributes file should only contain the attributes that are missing from your .MAP.
Q: How do I run the utility from the command line?
A: Assuming that the utility, the map, and the attributes file are all in the same directory:
WorldStuffer myAttribFile.txt myMapFile.map
Q: How do I run the utility automatically from 3DWS?
A: In the Run Map feature of 3DWS, specify WorldStuffer as the first program to be run after export. In the parameters field, enter the following (substitute your own attributes filename):
mappath$AttribsFile.txt mapfile$
Q: How do I know if the program was successful?
A: Results are logged to worldStuffer.log.
Q: Any caveats?
A: Yup, three of 'em.
1. The utility overwrites your .MAP file. This isn't an issue in 3DWS, as the .MAP files are generated each time you export your map, but if you're using other software that only saves in .MAP format, make sure you're not working on your sole copy.
2. WorldStuffer is a fairly simple-minded program that doesn't check for malformed attributes or duplicates. Proofread your attribute files carefully.
3. Keep out of reach of children. They like to punch you in the crotch when you least expect it.
If you have any problems, send an email to johndopp@yahoo.com and let me know what happened. I'll do my best to resolve it.
Happy mapping!
Q: What is it?
A: WorldStuffer is a command line utility for inserting a block of attributes into the WorldSpawn entity of a .MAP file.
Q: Why?
A: The utility was designed to supplement Leadwerks' 3D World Studio 5.49, for easier use with Torque. 3DWS generates a minimal worldspawn, but that entity cannot be edited within the program. To add advanced attributes like light_geometry_scale or detail_number, it's necessary to tab out of the program, edit the .MAP file by hand, then manually run map2dif on it. WorldStuffer eliminates that handicap.
Q: How?
A: WorldStuffer reads in an attributes file, then inserts that content directly below the worldspawn definition of your .MAP file. It's a simple program that doesn't do any advanced parsing or validation: it simply locates the worldspawn in your .MAP file, and jams your attributes straight up its entity.
Q: What's an attributes file?
A: It's just a text file that has the worldspawn attributes in it, one per line. You can copy these from an existing .MAP file, or use one of the attached templates as a starter. The attributes file should only contain the attributes that are missing from your .MAP.
Q: How do I run the utility from the command line?
A: Assuming that the utility, the map, and the attributes file are all in the same directory:
WorldStuffer myAttribFile.txt myMapFile.map
Q: How do I run the utility automatically from 3DWS?
A: In the Run Map feature of 3DWS, specify WorldStuffer as the first program to be run after export. In the parameters field, enter the following (substitute your own attributes filename):
mappath$AttribsFile.txt mapfile$
Q: How do I know if the program was successful?
A: Results are logged to worldStuffer.log.
Q: Any caveats?
A: Yup, three of 'em.
1. The utility overwrites your .MAP file. This isn't an issue in 3DWS, as the .MAP files are generated each time you export your map, but if you're using other software that only saves in .MAP format, make sure you're not working on your sole copy.
2. WorldStuffer is a fairly simple-minded program that doesn't check for malformed attributes or duplicates. Proofread your attribute files carefully.
3. Keep out of reach of children. They like to punch you in the crotch when you least expect it.
If you have any problems, send an email to johndopp@yahoo.com and let me know what happened. I'll do my best to resolve it.
Happy mapping!

Torque 3D Owner Jesse Liles