673ef59385599

673ef59386f0e
1 Guest is here.
 

Topic: Advanced ShockEd Tutorials Read 23781 times  

673ef59389ff9
Tags: °SS2 °tutorial
Please post only corrections for the tutorials here. Ask questions in Shock Helpdesk.

Disclaimer
All these tutorials are for people who already have a rough idea of how to use ShockEd. If you are not one of these people, you should first read Totality's Official ShockEd Tutorial.



Special Thanks
Unless otherwise specified, the tutorials were written by me, JediK. I'd like to thank all of the other contributers, as well as fellow ShockEditors who helped me realize some of this myself:
Tom "Doc4" Green, Ben "Zygoptera" Forrer, Omer "G`Len" Joel, Raphael "Thanos" Relat, d0om, Totality, HKPrince, Aaron "Spanker" Pettett, Greg "frozenman" Langham, Disenchanted, Desentrance, Daxim, Icemann, Chris Perry, Ross "Von Braun" Burow, Lance, and Garboshnik



Misc Tips
-If you're stuck trying to make something, look in the original Shock2 levels. They may provide some help.
-Use "show_stats" to show your framerate in game.
-Always save before optimization.
-Press Tab to cycle through all your objects and brushes.
-Use the FILTER to block out things you don't want to see.
-NEVER portalize with a grid size below 12. It may seem fine at first, but it will cause severe problems with your level later on.



Filetypes
Many of you may ask, what's the difference between a "mis", "gam" and "cow". A mis is your basic mission file. It needs a gam (Game) file if you intend to edit anything. Every set object for Ss2 is on its gam (shock2.gam I believe, in the main SS2 Dir.) A cow (Creator Of Worlds) is the gam and .mis combined. If you are using a .mis, you need to make your .gam and in the command box type "set_gamesys A.gam" Without quotes and where "A" equals your gamesys name.



Usable Computers, Info Comps, keypads and keycard slots - G'len
Usable computers are easy to use - basically, all you'll need in order to have them
turn off or on something is simply a "HackingLink" link between the computer and
the targeted item (force door etc.). You should also replace the original "Hack Text"
parameter under the Gamesys part of the Usable Comp part of the hyrarchy under
"properties", and you could change the Hacking or Repair Dif. parameters if you wish.
InfoComps:
Add -> Engine Features -> Frobinfo -> World: Scriprt (I think this is needed... but
I am not sure)
Add -> Obj -> HUD Use String: Training_Wheel_6 (I don't know exactly what this
does, and it doesn't seem nescery. I've used the InfoComp sucessfully without this
bit; Official levels use it in the InfoComps, for an unknown porpuse.
Add -> Player -> Helptext (Select a number. The numbers refer to texts in the
infocomp.str in the strings.crf. Modify the CRF or create a "strings" directory under
your primary Shock2 install directory and extract the file to there in order to change
the texts).
Keycard:
Add -> Engine Features -> Locked: True (mark the box)
Add -> Engine Features -> KeyDst (choose the RegionID of the card you want it to
use; You don't have to use the rest of the dialoge box).
Make sure that you have Tweq -> ModelState in the keycard solt's properties. Edit
the ModelState property, and make sure that AnimS and MiscS are both "none".
Now, make a SwitchLink from the door's tripwire to the keycard slot. Make sure
that the tripwire isn't SwitchLinked directly to the door, otherwise the keycard
won't work. Also Switchlink from the keycard slot to the door itself. Place the
right card somewhere within your level... and here it goes :)
Keypads:
Add -> Script -> Keypad Code (Enter the code; Note that this is under the
"script" menu, not under s -> script).
Then create the switchlink to the door. I haven't found a way yet to let a tripwire
work with a keypad, but there might be one.



Doors
Doors are thankfully one of the easiest things to make. I say thankfully because we place them so often, its damn good that they're easy. To make a door you want to have 2 rooms, connected by a small hallway...Now, as you can see in any SS2 level, the hall needs to be longer than the rooms. This is so the door has somewhere to go when it opens. Place a door, Physical - Terrain - Doors...I suggest you begin using a MedSci one. Now then, place the door in your hallway at the spot the rooms connect. Now on the doors properties, you can play with the "Translation" property to get the door to go as far as you want and as fast as you want. Next step, decide whether you want to use a Switch or a Tripwire to get the door to open. A switch is easy, simply place it and in "Links", create a switchlink from the switch to the door. For a tripwire, place the tripwire on the ground in front of it and switchlink that to the door. That's it! You may also want a switch/wire on the other side so you can get back in. Now Comforce Doors are another story. If I remember correctly you must add the Translation property completly manually. They look cool but they are very...unstable. I suggest avioding their use. One way to get around such problems, is to take a different door and add SHAPE -> MODELNAME and change that to "comforce". So you now have a normal door that looks like a comforce.



a. Secret Doors
Now that you know about Doors, it's time you learned about Secret doors. You see, anything can be a door if it is designed right. I was testing this once, and I made it so you click a button and a bed moves and there is a secret pit under it. All you have to do is find an object you want to make into a door and add a "Translation" property to it, and then add a switch or a tripwire to make it move. Enjoy!



b. KeyCode Doors - G`Len
Keypads: Add -> Script -> Keypad Code (Enter the code. Note that this is under the "script" menu, not under s -> script). Then create the switchlink to the door. I haven't found a way yet to let a tripwire work with a keypad, but there might be one.



c. KeyCard Doors - G`Len
Keycard: Add -> Engine Features -> Locked: True (mark the box) Add -> Engine Features -> KeyDst (choose the RegionID of the card you want it to use; You don't have to use the rest of the dialoge box). Make sure that you have Tweq -> ModelState in the keycard solt's properties. Edit the ModelState property, and make sure that AnimS and MiscS are both "none". Now, make a SwitchLink from the door's tripwire to the keycard slot. Make sure that the tripwire isn't SwitchLinked directly to the door, otherwise the keycard won't work. Also Switchlink from the keycard slot to the door itself. Place the right card somewhere within your level... and here it goes :)



Corpses
When you make a corpse in Dromed, you see what is commonly refered to as a "Scarecrow". It looks like a corpse but has a "t" shape going for it. Take a gander in motions.crf, you need those names. For a corpse you add the property Creature->Current Pose and make sure it is set to motion name, then type in a name from the CRF (eg "Humdead3b" in the "motion" field). Portalize and it should be all set. Be careful rotating them though. Also watch out, because not all of the motions in that CRF are for Human Poses.



Security Camera - Von Braun
The objects need for this tutorial are as follows:
At least 1 security camera
A security computer
and an "Ecology" (Traps -> Ecology)

How to set up:
Place the security camera(s) and the computer in a usable/visible location.
Place the ecology anywhere. REMEMBER THE ID NUMBER!!!
Add a switchlink FROM the computer TO the Ecology
Then add switchlinks FROM the Ecology TO the cameras.
Then go to each camera and add a switchlink TO the ecology FROM the camera.



General Troubleshooting - Doc4
My chairs are sinking in to the floor. Some of the objects do not have the right dimensions built it to them for some bizarre reason. You have two solutions: 1) Change the chair's Dimension properties to have a radius of 2.5 2) Change the Control properties by selection the Rotation button and adding Location. This will lock the chair into place. It will be EXACTLY where you put it and never move.

Why can I walk through some of these objects? Two reasons: 1)The objects dimensions properties to not match the physical dimensions in the editor/game. Simply edit the object and change its Dimension properties to be correct. (i.e. you stretched a door to be twice as big but can still move through it. So change its Dimension properties and that will fix it) 2)The object never had a collision property added for some reason. Add the property - Physics - Collision Type - Bounce.

