No worldspawn in map?


(Flotsam) #1

When I went to go open my map today i recieved the following error:

Loading map from C:/Program Files/Wolfenstein - Enemy Territory/tcetest/maps/castlemap2.map
ERROR: failed to open C:/Program Files/Wolfenstein - Enemy Territory/tcetest/maps/castlemap2.map for read
No worldspawn in map.
Map_New

When I first went to open GTKradiant it failed to open so i was forced to end the process, and then the next time i went to open it a box opened up saying something that I actually forget. Surprisingly though this time the editor opened and then i recieved the error above while trying to open my map. No maps open due to the same error, and I already tried reinstalling it. Any ideas?


(Flippy) #2

A common error, try a search on this forum for more information.

It is usually caused by a bug (I guess) which causes the worldspawn entity to move to the bottom of the map file (it should be on top). If you open your map file in Notepad, you can edit the code manually to fix it (after making a backup!).

If you open battery_final.map (or goldrush for that matter if you haven’t got the source maps) you can see the following at the very top:

// entity 0
{
"_mingridlight" "56"
"_minvertexlight" "18"
"ambient" "18"
"_blocksize" "1024"
"gridsize" "256 256 128"
"_color" "0.8 0.9 1.0"
"classname" "worldspawn"      
"mapcoordsmins" "-768 1664"
"mapcoordsmaxs" "7296 -6400"
"_fog" "textures/skies/sd_batteryfog"

(followed by a long list of brushes and patches)

As you can see, this is the worldspawn entity, and it’s on top.

You should open your map in notepad and find your worldspawn entity. Cut and paste everything of it to the very top of the file and it should work again! Be sure to include everything though (from the first opening brace {, to the last matching closing brace }).

If you can’t get it, show your map code here (in [code ][/code ] tags please!!) and we can help you.

EDIT
Interestingly enough, my own post (when I was still a noob hehe) comes up when I search for it:
http://www.splashdamage.com/forums/showthread.php?p=138860

It seems that it can also happen that your first entity is simply renamed to a different entity. If the first entity looks like it could be the worldspawn (it may have mapcoords set, and other key/values like in the battery map above) you could try renaming it to worldspawn ( “classname” “worldspawn”) instead of what it changed to.

Always make a backup first in case you screw it up (which is likely if you’re going to meddle in the code).


(Flotsam) #3

Nvm, I fixed my problem.

It turns out that random pk3 files can screw up how GTKradiant runs so all I had to do was delete the one messing it up.

Thanks anyway :slight_smile:


(mmysc) #4

i would advise u to install gtk radient in another et installation.