Game Development Community

Map2dif - Hmmm

by Jace · in Technical Issues · 02/11/2005 (11:21 pm) · 15 replies

Hello everyone this is my first question on the forums so please be gentle!

First off:

Yes I use WorldCraft - Let's work past that and keep the Quark plugs to a minimum ;)

Question:

I am trying to export using map2dif and I recieve the following error.

Unable to write detail level to stream

I appreciate any help on this and thanks in advance!

#1
02/12/2005 (1:22 am)
Addition:

The code passing this error to the console is:

*removed*

It is apparently looking for a detail level in the map. This is what I have tried:

The map is named test_1.map
I set the worldspawn entity ("detail") to value 1 and name 1

I then tried to export the map to dif and I got the above posted error.
#2
02/12/2005 (1:38 am)
No showing code in a public forum!

Do you have a test_0.map?
#3
02/12/2005 (3:23 am)
Hey, no worries, please don't post parts of the SDK code in the public forum though, stuff like that is for the private forums. However, this isn't a code problem at all, merely it's just a simple problem, you've just got to check how you have your LOD setup, it's set up incorrectly.

Matt may have hit that one, the first map in the level of detail should always start with 0 (not 1).

Also, the key for the detail number setting in the map properties isn't "detail" it's actually "detail_number" and it's value should correspond to the _# in the file name (so 0 if it's test_0.map).

Also, you need to specify a min_pixel size with a value in the map properties section to let it know when to switch out to the next level of detail or else it won't pop of course!

For a good writeup on how LOD works in difs, check this site out.

It's written for Quark, but the same idea applies to hammer as well, you just need to set these values in the map-properties section (Quark and hammer are just two different tools that produce the same file, so the values and all are universal between the two).

Good luck
Tim
#4
02/12/2005 (8:25 am)
The map file that I am trying to export is named test_0.map

"classname" "worldspawn"
"detail_number" "0"
"detail" "0"
"min_pixels" "250"
"geometry_scale" "32.0"
"light_geometry_scale" "32.0"
"ambient_color" "0 0 0"
"emergency_ambient_color" "0 0 0"
"mapversion" "220"

This yields the same error as posted above.
#5
02/12/2005 (1:51 pm)
The map file that I am trying to export is named test_0.map

"classname" "worldspawn"
"detail_number" "0"
"detail" "0"
"min_pixels" "250"
"geometry_scale" "32.0"
"light_geometry_scale" "32.0"
"ambient_color" "0 0 0"
"emergency_ambient_color" "0 0 0"
"mapversion" "220"

This yields the same error as posted above.
#6
02/12/2005 (1:52 pm)
Apologies for the double post seems my refresh button is on the fritz!
#7
02/12/2005 (2:20 pm)
If you do not have multiple detail levels (IE. test_0.map, test_1.map, test_2.map) do not end your map name with an underscore + number ("_0", "_1", etc)
#8
02/12/2005 (3:17 pm)
Yes, harold is right, that was the next thing I was going to ask. Also, you can get rid of the key "detail", you don't need that AND detail_number. If you only have one map, it's going to freak out on you. :)
#9
02/14/2005 (6:23 pm)
Hmm does not seem to make a difference, I tried:

test.map with OUT any detail level..

And it still yields the same error as posted above.
#10
02/18/2005 (4:17 pm)
Well if anyone uses Hammer with Torque just give me a hollar I am sure I am just missing an easy step.
#11
03/16/2005 (8:27 am)
@Jace

Did you ever solve this problem? I am having the same error. Any ideas?
#12
03/25/2005 (3:11 pm)
Having the same problem... even gone so far as to try big_empty_box0.map and getting "unable to write detail level to stream"

had to put a portal in it to avoid the "orphaned polys" error
#13
03/27/2005 (7:57 pm)
Ray, your name setup in that will probably screw up map2dif, too many underscore, and not in the proper spots.

Try this instead:

bigemptybox_0.map

Also, be sure to have a bigemptybox_1.map as well, or it won't work. If you just have one detail level, map2dif will be upset and not understand why.
If you have just one map, cut out any _#'s you have in the file name. You only need to start the _#'s once you have multiple maps.
#14
09/23/2006 (1:31 pm)
Not sure if you figured this out yet, but I've found that map2dif will spew with this exact error if you don't specify an output directory. So just add -o .\ before your .map name and it might fix this problem. (I spent an hour trying to figure out why my detail levels wouldn't work before thinking "Maybe it's just a bad error message and it actually means it cant write the detail level to a file it can't find").
#15
06/25/2009 (6:48 pm)
Hi Dave,

If you are still around, I just wanna say that you are god. Exporting is working perfectly using Crossover on a mac, before I had the detail stream error.

Thanks again