Why do my doors disappear as they are opening? If the middle of any object is outside of the game world the entire object will disappear. You doors are opening into a solid wall, when the middle crosses into that wall the entire door disappears. Simply create a space for the door to move into so that the center of the brush never moves into a solid. That should fix it.

How can I figure out what Hue and Saturation values to use to get a specific color? The most accurate way is to open up MsPaint. Create a custom color with the color wheel and look at the Hue and Saturation values. Take these numbers and divide them by MsPaints maximum values for them (240) and you have the decimal value that ShockEd wants.

How do I add objects to the players inventory when they start? 1) Create the objects you want and put them in your level (it doesn't matter where, but it's a good idea to put them next to the "level start marker" so you can find them again easily). 2) Create a "Contains" link from the Level Start Marker to the object. 3) On the links screen, double click on that ID # on the far left. An ordinal field will come up. This is the space number on the characters inventory screen. So if you add 3 objects to player but leave them all with an ordinal of "0", they will all try to cram into the same place and the player will only have one in the end. Instead number them like 0, 1, 2. And then all three will appear.

How do I make sky? Its nothing but black with a few dots. 1) Hit Alt+T to bring up the texture screen 2) Click on the empty box labelled "Sky" 3) Click on the ceiling of the room that you want to be the sky. You should now have a black parallax texture and if you look close enough, a few TINY little red dots 4) In the console type "load_sky sky" NOT load_family 5) Go to Editors - Mission Parameters - Sky Rendering - change it to textures. Now you have a sky. 6) There is one more sky you can try and that is "load_sky acid"



Simple Lift - Spanker & JediK
For a simple 2 destination lift, it requires 5 parts: 2 Elevator Paths linked by a TPath flavor. 2 switches connected to the lift itself using a Switchlink flavor and 1 lift connected to the first path using TPathInit.
1: Create two elevator paths (Markers>Elevator Path). These will be the two endpoints of the lift. Link these two markers using TPath. Do it for opposite ends also. (Example: Link path 1 to path 2 and then link path 2 to path 1).
2: Create a lift and place it directly on top of one of the elevator paths. (Physical>Terrain>Moving Terrain). Link the elevator to the path that it is directly above using TPathInit.
3: Create two switches (Physical>Functional>Controllers>SimpleButton) at each end. 1 button right next to path one and the other button next to path 2. The button should be close enough so that you can press it while ontop of the elevator. Link both of the buttons to the lift itself.
Now, it works now. But theres a problem. Its speed is set to 0.
4: Select 1 elevator path and look at its links. Double click the TPath flavor and enter a number in the speed dialog. 5 is normal. I prefer fast, 10. Do this for the other elevator path also.



Elevators - HKPrince
a. Multilevel elevator
Normally elevator goes to two places only, bottom and top or left and right. Therefore two Elevator Paths are enough and they should have TPath and ~TPath links between them (with positive value of speed on data part of the link). The Elevator should have TPathInit link to one of the Elevator Paths (depending on which one the Elevator start with). Then add two buttons with switchlink to the Elevator. Sometimes we want it to go to more places, then we have to make more Elevator Paths. The problem is how we add TPath links to them. Suppose we have three places to go and three Elevator Paths (EP). We should have TPath link from EP1 to EP2, EP2 to EP3, and EP3 to EP1. Don't add TPath links from one EP to two EPs, this will cause error. The Elevator will go from 1 to 2, 2 to 3 and 3 to 1, very obvious. Someone has posed a question to me: Can I have a button to call a multilevel elevator to a certain place? From the above information, obviously no. Then I study more and find out that: Yes, at least for 3 places (Don't ask me to do 4 places). It is not simple. The TPath links for the EPs are the same. The scripts of the three buttons have to change to RerouteElevatorButton using add scripts. A ScriptParams link have to be added from a button to the destinating EP (button 1 to EP1, button 2 to EP2, button 3 to EP3). Of course the switchlinks from buttons to the Elevator are needed. Besides a TPathInit link, a ScriptParams link is needed from the Elevator to the starting EP. Then the Elevator will travel to the place you want.

b. Changing objects to elevators
Actually many moving objects in SS2 are elevators, the radar striking the window in the beginning of medsci deck, the tram in command deck, torpedos in the Rickenbacker, etc. Changing objects to elevators is very simple, just add scripts BaseElevator to the objects. Then we can have a moving plant or flying chair. I have suggested a shockedder to change a door to an elevator so that pressing button can shut the door. However changing scripts of a Door from StdDoor to BaseElevator can't do the job, we have to check the Don't inherit box in scripts menu and change Door->Translating->Base Speed to zero. Don't delete Door->Translating properties, otherwise pressing button to operate the door may cause crash.

c. Attaching objects to elevator
Add PhysAttach link from objects to the elevator, this will attach the objects to the elevator. But this is not the end of the story. We have to set where the objects attach to the elevator. This is done by editing the Offset x, y, z values of Link Data of PhysAttach links. Default value 0, 0, 0 means attaching the objects to the centre of the elevator. To find the correct values, we have to do some expts. Remember to add Physics->Misc->Moving Terrain: False to the objects, otherwise the objects and elevators stick to the original place or even crash ShockEd. Warning: attaching objects to an elevator may lead to error in computing pathfinding database. Attaching objects to elevator may be just decorative, attaching buttons to elevator should be useful. Before adding PhysAttach link from buttons to the elevator, we have to add all five Physics->Model properties (Attributes, Controls, Dimensions, State, Type) to buttons, otherwise ShockEd may crash. One last thng, if we change an object to an elevator and try to attach a button to the object, then one more property have to be added to the object, Physics->Terrain->Can Attach: True.



