Stendhal Quest Editor: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>Hendrik Brummermann Created page with "{{Navigation for Stendhal Top|Contributing}} {{Navigation for Stendhal Contributors}} {{Stendhal Quests}}__NOTOC__ {{TODO|This article is a starting point of describing th..." |
imported>Hendrik Brummermann |
||
| (89 intermediate revisions by the same user not shown) | |||
| Line 5: | Line 5: | ||
{{Stendhal Quests}}__NOTOC__ |
{{Stendhal Quests}}__NOTOC__ |
||
| ⚫ | |||
| ⚫ | |||
{{TODO|This article is a starting point of describing the '''experimental''' quest editor for Stendhal}} |
|||
| ⚫ | |||
| ⚫ | |||
== Task 1: Respond to "job" by saying "I am a lumberjack." == |
== Task 1: Respond to "job" by saying "I am a lumberjack." == |
||
| ⚫ | |||
| ⚫ | |||
| Line 22: | Line 20: | ||
Next, we want that the NPCs replies with "I am a lumberjack." The green area is dedicated to actions, SayTextAction is already preselected. So all you need to do, is to replace "Hello, World" with the sentence. |
Next, we want that the NPCs replies with "I am a lumberjack." The green area is dedicated to actions, SayTextAction is already preselected. So all you need to do, is to replace "Hello, World" with the sentence. |
||
[[Image:FsmEditor Game1.png|left]] |
|||
[[Image:FsmEditor Job.png]] |
[[Image:FsmEditor Job.png]] |
||
{{br}} |
|||
| ⚫ | |||
| ⚫ | |||
Now click the Save-button and think of a name for your quest. (It might be a good idea to include your nickname to prevent conflicts with other people). |
Now click the Save-button and think of a name for your quest. (It might be a good idea to include your nickname to prevent conflicts with other people). |
||
| ⚫ | |||
== Aside 1: The ingame view == |
|||
The player might not know what a lumberjack does. So we should explain it: |
|||
{{TODO: Screenshot in game}} |
|||
| ⚫ | |||
[[Image:FsmEditor Game2.png|left]] |
|||
{{TODO|custom trigger}} |
|||
[[Image:FsmEditor Hash.png]] |
|||
{{TODO|hashtag to highlight lumberjack}} |
|||
First of all, we need to indicate, that "lumberjack" is a word, which the player may say. The client prints those words in blue. In the editor (or the java code), we use the "#" character to achieve the highlighting. |
|||
== Aside 2: The game view == |
|||
And second, we have to define a new interaction. Click on the +-button below the black border to create a new one. |
|||
{{TODO: Screenshot in game}} |
|||
Unlike "job", "lumberjack" is not a predefined standard trigger, so it is not in the drop down list. Therefore we have to use the custom trigger field. |
|||
== Aside 3: The graph view == |
|||
== The graph view == |
|||
{{TODO: Explain graph view}} |
|||
In the next section, we will have a look at asking questions and reacting to answer. But before we go there, we should have a look at the <nowiki>[Graph]</nowiki>-page: |
|||
[[Image:FsmEditor Simple Graph.png]] |
|||
You can see a red box in the middle labeled ''ATTENDING''. This is called a state. Will will look at them in detail in the next section. |
|||
Linked to the ''ATTENDING'' state there are the two interaction, which we have defined earlier. |
|||
If a NPC is in state ATTENDING and the player says one of those triggers, the interaction will be executed and the NPC will reply. |
|||
If you point the mouse cursor at an interaction, you can see a box on the right with detailed information. |
|||
== Task 3: Ask the player for a new axe == |
== Task 3: Ask the player for a new axe == |
||
Let's offer a quest! If the player says ''quest'', the NPC shall ask him for a new axe: |
|||
{{TODO|QUEST-trigger, ask question}} |
|||
{{TODO|Explain states}} |
|||
''I broke my axe. Please, will you get me a new axe?'' |
|||
{{TODO|Add yes and no answer}} |
|||
{{TODO|Graph view}} |
|||
But this time, we are waiting for an answer, either ''yes'' or ''no''. We could just add those words as triggers. But that would mean, that we can only ask one yes/no-question. |
|||
When the player says ''yes'' or ''no'', the NPC needs to remember that he asked for an axe. This short term memory is achieved by using another state. Any state would do, but per convention there is ''QUEST_OFFERED'' just for this situation. |
|||
[[Image:FsmEditor Quest Graph.png]] |
|||
As the above graph shows: If the player says ''QUEST'', the NPC will transit from ''ATTENDING'' to ''QUEST_OFFERED''. In this state, he will only accept ''YES'' and ''NO'': |
|||
[[Image:FsmEditor Quest.png]] |
|||
== Task 4: SetQuestAction == |
== Task 4: SetQuestAction == |
||