Scriptable Entities Design: Difference between revisions

From PSwiki
Jump to navigation Jump to search
Magodra (talk | contribs)
Magodra (talk | contribs)
Line 38: Line 38:
--> (*)
--> (*)
</uml>
</uml>
 
<uml>
(*) --> "Target NPC"
--> "Open Hire Dialog"
--> "Select Service"
--> "Select Hiring Period"
--> "Select Work Location"
--> [Guard Service] "Select Guard Locations"
--> "Confirm Hiring"
"Select Work Location" --> [Sell/Buy Service] "Identify Items to Sell/Buy"
--> "Confirm Hiring"
"Select Work Location" --> [NPC Dialogue] "Create/Edit Script"
--> "Confirm Hiring"
"Select Work Location" --> "Confirm Hiring"
--> "Pay Hiring Fee"
--> "Store and activate Hired NPC"
--> (*)
</uml>
==== Select Service ====
==== Select Service ====
Select service needed from a list of services.
Select service needed from a list of services.

Revision as of 00:24, 23 December 2013

This desing realize the Scriptable Entities functionality.

TODO List

  • Identify how to select the items to sell/buy.
  • Guild items should be through a guild chest or crate. Activities to establish this has to be identified.

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 services
  • See the price for hiring
  • Determine the length of the Hire
  • Create/Edit Custom Dialogues (See the Script Hired NPC use case for details.)

Activity Diagram

Select Service

Select service needed from a list of services.

  • Guard
  • Buy/Sell Hiring Players Items
  • Buy/Sell Guild Items
  • Custom Dialogue

Script Hired NPC

Hired NPCs can be scripted. User open the Hire NPC Dialog to enter new scripts for the NPC.

Activity Diagram

Extend Hire

Opening the Hire NPC Dialog enable the Hiring Player to extend the hire period and pay the extra fee.

Activity Diagram

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

Release NPC

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

Activity Diagram

Interact with Hired NPC

Using the NPC Dialogue to interact with the NPC. Custom NPC Dialogues provides the input.

Activity Diagram

Buy/Sell

Using the standard interface to sell and buy stuff from NPCs.

Activity Diagram

Hired NPC Use Cases

Guard

Perform Guard duties. Pre-programmed guard action. Player select working hours, working 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 Hiring Players Items

NPC can sell and buy either personal. Using the standard trade front end with the trading character.

Activity Diagram

Buy/Sell Guild Items

NPC can sell and buy guild items. Using the standard trade front end with the trading character.

Activity Diagram

Detailed Design

This section will detail some of the activities identified in the Use Cases above. Down to a level that identifies messages between client, server and npc client and some of the sequences in the server as needed.

Sequence Diagrams

This section will be started when Use Cases has been agreed.