Difference between revisions of "EditWorld"

From Mod Wiki
 
(updated to match newer info, removed some outdated stuff and some info which probably shouldn't be on a public Wiki)
 
Line 1: Line 1:
EditWorld is the game's built-in map editor. It is accessed by typing '''editWorld''' in the console.<includeonly>
+
EditWorld is the game's built-in map editor. It is accessed by typing {{consolecmd|editWorld}} in the console.<includeonly>
  
 
{{main|EditWorld}</includeonly><noinclude>
 
{{main|EditWorld}</includeonly><noinclude>
  
== Useful information ==
+
== The Basics ==
 +
For the basics of using EditWorld, look at [[How do I|How do I... ?]]
  
=== Editing tips ===
 
If you have rotated a brush and want to know its rotation, select the brush and look at the transformation editor. You can copy the "yaw" value (the middle of the three values on the bottom row) as the "movedir" key for things such as func_doors.
 
  
=== To use references ===
+
== Using References ==
Right click in the XY window and select '''New Reference''' from the menu. Pick the world that you want to reference, and hit ok. There will be a pause while preview geometry is created and the world is loaded. After that finishes you'll have a model representing the world.
+
[[References]] are a great way of speeding up map development and working "off the grid".
 +
 
 +
Right click in the XY window and select '''New Reference''' from the menu. Pick the ''.world'' that you want to reference, and hit OK. There will be a pause while preview geometry is created and the world is loaded. After that finishes you'll have a model representing the world.
  
* Pressing ctrl + r + r will reload a reference.
+
* Press {{accelkey|ctrl}}{{accelkey|r}},{{accelkey|ctrl}}{{accelkey|r}} to reload a reference.
* Pressing ctrl + r + o will open the currently selected reference.
+
* Press {{accelkey|ctrl}}{{accelkey|r}},{{accelkey|ctrl}}{{accelkey|o}} to open the currently selected reference.
  
 
You can move it around, rotate, etc and it will appear where you place it when the world is compiled. You can also see it in render mode.
 
You can move it around, rotate, etc and it will appear where you place it when the world is compiled. You can also see it in render mode.
  
Current known issues:
+
When making a reference out of an existing map you'll generally want to move everything to the origin. Don't forget to recenter/update the origins for entities with brush/patch geometry or you might get leaks. The default shortcut for this is {{accelkey|Shift}}{{accelkey|O}}.
The preview is currently incorrect for references that have a reference inside of them. This should be fixed soon.
 
  
When making a reference out of an existing map you'll generally want to move everything to the origin. Don't forget to recenter/update the origins for entities with brush/patch geometry or you might get leaks. The default shortcut for this is Shift + O.
 
  
=== To convert an existing .map file to the new format ( with no terrain )===
+
== Converting an existing .map file to the new format ==
 +
* Start {{consolecmd|editWorld}}
 +
* Choose ''File -> Import .map -> Choose a ''".map"''''.
 +
* Save the map.
 +
* Compile the map from the Compile menu using ''Normal Compile''.
  
Start editWorld
 
* File->Import .map->Choose "mapname.map”
 
* Save the map
 
* Compile the map from the BSP menu using ''Normal Compile''
 
* Remove the old .map from SVN and add and commit '''mapname.world''' and '''mapname.entities'''
 
* Optional, only for major production maps:
 
** Copy '''mapname.proc''' and '''mapname.cm''' into the appropriate folder on megaserve ( currently \\Megaserve\ETQWDav\procs )
 
  
=== To convert an existing .map file to the new format ===
+
== Editing at angles ==
 
+
If you have rotated a brush and want to know its rotation, select the brush and look at the transformation editor. You can copy the "yaw" value (the middle of the three values on the bottom row) as the "movedir" key for things such as func_doors.
Start editWorld
 
File->Import .map->Choose “canyon.map”
 
Once that’s done loading, delete the dummy terrain mesh, since it’s not needed any more. Dmap knows about terrain now and will automatically include the mesh that you specify in the root of the .sft file.
 
Right click in the terrain editor and choose “New Tree.” sdRadiant will automatically find the terrain tree and load it.
 
Save the map and you’re done.
 
 
 
Convert your SFT and RTL files to the newest version with
 
'''convertSFT''' and '''convertRTL'''
 
Radiant needs to be loaded for these commands to be available.
 
 
 
=== To compile ===
 
Either use the BSP menu like usual, or if you don’t have sdRadiant loaded, type
 
''editWorld –compile canyon'' and it will do its normal routine of compiling.
 
  
*note that is isn't really recommended if you have a large map open, as you could run out of memory
 
  
If you only want to regenerate the .entities file (say, you changed a key-value pair and no geometry) use:
+
== To Compile ==
 +
* {{consolecmd|compile <mapname>}} at the console will do a full compile routine.
 +
** '''Note:''' It isn't really recommended to do a full compile from within editWorld if you have a very large map open, as you could run out of memory.
  
''compile -onlyents canyon''
+
* {{consolecmd|compile -onlyents <mapname>}} should be used if you only want to regenerate the ''.entities'' file (eg. if you only changed a key-value pair and not geometry).
 +
** '''Note:''' This will only regenerate the ''.entities'' file, and leave the ''.proc'' and ''.cm'' alone.
  
''noimagecompile'' is used from the console, it loades the map with no images to save on memory.
+
* {{consolecmd|noimagecompile <mapname>}} should be used from the console to compile the map without loading images, to save memory.
 +
** '''Note:''' If you use this, you will need to completely restart ETQW before you can test your map, as if you try and run the map straight after the compile finishes, it will have no images loaded.
  
This will only regenerate the .entities file, and leave the .proc and .cm alone.
 
  
=== Files ===
+
== Files ==
You’ll notice a few files sitting around before and after you’ve compiled. They are:
+
You'll notice a few files sitting around your {{filename|/maps/}} folder before and after you've compiled. They are:
  
* '''mapname.world''' – this is the equivalent to a .map file. It has everything you’d expect: entities, geometry, etc.
+
* '''mapname.world''' – this is the equivalent to a .map file. It contains everything you'd expect: entities, geometry, etc.
* '''mapname.proc''' – the processed geometry. This is the same as it’s always been.
+
* '''mapname.proc''' – the processed geometry.
 
* '''mapname.procb''' – the processed geometry in binary form.
 
* '''mapname.procb''' – the processed geometry in binary form.
* '''mapname.cm''' – the collision data for the map. This is also the same as it’s always been.
+
* '''mapname.cm''' – the collision data for the map.
 
* '''mapname.cmb''' – the collision data for the map in binary form.
 
* '''mapname.cmb''' – the collision data for the map in binary form.
* '''mapname.entities''' – this is what the game actually loads. It’s basically a stripped-down version of the .world file that holds only entity key-value pairs, plus additional keys that editWorld injects while it’s compiling. You should never edit this file manually, since it’s thrown away each time you compile and any changes will never make it back into the .world file.
+
* '''mapname.entities''' – this is what the game actually loads. It's basically a stripped-down version of the ''.world'' file that holds only entity key-value pairs, plus additional keys that editWorld injects while it's compiling. You should never edit this file manually, since it's thrown away each time you compile and any changes will never make it back into the ''.world'' file.
  
 
[[Category:Level Design]]
 
[[Category:Level Design]]
 
</noinclude>
 
</noinclude>

Latest revision as of 15:14, 3 December 2007

EditWorld is the game's built-in map editor. It is accessed by typing editWorld in the console.

The Basics

For the basics of using EditWorld, look at How do I... ?


Using References

References are a great way of speeding up map development and working "off the grid".

Right click in the XY window and select New Reference from the menu. Pick the .world that you want to reference, and hit OK. There will be a pause while preview geometry is created and the world is loaded. After that finishes you'll have a model representing the world.

  • Press ctrlr,ctrlr to reload a reference.
  • Press ctrlr,ctrlo to open the currently selected reference.

You can move it around, rotate, etc and it will appear where you place it when the world is compiled. You can also see it in render mode.

When making a reference out of an existing map you'll generally want to move everything to the origin. Don't forget to recenter/update the origins for entities with brush/patch geometry or you might get leaks. The default shortcut for this is ShiftO.


Converting an existing .map file to the new format

  • Start editWorld
  • Choose File -> Import .map -> Choose a ".map"'.
  • Save the map.
  • Compile the map from the Compile menu using Normal Compile.


Editing at angles

If you have rotated a brush and want to know its rotation, select the brush and look at the transformation editor. You can copy the "yaw" value (the middle of the three values on the bottom row) as the "movedir" key for things such as func_doors.


To Compile

  • compile <mapname> at the console will do a full compile routine.
    • Note: It isn't really recommended to do a full compile from within editWorld if you have a very large map open, as you could run out of memory.
  • compile -onlyents <mapname> should be used if you only want to regenerate the .entities file (eg. if you only changed a key-value pair and not geometry).
    • Note: This will only regenerate the .entities file, and leave the .proc and .cm alone.
  • noimagecompile <mapname> should be used from the console to compile the map without loading images, to save memory.
    • Note: If you use this, you will need to completely restart ETQW before you can test your map, as if you try and run the map straight after the compile finishes, it will have no images loaded.


Files

You'll notice a few files sitting around your /maps/ folder before and after you've compiled. They are:

  • mapname.world – this is the equivalent to a .map file. It contains everything you'd expect: entities, geometry, etc.
  • mapname.proc – the processed geometry.
  • mapname.procb – the processed geometry in binary form.
  • mapname.cm – the collision data for the map.
  • mapname.cmb – the collision data for the map in binary form.
  • mapname.entities – this is what the game actually loads. It's basically a stripped-down version of the .world file that holds only entity key-value pairs, plus additional keys that editWorld injects while it's compiling. You should never edit this file manually, since it's thrown away each time you compile and any changes will never make it back into the .world file.