CHASM - The Rift (TM) Level Editor Manual Table of contents: 1. Creating a room 1.1. The editor interface 1.2. Coordinate systems 1.3. Making walls 1.4. Floors and ceilings 1.5. Lights 1.5.1. Presets 1.5.2. Sources of light 1.6. Netplaces 2. Making some enhancements to your room 2.1. 3D objects: 2.2. Monsters 2.3. Weapons, ammo and artifacts 3. Processes 3.1. Links 3.2. Process description 3.3. Actions 3.4. Messages 1. Creating a room 1.1. The editor interface The main screen of the editor consists of two main parts: the Map window and the Control Panel. The Control Panel shows you all available instruments you can use in the current editing mode. In the top of the Control Panel, you can see five buttons that select the editing mode (Walls, Ceils, Floors, Lights and Ambient). There is a viewer window below these buttons which shows you the current wall, floor/ceiling, artifact etc. In the bottom of the Control Panel, you can see 3 lines of buttons. The first line lets you choose the Map window display mode. There are six toggle buttons that mean (from left to right): grid on/off, walls on/off, normals on/off, objects on/off, monsters and netplaces on/off, lights on/off. You can set several modes at a time. Second line (from left to right): 1:1, 1:2, 1:4 - specify the scaling factor for the Map window; Hold allows you to hold the current map; Fetch fetches previously held map. The third line specifies the difficulty (difficulties) of the game on which you will see the current monster, object, ammo, or artifact. Note: Difficulty settings will not take any effect on walls, floors, ceils, ambients, and lights. Above the Map window you can see the bar containing the current coordinates of the cursor if it is in Map window or the menu bar in other cases. 1.2. Coordinate systems First of all let's define the coordinate systems in Chasm: The Rift. As you can see the Map window is an array 64*64 squares. If you take a look to the menu bar while moving the cursor through the edit window, you will see two type of coordinates the editor uses. Location shows the current square the cursor is in. It looks like (X: dX, Y: dY) where X and Y are the coordinates of the current square. Each square is an array 256*256 of little squares. dX and dY show the current cursor position inside the big square. These coordinates (dX and dY) are very important when you create processes (see Processes for more information). When you move the mouse, the values of dX and dY are incremented or decremented by 16, therefore in the editor every big square consists of only 16*16 little squares. 1.3. Making walls When you choose the NEW command from the file menu, the editor automatically creates a square room using the appropriate set of textures and puts 8 netplaces in it (The last is vital for Chasm. It will NOT run if there are less then 8 netplaces). To create a wall, choose the ADD command from Control Panel, then place the cursor at a position where you want it, and press the left mouse button or press Enter. All of the above will create a normal horizontal wall of the current size and darkness level. After that you will see a line with normal showing its direction and a dark square which this wall is binded to. Any further actions to the wall can be made by making these actions to the corresponding square. To make a square room, hold the right mouse button and move the mouse until you get the desired size of the square, and then release the mouse button. You'll see a box of walls of the current size and with normals showing their current direction. The side of the wall with the normal is visible, and the other is invisible. To change the direction of the normal, choose the DIR command from the Control Panel and click the mouse on the appropriate dark square or simply press "R" while the cursor is on the dark square. The list in the right part of the screen shows you all available textures. To select one simply click the mouse on the desired texture. There is a switch upon a list (SIZE) that allows you to change the size of wall (64 or 128). Also, there is a scroll bar (DARK) situated to the right of this switch that allows you to set the darkness of the wall. The darkness of the wall is shown on the dark square that corresponds to the wall. To set the darkness and texture to the existing wall simply set the desired values, and then choose the SET command from the Control Panel and right-click on the corresponding dark square. To get information (texture and darkness) from the existing wall, choose GET from the Control Panel and click on the dark square of the wall. To delete a wall or a group of walls, select DELETE from the Control Panel and left-click or right-click on the desired wall or press the Spacebar on that wall. Right-clicking allows you to move the mouse and make a selection box where contents will be deleted. Note: Right-clicking works not only with the DELETE command but almost any other editor command except commands that work with lights. Choose the USE command from the Control Panel to reserve a square for a future use or to move the existing wall's dark square. To copy a fragment of the map to another location, choose the CUT command from the Control Panel. Then select the area you want to copy to. This will copy the selected area to the clipboard. To paste it from the clipboard, choose the PASTE command from the Control Panel and click where you want it to copy. 1.4. Floors and ceilings To select the floors/ceiling editor mode, click on the Floors/Ceils button at the top of Control Panel. SET and GET commands are similar to their counterparts in the walls mode. The CLEAR command clears the floor/ceiling at the cursor position, or, if you hold the right button and move the mouse, it clears the selected area. The SEPARATE command fills the floors/ceilings of the same type with the selected floor/ceiling texture. There are 3 viewing modes available in the FLOORS/CEILS editing mode. TEXTURE shows floors/ceilings with the textures on them. SHADOW shows textured floors/ceilings with shadowmap. INFO shows textured floors/ceilings with the numbers showing the darkness level of the appropriate floor/ceiling. 1.5. Lights There are two types of lights in Chasm: The Rift. They are presets and light sources. The preset is a kind of light that is specified directly to the floor/ceiling or wall and illuminates it equally on the whole length of wall/floor/ceiling. Light sources allow you to put a light with center in a point and a certain radius. 1.5.1. Presets To set a preset light to a wall, select the darkness level you desire, select SET in Control Panel, and right-click or press "D" on the square corresponding to the wall. To set a preset to floor/ceiling, select the desired darkness level. Then select Darkness (you should deselect TEXTURE if you want to se only the darkness level), select the SET command, and left-click on the floor square. 1.5.2. Sources of light To set the source of a light, switch to Lights editing mode and choose the ADD command in Control Panel. There are four scroll bars available in this mode. They are (from top to bottom): R0 specifies the inner radius of the light source (light level is constant inside this radius), R1 specifies the outer radius of the light source (inside this radius the light level changes from the level inside R0 to zero), L specifies the brightness of the light source, and Bm specifies the maximum brightness that can be obtained by one or several sources of light. After you have chosen the values you desire and selected the ADD command, simply click where you want to put it. SET, GET, DELETE and MOVE commands work in the same way as they work with walls. View control allows you to toggle between different viewing modes (you can view a rendered shadowmap or sources with their inner and outer radiuses). The Preview control allows you to preview light sources in the window in the top of Control Panel. THe RENDER command renders the shadowmap. It is necessary to render it every time you change the map. The VIEW ALL command shows you the rendered shadowmap. 1.6. Netplaces Netplaces are the positions where players spawn during network play. Chasm will not run unless there are at least 8 netplaces. The maximum number of netplaces is 32. To set a netplace, choose any option in the Objects bar. You'll see an ADD PLAYER button below it. Click on it, and then select the direction and right-click on the map where you want to set the netplace. 2. Making some enhancements to your room 2.1. 3D objects: There are two types of objects used in Chasm: The Rift: normal and destructible. They have no differences except for the fact that the last can be destroyed by shooting at them. To add some 3D objects to your level, you should choose the Walls mode and choose the ADD command. In the Objects box, select models. Choose the desired model from the list below and its direction and skill level when it appears in Chasm. Then simply right-click on the map where you want to put it. 2.2. Monsters To put some enemies into your map, select Walls editor mode and choose the ADD command. Then select the monsters option from the Objects bar. Select the direction of the monster and the skill level when it appears. Then click on the map where you want to place it. All commands that work with walls will also work with monsters. Note: Monsters and netplaces, unlike other objects, do not have any dark square which they are binded to. 2.3. Weapons, ammo and artifacts To put weapon and artifacts, choose the artifacts option from Objects bar and follow the instructions mentioned above. 3. Processes After you have finished editing your level and have exited the editor you'll see a file process.NN (NN is the number of your level) in LEVELNN directory in your USERMAP directory. This file looks like this by default: #mess 01 Delay 1 TextA: -1 64 " " #end ;================================= ;| Processes definition part | ;================================= #proc 01 StartDelay 0 #action #end ;============================================ ;| Link switches and objects to processes: | ;| Format: "LINK swx swy Nproc" | ;============================================ #links floor 1 1 1 #end . It consists of two main parts: Process definition and Links. 3.1. Links Links specify the method by which the process will be activated. They usually consist of three parts: LinkName, coordinates of floor, wall or object which activates the process and the number of process binded to this link. Below is a list of available links: link X Y ProcNumber - activates a process when a player comes too close to the object or allows the player to take the object if it is a key or an artifact. floor X Y ProcNumber - activates a process when a player steps on a certain floor tile. shoot X Y ProcNumber - activates a process when a player shoots the specified wall or object. return X Y ProcNumber - returns the process to its start state. onofflink X Y ProcNumber - same as link but also deactivates the process when it is touched a second time. destroy X Y ProcNumber - activates a process when a player destroys the object it is binded to. 3.2. Process description The next few lines after the line containing '#proc NN' are the description of the process. Use the following commands: StartDelay sec - sets the time period in seconds after which the process starts enddelay sec - set the time period after which the process ends BackWait sec - sets the time period after which the process will return to its starting position. If this value is set to 0 then process will never return. Speed num - sets the speed of the process. Checkgo - checks if there is any life form in the area of its action and stops when it is reached. Checkback - the same as above but works when the process returns. Mortal - use it with checkgo/checkback to kill the life form instead of stoping the process. LightRemap - while moving the wall it will use shadowmap Lock - the process is locked and should be unlocked to start. Redkey, Greenkey, Bluekey - the process is locked and can be activated only by the appropriate key. OnMessage num - specifies the message to be displayed when process is activated. FirstMessage num - the same but only one time. LockMessage num - the same but only if process is locked. SfxId num - specifies the sound for the current process. SfxPosxy x,y - specifies the coordinates of sound source. LinkSwitchAt x,y - the position of an object which will be animated by this process. LifeCheckGo ????? linkswitchat 23 33 ???? mortal ???? 3.3. Actions After the process definition is the action definition (lines after #action). Actions define what exactly the process will do: lock num - locks the process with a specified number. unlock num - unlocks the locked process with specified number. playani num - plays specified animation. stopani num - stops animation for specified object. move X Y dX dY - moves the wall/object with the location coordinates X,Y by dX,dY (see Coordinate systems) xmove --- - the same but first along x-axis then y-axis. ymove --- - the same but fitst along y-axis then x-axis. rotate X Y dX dY Fi - rotates the wall/object X,Y around the point with global coordinates dX,dY by axis Fi. up X Y H - rises transparent wall X,Y by H points. light X Y time_off rad l - makes a rotating light in position X,Y that will turn off after time_off miliseconds of radius rad and brightness l (needs an object to be in X,Y). source dX dY rad l time_on - turns on the light in position dX,dY of radius rad and brightness l after time_on miliseconds of blinking. nonstop - makes the action nonstoping. death X1 Y1 X2 Y2 death_power lo,hi - starts death area from X1,Y1 to X2,Y2 with damage death_power (needs nonstop). Example: Death 36 19 43 21 0 64 400 wind X1 Y1 X2 Y2 wx wy - starts wind in area from X1,Y1 to X2,Y2 in direction wx,wy (needs nonstop). Example: wind 41 53 41 54 0 -10 quake X1 Y1 X2 Y2 PWR - starts vibration in a square area from X1,Y1 to X2,Y2 of PWR power (needs nonstop). explode x y ????? breaks breakeable object at xy change x y num change object/wall at xy to .cel # ambient x1 y1 x2 y2 num change ambient to ambient sound # in area from x1y1 to x2y2 destroy ???? 3.4. Messages Also, you can put some messages to your process. To do so, you'll need to create a message definition. It looks like: #mess NUM - NUM is the number of message Delay sec - delay in seconds during which the message is visible TextA [ x,y] , x=-1 center for X "your message here" TextB [ x,y] , x=-1 center for X "your message here" TextC [ x,y] , x=-1 center for X "your message here" TextD [ x,y] , x=-1 center for X "your message here" TextE [ x,y] , x=-1 center for X "your message here" #end #endcamera 3328 9984 100 -48 0 ------------------------------------------------------------------------------ comes after links: teleports: #teleports tcenter 41 53 37 16 2 2 tcenter 38 55 43 16 2 2 tcenter 39 55 46 16 2 2 tcenter 38 53 42 41 2 2 tcenter 39 53 47 39 4 2 tcenter 40 53 42 36 2 2 #end -------------- + -------------- + ----------------- ; Setup sky file. #sky=filename.cel ; Freeze 3d objects #stopani [#number] ,freeze 3d object at start of level. ; Messages definition #mess [#number] Delay [.sec] Text[#word]: [ x,y] , x=-1 center for X #end #proc [#number] ; Setup process : StartDelay [.sec] BackWait [.sec] ,if not or 0 ,not revercible. Speed [.def] LifeCheckon ,LifeCheck:=True; Mortal ,Mortal:=True; LightRemap ,Wall bright:=Floor bright; Lock ,locked at begin; Loops [.num] ,loop action; LoopDelay [.sec] ,delay after loop; OnMessage [.num] ,[.num]= message [.num] FirstMessage [.num] ,shows one time LockMessage [.num] ,if Locked SfxId [.num] ,[.num]= sfx [.num] SfxPosxy [ x,y] , LinkSwitchAt [ x,y] #action ;Action commands : lock [procnumber] unlock [procnumber] playani [.num] ,plays specified .3o .ani stopani [.num] ,stops ... move [ x,y] [ dx,dy] [s:num] xmove --- ymove --- rotate [ x,y] [ cx,cy] [dfi] [s:num] up [ x,y] [ H] [s:num] ,if H>=80 then walktrough light [ x,y] [int sec] [R:256] [Bright] [s:num] waitout [ x,y] [ R] #end ; Links definition #links link [x,y] [.num] , walls and .3o floor - , floors shoot - , walls and .3o return - , walls and .3o unlock - , walls and .3o destroy - , 3dobject (auto-unlock locked processes) onofflink - , walls and .3o #end ;=========== remove things for net mode ======= #NetOn remove 1 1 #end ;=========== remove things for single mode ==== #NetOff remove 5 27 #end . GoRad - clipping radius Shad - Shadow 0 or 1 (off/on) BObj - chasm.ini BMP object,negate(-)turns it off BMPz - clipping 0/-1 (on/off) AC - action code, see below for codes Blowup - chasm.ini blow object -# BLmt - 0 = unbreakeable SFX - Sound effect # BSfx - explosion/destroy sound effect # action codes: 142,141,143 = blue,red,green keycards 0 0 -4 0 245 0 0 0 0 05_wl_02.3o 0 0 -1 0 255 0 0 0 67 adoor1.3o adoor1.ani 0 0 -4 0 255 0 0 0 84 blood.3o blood.ani128 0 -1 0 254 0 0 0 0 0 balk01.3o 127 0 -1 0 254 0 0 0 0 box_1.3o 0 0 -1 0 255 0 0 0 84 bridge4b.3o bridge4b.ani 0 0 -2 0 255 0 0 0 82 bridge22.3o bridge22.ani 0 0 -2 0 255 0 0 0 85 bridge4b.3o bridge4b.ani 0 1 -1 0 143 0 0 0 0 b_card.3o a_card.ani 33 0 -1 0 255 0 0 0 84 booksw.3o booksw.ani 0 0 1 82 0 0 0 0 0 flame.3o 0 0 1 82 0 0 0 2 0 flame.3o 32 0 0 1 74 0 0 0 1 0 fire.3o 32 0 1 74 0 0 0 2 0 fire.3o 32 0 1 102 0 0 0 1 0 flame2.3o 85 0 0 1 80 0 0 0 1 0 fl1.3o 16 0 1 86 0 1 1 2 68 lith_01.3o 16 0 -1 110 0 3 0 0 102 lamp1.3o 96 0 0 1 64 0 7 40 0 0 lith_d2.3o 96 0 -2 0 0 1007 40 0 0 lith_02.3o 48 0 -1 0 0 1003 10 6 68 lamp4_2.3o %lamp4_2.ani 48 0 -1 0 0 1003 10 6 70 lamp4_2.3o %lamp4_2.ani 0 1 -1 0 141 0 0 0 0 r_card.3o a_card.ani 0 0 -1 0 141 0 0 0 0 r_card.3o a_card.ani -------------------------------------- hax0r stuffs below hex 78 = invis wall EndDelay 2.0 <- ends the level ! when the next level has a script file (script.num) it loads this one first spawnfix (usualy EOF): X Y num 80 30 80 2C 64 00 02 01 60 1B 80 30 64 00 02 00 80 0A 80 2A 64 00 04 02 80 26 80 27 64 00 06 03 80 1F 80 2E 64 00 01 04 00 27 00 12 64 00 06 05 80 35 80 36 64 00 00 06 80 1C 80 36 64 00 04 07 00 27 00 21 64 00 00 08 00 12 00 21 64 00 06 09 mongf.car 6fe8->B1C8 = start/end body graphics = .cel -320byte header (16kb) 8fe8 efe8 sound 77688 texturestart4868+~12kb first data slot in floor lump file starts after 64 bytes 64 image slots for 64x64 resolution .cel images without their 320 byte long header after each slot there is a 64 byte long pause until next cel data .cel is always the same size for a resolution no matter what color information it holds write data at offset 320 until EOF from 64x64 resolution image.cel into floors.01 at offset 64 repeat for next image.cel starting 64 bytes after the first image.cel data in floors.01 for a maximum of 63 times Programming : Oleg Slusar Artwork : Yaroslav Kravchenko Alexey Pivtorak Oleg Naprasniy Characters design : Alexey Serhiy Sound FX and CD Music: Alex Kot Level editor programming : Maxim Novikov Level design : Andrey Sharanevitch Denis Vereschagin Alexey Pechenkin Biz : Igor Karev Denis Vereschagin Voices : Strickland- Sean Spitzer Commander- Robert Sallade Development Support : Lamberto M. Alvaro Special Thanks : Josh Miller, Mark Wang, Cris Ramon, Mike Nowostawsky, and Paul Navin