Tags:
°SS2 °tutorial
A simplified version of the ShockEd FAQ by Thomas Green (Doc4) written in 2001. Obsolete and redundant information was removed from it. Also see:
General Troubleshooting The first steps you should take to ANY problem you have with ShockEd.Have you tried Portalizing? Optimizing? Computing Pathfinding? Building AI Rooms? Did you type "script_load allobjs" in the console?
Do I really need to load up the level again after I have played with it in Game mode?Yes. When you come back to the editor from game mode ShockEd has left everything in the state it was when you left the game. So if you picked up a weapon it is now on the player and cannot be picked up again. If you killed a creature it is now gone from your level. A one-time door will now be permanently open.No. With NewDark and the new ShockEd (showing version 2.42 in the titlebar) the editor will auto reload your level upon exiting game mode. This is very helpful to prevent errors on your level. You can jump into game, check something, then jump back to the editor without having to reload anything.
With that said, If you need to simulate an effect that can occur in Game mode but you cannot set it up to happen in the editor, you can enter a command in ShockEd to prevent this auto reloading, but then you WILL NEED TO RELOAD YOUR LEVEL. First, type "set game_mode_backup 0" into the console, then go into game mode to make the effect happen, exit to the editor to see what the results are and how you need to do things, load up your save, and then duplicate the effect.
Are there any keyboard shortcuts?You bet. Any using them can save you a heck of a lot of time. Especially moving around brushed and objects. They are all located in your Shock directory in a file called Keybind.cfg I suggest you take a look there and get a feel for using the keyboard.
I hear people saying I should always use Grid snapping. Is this true?Yes. If you do not ALWAYS have the USE button for the grid on, you will get errors. Not immediately, but they will happen. You want to avoid this at all costs. Some Thief editors say they put their grid size on 13 and never to go below or you will get errors. I moved between sizes 11 and 13 frequently (because we Shockers have some tiny screens and such to build) and never ran into any problems. But I wouldn't recommend going down any further. Objects will not snap to grid but that is fine.
How do I make my recharger particles blue like the game?Easy. ShockEd just needs to be told to use the right palette. Go to Editors - Mission Parameters - Rendering Parameters - and where it asks for the palette enter "shockpal"
My brush wont change type (solid/air/water) even though it says it has changed.Any time you have the texture window open, it will not accept any changes you make to a brushes type. Just hit Alt+T to get out of the window and try changing the brush again.
Sometimes when I move a texture or add a new one to a brush, I don't see any changes.That means you moved a piece of your achitecture since you last Portalized. Portalize again and you should see your changes and any new changes you make to the textures. But once you move another brush, you may not be able to see texture changes again.
How do I make the player start somewhere?You need to create two objects and link them.
1) "The Player" - put this somewhere outside of your actual rooms as it is not a real object but will leave a triangle if you put it in a room.
2) Marker - "a level start marker" - put this where you want the player to appear
3) Create a "playerfactory" link from the level start marker to the The Player.
How do I make the game start where the camera is in the editor?Type "persistent_player_pos" in the console before you go to game mode. Then you will start where the camera is at. Just make sure it is actually inside your level or you'll fall for quite a while. And don't forget, you don't have to spell it each time. Next time just type "per" and hit the TAB key and it will fill in for you.
I have finished my level but when I try it out in the real game I don't have an interface.You need to tell the game to add the interface. The editor does this automatically when you go into game mode. But the game does not. It's pretty simple though.
You need to create a trigger to a simple "Marker". On this Marker add S - Scripts and in the first field type "ChangeInterface". Now when the game starts, you will have the interface. But if you go into the game through the editor, you will not have the interface anymore because you toggled it off (since the editor automatically toggles it on when you go into game mode).
By the by, a good way to trigger the Marker, is to create a Once Trigger that is very small and right under where the player will spawn. Then when they enter the game, it triggers off any initial effects you want.
How do I create an ambient sound in the game?First, find the name of the sound you want. They are located under Schema - AMB_SCH. I also have a list of the Ambient schemas out there on the net someplace. To listen to a schema, in the console type "play_schema **name**" with the EXACT schema name. "halt_schemas" will stop all the sounds playing. If you are going to listen to a lot of sounds, I suggest you add those commands to a custom menu, it will save you a lot of time. Note, that you cannot simply find the WAV file name in the SND.crf file. The schemas have different names unfortunately.
Next step is to add a Traps - Ambient Sound trap. Add the property A - Ambient Hacked. Give it a radius and the schema name and you are all set.
I created an ambient sound with a radius of 30 but it never goes away.You created an ambient sound with the environmental attribute. This attribute says that no matter where the player goes, the sound will follow them at the same intensity. This is a good idea for engine rumbles and such. The radius merely defines the range and which it is triggered.
Now the sound WILL go away when another ambient sound with the environment attribute has its radius entered. And if you gave it the schema "cmd_silence", guess what, now it's all quiet.
How do I turn a sound on and off?To turn a sound on, do not make it an Ambient sound like above. Instead create a Trap - Sound Trap. Add the property - Sound - Object Sound and type in the schema name you want. Now this sound will not do anything on its own. It is silent. If you trigger it with, say a button, it will make noise as you expected.
However, I do not know of a way to turn off the sound other than using a DestroyTrap to delete the Sound object.
I have a DestroyTrap switchlinked to another object, but it doesn't destroy that object.Sounds like you have a DestroyTrigger instead of a DestroyTrap. Try remaking the object as a DestroyTrap and see if that helps.
How can I view more than one Area at a time?1) Select an Area
2) At the bottom of your screen hit the button marked Activate
3) Repeat this with another area
4) Select the button marked Shot Hot - You should now see both areas only
5) If you do not see just both areas, that means one of two things, either you are not looking at Show Hot or more likely, you have one Area marked as Me Only. Unmark that Area as Me Only and it should work.
Are there any commands I can enter to see my frames per second?Inside the game mode hit the colon and type "show_stats". It will give you lots of good stuff. Keep in mind that total brushes are not the only factor to slowing down your level. Lots of objects and animated lights will also bring things to a crawl.
Is there a command to get some stats about the level itself?Yep. In the editor at the console type "info_window". Some interesting info there.
What do all those different tools do (build rooms/optimize/etc)?I asked this question once myself and a kind soul named Xarax gave an excellent reply and a suggestion I strongly encourage to create a "rebuild" file. Here is what he had to say: The Thief engine is a "portal engine". A portal engine uses 3D convex hulls (aka Polyhedrons) for mapping the 3D world. The "walls" of the hull are polygons. The polygon that is shared by two adjacent 3D hulls is called a "portal". (Actually there are 2 portals, because portals only go one way.) The "Portalize" action computes the hulls and portals between the hulls. Portalizing is faster than optimizing, but can create world maps that are more complex than optimizing.
Those folks who advise not optimizing are ill-advised. Optimize at least once per session; any warnings or errors must be dealt with immediately. Commonly seen problems are "Warning: Didn't grab coplanar case!" and "Error: SplitPolyhedronByPortal blah didn't cross plane." These are usually caused by not using the grid or using a grid size that is too small (I never go below grid size "12"). Optimizing performs 2 portalizations. For ThiefGold, each optimizing pass will use the current lighting setting (Quick, Raycast, Objcast), so you should set Lighting to Quick before optimizing, then relight afterwards with Objcast. I think Thief2 DromEd uses Quick lighting on the first pass, which is goodness.
Build Rooms is required when you create new kinds of rooms. If you create a new kind of room that has, say, a TrigRoomPlayer script, then the game won't recognize the new room (nor activate the script) until you Build Rooms.
The AI room database is different from the "Build Rooms" database. AI must always *know* what room they're in and which room they're transitioning to. There are some in-game commands that can spew information to the monolog file for showing AI room transitions. I don't know why it's important for AI to know their current/next room, but it is.
Pathfinding database also includes information about objects (collision avoidance) and lighting information. Thus, it's important to compute pathfinding after Objcast lighting your level, so that AI have a realistic view of the world in terms of light levels, shadows, as well as for avoiding objects in the world. The room databases don't include objects.
Here is a handy-dandy text file that I run from the DromEd command box when I want to rebuild the entire level. I name the file "rebuild.txt". Just put the file in your Thief directory and issue the DromEd command "run rebuild.txt" whenever you want to rebuild the entire level (you should "Show All" area brushes and enable all filtering before running this file).
code:
purge_missing_objs
fix_rooms
clear_hilight
hilight_check_snap 1
hilight_do_snap 1
clear_hilight
compress_br_ids
set_lighting_mode 0
optimize
set_lighting_mode 2
relight_level
rooms_build
ai_build_path_database
build_ai_room_database
set_lighting_mode 0
The command file performs the various build operations in the proper sequence, as well as grid snapping everything according to the current grid size. I always set my grid size to "12" and leave it there.
Good luck.
Xarax
Why do my windows have weird pink boxes on them?This has to do with unusual ways light seems to affect them. You need to change the radius or angle of the light OR where you put the window.
How can I remove textures or texture families I don't need anymore?In the console type "compress_family all"
"Floor me" doesn't seem to work all the time.Like many things about ShockEd it's buggy. Sometimes hitting it twice will work. Sometimes it just doesn't work. Don't rely on it.
How do I change the default stats for the player?Add the properties under the Player group to either the A Player item or the Level Start Marker. Some only work on one or the other.
I cannot figure out Quest Filters.If you've gotten far enough to be using Quest Bits but cannot figure out the filters there is a simple reason why. QB Filter will pass along a switchlink if the value of the QB_Name is larger than the amount specified in QB_Value.
So if the player flipped a switch that had a QB Set make PowerOn to 1. Then all I need to do is to have that elevator switch go to a QB Filter looking for PowerOn at 0. As long as PowerOn is larger than 0, the filter will pass along the signal.
How do I make a corpse?1) AI - Current State - Dead
2) Look in the Motions.crf (treat it as a ZIP file) for the animation names, look for things that sound like corpses (i.e. humdiedn3)
3) Creature - Current Pose - Type - Motion Name
4) Create - Current Pose - Motion - "the exact name of the motion from the MOTIONS.CRF file"
5) Portalize. You should immediately see the creature in its new pose.