David on 6/11/2004 at 20:42
I'm having a really hard time trying to figure out how objectives are acheived, I've been at it for a few days now (hence no tutorials in the last few).
Anyone managed to find anything?
I've found a few bits and pieces releating to objectives, and initialising them, but I've not been able to find anything specific like adding a "STEAL THIS" trigger script or property to an object.
Harwin on 8/11/2004 at 21:28
Ok. I'm not overly familiar with how they did goals, but grepping through the code, it looks like you define the goals in the conversation system.
Some goals are predefined (you have them when you start the level), others you get via trigger action.
There are 3 actions:
CompleteGoal, ClearAllGoals, AddGoal.
And some conditions on goal state.
So I'd go looking at conversations if you want to start trying to figure out how a specific goal from a real level comes about.
David on 9/11/2004 at 20:33
I've figured out objectives now, but I am unable to get my own ones to work, only ones shipped with the game.
I create a new conversation called <em>DavidTestObjectives</em> under <em>PlayerGarrett</em> in the conversation browser and associate it with the "Castle" conversation pack.
I then created a single goal called <em>GoalStealGoblet</em>, set its Initial State to <em>Pending</em>, set its type to a Goal and gave it the text <em>Steal the goblet</em>.
I also created an "End" point in the conversation.
I then created a goblet in the game and added a custom trigger script to basically say "When I am frobbed by player > Set goal GoalStealGoblet to kgs_success"
I modified the trigger script CastleInitializeCobjectives to point to my custom conversation.
I then gave my map the Conversation Package of <em>Castle</em>.
Testing the map and looking at the objectives shows no text, additionally taking the goblet has no effect.
I then changed the trigger script <em>CastleInitializeObjectives</em> back to its original (that is to initialize the conversation <em>CastleObjectives</em>)
I changed the trigger script on the goblet to change the state of the goal obj_EnterCastle to success when it is frobbed.
Starting the game now shows the objective text of the Bloodline mission, additionally taking the goblet flashes up Objective Completed (or whatever it is) on the screen, and checking the objectives shows that the Enter the Castle objective is complete.
This, at least, shows that I know how to create objectives.
Notes:
If I rename the Castle.con (CONTENT\T3\Conversations) file and set the objectives back to the Bloodline ones then the objectives cease to work.
My custom conversation objective does not have one of these and I do not know how to create one:
Inline Image:
http://www.ttlg.com/dave/t3ed/goal.pngThirdly, using File > Save and File > Compile has no obvious effect other than a momentary flash of the Windows "Busy" cursor.
Editing the Castle.con file to replace one of the words with one of my own also causes the conversation not work.
I figure I need something or some way of creating these *.con files.
So, I'm stuck on something fairly vital :(
Harwin on 9/11/2004 at 21:05
Hmm.
I'm not sure that I can get you both conversations with audio *and* objectives in the current editor release.
But you *could* try the following:
In your user.ini, under [Conversations] set:
"SchemaChangesAllowed=true"
(You can see this set to false in default.ini)
This should allow you to compile conversations. However, if you compile conversations packages without the associated sound files, well, they won't work properly. So you need a package that has *only* objectives at this point (I think). (I wish I were more familiar with the conversation system.)
*Ideally* you could recompile existing conversations and as long as you didn't add *new* audio it would work. But that's not how the current system works, unfortunately. I hope that the above change at least lets you do missions with barks and objectives, even if you can't do conversations.
--Alex
David on 9/11/2004 at 21:24
Excellent, that is one step closer!
I was only using the Castle pack because I know it was a working one.
I've now created my own pack and my custom objective now shows up and gets checked off when I steal the goblet.
The next issue is that the text does not show up in the objectives menu.
But now it is time for some food, now that its 9:20 pm :o I worked all the way through from 4:45pm on this! :D
David on 10/11/2004 at 18:24
I know how one of the ringed names in the image above, and it corresponds to a filename.
The file contents is
Quote:
Version 7
SoundSchema
DJCObjective_001000
streamtype 0
volume 0,0 pitch 0,0
radii 0.00625,100
pan 0,1081690947
randomstyle 0
looptype 0
finishstyle 0
schemaloopdelay 0,0
ainoisetype 0
storage 3
metasounds 1
meta1
tags 1
+voice:
MetaSound
DJCObjective_001000/meta1
lang_english 2004-11-10 18:11:54:00 "Steal the Goblet"
none
I've "Saved," "Compiled" and "Export Misson Objectives" and even resorted to hex-editing EMObjectives.dat to include this new file.
Still I am left with an objective that works, but has no text in the menu.
Is there something I am missing?
Harwin on 10/11/2004 at 19:06
I'll take another look when I get some time.
Harwin on 10/11/2004 at 21:37
Ok.... so it's a bit more complicated than I thought.
So... the key are the "EnterMissionInfo" objects.
Now there are two types.
Those which have TriggerScriptLinks *to* them. (Enter objects)
Those which don't. (Restart objects)
As an example, look at Inn.unr. It has the one for while you're in the mission (or if you restart it), and the one for when you exit the mission to go to Castle (we haven't yet loaded castle, so we have to show you the objectives)
There are two copies of the props, the inherited (blue) and the local, unreal-style (black). The code checks for the blue props first. The black ones should have been removed, but weren't.
I haven't tried doing this myself, but this is what looking through the code got me.
Enough info?
--Alex
David on 11/11/2004 at 08:41
It is a start.
I created an EnterMissionInfo and DifficultyInfo for my test map as children of the Castle's. I didn't use the Inn because it keeps changing the objectives (unhiding etc) and I wanted to keep it separate.
I change the blue Visible Objetives property to match the *.con file of my level.
(Just a thought, it might be handy to have a list of where these files are. A lot of the things that reference external files just have "Inn.txt" and no information about which folder they are supposed to be in, I can guess but it isn't ideal)
I linked the EnterMissionInfo to the DifficultyInfo via a TriggerScript link and added an InitalizeObjectives trigger script which I saw on one of the levels' DifficultyInfos, though I forget which level.
Still no luck :(
Harwin on 11/11/2004 at 18:48
There is no Inn.txt for objectives. Which is even more misleading. It's part of EMObjectives.dat (it used to be in EMObjectives\Inn.txt before we compressed them into one file)
Hmm... I'll look some more.
--Alex