Scriptable Entities Design: Difference between revisions
Line 3: | Line 3: | ||
:Hiring Player: --> (Hire NPC) | :Hiring Player: --> (Hire NPC) | ||
:Hiring Player: --> (Script NPC) | :Hiring Player: --> (Script NPC) | ||
:Hiring Player: --> (Extend Hire) | |||
:Hiring Player: --> (Release NPC) | :Hiring Player: --> (Release NPC) | ||
:Player: --> (Interact with NPC) | :Player: --> (Interact with NPC) | ||
Line 8: | Line 9: | ||
</uml> | </uml> | ||
=== Hire NPC === | === Hire NPC === | ||
Player target npc and enter "/hire" or selecting the hire icon from the context menu (See [[Context Menu Design]]). This open the hire NPC | Player target npc and enter "/hire" or selecting the hire icon from the context menu (See [[Context Menu Design]]). This open the hire NPC dialog where the user can select tasks and see the price for each service. Select the needed service and confirm hiring of the NPC. | ||
==== Activity Diagram ==== | ==== Activity Diagram ==== | ||
<uml> | <uml> | ||
(*) --> "Target NPC" | (*) --> "Target NPC" | ||
"Target NPC" --> "Open Hire | "Target NPC" --> "Open Hire Dialog" | ||
"Open Hire | "Open Hire Dialog" --> "Select Service" | ||
"Select Service" --> "Confirm Hiring" | "Select Service" --> "Confirm Hiring" | ||
"Confirm Hiring" --> (*) | "Confirm Hiring" --> (*) | ||
Line 25: | Line 26: | ||
=== Script NPC === | === Script NPC === | ||
Hired NPCs can be scripted. User open the script window or hire | Hired NPCs can be scripted. User open the script window or hire dialog to enter new scripts for the NPC. | ||
==== Activity Diagram ==== | ==== Activity Diagram ==== | ||
<uml> | <uml> | ||
(*) --> "Target NPC" | (*) --> "Target NPC" | ||
--> "Open Hire or Script | --> "Open Hire or Script Dialog" | ||
note right: TODO: Have to decide if this should be Hire | note right: TODO: Have to decide if this should be Hire dialog or a new script Dialog | ||
--> "Create/Select Custom Script" | --> "Create/Select Custom Script" | ||
--> "Edit Custom Script" | --> "Edit Custom Script" | ||
Line 43: | Line 44: | ||
endif | endif | ||
</uml> | </uml> | ||
=== Extend Hire === | |||
Opening the hire dialog enable the | |||
=== Release NPC === | === Release NPC === | ||
A NPC that is no longer needed can be released. This will be done from the Hire | A NPC that is no longer needed can be released. This will be done from the Hire dialog. | ||
== NPC Use Cases == | == NPC Use Cases == |
Revision as of 16:03, 22 December 2013
Player Use Cases

Hire NPC
Player target npc and enter "/hire" or selecting the hire icon from the context menu (See Context Menu Design). This open the hire NPC dialog where the user can select tasks and see the price for each service. Select the needed service and confirm hiring of the NPC.
Activity Diagram

Select Service
Select service needed from a list of services.
- Guard
- Buy/Sell
- Custom Dialogue
Script NPC
Hired NPCs can be scripted. User open the script window or hire dialog to enter new scripts for the NPC.
Activity Diagram

Extend Hire
Opening the hire dialog enable the
Release NPC
A NPC that is no longer needed can be released. This will be done from the Hire dialog.
NPC Use Cases

Guard
Perform Guard duties. Pre-programmed guard action. Player select working hours, main guarding position, a number of check points and interval for checking thous.
NPC dialogue
Through Quest script syntax with user safe commands enabling custom scripts to be crated for the NPC.
Buy/Sell
NPC can sell and buy either personal or guild items.