Textures
We are going to go over how you place textures and how you create your own. To add a texture family in the command box type "add_family A" without the quotes and where A equals the family name. If you have the custom menus, you can click which you want up at the top, but you will still need to type it for customs. To make a custom texture, you draw whatever you want, but it must be 64x64 pixels, 128x128, 256x256, etc and it must be saved as a pcx. You need to save the palette you used as a pcx. To do so, save the palette. Then create a 4x4 pixel square and load the palette. Save this as full.pcx. In your shock directory, make a folder called Fam, if there isn't one there. In Fam create a folder with your "family's" name on it. Inside put the 2 images, the texture and full.pcx. Then start dromed and in the command box type "add_family A" without the quotes and where A is your family's name. Open the texture menu and your texture should be there. You can also change the size of a texture when placing it. Put any texture on a wall, and press the ALIGN button at the bottom of Dromed. It should change to TXT. Now then, down bottom the buttons have changed for texture manipulation. Click the wall you just put a texture on. Using the "U" and the "V" arrows at the bottom, you can change the horizontal and vertical area of your texture. It will not resize it only move it. The SCALE command changes the size of the texture on the wall. The ROT one rotates the texture.



Sounds and Music - Tom Moore
1. Select your roombrush
2. Press Alt+Insert(the brush should turn purple)
3. Go to Tools>Build Room Database
4. Go into gamemode to hear footsteps
This also allows you to add ambient sounds.
*Note, you must do this to every room



Teleport Traps - G`Len
To use teleport traps, first place the teleport trap itself where you want the object to be teleported to (the size of the trap itself doesn't matter, only the co-ordinates). Then, create a switchlink between the trap to the item you wish to be teleported into it (for example, some item inside a so-called "Blue Room" which you want to appear inside your level "out of nowhere", which is actually "out-of-where-you-are-hiding-that-object") The final step is to create a switchlink (a hacklink might work; I haven't checked this yet), from a controller, another trap etc to the Teleport Trap. Once you activate that, the item is immidiately teleported to the teleport trap's location.



Sky - Tom Moore
1. Open Dromed
2. Go to the Editors Menu>Mission Parameters
3. Change the menu from stars to textures
4. In the command box type "load_sky sky" or "load_sky acid"
5. Then just go to the texture pallette and assign sky to brush.



Climability
You can climb any object you like as though it were a ladder simply by altering the objects properties. In Physics -> Model -> Attricbutes, check off all of the climbable sides. And make the base friction 0. You should then be able to use it.



Replicators - G`Len
Building a functional replicator inside a ShockED level isn't that hard - except for the fact that only the upper parts of the Rep and the screen will appear. Use Rep Base (or Base Rep, I don't remember the actual name) and Rep Screen. The screen is actually only decorative. Also, place a generic marker where you want the replicated items to appear. Now, open the "properties" of the Rep Base. Add Gamesys -> Rep. Contents (look at any original Shock2 mission for item names) to create the menu and prices. Then add Gamesys -> Rep. Hack Contents (for menu and prices when hacked). Make sure that the replicator has the Gamesys -> HackDiff (hacking difficulty) parameter. Close the Properties window and open the "Links" window. Create a link, using the "Replicator" value from the Rep Base to the marker that you've created earlier. Once this is done, portalize and the replicator should work (if you have put the right names). Note that for the rest of the replicator's body you'll need to create some terrain brushes (or multibrush-copy them from an unstripped mission)



