Scriptable Entities Design: Difference between revisions

From PSwiki
Jump to navigation Jump to search
Magodra (talk | contribs)
Magodra (talk | contribs)
Line 1: Line 1:
This desing realize the [[Scriptable Entities]] functionality.
This desing realize the [[Scriptable Entities]] functionality.
== Player Use Cases ==
= Player Use Cases =
<uml>
<uml>
:Hiring Player: --> (Hire NPC)
:Hiring Player: --> (Hire NPC)
:Hiring Player: --> (Script NPC)
:Hiring Player: --> (Script NPC)
:Hiring Player: --> (Extend Hire)
:Hiring Player: --> (Extend Hire)
:Hiring Player: --> (Define Locations)
:Hiring Player: --> (Dismiss NPC)
:Hiring Player: --> (Dismiss NPC)
:Player: --> (Interact with NPC\nNPC Dialogues)
:Player: --> (Interact with NPC\nNPC Dialogues)
:Player: --> (Buy/Sell)
:Player: --> (Buy/Sell)
</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 dialog where the user can select tasks and see the price for each service. Select the needed service and confirm hiring of the 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"
Line 22: Line 23:
</uml>
</uml>


===== Select Service =====
==== Select Service ====
Select service needed from a list of services.
Select service needed from a list of services.
*Guard
*Guard
Line 28: Line 29:
*Custom Dialogue
*Custom Dialogue


=== Script NPC ===
== Script NPC ==
Hired NPCs can be scripted. User open the hire dialog to enter new scripts for the NPC.
Hired NPCs can be scripted. User open the hire dialog to enter new scripts for the NPC.
==== Activity Diagram ====
=== Activity Diagram ===
<uml>
<uml>
(*) --> "Target NPC"
(*) --> "Target NPC"
Line 46: Line 47:
</uml>
</uml>


=== Extend Hire ===
== Extend Hire ==
Opening the hire dialog enable the Hiring Player to extend the hire period and pay the extra fee.
Opening the hire dialog enable the Hiring Player to extend the hire period and pay the extra fee.


=== Dismiss NPC ===
== Define Locations ==
Enable the Hire to define locations used when scripting their hired NPCs. This would be Work Locations and Guard Locations.
 
To decide: Should this be implemented through the /location command? Enabling players to define locations, might need some kind of association so that when character/guild is deleted the location is deleted as well.
 
=== Activity Diagram ===
<uml>
(*) --> "Go to location"
--> "Define new location"
--> (*)
</uml>
 
== Dismiss NPC ==
A NPC that is no longer needed can be dismissed. This will be done from the Hire dialog.
A NPC that is no longer needed can be dismissed. This will be done from the Hire dialog.


==== Activity Diagram ====
=== Activity Diagram ===


<uml>
<uml>

Revision as of 16:49, 22 December 2013

This desing realize the Scriptable Entities functionality.

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 hire dialog to enter new scripts for the NPC.

Activity Diagram

Extend Hire

Opening the hire dialog enable the Hiring Player to extend the hire period and pay the extra fee.

Define Locations

Enable the Hire to define locations used when scripting their hired NPCs. This would be Work Locations and Guard Locations.

To decide: Should this be implemented through the /location command? Enabling players to define locations, might need some kind of association so that when character/guild is deleted the location is deleted as well.

Activity Diagram

Dismiss NPC

A NPC that is no longer needed can be dismissed. This will be done from the Hire dialog.

Activity Diagram

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.