Mission Tutorial: Objectives, Scripts, Triggers, Flags, Difficulty Levels - by d'Spair
d'Spair on 4/3/2005 at 14:51
Well, first of all, this one probably couldn't be possible without myself being ill at the moment of writing. I had a few days (and nights, actually) to stay at home and figure this bloody system out. So, thanks to my illness:)
This tutorial will show you the way to do a few really important things with your FM. Without knowing that, you'll probably not be able to finish your mission and ship it, so the others can play it successfully. Read through this doc very carefully and try to ignore my mistakes in English (sorry!). I also want to say Thanks to everyone who contributed to exploring T3Ed, especially to those who had written tutorials, and to the authors of the game who answered our questions.
In some areas this tutorial will show some other ways to do different things, despite that it had been already covered in some tutorials or forums posts.
Before reading this doc, you should read the official T3Ed Readme first!
This is not the last version of the document. Your comments and help are highly appreciated.
Well, here we go.
PART 1: HOW TO PLAY THE MISSION WITHOUT THE EDITOR INSTALLED. DECORATIVE MISSION INFORMATION.
1.1: Getting Ready And Making A Teleport System.
Well, the problem of playing a mission without the editor is actually more important than you might think. The very well known method with T3.exe file's shortcut doesn't work as it should, so we will have to mess with the Entry map file. The final result is impressive: you will be able to play your (or someone else's) mission by hitting the "New game" button in the main menu, choose difficulty levels, read (and listen to) the briefing, watch your starting gear and even see the hand-drawn map. Moreover, some hidden problems with mission Autosave function and Level status save system will not occur.
In our example, we're going to build a small test mission called "Robbing The Bank". Actually, we're not going to build a bank, I simply like messing with banks, you see. As far as I understand, there is no hard limit on the number of maps a mission may consist of. So our "Robbing The Bank" mission will be split into three maps: "Bank West Wing", "Bank East Wing" and "Bank Basement".
I don't mean that your mission MUST be split into three parts, no. We have to do this with our test mission only in order to see how some things work with the map transition system.
NB: You have to understand the difference between words "map, level" and "mission". A Mission may consist of multiple Maps (or Levels). For example, the Original Mission called "End of the Bloodline" is split into two Maps: "Castle Front" and "Inner Quarters".
The general internal name for our mission is "Bank". All the maps must have the name of the format "BankX", where X is a number starting from 1 - in our case we have "Bank1", "Bank2" and "Bank3".
Now go and build three very small maps (they actually can be just hallways) and save them as Bank1.gmp, Bank2.gmp and Bank3.gmp (if you don't know how to save and export maps, read the appropriate tutorials!).
The general name ("Bank") must be used when creating conversations. You should put "Bank" (NOT "Bank1" or whatever) in LevelInfo > Properties > LevelInfo > ConversationPackage in each of all three maps you have. The same is about the Map Name in Conversation Properties > Usage (we will do it later). The general mission name is also used in other things, see below.
More on objectives is below.
The name of the actual map is also important. This is the actual map file name (for example, Bank1.gmp). You should use the actual map filename in ... LevelInfo > Title (without the extension, just "Bank1"). This is also related to Teleporters between maps (see below).
Now we have to connect all our three maps, so the player will be able to move between them. You can read more about this in the official T3Ed Readme file. Let’s link our maps this way: the player can move between Bank1 and Bank2, he also can move between Bank2 and Bank3, and, finally, he can move between Bank3 and Bank1 maps. If your test maps are just hallways, put teleport volumes at the both ends of the hallways. This way our maps are linked in a circle: the player can go Bank1 > Bank2 > Bank3 > Bank1 > Bank2 > … and so on.
In order not to be confused, add some different color lights to each of your maps, so that you will know what map you’re now at.
Let's see what we have to do with our teleporter Volume properties. In TeleportInfo, TeleportDestination is the name of a starting point that is placed in the destination map. TeleportDisplayName is a link to one of .sch files with the name of the area (see below), you should have "T_LevelEnterTextBank2" or similar. TeleportMap is, of course, the name of the destination map.
For example, here are the settings for the teleport volume that leads from Bank1 to Bank2:
PromptForTeleport – True (the game will ask you if you want to move to the next area);
TeleportDestination – Let’s call it “from1to2”;
TeleportDisplayName – “T_LevelEnterTextBank2”;
TeleportMap – “Bank2”.
Now we have to set up Teleport destinations for our levels. When a player moves from one map to another, he starts the game on one of the teleport destinations. We have six different Teleports in our maps right now, so we need to put six Teleport destinations, two for each map. To add a teleport destination, add Actor > Marker > Keypoint > NavigationPoint > PlayerStart. Then Add Property Teleport > TeleportDestName on it. This “TeleportDestName” parameter should be the same as the “TeleportDestination” parameter on the teleport volume the player uses to move between the maps. For example, when the player moves from Bank1 map to Bank2 map, he starts at a StartingPoint with “TeleporterDestName” set to “from1to2”. So, set up all six destinations now.
Pay attention: Teleporter destinations and simple Starting Points are different things! If you have no actual StartingPoint in your map (doesn't matter if you have teleporter destinations or not), you will not be able to play the level until we do a few things with the Entry map (see below). You don't have to use simple StartingPoints (without Teleport > TeleportDestName property) in the final versions of your maps, Teleporter destinations will do fine.
But right now we have to check how our Teleports system works, and in order to do that, we have to play our maps. We didn’t set the launch mission system set, so at the beginning of our work we can use the ordinary method with the T3.exe file shortcut.
First of all, create an ordinary PlayerStart actor in your Bank1 map. Then, go to your Thief3 installation directory and create a shortcut to T3.exe file. Add a command-line parameter “Bank1” (without quotes). It should look like that: “…\Thief3\System\T3.exe Bank1”
Now click this shortcut twice. You should start the game on Bank1.gmp map. Test how your Teleports system works, try to move between all three maps in both directions. Make sure it works properly!
Now the last step before we move on: Open Level Properties and set LevelInfo > LevelEnterText for all three your maps to “T_LevelEnterTextBankX”, where X of course is the number of the map (for example, for Bank 2 it should be T_LevelEnterTextBank2).
1.2: Working With Game Files.
Very good, now it’s time to close the editor for a minute and do something with different game files. We’re going to give real names to our levels and to the mission in general, plus something more.
Go to Thief3\CONTENT\T3\Books\English folder.
Briefings and DeBriefings folders contain some files with texts for briefings and debriefings. You also have to set up a few things in editor to make them work (see below). In Briefings directory, create a file called “Bank.txt” and fill it with the following text:
VERSION 2.0
TextEntry
Bank
lang_english 2004-02-20 21:36:00 "<font=Papyrus14><dc=97,80,109>\nI’ve got a simple job planned for this evening… Robbing the local Bank probably won’t be too difficult. I’ve got to get inside, steal the very valuable goblet, push the very important button and get away undetected… Well, here we go!"
lang_french 2004-04-22 14:52:42 "<font=Papyrus14><dc=97,80,109>\nI’ve got a simple job planned for this evening… Robbing the local Bank probably won’t be too difficult. I’ve got to get inside, steal the very valuable goblet, push the very important button and get away undetected… Well, here we go!"
lang_german 2004-04-29 11:40:37 "<font=Papyrus14><dc=97,80,109>\nI’ve got a simple job planned for this evening… Robbing the local Bank probably won’t be too difficult. I’ve got to get inside, steal the very valuable goblet, push the very important button and get away undetected… Well, here we go!"
lang_italian 2004-04-23 16:18:39 "<font=Papyrus14><dc=97,80,109>\nI’ve got a simple job planned for this evening… Robbing the local Bank probably won’t be too difficult. I’ve got to get inside, steal the very valuable goblet, push the very important button and get away undetected… Well, here we go!"
Note: if you want, you may write the text in French, German and Italian.
Good. Now save the file and rename it to “Bank.sch”.
Now in DeBriefings directory, create a file called “Bank.txt” and fill it with the following text:
VERSION 2.0
TextEntry
Bank
lang_english 2004-02-20 21:36:00 "<font=Papyrus14><dc=97,80,109>\nVery good, this work wasn’t hard at all. Now for some food… I also have to pay for my flat, otherwise I’ll have to go back to pick pockets..."
lang_french 2004-04-23 17:51:02 "<font=Papyrus14><dc=97,80,109>\nVery good, this work wasn’t hard at all. Now for some food… I also have to pay for my flat, otherwise I’ll have to go back to pick pockets..."
lang_german 2004-03-10 03:52:06 "<font=Papyrus14><dc=97,80,109>\nVery good, this work wasn’t hard at all. Now for some food… I also have to pay for my flat, otherwise I’ll have to go back to pick pockets..."
lang_italian 2004-04-20 16:18:13 "<font=Papyrus14><dc=97,80,109>\nVery good, this work wasn’t hard at all. Now for some food… I also have to pay for my flat, otherwise I’ll have to go back to pick pockets..."
Also save the file and rename it to “Bank.sch”.
Now go to String_Tags directory.
MapRooms.sch contains some data on how your mission is called ingame. For example, for Museum mission it looks like that:
TextEntry
T_EnterMissionNamemuseum
lang_english 2004-02-29 21:48:00 "Still Life with Blackjack"
lang_french 2004-03-25 13:58:33 "De la Nature Morte et des Matraques"
lang_german 2004-03-20 17:14:06 "Stillleben mit Knьppel"
lang_italian 2004-03-25 07:24:38 "Natura morta con manganello"
In our case, we should probably do something like this:
TextEntry
T_EnterMissionNamebank
lang_english 2004-02-29 21:48:00 "Robbing The Bank"
lang_french 2004-03-25 13:58:33 "Robbing The Bank"
lang_german 2004-03-20 17:14:06 "Robbing The Bank"
lang_italian 2004-03-25 07:24:38 "Robbing The Bank"
[simply add this text right after the first line in MapRooms.sch document]
Misc.sch file has some info on the ingame names of the areas (maps). For Bank West Wing, we should have something like this:
TextEntry
T_LevelEnterTextBank1
lang_english 2004-02-29 21:48:00 "Bank West Wing"
lang_french 2004-04-29 12:12:22 "Bank West Wing"
lang_german 2004-03-20 17:14:06 "Bank West Wing"
lang_italian 2004-03-25 07:31:07 "Bank West Wing"
Add some info for the two remaining maps Bank2 and Bank3, of course (if you don’t remember, they are Bank East Wing and Bank Basement).
In Quotes.sch, you can modify the text that appears onscreen when the level is loading:
TextEntry
T_BankLoadingQuote0
lang_english 2004-08-23 18:16:39 "The Bank is heavily guarded. Alarm systems are modern and very dangerous."
lang_french 2004-08-23 18:16:39 "The Bank is heavily guarded. Alarm systems are modern and very dangerous."
lang_german 2004-08-23 18:16:39 "The Bank is heavily guarded. Alarm systems are modern and very dangerous."
lang_italian 2004-08-23 18:16:39 "The Bank is heavily guarded. Alarm systems are modern and very dangerous."
You can have few loading quotes, just call them T_BankLoadingQuote1, T_BankLoadingQuote2 and so on.
Well, we’re finally ready to make the last step in this lesson.
1.3: Saying Goodbye To The Editor.
Now it’s time to launch our test Bank mission via the game. As I have already said in the beginning, using the T3.exe file’s shortcut won’t do, and you may remove the regular StartingPoint from your Bank1 map and delete the shortcut you have made earlier. But there is a way to modify the Entry.gmp file in order to run your mission in the real game by hitting the "New Game" button. Make a backup of Entry.unr and Entry.gmp files first (they are of course in the Maps folder).
Start T3Ed and open Entry.unr. Find the EnterMissionInfoInn file and go to its Properties > EnterMissionInfo. In EnterMissionBriefingFileName and EnterMissionVisibleObjectivesFileName write "Bank.txt" (instead of "Inn.txt", if course). You can also change the name of the sound file (EnterMissionBriefingVoiceOverSchemaName).
Now find the ExitMissionInfoEntry file and go to its Properties > ExitMissionInfo. Set ExitMissionDestMapName to Bank1 and ExitMissionDestTeleportName to “MissionStart”.
Rebuild the map, save it and Export.
Open your Bank1 map and add another Teleport destination where you want the player to start the Bank mission. Its “TeleportDestName” should be set to “MissionStart”.
Actually, that’s it. Now if you start the game by clicking on the regular T3.exe file and press "New Game", your Bank mission will begin. Now you’re able to see the text for the briefing, the name of the mission (at the top of the screen), see starting gear (you have 10 water arrows, a blackjack and a dagger – we’ll discuss it later) and so on. You can’t see any goals though, but don’t worry, we will fix it later.
When you start your mission, you will notice that every level now has its proper name (at the top of the objectives screen). When you decide to go to Bank3 map, for example, you will be asked “Do you want to leave this area and go to Bank Basement?” While the levels are loading, you will read your quotes. As you can see, everything works properly now. Congratulations!
d'Spair on 4/3/2005 at 14:53
PART 2: MISSION OBJECTIVES (CHAPTER 1). BASIC CONVERSATIONS, SCRIPTS, TRIGGERS AND FLAGS KNOWLEDGE.
2.1: Planning Objectives.
OK, now nothing stops us, and we are to move on to objectives. Due to some engine and game design decisions in Deadly Shadows, this process is a bit more difficult than in Thief 1 and 2 (crap, it actually was quite difficult in the first two games!) In Thief 3, there are two types of objectives you can have in your mission: the actual mission goals and the objectives (or restrictions) determined by difficulty levels. Remember Original Missions? For example, in each of OMs you had goals of this type: “Get 90% loot”, “Steal 3 Special Items”, “Don’t kill unarmed” and so on. All those goals are not actual mission goals, but the goals set by Expert difficulty level. But there are also special mission goals, like “Steal Bloodline Opal” or “Find Compendium of Reproach”. You have to understand the difference between those two types of objectives (as you probably know, in DromEd there is no objective division of that kind).
There’s also a big plus in this system: you don’t have to manually set different goals for different skill levels (unless you want to do this), all is set automatically.
But let’s start with some quite simple things: adding local mission objectives. This process is quite simple and very well described in the brilliant David’s tutorial. I’ll try to add something to this text, though.
In our mission, we’re going to have four local objectives:
- Get inside the bank;
- Steal the valuable goblet (once you do this, the objective number 3 becomes visible);
- Push the very important button (invisible at the beginning of the mission);
- Get out of the Bank, once you’re ready.
We’ll set up those objectives just for you in order to understand the basic mechanics of objectives system. There are some common things with objectives in Thief 1 & 2, but there also many differences.
2.2: Setting Up Local Objectives.
As far as your mission can be (and is) split into a few parts, the goals now are not linked to certain levels. The idea is simple: when the player starts the mission, the special trigger turns the goals active. When the player does something in the game world (takes the goblet, pushes the button), another special script turns one particular objective completed. This way you can move between levels successfully, and your objectives will work.
Objectives are connected with the Conversations system. Don’t worry: we will have nothing to do with speech or something. Conversations determine the order of actions that take place in the game. In our case, those actions are goals turning active for the player.
In T3Ed, press View > Conversations. You will see the Conversation Editor window split into two parts: the left-hand and the right-hand. In the left hand, expand to PlayerGarrett and select Conversation > Add from the top menu.
Set Conversation Name to “BankObjectives”. Left Conversation Owner for “PlayerGarrett”. Under “Usage” window, press the “Add Map” button. You will see the list of mission names. In the top line, write “Bank” and press “Add Map” button to the right. Now select your “Bank” mission from the list and click “OK”. In the “Usage” window, your “Bank” mission now should present. Also, in Options turn on the “Remain in First Person” setting. Very good, now press “OK” and return to Conversation Editor window. As you can see, the new “BankObjectives” conversation appeared under “PlayerGarrett” branch. In the right-hand window, right-click and choose Add > Goal.
Set Goal Name to “objGetInside”. Turn off “Do this objective last” option. Initial state should be set to “Pending” “Objective”. In “Goal Text”, enter the following text: “Find the way to get inside the Bank… There should be two ways, through the basement or via Bank East Wing.” Press “OK” button.
[Note: After you have clicked “OK” button, Schemas may start loading… It will take a few minutes (there are more than 15000 schemas) and it’s quite annoying, but don’t worry – just wait for the end of this process.]
Now use the same method and add three more objectives:
Number two: Set Goal Name to “objStealGoblet”. Turn off “Do this objective last” option. Initial state should be set to “Pending” “Objective”. In “Goal Text”, enter the following text: “There are quite a few valuable items in this Bank, but the infamous Golden Goblet should be the most important for a man like you... Locate the Goblet and take it.” Press “OK” button.
Number three, this is our invisible objective: Set Goal Name to “objPushButton”. Turn off “Do this objective last” option. Initial state should be set to “Hidden” “Objective”. In “Goal Text”, enter the following text: “Oops, it seems that the alarm systems noticed that the Goblet is missing, and all the ways out are now closed. You have to find the secret button that reopens the gates!” Press “OK” button.
Number four, the last objective: Set Goal Name to “objGetAway”. Turn ON “Do this objective last” option. Initial state should be set to “Pending” “Objective”. In “Goal Text”, enter the following text: “Once you have retrieved the Golden Goblet, find your way out of the Bank and escape unnoticed.” Press “OK” button.
Very good, the goal parameters are set, but don’t hurry up. As you remember, in Original Missions we also have some useful tips and hints that are displayed in the Objective screen. Let’s do the same for our mission. Now right click and Add > Goal again.
Set Goal Name to “objNote1”. Turn off “Do this objective last” option. Initial state should be set to “Pending” “Note”. In “Goal Text”, enter the following text: “The alarm systems in this Bank are quite tough... You may experience some serious problems while travelling inside the building.” Press “OK” button.
Now add another note, named “objNote2”, with this text: “The Bank is full of wealth. You're going to have a lucky night.”
Ok, now we are ready. In the right-hand menu, right-click and Add > End (left Event Label field emty). Make sure that the End event is in the very bottom of your Conversation! Now in the top menu, press File > Save, then File > Compile (in the popup window choose “Yes”) and File > Export Mission Objectives. Close the Conversation Editor window.
Now we actually have texts and data for our objectives, but we have to make our mission know about that. First of all, we have to add one script.
Open the Trigger Script Manager. Expand to Missions and, when Missions is highlighted, press “New” button to the left. Set script’s name to “ObjInitialize” Press “Conditions” button and select Scripts > When map starts, arriving from a different map. Press “OK”. Now press “Actions” button and select Conversations > Queue conversation [String] to play. Now in the main Trigger Script window, left click on the blue [String] word and select “BankObjectives” from the list. Press “OK” twice to get back to the Trigger Script manager window (if you wish, you may group all scripts for your Bank mission in the separate folder. To do this, select your “ObjInitialize” script and press the “Group” button. Enter “Bank” in the Group Name. Now you have the separate branch in Missions > Bank. It’s much easier to add your custom scripts there in order not to spoil another folders). Now press “OK” button and wait for the scripts to save.
Finally, in T3Ed, open your Bank1 map. Add Property > Scripts > TriggerScripts to your MissionStart point. In “TriggerScripts” line, press the “Add”, then “…” button and find your “ObjInitialize” script. Highlight it in the TriggerScripts manager and in your Properties window, press “Use”. Finally! Save and export the map.
Well, let’s see what we have now. When the player starts the Bank1 map, the ObjInitialize script triggers the conversation named “BankObjectives”. This conversation adds goals to the game. Easy, isn’t it?
Now quickly start the game and enjoy. Even before starting your “Robbing The Bank” mission, you are now able to read the texts for three objectives (“Get inside”, “Take the Goblet” and “Escape”, the Button objective is invisible right now) and for two Tips. Oh yeah. Start the game and go to Objectives screen. The same! Very good. Try to move between the levels and check your goals – they present! There’s only one problem now – they are not working, haha. You cannot complete those objectives. You also have no objectives determined by the difficulty level (i.e. “Get 40% of loot”, “Steal 1 Special Item” etc). We’re going to solve both problems just about now.
Now you have to create some actions in the game that will trigger and set your goals to completed. Let’s do it.
2.3: Creating An Objective “Steal The Thing”; Creating An Invisible Objective (Beginning).
Let’s start with the Goblet objective, it’s very easy to do. Open your Bank2 map and add Actor > WorldObj > InventoryObject > Loot > GobletLootDiamond somewhere on your map. Now open Trigger Script Manager and add the script called “GobletTaken”. Under Conditions, use Frob > When I am frobbed by player. Under Actions, set Goals > Set goal [objStealGoblet] to [kGS_Success]. Then, add another action: Goals > Set goal [objPushButton] to [kGS_Pending]. Ok, now save this script and go back to the main editor window. Now add this Script to your goblet.
La dee da. Start your mission. When you move to “Bank East Wing” and take the Goblet, the second objective “Take the goblet” will be completed, and you will be given another additional objective: “Push the button”. Take note that all the objectives work properly even if you move between the maps.
2.4: Creating An Objective “Frob The Button”; Creating An Invisible Objective (Continuation).
Now for the Button objective. The method is absolutely similar. Make the script that will turn the goal named “objPushButton” to [kGS_Success], when the player frobs this button. Add this script to the button then. Place the button on the Bank3 map.
Now if you start the game and take the goblet, the hidden objective will appear. Then if you go to Bank Basement and push the button, the third objective will be completed.
NB: This system is actually not bugless. For example, try to frob the button BEFORE you take the goblet. You will see that the third objective will turn visible and completed simultaneously. Then go and take the Goblet, and the third objective will reset to incompleted. Another attempts to frob the button won’t help, and you will not be able to finish the mission, as a result. If you really want to make this system work as it should, you have to mess with additional triggers and flags system (When the player takes the Goblet, a special flag is set to True. The “Push the button” objective is set completed only when the player frobs the button AND the flag is set to True).
2.5: Creating An Objective “Enter The Place” For Different Maps. Flags system.
Well, now let’s start setting the objectives that are connected with going to somewhere. The objective “Get inside the bank” will turn to completed when you reach one of two different areas. Let the first one will be placed at the entrance to the Bank2 map, and the second one – at the entrance to the Bank3 map. This way, when the player moves to either map Bank2 or Bank3, the objective triggers to completed.
Remember the Castle Thief 3 Original Mission. You have three ways to get inside the castle: through the open window, via main gate and via the back door that the cook opens (once you set off the torch). Once you have entered the building, the objective is set to completed. Even if you leave the castle then and try to get inside via the other ways, nothing will change (once completed, the objective can’t be completed again).
In this mission, the authors used a very good method. They have placed three volumes at the entrances to the castle. They also placed a special actor on this map and made three TriggerScript links from this actor to each of the volumes. The actor has a script that turns the “Enter the Castle” objective completed when the player breaches one of the volumes linked to the actor (erm, I hope you follow me).
This is definitely a good method to make “Enter the place” objectives, but only if we deal with one single map. In our case, we’re going to place our entrance volumes at two different maps, so this method will not work.
Right now we’re going to deal with Flags. The Flag system adds a whole new dimension to the scripting system and give great results if set properly. Open View > Global Variables > Flags. Now we have to add our own flag. Call your new flag “BAN_BankEntered” and press the “Add” button. Close this window.
Now let’s add another script called “BankEntered”. Under Conditions, set “When linked volume(s) [MYSELF] are breached by [Category_Player]” and “Query if flag [BAN_BankEntered] is set to [FALSE]”. Under Actions, put “Set goal [objGetInside] to [kGS_Success]” and “Set flag [BAN_BankEntered] to [TRUE] expires on map change [FALSE] expires on mission [1]”.
Now open the Bank2 map. Place a volume close to the Teleport destination that leads from the Bank1 level, so that the player enters this volume right after he had entered the Bank2 map. Now add this “BankEntered” script to this volume. Rebuild, save and export this map. Now open the Bank3 map and put another volume close to the entrance from Bank1, add the same “BankEntered” script to this volume. Go in the game and move to either Bank East Wing or Bank Basement. As soon as you get there and make a few steps, your “Get inside the bank” objective should turn to completed.
Pay attention: once your objective is complete, entering the other volume in the next map won’t do anything. Once the objective is set to completed, it can’t be completed again. The scheme is extremely easy: at the beginning of the mission, the flag “BAN_BankEntered” is set to False. When you enter one of the volumes, the script checks, if the flag is set to False (it is), and then sets the objective completed and set the flag to True. Then when you enter another volume, the script notices that the Flag is already True, and blocks the signal.
2.6: Creating The Final Objective “Escape When You Are Ready”.
Alright, now we have only one last objective to set up: “Escape when you’re ready”.
It’s quite easy do. In your Bank1 map, make a little niche – it will be the area the player need to enter in order to escape. Now surround this niche with a volume. Create another script called “Escape”, with Conditions “When linked volume(s) [MYSELF] are breached by [Category_Player]” and “Query if all goals are completed or cancelled, exclude hidden [TRUE] ? include ‘do last’ goals [FALSE] ?”, and Actions “Set goal [objGetAway] to [kGS_Success]” and “End Mission [TRUE] successfully” and “Reset script conditions and actions”. Now add this “Escape” script to this volume. Actually, that’s it.
NB: You may have noticed that we have to make this script in spite of the fact that we have set our “Escape” goal to Last. It seems that this Last flag on an objective actually does nothing except putting the text of that objective to the very bottom of the Objectives screen in the game. So, don’t be fooled: even if you set your goal to Last in the Conversations menu, it will still be able to be completed before the other objectives are done.
If you go in the game now, you will find out that your last “Escape” goal can be completed only when the other objectives are already completed. Moreover, when you enter the final escape zone, you will be asked if you want to finish the mission. If you decide not to do it, you will be able to continue playing, wondering around the mission, and then you can get back to this escape zone and finally leave the mission (that’s why we put this “Reset” action at the end of the script Actions tree).
Finally you can finish your mission and read the Debriefing text you have written long ago!
Ok, but you’re still not satisfied, are you? You can’t choose difficulty levels. You have no “Don’t kill unarmed” or “Steal 90% loot” objectives. Can you live with it? Of course you can’t. Then welcome to the next chapter!
I hope that now you begin to understand that proper usage of Conversations\Links\Triggers\Scripts\Flags system may give you some really awesome results. Yeah.
d'Spair on 4/3/2005 at 14:58
PART 3: MISSION OBJECTIVES (CHAPTER 2). CHANGING THE GAMESYS. VERY BASIC LINKS KNOWLEDGE.
3.1: Mission Transition Data Theory.
Well, it’s time to deal with some more complicated things. Even MORE complicated? – you may ask. Don’t worry, it only looks complicated, in fact it’s quite easy.
Some things in the game (including difficulty-driven objectives) can’t work properly without proper transition between levels. When the player moves from one map to another, some data should be saved (how much loot the player has collected, how much guards blackjacked, how much time passed since the beginning and so on). In order to make this system workable, a few actors should be placed in our maps. There are four general actors of that type:
- EnterMissionInfo;
- ExitMissionInfo;
- DifficultyInfo;
- DifficultyAIMap2.
I won’t explain you what those actors exactly do, but generally you don’t need this info in order to build complicated missions.
Not all four actors should be placed in all three maps. Here’s the list:
- EnterMissionInfo is placed in every map you have;
- ExitMissionInfo is placed in the map where the player ends the mission (if the player is able to finish the mission not in a particular map, you should place this actor in all maps);
- DifficltyInfo is placed in every map you have;
- DifficultyAIMap2 is placed in all maps you have EXCEPT the one where the mission begins.
Of course, you don’t have to place the same actors on one map for a few times. Very often those maps’ functions overlap (i.e. the map where the mission BOTH begins and finishes, or the map where the mission doesn’t begin, but finishes, and so on). If your mission consists of one single map, you have to place three actors: EnterMissionInfo, ExitMissionInfo and DifficultyInfo. In our example, we have the map where the mission both begins and finishes (Bank1). So, we should put three actors there: EnterMissionInfo, DifficultyInfo, ExitMissionInfo. We also have two maps where the mission neither begins nor finishes (Bank2 and Bank3). We have to place EnterMissionInfo, DifficultyInfo and DifficultyAIMap2 actors in each of those two maps.
3.2: Adding Actors To The Gamesys. Setting Difficulty Levels Parameters. Making A Simple Link.
Right now we’re going to change the Gamesys, so make a backup of your System\T3Gamesys.t3u file.
Open your Actor browser and go to MetaData > Info > EnterMissionInfo > T3EnterMissionInfo. Right click on T3EnterMissionInfo and select “New”. Change the name to “EnterMissionInfoBank”. Now you have the new actor called “EnterMissionInfoBank” under “T3EnterMissionInfo” branch. If you have messed with the Object Hierarchy in DromEd, you should be familiar with the process: we’re going to modify some properties not of the concrete object, but of the gamesys actor. Ok, go to Properties > EnterMissionInfo of this newly created actor.
EnterMissionBriefingFileName should be changed to Bank.txt.
EnterMissionBriefingVoiceOverSchemaName - the name of the sound file that should play while the player reads a briefing text ("Garrett's speech" in OMs).
EnterMissionVisibleObjectivesFileName - also set to "Bank.txt".
Now we have to create three more actors in the gamesys. Go to … Info > ExitMissionInfo and add another actor called “ExitMissionInfoBank”. Modify its Properties > ExitMissionInfo:
ExitMissionDebriefingVOSchemaName - name of a file that plays along with a debriefing text displayed.
ExitMissionDestMapName – the name of the map the player moves to when the mission is completed (you can put the name of another mission, if you’re making a campaign, or leave it blank, if this is the last mission or single mission in your mod).
ExitMissionDestTeleportName – the name of the destination teleporter in the next map.
Two left. Go to … Info > DifficultyInfo > T3DiffiucltyInfo and make the actor called “DifficultyInfoBank”. Go to its Properties > Difficulty:
Here you can modify some parameters set to each difficulty level. Change DifficultyInfoLevelName and LevelName to "Bank".
Now for the most interesting part. So you thought that the Original missions were too easy for you? No problem, you can make your FM very hard by modifying some parameters! Open DifficultyInfoExpertDiffSettings and change some parameters. If you set “DontBlackjackNonComb” to True, when you try to knockout non-combatants in your mission, the game will be over. If you set “MaxDetected” to “1”, the mission will fail even if you get detected by guards or locals more than 1 time! Even the Time Limit for your mission can be set! Wow, Shadows are getting really Deadly now!
Now go to Properties > Scripts of your DifficultyInfoBank actor and press the “Empty” button to the right, so that all scripts set to this actor are removed.
Finally, we have to make the last actor. Go to Actor > Marker > DifficultyAIMap2 and make another actor UNDER this DifficultyAIMap2 actor. Name it “DifficultyAIMap2Bank”. That’s all you have to do with this actor.
Now save the Gamesys by clicking File > Save Selected Packages, then File > Export All Scripts.
REMEMBER: If you decide to change the Properties of those actors in the future, you have to change the properties of the Gamesys actors, and NOT those concrete actors that you will place on your maps!
Now it’s time to place those new actors in our maps. Open the Bank1 map and place EnterMissionInfoBank, ExitMissionInfoBank and DifficultyInfoBank actors anywhere. Now we have to make a link from the EnterMisionInfoBank actor to the DifficultyInfoBank actor. Links have come to T3Ed right from DromEd, and the system works in the same way. Open the Links window (you can find the appropriate button in the left-hand menu in the main editor window). Select “TriggerScript” from the Link Types list. Now click on the EnterMissionInfoBank actor. Then hold Shift and click on the DifficultyInfoBank actor (while you’re holding Shift!). If you’re lucky, you should see the blue arrow coming from the EnterMissionInfoBank actor to the DifficultyInfoBank actor.
Very good. Now we have to put some of these actors in our two other maps.
Open Bank2. Place three actors there: EnterMissionInfoBank, DifficultyInfoBank and DifficultyAIMap2Bank. Again, create the “TriggerScript” link from EnterMissionInfoBank actor to the DifficultyInfoBank. And the last thing. Go to Properties > Scripts of your DifficultyInfoBank actor and set bEnableScriptInherit to False. You have to do it with all DifficultyInfo actors except the one that is placed in the map where the player starts the mission.
Now do absolutely the same with Bank3 map.
Don’t forget about the last step. You have to open the Entry map, delete the DifficultyInfo actor that is placed there and then add DifficultyInfoBank actor. Make a “TriggerScript” link from the EnterMissionInfo actor to the newly created DifficultyInfoBank actor. Save and export the Entry map.
Ok, not it’s time to go in the game and see what we have. When you start your mission, you’ll be able o restart it (finally!) and choose from the different difficulty settings. Note that in Expert difficulty information, you now have restrictions not to be caught more than 1 time, not to be detected and other restrictions which you had set in your DifficultyInfoBank actor in the editor. But once the mission is reloaded… nothing works again. There is still no text for the difficulty-level objectives, and those objectives of course don’t work.
Here comes the diabolic laugh.
3.3: Modifying Conversations.
Of course it won’t work: those goals are not set on when you begin the game! To fix that, we have to modify a number of conversations. Prepare for some very boring, but important work. Open your Conversation Manager window and go to PlayerGarrett. There is a number of conversations we have to modify. Here is the list of all those conversations:
DontBlackjackNonComb
DontKillNonComb
LootPercent
MaxBlackjack
MaxBlackjack0
MaxBlackjack1
MaxCorpsesFound
MaxCorpsesFound0
MaxCorpsesFound1
MaxDetected
MaxDetected0
MaxDetected1
MaxKill
MaxKill0
MaxKill1
MinBlackjack
MinBlackjack1
MinKill
MinKill1
SpecialLoot
SpecialLoot1
TimeLimit.
What do you have to do? You have to add the name of your mission (Bank) to the Usage list for EACH of those conversations. You have already worked with this Conversation system before, so nothing difficult here, actually. It will take you quite much time, but go and do it now, otherwise your soul will burn in fire forever. As a result, now in Usage folders for all those conversations you should have 11 missions listed: 10 OMs and the one you have added (Bank). Now Save, Compile and Export.
Hurry up into the game. Finally! You have the text for all your objectives, including the ones that are determined by difficulty levels! If you restart your mission on Expert, you will see that you have your custom restrictions in the game.
3.4: Setting Up Mission Stat Information.
But STILL something is wrong with those damn objectives. Some of them don’t work. Whenever you try to get some loot, the percentage doesn’t appear.
That’s because we haven’t set some ingame stat info. The game doesn’t know how much loot there is in the mission, in total, so it can’t calculate percentage.
Create a script named “set_stat” with those parameters:
CONDITIONS:
- When map starts, arriving from a different map
ACTIONS
- Set [sta_loottotal] to [x],
where x is the total amount of loot you can get in your mission. Yes, this is odd, but you have to count the total number yourself, there is no inside mechanism that will do it for you.
NOTE: Unfortunately, I wasn’t able to set the Time Counter properly. The ingame timer actually works (If you wait for some amount of time, the mission will fail), but the timer will always tell you “0 minutes remaining”. I spent many hours trying to combine different scripts and flags, but nothing helped. If you’re planning to add TimeLimit to your mission, you’ll have to use real watches to check the time. You can also modify the text of the Timelimit objective in order not to confuse the player.
Now add this script to your “MissionStart” point and go test it in the game.
Now it’s high time to place some loot and AIs on your map in order to check how your objectives work. Fill all three Bank levels with some loot. Now go ingame, pick up all the loot you have and write down the total amount of goods you have. This number should be given to [sta_loottotal] GlobalInt. On Expert difficulty, check if you can blackjack, kill guards and civilians, make sure that your restrictions (don’t get caught more than 1 time, for example) work. Check if all those things work even if you move between maps.
3.5: Creating An Objective “Collect Some Pieces Of Special Loot”.
Now we have to set up the “Steal some Special Loot” objective. Nothing can be easier: select three pieces of loot you want and simple add "CurrentSpecialLoot" (Difficulty > Hiererchy) script to them.
Congratulations: your objectives finally work properly. Go and play your mission now: it looks very challenging!
d'Spair on 4/3/2005 at 14:59
PART 4: SETTING UP STARTING INVENTORY
Drink a cup of tea, make a break, or go sleep (it’s even better) – we’re going to finish our efforts quite soon. Only two important things left: creating the default inventory and mission release.
David from TTLG has already explained how inventory works. Unfortunately, his method is not very helpful if we’re launching our mission via the “New Game” button.
Open our poor Entry map again. Find the EnterMissionInfoInn actor and go to its Properties > EnterMissionInfo > EnterMissionDefaultInventory. Here it is, the place where we modify a starting set of tools Garrett has when the mission starts. You have to add items by manually typing their names, so in order not to make a mistake, open Actor > WorldObj > InventoryObject and find those items you want to give the player. Remember how they are named and type those names EXACTLY in the EnterMissionDefaultInventory fields. “Num”, of course, is the number of tools available, but you can’t use the number that exceeds the “MaxInventoryStack” for that item (it’s set in the Gamesys).
For example, if you want to add two Noisemaker Arrows, you should put “NoisemakerArrow” to the “ItemName” field, and “2” to the “Num” field (MaxInventoryStack for Noisemaker Arrows is 5). Easy!
You have noticed that the player already has a blackjack, a dagger and 10 Water arrows. You can change it here.
There are some tutorials on giving the player lockpicks and upgrades – they should help you. We’re not going to discuss it here.
NOTE: There’s a strange bug connected with this system. Before starting the mission, go to the “Gear” screen. You’ll see that not all the items are present here. Some bombs or other things may be missing. However, during Restart no bugs of that kind occur.
Once you’re done, Save and Export the map. Go and check your brand-new inventory in the Game. Bring ‘em hell!
d'Spair on 4/3/2005 at 15:01
PART 5: MISSION RELEASE
NOTE: THIS PART MUST BE PARTIALLY REWRITTEN BECAUSE IT'S NOT COMPLETE!!!
Well, this question is not clear right now, because there aren’t known mechanisms of mission distribution. Discovery of the .IBT files creation will surely be very helpful. Anyway, IBT files may stock some resources like custom textures or static meshes, but some other files are still required. Well, here is the list of the files that you NEED to put to your mission archive:
CONTENT\T3\Maps\Bank1.gmp, Bank2.gmp, Bank3.gmp
CONTENT\T3\Maps\Entry.gmp
CONTENT\T3\Books\English\Briefings\Bank.sch
CONTENT\T3\Books\English\DeBriefings\Bank.sch
CONTENT\T3\Books\English\String_Tags\MapRooms.sch
CONTENT\T3\Books\English\String_Tags\Misc.sch
CONTENT\T3\Books\English\String_Tags\Quotes.sch
CONTENT\T3\Conversations\Bank.con
CONTENT\T3\Books\EMObjectibes.dat
CONTENT\T3\Flags folder
System\T3Gamesys.t3u
+ note: plus .ibt files!
Add all those files to a .zip file (“Bank.zip”, obviously), keeping the folder structure. Now make a fresh install of Thief 3 and unzip those files to Thief3 folder, rewriting the old files when necessary Then click T3.exe and go play your mission. Make sure that everything works fine: objectives, inventory, triggers and so on.
Actually, this is the way how the missions should be distributed. Again, this is not the last word. Something will surely change in the nearest future, so keep an eye on updates.
---
There is the list of issues I have to work on:
- Setting up proper Timer;
- Automaps;
- Changing skill levels in the beginning;
- Starting gear display in the beginning;
- Loading map custom image.
darkcosmos on 4/3/2005 at 15:53
Wow, very impressive! Can't wait to work through it tonight...
It is very well organized and easy to follow. The only confusing thing I found is in part 2.6 on creating the Exit objective. Where you have "create a little inch", I'm wondering if perhaps you meant "little niche"?
I almost hope you stay ill a little longer to give us more great tutorials! ( :ebil: I'm just kidding)
scumble on 4/3/2005 at 16:07
Good work, d'Spair - I'll put that in the wiki. Still, you might as well register and get going in there so these tutorials can be refined etc.
(
http://www.ttlg.com/wiki/wikka.php?wakka=BasicMission) 'tis done - still needs a little formatting.
Ideally anyone following the tutorial should add any useful tips as they go along, but excitement may stop this from happening of course ;)
deadman on 4/3/2005 at 16:08
Quote Posted by d'Spair
Well, the problem of playing a mission without the editor is actually more important than you might think. The very well known method with T3.exe file's shortcut doesn't work as it should, so we will have to mess with the Entry map file.
Just a quick note; are you talking about the method outlined in the release document that talks about creating a shortcut to T3.exe and adding an argument to load a specific mission outside of the editor? If so, this worked fine for me.. I just created a shortcut and added the name of a map (i.e., Tutorial5) outside of the parentheses. When I double-click the shortcut, it loads the map, giving me an alternative to doing it through the editor. It's supposed to work differently? :confused:
Again, just a quick note. I'm not even far enough in this editor to be reading the rest of this :joke:.
deadman.
d'Spair on 4/3/2005 at 16:27
Quote:
The only confusing thing I found is in part 2.6 on creating the Exit objective. Where you have "create a little inch", I'm wondering if perhaps you meant "little niche"?
Oh, crap. It's better not to write anything at 4.30 am :nono: Og course it's "little niche", gotta correct it right now. Thanks!
Quote:
I almost hope you stay ill a little longer to give us more great tutorials!
Hehe, I've already recovered :p
Quote:
Good work, d'Spair - I'll put that in the wiki. Still, you might as well register and get going in there so these tutorials can be refined etc.
Thanks. A word of caution though - this is not the last version of the tutorial. I'll definately be updating it. The last part about mission distribution is outdated and must be rewritten (I even was thinking about not posting it). I have some problems with registering at the Wiki :(
Deadman - yes, I'm talking about this. But when I was discovering some things, I found that this shortcut method is very unreliable. Map save status is buggy if you're dealing with multiple levels, and Reload function is lame too.
rujuro on 4/3/2005 at 16:34
If I remember from the post where this was all being discovered, d'Spair found that there were errors when moving between two maps that were introduced when running with the command argument.
oops, simultaneous