Objectives Editor: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 91: Line 91:
''Player Responsible'':The player MUST follow through with the objective himself. For example:The player must kill the zombie to complete the objective, instead of letting something else take care of it.
''Player Responsible'':The player MUST follow through with the objective himself. For example:The player must kill the zombie to complete the objective, instead of letting something else take care of it.


                                      -Tutorial Coming soon-
Now it might seem a bit crazy trying to take all of this in at once, so lets start with something easy.
 
== Tutorial ==
*Note:This tutorial is assuming you've learned the basics for using Darkradiant.
 
You should already be in Darkradiant. Start a new map if you're in an existing one.
 
We'll start with the basic cube room. Nothing fancy, just make a room, stick in a player start, a light and plaster on some textures.
[[Image:cube.png|left]]
{{clear}}
For this tutorial, our player is going to have to knock out a guard and steal a trophy.
 
So lets start with adding the AI, I chose atdm:ai_citywatch. Select him, go into the entity editor ("N") and change his NAME to "Roy" (without quotes).
 
 
Now its time to open up our objectives editor.
 
 
[[Image:Objmenu.png|left]]
{{clear}}
Now as you just learned, click add, click the target_tdm_addobjectives_1 and click add again.
 
The ''Edit Objective'' window should be open now. Clear the text under '''Description''' and type in "Knock out the guard". Set the initial state to 'Complete'. Check the '''Mandatory''' and '''Visible''' flags.
 
*Note: Although Initial state refers to the state the objective is at start, it is reversed right now and in the
process of being fixed. So for now, you have to set the state to what you want the outcome to  be. 9/6
 
Time for a new step, click the [[Image:%2Badd.png]] button under '''Components''' and the word "Kill" should appear. Select it and you will see some more options. Under '''Type''' select "AI is knocked out".
 
under '''Knockout target:''' select "Name of single entity" and type in the box to the right of it, "roy" (without quotes). Set amount to 1.
 
Now compare your screen to this, it should be the same.
[[Image:Editprogress.png|left|]]
{{clear}}
If all looks good than click OK.
 
Its always a good idea to test things to make sure everything is running right. So save your map, get into TDM and load your map.
 
First, hit ESC and click ''Objectives''. You should see your objective onscreen.
[[Image:Onjyes.png]]
*NOTE:If you don't see it on screen, you probably forgot to check the '''Visible''' box.
 
Now its time to test your objective. Exit out of the objectives menu and launch a gas arrow or use the blackjack on poor Roy. When he goes down you should see the words "Objective Complete" appear onscreen and since thats the only objective we've added so far you'll win the mission.
*NOTE:If you don't win nor see the on screen message, go back and try to figure what you did wrong.
 
If all is well than its time to move on. Exit TDM and go back into Darkradiant.
 
Now it is time to add the trophy. In your map add a trophy somewhere, I used the entity loot>atdm:loot_trophy_old
change its name to "trophy" and go back into objectives editor.
 
Add another objective and edit it.
'''Description''' should be ''Steal the Trophy''. State is ''Complete'', '''Flags''' should be ''Mandatory'' and ''Visible''. Click ADD and select '''Player possesses item''. Change '''Item:''' to ''Name of single entity'' and type in the box to right, "trophy". Change the amount to "1".
 
Your objective should look like this.
[[Image:Trophyedit.PNG|left]]
{{clear}}
Since this is a tutorial this map is very small and very basic so we are tossing all pre-thought and planning for the objectives out the window. If you want you can put the trophy on a stand and have the guard in front of it.
 
Save your map and load it up in TDM. Look at the objectives menu to see if the fresh addition is there. And than take it and see if it completes the objective.
 
Congratulations!
 
You now have a basic understanding of how the objectives editor works. For more advanced work, look for more tutorials in the future or go on the forums.
 
== FAQ ==
 
Q:If I kill the guard I don't fail the mission, but I can't complete it either.
{{clear}}
A:I'll quote Greebo for this one.
 
"The system is not smart enough to know automatically that someone who's killed can't be KO'd later, so if you want it to fail when they're killed, you have to put that in specifically. Note that this doesn't have to be a whole 'nother objective, it can be a component of the KO objective, so you have two components, KO them, and don't kill them. We could potentially make this automatic later on, but that's the way it is right now."

Revision as of 23:56, 6 September 2008

The objectives editor is a very useful tool located inside Darkradiant (Version 0.9.7 or later) that allows the map author to set objectives or goals that the player must do in order to win the level. The opposite is also true, the author can set restrictions that the player must adhere to, or will fail the mission.


To access the objectives editor once inside Darkradiant, click the pull-down menu Map>Objectives...


Upon clicking you will see a separate window that looks like this.



To start things off, click the Button

This will create an Entity that stores all of the objectives information that will you be editing.



Now we've spawned our objectives entity,

Notice the numbers in the “[]”'s. Those are the entities' coordinates on the map. These numbers will most likely be different from yours. When the objectives entity spawns it is placed randomly around the origin (As of 0.9.7 this is how it is, it might change in future versions, but for now this is how it is).

*Note:Be mindful that sometimes this entity will spawn outside your map and into the void. This will cause a leak, 
so look around the origin.

Now we're ready to start adding some objectives.

Click the second Button



Under Objectives you'll notice theres a new Objective.

Click it and than click


This will bring up this window.