Infomation Computers - G`Len
InfoComps: Add -> Engine Features -> Frobinfo -> World: Scriprt (I think this is needed... but I am not sure) Add -> Obj -> HUD Use String: Training_Wheel_6 (I don't know exactly what this does, and it doesn't seem nescery. I've used the InfoComp sucessfully without this bit. Add -> Player -> Helptext (Select a number. The numbers refer to texts in the infocomp.str in the strings.crf.) Modify the CRF or create a "strings" directory under your primary Shock2 install directory and extract the file to there in order to change the texts).



Water - Thanos & JediK
Water isn't very tricky either. You can do water in any brush you want. Usually it's a square/rectangle. It works for sinks, bathtubs, pools, flooded areas. Remember in MedSci2 where the floor was flooded? That was one big brush. Anyway, you need your air brush for the room. Then make another one and position it however you want it to be flooded. Note: you may want the Length and Width to be slightly longer than the room itself. Set that brush to "fill flood". Portalize and go for a swim. FYI-Setting the brush to "fill water" will dissolve any other brush you have in the flooded zone.



Water Flow - Unknown
To use flow brushes, firstly click 'FLOW' (the bottom name next to create: object, room, light, etc)
Then drag a flow brush over the area which contains water, it doesnt matter how much it overlaps. Next click on 'edit group' which will have just shown up, change the texture now to 'BL' (without the quotes') for blue water, 'GR' for green water, 'L2' for laver type one, 'L3' for laver type two, or 'L4' for laver type three. Then press ok when you have done. U can have different types/colour of water in your level by having different groups. Changing the group to 2 for example will create a different group, which could be a different type of water to group 1. This means that when u have more than one flow brush in your level, selecting a different group means that each flow brush doesnt have to be set up indivdually.
But each group will be setup indivudally, and will save with your level. You can also make the water push you along by changing some of the other values, to different numbers.



Spawning AI - Lance
I have learned something about Spawning Monsters (in relation to Security Computer Consoles & Security Cameras) and thought I would share it with you. Hope it helps...

After playing around with the Spawn "Supply" figure in DirectMonsterGen>Spawn (at the bottom), I found out that this figure must relate to the strength of an encounter. (NOT THE DIRECT NUMBER OF CREATURES.) This may sound obvious, but I will explain further. I noticed that if I put in a figure of a multiple of four (or part of), I would spawn one OG-Pipe per four points per Spawn Marker that the DirectMonsterGen was linked to.
I only used the OG-Pipe monster in my "experiments", but guess that other monsters may have a higher figure (than 4) to equate to less encounters of that type (when randomly determined with more than one creature) for the same "Supply" figure.

But, I have also noticed (with help from G'len's info), that "Alert Min" and "Alert Max" within Ecology>Ecology may take priority over the maximum supply figure calculated in the spawn "Supply" figure above. (DOWNWARDS ONLY! You could not get more monsters than that calculated from the "Supply" figure in DirectMonsterGen - unless the "Supply" figure is 0 (zero), which I think means unlimited.) Because, when these figures are lower than the highest numbers of OG-Pipe that are potentially available (remember it may be different for different creatures and may alter this example altogether!), then these lower figures take priority.

An example may clarify this: I have worked out that OG-Pipe monster equates to 4 points. Therefore, if I put a figure of 16 in the "Supply" figure in DirectMonsterGen>Spawn, I will get (potentially) 16/4= 4 OG-Pipes PER MARKER that the DirectMonsterGen is linked to. So, if I had this linked to two SpawnMarkers, then a potential 4x2 = 8 OG-Pipes could be spawned. (Four from each Marker.) (NB: It may be that tougher monsters - with higher "points" would spawn less??? - If someone does experiment with this and works out the figures for other creatures, then please let us all know. 8>) )

However, continuing with the above example, if I had the "Alert Min" as 1 and the "Alert Max" as 2 (within Ecology>Ecology), then I would get a random figure of 2 - 4 monsters ... 1 or 2 monsters from each Marker. (NB: I tried making the Min & Max numbers the same to force a certain number, but it did not seem to work ... but then again, I may have forgotten to Portalise between each change ... which does appear to make a difference ... so do not foget to Portalise between each change!) So there you have it. Hours of fiddling around to hopefully give us some sort of clue to help with the type of Monster Spawning available. I have just a couple of questions of my own, related to the same thing...

1) The flags in Spawn (just above the "Supply" figure) - Any ideas? (When I removed the PopLimit tick - I think it was that one - all the monsters appeared to Generate in one go at one Marker!!!! In other words, when I had the test supply figure at 20, I got 5 OG-Pipe monsters appear at the Marker instantly the alarm went off. I have not experimented further with this yet. Let me know if any of you do...

2) "Period" in Ecology>Ecology - Any ideas? In my example above, I kept this to 1.00. I have yet to test it any other way.

3) Does anyone really know if EcoType or EcoState relate to anything in particular? I have stuck an EcoType:1 in Ecology>Script, but I reckon it would probably not change much if I took it out ... something to try later perhaps. One last thing, which may help to work out what is going on with all these variables (and work out what is going on) and that is to hit Alt-E and return to the editor after playing your level a bit and then examine the objects properties before reloading the level to work on again! I found out quite a few interesting things by doing this. One thing, which may need looking into by someone who has better knowledge, is EcoState added itself to either DirectMonsterGen or Ecology (I cannot remember which) as Ecostate:2. It may be related to the alarm going off, as I hit Alt-E and returned to the editor when the alarm was still sounding. As you can see there is plenty of areas to look into if anyone has got more time. I have made a start and now offer this onformation for what its worth, to those who may wish to add to what I have just gone through.



Leading AI's- HKPrince
Bad AIs in SS2 chase and hunt the player until one of them kill the other. Good and neutral AIs ignore the player, so it is quite difficult to interact with them. Some of us want to have team members in single player game FM, or have some NPC to work for us. To make an AI follow the player, AIFollowObj link is one of the solutions, AIWatchObj link is another.

You can simply add AIFollowObj link from the AI to the player, adjust the distances and angles in data menu of the link. Use distances of more than 4 to avoid the AI stepping on player's feet. Remember to compute pathfinding database so that the AI knows where to find the player. Then the AI fight for you and return to you after the battle. However, this is only an experiment of the link. You have no player object before game mode or real game, the link should be invalid. If you link the AI to The Player (-384), it will go to the starting location or level start marker. Is the link useless?

No, you can use a signal response to add the link from the AI to the player. Add AI->Response->Signal response to the AI, name the signal SwitchOn (don't try other name, otherwire you have to use AI signal trap to activate the signal response). On Response Step 1, select add link, enter AIFollowObj on Argument 1, player on Argument 2, AI's object number on Argument 3. Then add an once tripwire, add switchlink from the tripwire to the AI. When the player cross the tripwire, the AI will follow you everywhere. But you can't adjust the distances (I can't, may be someone can).

To make the AI stay away from you as a bodyguard, you can still use AIFollowObj link, this time link the AI to compass HUD (-3634). This object exists before the game and the AI chases compass HUD attached to the player in game. One problem of this is the AI looks for you once you enter game, they probably walk through doors to find you. Frozen or docile metaproperties can't stop them. So you may need to teleport the AI in the map if you want the player meets it later in game.

Another method is to use AIWatchObj link, add it from the AI to itself. Then in data menu, select Player intrusion on Watch kind, enter Trigger radius 40 and height 30, select Don't kill on Exit: Link kill option, then on Response Step 1, select Goto object, enter player on Argument 1. The AI will go to the player once it sees him. However, I can't adjust the distance of the AI from the player. (This method is actually suggested by ndru.)

Here is a demo FM: AIfollow.zip

Leading an AI to open a door

We may want an AI to open a door for us, and the door can only be opened by the AI, so we use AIWatchObj link. Add the link from the AI to the door or an invisible button to the door or any object close to the door. In data menu, select Self entry on Watch kind, enter Trigger radius 8 and height 8 (depending how close you want to), select After completion on Exit: Link kill option, then on Response Step 1, select frob object, enter button's object number on Argument 1. Remember not to shut the door or let the AI die, otherwise I can't help you.

However, the results of my expts aren't very satisfactory and promsing. AI following the player with AIFollowobj link freezes after opening the door. To defrost the AI, remove the AIFollowobj link before or after frobing the button. Select Remove link on Step 1 or 2, enter AIFollowObj on Argument 1, enter player or compass HUD as you have chosen before on Argument 2, enter object number of the AI on Argument 3. Also AI following the player with AIWatchObj link seems to have some difficulties to find the button or door.

Here is a demo FM: AIopendoor.zip



Gravshafts - Disenchanted
Here's my short tutorial/walkthrough on gravshafts which I have been wrestling with for the last few days. i compiled this with the help of those gone before me with special thanks to NoCoolAlias for giving me the last piece of the puzzle.
1.The SFX>Terrain FX>Gravshaft>your choice has no real bering on the gravshaft. this is the little white dots that float up, so depending on your arcitecture, you may not even want them. Try and use gravshaft 4 and gravshaft 8 as much as possible because the straight gravshaft must be hosted as far as I can see. It can not be resized by normal means.
2.A down gravshaft is a room brush with room>gravity%:20 added.
2.1 You will need to make a separate roombrush category for your gravshafts or all your rooms will have the same attributes as your gravshafts. Your first step should be to make a basic room, select it, hit create, add, enter a name you see fit ie. UGravshaft, ok, edit, now add the gravity. you will need a separate roombrush for the three gravshaft parts.
3.An up gravshaft is two room brushes. A room brush with room>gravity%:-10 added and a room brush placed at the stopping point with room>gravity%:0 added and s>script "ZeroGravRoom" added.
4.The ZeroGravRoom script will not work until you have run "script_load allobjs" through the command box. Untill you do this, you will fly into the zero grav sector (which does work), bounce off the roof down into the up gravity, and be shot back into the zero grav, repeat ad nausium.
5.Be careful with the placement of gravshafts. As the center of a room cannot be loated inside another room, you may have to do some fancy room brushing to get some configurations to work.
6.The gravshaft noise is an ambient noise tag. Create an ambient noise tag (marker>ambient snd) and add property A>AmbientHacked and type in the name of the gravshaft noise which you can find under schemas in the object heirarchy (schema>amb_sch>gravshaft_ip).



MFD's - Daxim
To make your own little custom pictures which appear in the MFD when you read logs, you need a decent graphic tool like Paint Shop Pro, MS Paintbrush won't be enough. Open your picture and promote it to true colour depth (24
bit=16,7 million colours). Replace the background homogenously with the colour RGB (52)(68)(84). This is the same background colour used as in polito.pcx and other original resource files in book.crf. I found that the erasor rubber tool suits this task best, as it does not smear at the edges like the brush tool does. Now calculate the proportion ratio of your picture. If it has a ratio of 0.690476, then you were lucky, because this is exactly the proportion we need (58 divided by 84). Scale your picture down to 58 by 84 pixels. If it has a ratio less than 0.690476, then your picture is too wide. Scale it down to x by 84 pixels. The x value is filled in automatically. Now cut away at the left and/or right side with the crop tool until your picture has a size of 58 by 84 pixels. If it has a ratio greater than 0.690476, then your picture is too tall. Scale it down to 58 by y pixels. The y value is filled in automatically. Now cut away at the upper and/or lower side with the crop tool until your picture has a size of 58 by 84 pixels. Your picture now has the right shape and size. To add those interference lines, you need to select the proper pixels first. Have a look at polito.pcx how it was done. How you have many different opportunities to change the colours of the selected pixels. The easiest way is to use the retouch tool, square-shaped, sized 100 pixels. Choose brighten RGB and apply it around 4 times to your selection, this depends on how bright your picture already is. Now you are finished. If you want to have the picture share the same palette as polito.pcx, retain the colour depth and save as .tga. Download Bright and unzip.
Then type the command bright yourpic.tga yourpic.pcx -pal polito.pcx to make a .pcx file using the same palette as polito.pcx. This looks definitively ugly when your picture consists of many different pixels (e.g. photographs). If you want to use the picture as it is, reduce its colour depth (8 bit=256 colours) and save as .pcx.

Janice Polito, Althea Grossmann, Pook Garboshnik, Digital Nightfall, jim the hairy, h-son, Daxim



Making an Item stick to the wall - Unknown
Simply add Physics->Controls: location and rotation. And your item will stick to any wall.



Making Text Appear Onscreen - d0om
On screen with a nice black border: (Limited by the number LGS had as its script based.)

Strings.crf/chargen.str

YearText0:"Year 0"
YearText1:"Year 1" YearText0:"Year 2"
YearText0:"Year 3"
EarthText0:" 4 Years Earlier\nRamsey Recruitment Ctr."

To call them, use a switchlink ON to a marker with
script:earthtext for the earthtext, don't know how the other ones are called.

Just at Top:

script:TrapMessage
script-->UseMessage:

strings.crf/usemsg.str

:"Text"

Trigger with a switchlink ON.

The script for the "year 1" type text is
"SetupInitialDebrief". It can be found on obj 111 in station.mis. So
use script:SetupInitialDebrief



Cloaking Turrets - raph

The turrets in this example would be hidden until the player walks in a trap that would trigger the whole mechanism.

To do the same for each turret, you have to create a hole in the ground first, a little bigger than the turret itself. It should be 7 units high. Also create a turret, a security door and a gravlift. Of course, you can make the cache anywhere you want. If you want the turret to be
hidden in a wall.

First resize the lift to make it fit with the hole.
Then press "floor me" and do the same with the turret. Be careful,
when you test the level the turret should appear as if it was on the lift, so
you may want it to be 0.5 higher than the lift (that's the size of my lift,
adapt to yours). Go in the turret properties and change the AI settings to "asleep"
"none" and "none". Open the script window and add
"StdDoor". Of course, don't remove "Turret". You'll also
have to change the object's mass (in the properties) and cut it down to 30 or
50 instead of 100,000. Once you have everything done, the turret should appear
as an offline turret. Now go in the lift properties and change the script from
"BaseElevator" to "StdDoor". Then add Door>translating
coordinates according to the size of the cache to both objects. I usually enter
a translating speed of 3.

Now we're gonna place the security door... Resize
it like you did with the lift. Place it horizontally at the top of the cache.
As always, create a little empty room so that the door doesn't disappear when
it opens, and adapt all the door properties to fit with its new dimensions. The
door speed in my levels is 6, twice as much as the turret's. For the test, you
will trigger the mechanism with a button, so create one and add a switchlink
and ~switchlink flavor from it to each of the three objects, the turret, the
lift, and the door.

Without even testing, you'll realize now that the
turret will have to "wait" until the door opens completely before
going up. That's why I wanted the cache to be bigger than the turret. In fact,
as the door opens, the turret will start to go up, but if you manage to make it
go slow enough, you'll have your special effect anyway. When the turret goes
down, the door usually waits automatically before closing. If it doesn't, add a
timer duration factor to the door.

Portalize, save and test your turrets until you
find the solution best adapted to your level. Of course, for the trial, you
have disabled the turrets, so they don't shoot you down (even if you can't be
shot). If you try with an active turret it will open, and be taller than
before, so all the settings will have to be changed. There should be enough
room in the cache for an open turret though. Test and change the settings until
you have what you wanted.

Now you want the player to trigger the hidden
mechanism but as a trap. The button you used to test the turrets will actually
be out of reach in a "real" level. I tried a door tripwire but the
turret would automatically go down after a couple of seconds. I had a look in
the trap section and found exactly what I wanted. A Floor Egg tripwire. Create
one (I think it's Tripwire>Once tripwire>Floor Egg tripwire) and place it
where you want the player to trigger the whole thing. Link the tripwire to the
three objects (or six, if you have two turrets) but with a "switchlink"
only. (the Security Station nearby will have the switchlink/ ~switchlink
button.)

Now portalize, save and go in game mode. The turret
should "detect" you as soon as you step in to the tripwire. If you
change the AI back to "Alert" or something, it should open as soon as
it sees you. The tripwire disappears as soon as it is used, so the turret will
actually act as it would in real life: if you're too close, it will open, but
as soon as you switch them off, you have control.
« Last Edit: 18. September 2016, 22:05:38 by Moderator »
Re: Advanced Shocked Tutorials
673ef5938a694
Shocked Lighting - JediK

1. Different Types of Lights: Brush Lights

The first kind of light we'll learn about is what I call the "Light Brush".

Looking at this image you can see the lower console of DromED. The part we're going to focus on for now is circled in green. This area deals with what kind of a brush you're using. The one we're going to use is Light. Now, assuming you just started up DromEd, the first thing you want to do is create your player start marker somewhere in the room. In the text console at the bottom right of DromEd type "light_bright" without quotes and press enter. Then type "lit_obj_toggle" and press enter. Right click in the 3d view and press "Solid and Selection". At the top of DromEd, click Portalize, under Tools. You should now see the pink, blue, and white texture called jorge on the walls of your room. Now click light on the lower console. Draw the light where you want it to be. A yellow cross should show up like so.

Now comes the fun part. You'll notice that next to where you clicked "light", the console has changed. It now has this:

Now, the Type switches between Omni and Spotlight. For now, we'll use Omni. Under that, you can see "Bright". This is how bright you want your light to be, with 0 being no light. Most lights don't go above 250. The default for the "Light Brush" is 127. Now, under that you can see Hue and Saturation. Hue and Saturation set your lights colors. We'll come back to those later.

So now, portalize your level again and save. Call it.....Lighting1.mis or something. Then press ALT and G to go in-game. What happened? It didn't work. The entire place was bright as hell. Know why? We left "light_bright" and "lit_obj_toggle" on. So, reload your level and in the text console type the codes to shut them off. Then portalize, save, and go in again.

So now, it should have worked. You should see a difference. Like between these two images.



The top one is with 127 lighting. The bottom is with "light_bright".

So why use these lights? Well, they're good for if you have a lit panel or want to emit light from somewhere but don't want a visible source. Thought you see the cross in DromEd, you see nothing in-game except the light itself. Congradulations, you passed Chapter 1. \o/

2. Different Types of Lights: Object Lights

Go into Editors -> Object Heirarchy -> Physical -> Lights. The list here is all the different lights you can use. The light we're going to start with is the Flourescant Light (-488). Before you place it, we'll take a quick look at how it works. Click Flourescant Light and click Edit. You should see this.

Now, see where it says Renderer and then Light? Click Light and click Edit. This allows you to change the light brightness, radius, and how far it is from the object. Click Cancel. Keeping the light open, click ADD -> Renderer -> LightColor. A box should pop up with good ol' hue and saturation again. Click Cancel. Close the lights properties until your back at the main list of lights. Make sure Flourescant is selected and press Create. Put the light wherever you want. It should show up as a yellowed rectangle. You'll probably want to delete the old light. Place it, portalize, make sure light_bright is off, save, and test. You should see the light completely lit up, in all it's glory.

Mess around using different lights, and when you're ready, go on to coloring.


3. Coloring

Ah,?here we are. Coloring. Population 12. Hopefully you remember where Hue and Saturation are. Pick whatever kind of light you want, be it an object or a brush or whatever. You name it. Go into the hue and saturation part and mess around. When you're ready to see your creation, poralize, save, and go test.

Did it work? If it did, good job. Curious as to what hue and sat do what? There used to be an excellent page on it at The Editors Guild, but it's all gone now. So what do we do? We experiment!

Now, I left the saturation at .5 for all of these, but that doesn't mean you have to. I'll simply notate the color and hue used to get it. Not all are exact, mess around to get what you want.

Main Colors
Red - 1
Purple - .8
Blue - .7
Orange - .1
Yellow - .2
Green - .3

So what are the rest?
.9 is pink
.4 is a light green
.5 is a light blue
.6 is also a light blue

Some lights come pre-colored. For example, if you go into the Object Heirarchy under Lights and look at the Engineering Wedge Light, you'll see that it has a light color to it already. Be sure to look deeply into this. Lighting is the most important part of a level.

4. Blinking Lights

So you've made it this far have you? Very well, but trust me, it doesn't get any harder than it has been =)
First things first, blinking lights require an object. We're going to use the Engineering Wedge Light. Find it in the Heirarchy in Physical -> Lights. We first want to click Edit on the light, bringing up it's properties. Add renderer -> Animlight. Leave the mode as it. Miliseconds to brighten/dim is how quickly you want it to blink on and blink off. The Max brightness is how bright you want it to be when lit. Make some stuff up. Min brightness should be 0, or else this won't work. The rest of the things you can leave default. Click okay. Create the light in your room. Poralize, Save, Test, yada yada. Did it work? No it didn't did it? Even when it was "off" light came out. Why? Well, that's because the object still emits light. Re-load your level. Click the object and click Properties at the bottom. See where it says "light" and has it set to 256? Delete that. Now close that, portalize, save, test. When you go in-game it should turn on and off as quickly as you set it to...


Well, I think that's it. If you have any questions, please don't hesitate to email me
Mike "JediK" Pelletier
7/30/02
Re: Advanced Shocked Tutorials
673ef5938aa6a
ShockEd Automaps - Zygoptera

Introduction

The original files available with either Shock2 or Thief2are an invaluable resource- They may be found in..\intrface.crf\LevelName\language\.. as a series of graphics files and .bin files. If something I've written confuses then try looking at them as they may help to illustrate what I'm trying to say.

Making a Basic Map

Suggested method:
  • Enlarge top-down view in ShockEd by dragging the sliders
  • Select filter and remove lights, objects and rooms.
  • Zoom out until the map fits onto screen
  • Use a screen capture program to take a snapshot
  • Make walls and blank spaces one colour each. It is probably sensible to resize the image at this point so that it fits the map parameters
  • Erase non-space defining walls.
  • End image size should be 614x260x8bit. Larger or smaller size will work, but with problems
  • Save file as Page001.pcx and place in path ..\sshock2\intrface\english\MyMisName. If making an automap save as Page001a.pcx
For a really basic map, and if you do not want it to be an automap this should be enough. Getting to this point should take about anhour, depending on competence with the paint programs and size of the level.

A few notes and observations on making the basic map:

  • If you want to make an automap it is important to resize the map to its correct size at the right time. Writing and thin walls especially may scale oddly or be lost
  • Palette entry #1 is the transparent colour, which in PSP defaults to pure black. If the "no map data" shows up through your map this is the probable reason.
  • For insets, use area brushes first to isolate the area for the inset and then use screen capture. It is best to keep all screenshots to the same scale, especially if an automap is planned.
  • Use the same palette for all files in each folder
Making an Automap
  • If you find that your level is orientated the wrong way relative to the automap there is a "map rotate hack" under the mission parameters of the editor menu.
  • Make named room brushes, typically by opening up the object hierachy, selecting rooms from the dd menu, clicking on default room and then new, naming them and clicking create. Each new subtype defines an automap area
  • Make a "blank" version of the basic map. Save as Page001.pcx
  • Complicated, see examples
    • Draw boxes around automap sections as defined by the rooms (alternatively define the rooms based on the automap) using palette entry 254. Best to edit the palette so that colour 254 is an obvious colour, typically either bright green or pink. I used bright yellow.
    • Fill in the section around the "map parts" with palette entry 1, which makes the surrounding areas transparent.
    • The fill must go over any bits of the map which are outside the appropriate automap section.
    • The boxes may not overlap
    • Save as p001ra.pcx
    • Repeat steps until all automap sections are defined. Save file as p001ra/b/c.. sequentially.
  • Run cutout.exe from the LGS mapping tools (available in the Resources section of ShockEd Central) from either the run dialog or DOS box with the usage "cutout p001ra.pcx ..", with all the p001r_ you made listed after p001ra.
  • Run makerect.exe (also in LGS mapping tolls) with the same usage.
  • To make the areas light up as you enter them copy p001ra.bin (made by makerect) and rename to p001xa.bin. Then copy all the files generated by cutout.exe (p001r000.pcx etc.) change as desired and rename to p001x000.pcx)
  • Add the property gamesys..map loc to the rooms of your level and number them equivalently to the cutout generated versions, for example p001r004 would be map loc 4.
Getting the automap to work
  • In ShockEd, create two markers at obvious positions, but not in inset areas
  • Find the marker's place on the automap graphic and note their x,y coordinates (at bottom right in PSP for example)
  • Give the two markers the property obj..map ref info and enter the x,y coordinates into them. Set frame to -1
  • To get insets to work, create a single marker in each and give it the map ref info property. Fill in the x,y as appropriate from the graphic and set the frame# to the same as the room number of the inset.
This should give a working automap and allow the player cursor to appear. There are also several Thief based tutorials available at DromEd Central, though not all information is relevant to Shock.

Addendum (ZylonBane)
If you just need to make an adjustment to an existing automap section's position, it's not necessary to go through the entire process described above. It's fairly easy to hex-edit the generated BIN files directly.

The format is very simple:
There is one record for every map area in the BIN file, stored sequentially.
Each record is 8 bytes, and contains four values, stored as little-endian 16-bit numbers:
  • X coordinate of the upper-left corner
  • Y coordinate of the upper-left corner
  • X coordinate of the lower-right corner
  • Y coordinate of the lower-right corner

To perform the editing, I recommend XVI32. For this task it has an essential feature called "Data Inspector" that will display the value of 16-bit numbers.
« Last Edit: 07. October 2022, 16:18:43 by Moderator »
Re: Advanced Shocked Tutorials
673ef5938af22
Ecologies - The Pixie

Introduction

This is based on the LGS Grimoire, examining the OMs plus my own experimentation. Thanks are also due to Telliamed and Nameless_voice for advice and for custom scripts. Any comments or corrections, please PM The Pixie at TTLG.

The Ecology is a pretty complicated construction, but a standard feature of Shock missions. At its simplest, it consists of an Ecology object, which determines the timing and numbers, a monster generator (such as a DirectMonsterGen), which determines what is spawned. But it can be much more complicated than that...

The Ecology object

The Ecology object comes with the TriggerEcology script on it.

Every ecology on the level has its own identifying number. You assign this by adding the Script --> EcoType property, with some number unique to that level. All spawned AIs are given this property; it can then be used by the game engine to track the population of the ecology. You can give AIs this property so they are considered part of the ecology from the start.

Apart from the EcoType, the other settings for the Ecology object are done through the Script --> Ecology property (there is also an EcoState property, used in-game). The Ecology checks its population every N seconds (where N is the period field value). If the number of AIs is below the minimum, it sends a TurnOn, if between the minimum and maximum, there will be a 1 in P chance of a TurnOn signal (where P is the random field value). If the count is over the maximum, no signal is sent. Incidentally, the average time between TurnOn messages if between the maximum and the minimum is N times P, so if N is 10 seconds, and P is 6, you will get AIs spawning on average every 60 seconds.

The Ecology has two modes, Normal and Alarm, each has its own set of parameters. The Alarm values are used if the Ecology goes into alarm mode. For the alarm values there is also a recovery value; the number of seconds until it resets (it gets very confused if this is left at 0 and a Security Camera is attached, by the way).

By the way, there is an alernative script, TriggerEcologyDiff, which does more-or-less the same, but the spawning parameters are affected by configuration values in shock.cfg, so can be adjusted by the player. These are no_spawn lower_spawn_min and raise_spawn_rand

Monster Generator

The Ecology has to be SwitchLinked to a marker or trap with the TrapSpawn script on it. DirectMonsterGen (for alarm ecologies) and RandMonsterGen (for normal ecologies) are traps set up like this with different default flags. While the Ecology determines the timing, it is the monster generator that determines what is spawned.

As well as the script, this also needs the Script --> EcoType property and the Script --> Spawn property. When an AI is spawned, the script will add the EcoType property to the AI, giving it the same value that it has itself. The Ecology object can then track exactly how many AIs are around, and behave accordingly. It is therefore necessary to set the EcoType property on the monster generator to the same value as it has on the Ecology object.

The Script --> Spawn property has four pairs of fields to set up up to four different AIs. The first field of the pair is the AI name as it appears in the hierarchy, the second value is the relative probability of that AI. Looks to me as though LGS originally did these as percentages, then tuned, as they seem to add up to somewhere around 100. You can leave fields blank if you want less than four AI types. To spawn new monsters, you will have to edit the hierarchy, which means making a custom gamesys (there are plenty of other good reasons to do that).

The final field in the Script --> Spawn property is called Supply, and is the maximum number of AIs that the trap will generate. Set to zero if you do not want a limit. A note by Lance Botelle has another idea (see here) but this is what I found.

The field before that is a set of flags.

  • PlrDist: If set, spawns only when player is not nearby (could be within 35', from a very rough test).
  • RayCast: Only spawns when player cannot see the Spawn Point.
  • SelfMarker: Count me as a Spawn Point too (for the DirectMonsterGen). LGS recommend not doing this, but do it anyway.
  • PopLimit: Limit the number of active AIs from the Spawn Marker to one only
  • Farthest: This will cause the AIs to spawn at the furthest point from the player, no matter what (Raycast will be ignored)
  • GotoLoc: This seems to make the AIs go straight to the player (even if you have ai_aware turned off)

Spawn Markers

Spawn Markers determine where the monsters will appear. They are actually the same as Markers (or Traps if it comes to that), but if you use Spawn Markers, you will know what they are for when you look through your mission in three months time.

Each Spawn Marker must have a SpawnPoint link from the generator. Make sure you put them high enough off the ground and away from wall, otherwise the AIs will get stuck (this may mean smaller AIs appear in mid-air though).

A Spawn Marker can have the AI > Ability Settings > Patrol: Does Patrol property; spawned AIs will then patrol. You may be able to use AI > Ability Settings > Patrol: Random Sequence too (LGS did, but Telliamed's script summary suggests not).

Security Systems

A SwitchLink from a Security Camera to an Ecology will allow the Ecology to go into alert mode when the camera sees the player. You also need a SwitchLnk back from the Ecology to the Security Camera, so that after the recovery time, when the Ecology goes back to normal, the camera is reset too.

A SwitchLink from a Security Computer to the Ecology will allow the player to disable the alarm system. Alarm Ecologies should be kept well apart from each other (perhaps restrict to one a level) otherwise the player could get confused when he hacks the Security Station for one, but alerts the camera for another ecology.

Turrets should also have a SwitchLink from the Ecology, so that they also are deactivated when the Security Computer is hacked. You can also put in a SwitchLink from the Ecology to an object with the AlarmScreen script; this will activate a Tweq when in alarm mode (I do not know of any object in the hierarchy that uses this).

Dynamic Ecologies

By inserting QuestBit filters between the Ecology and the monster generator, you can change the system in-game. Say we have a QuestBit called SpawnType, which can change during the name. Connect the Ecology to a QB Filter, the QB Filter to a Anti-QB Trigger, and the Anti-QB Trigger to a DirectMonsterGen. For the two filters, set the Script --> QB Name property to SpawnType, and the Script --> QB Val property to 1 and 2 respectively. Now, the DirectMonsterGen will only generator monsters if SpawnType has the value 1.

You can connect your Ecology to a whole set of these systems, adjusting the Script --> QB Val property appropriately. Each DirectMonsterGen can be set to generator a different set of AIs, but connected to the same Spawn Points. Thus, the AIs that appear will depend on the value of SpawnType. One use of this could be to make the area more difficult as the player gets more skills, weapons and armour.

Alarm and Reset messages

One of the confusing things for me when I started to use ShockEd after building Thief missions was that the SwitchLink is used for much more than the ControlDevice link is. Thief's CD link carries TurnOn messages and TurnOff messages, and that is it. The SwitchLink send them and lots more besides (I guess for any situation where one script communicates with another, but without needing to send any data as well). The TriggerEcology script uses, among others, Alarm and Reset messages. When it receives the Alarm message, it goes into alarm mode, and broadcasts Alarm to all objects that have a SwitchLink from it. When it receives the Reset message (or when the timer expires - which is also done as a message), it goes out of alarm mode, and broadcasts Reset to all objects that have a SwitchLink from it. Those objects that are interested in Alarm and Reset can act accordinly. The Security Computer, Security Camera and Turret, as well as the AlarmScreen script all use these Alarm and Reset messages.

Most objects or scripts do not handle these messages; it would be nice if we could translate Alarm and Reset into TunOn and TurnOff, and then link all sorts of other devices into the security system... And this is pretty easy with custom scripts. Custom scripts may seem scary, but they are actually pretty easy to use. The one you need is NVRelayTrap, in the module NVScript.osm. You will need to download the file from here:

NVScript v1.2.0

Unzip it, and put the file NVScript.osm into your SS2 directory. You need to ensure that anyone playing your FM also has this file. In ShockEd, in the command area, type script_load nvscript That loads in the all the scripts in the module, just as you did with allobjs.osm. You only need to do that once for your FM, to have all the new scripts available.

To make a trap that will translate messages, create a Traps object, add the property S --> Scripts: NVRelayTrap The NVRelayTrap script simply takes a message, and passes it on (just like a Relay Trap in Thief), however, you can configure it to respond to or send any message you like.

The Alarm2TurnOnTrap: To translate from Alarm and Reset to TunOn and TurnOff, add the property:
Scripts --> Objlist arg: NVRelayTrapOn="Alarm";NVRelayTrapOff="Reset"This tells the script to treat incoming Alarm message as TurnOn message (and ignore incoming TurnOn messages), and Reset message as TurnOff. So now, if it receives an Alarm message, it will respond, and pass on a TurnOn (which it defaults to).

The TurnOn2AlarmTrap: To translate from TunOn and TurnOff to Alarm and Reset, add the property (notice the extra 'T's)
Scripts --> Objlist arg: NVRelayTrapTOn="Alarm";NVRelayTrapTOff="Reset"This tells the script to send out Alarm instead of TurnOn and Reset instead of TurnOff.

SwitchLink from the Ecology to an Alarm2TurnOnTrap to lights that come on during a security alert, to security doors that automatically close during an alert, to toxic gas emission, etc. SwitchLink from panic buttons, tripwire traps and (via inverters) reset buttons to a TurnOn2AlarmTrap and then to the Ecology.

Level design

LGS recommend using separate ecologies for alarms or normal spawning, and an important difference is that your alarm ecologies should have the GotoLoc flag set on the generator, so monsters go straight to the player. The DirectMonsterGen trap is set up for this.

For normal ecologies, use RandMonsterGen trap, which does not have GotoLoc turned on. You can have several normal ecologies, perhaps having each spawn a different set of monsters, appropriate to the area. The normal Ecology object I examined in medsci1.mis (1187) had a period of 120, minimum of 1, maximum of 2, and a rand of 3. The RandMonsterGen trap had Raycast, rather than PlrDist, as well as SelfMarker and was linked to four Spawn Points, all well spread out, and placed in corridors. Monsters will materialise in places where it is believable that they could have come from "the other direction" whereever the player is, and will not spawn when the player will see it happen. The Spawn Points have AI Patrol set on them, so the AIs will wander around and cover more ground.

Alarm ecologies should be fairly small so that AIs arrive promptly when alarmed, and are not still trying to reach the player five minutes after the alarm has stopped. Position of the Security Computer needs much consideration; can it be hacked before the camera sees the player, can it be quickly reached once in alarm mode? If you have more than one alarm ecology, link all your Security Computers to every ecology, so that hacking the computer will disable them all (unless thy are well separated, and the player cannot get from one to the other during the two minutes of grace.

The alarm ecology in medsci1.mis (109) has a period of 15, minimum of 2, maximum of 2, recovery of 120 and a rand of 0. The DirectMonsterGen trap had Raycast as well as PlrDist, and SelfMarker and was linked to one Spawn Point. The Security Camera is at a corner of a corridor; the Spawn Point and the DirectMonsterGen were placed at either end of the corridor, behind doors to other corridors.

The Demo Mission

The demo mission of this post tries to illustrate some of these concepts. To use it, unzip the file, and open it in DromEd. There are no extra files included, but it will work best if you have NVScript.osm in your SS2 directory.

There are two Ecology systems in the large open area. The first is a simple, normal Ecology, spawning monsters continuously, on either side of the bridge. The generated AIs are set to patrol back and forth over the bridge.

The second Ecology is rather more complicated. It is an Alarm system, connected to a security camera, a turret and a security computer. You can hack the security computer to disable the turret and ecology.

Also, on the left there is an alarm screen (of sorts; the command elevator screen will change to a engineering elevator screen when the system is alarmed - it was the best I could find in the hierarchy). This uses the AlarmScreen script, which activates the Tweq --> Model property, changing the screen. You could use any two objects. I set this up with (but I am no expert at Tweq):
Tweq --> Model: Stop Tweq, Wrap, Scripts, [None], 0, elecom, eleng,,,,
Tweq --> ModelsState: [None], [None], 0, 0

It also illustrates how to set up a dynamic Ecology. The buttons right of the Security Computer set the QuestBit SpawnType, allowing you to choose whether hybrids, cyborgs or rumblers are generated (rumblers will only appear in the two furthest Spawn Points, by the way, and are a bit slow as they only just fit). SpawnType is initially zero, stopping all spawning; you will have to press one to get anything to spawn.

The upper button left of the Security Computer bypasses the ecology altogether, and will cause an AI to spawn instantly. It just sends a TurnOn message straight to the QB filters and generators.

The lower two buttons left of the Security Computer use NVRelayTrap to allow you to put the ecology in and out of alarm mode (if NVScript.osm is in your SS2 directory). The light over the switches to the right goes on when the ecology is in alarm mode, and out again afterwards. An ambient sound should also be heard.

« Last Edit: 05. September 2023, 02:04:30 by Moderator »

Your name:
This box must be left blank:

A familiar passcode with 3 digits:
1 Guest is here.
That's a lot of nuts!
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
673ef5938ba66