Now we're editing our first objective. It may seem a little confusing at a first glance but a lot of it is self explanitory and a little practice will take you a long way.

So what do all these various lines and checkboxes do? They effect the objective components at the bottom.

What do they all mean?

Description: This what the player will read in the objectives menu. For example: “Steal the scepter”, “Don't kill any guards”, “Get back to where you entered the warehouse”. Its explaining what you want to player read so he/she knows what to do. A good rule to follow is to make them short and to the point.

Difficulty:These refer to Easy/Medium/Hard difficulty levels. If the author wishes, they can be different for each difficulty. For example: on Hard difficulty the player will have to avoid being seen. On Easy the player will only have to steal 200 gold at the minimum. All Levels means that the objectives that are checked under this will be there regardless of difficulty.

Initial State:This is what the objective will be right from the start. There are four options. Complete, Incomplete, Invalid, Failed.

Flags:

Mandatory means the objective in question is necessary to complete the game. If it is unchecked than the objective will be optional.

Ongoing means that the objective won't show completion until the end of the mission. Irreversible means that once the objective is done, theres no change to it (could use more elaboration).

Visible means that objective will be visible in the objectives menu ingame. If unchecked than there will be no objective shown. (The objective will still work, it just won't show up in the menu).

*Tip: The "Visible" Box isn't checked by default yet, so try to get in the habit of checking it with each objective you want visible.

Enabling Objectives, Logic and Scripts: Under Construction

Components:These are used by the editor to specify what objectives need to be done. The map author can choose from a variety of options under Type with varying degrees of specification. For example: Knocking out an AI named "Roy". Not being seen by the ANY enemy. (less examples, should cover this in the coming up tutorial.)

Components Flags:Components have their own special flags as well.

Satisfied at Start:For some objectives it makes sense to have them done at start. For example: Not killing anyone.

Irreversible:One the objective has reached a certain state, it will stay that way and not change. (more elaboration, an example?)

Boolean NOT:Adds "NOT" to your component so the player has to do the opposite of said objective. For example: Do NOT kill any AI on team 2.

Player Responsible:The player MUST follow through with the objective himself. For example:The player must kill the zombie to complete the objective, instead of letting something else take care of it.

Now it might seem a bit crazy trying to take all of this in at once, so lets start with something easy.

Tutorial

*Note:This tutorial is assuming you've learned the basics for using Darkradiant.

You should already be in Darkradiant. Start a new map if you're in an existing one.

We'll start with the basic cube room. Nothing fancy, just make a room, stick in a player start, a light and plaster on some textures.

For this tutorial, our player is going to have to knock out a guard and steal a trophy.

So lets start with adding the AI, I chose atdm:ai_citywatch. Select him, go into the entity editor ("N") and change his NAME to "Roy" (without quotes).


Now its time to open up our objectives editor.


Now as you just learned, click add, click the target_tdm_addobjectives_1 and click add again.

The Edit Objective window should be open now. Clear the text under Description and type in "Knock out the guard". Set the initial state to 'Complete'. Check the Mandatory and Visible flags.

*Note: Although Initial state refers to the state the objective is at start, it is reversed right now and in the
process of being fixed. So for now, you have to set the state to what you want the outcome to  be. 9/6

Time for a new step, click the button under Components and the word "Kill" should appear. Select it and you will see some more options. Under Type select "AI is knocked out".

under Knockout target: select "Name of single entity" and type in the box to the right of it, "roy" (without quotes). Set amount to 1.

Now compare your screen to this, it should be the same.

If all looks good than click OK.

Its always a good idea to test things to make sure everything is running right. So save your map, get into TDM and load your map.

First, hit ESC and click Objectives. You should see your objective onscreen.

*NOTE:If you don't see it on screen, you probably forgot to check the Visible box.

Now its time to test your objective. Exit out of the objectives menu and launch a gas arrow or use the blackjack on poor Roy. When he goes down you should see the words "Objective Complete" appear onscreen and since thats the only objective we've added so far you'll win the mission.

*NOTE:If you don't win nor see the on screen message, go back and try to figure what you did wrong.

If all is well than its time to move on. Exit TDM and go back into Darkradiant.

Now it is time to add the trophy. In your map add a trophy somewhere, I used the entity loot>atdm:loot_trophy_old change its name to "trophy" and go back into objectives editor.

Add another objective and edit it. 'Description should be Steal the Trophy. State is Complete, Flags should be Mandatory and Visible. Click ADD and select Player possesses item. Change Item: to Name of single entity and type in the box to right, "trophy". Change the amount to "1".

Your objective should look like this.

Since this is a tutorial this map is very small and very basic so we are tossing all pre-thought and planning for the objectives out the window. If you want you can put the trophy on a stand and have the guard in front of it.

Save your map and load it up in TDM. Look at the objectives menu to see if the fresh addition is there. And than take it and see if it completes the objective.

Congratulations!

You now have a basic understanding of how the objectives editor works. For more advanced work, look for more tutorials in the future or go on the forums.

FAQ

Q:If I kill the guard I don't fail the mission, but I can't complete it either.

A:I'll quote Greebo for this one.

"The system is not smart enough to know automatically that someone who's killed can't be KO'd later, so if you want it to fail when they're killed, you have to put that in specifically. Note that this doesn't have to be a whole 'nother objective, it can be a component of the KO objective, so you have two components, KO them, and don't kill them. We could potentially make this automatic later on, but that's the way it is right now."