Scriptable Entities Design: Difference between revisions

From PSwiki
Jump to navigation Jump to search
Magodra (talk | contribs)
 
(109 intermediate revisions by one other user not shown)
Line 1: Line 1:
This desing realize the [[Scriptable Entities]] functionality.
This desing realize the [[Scriptable Entities]] functionality.
= TODO/TBD List =
* Identify how to select the items to sell/buy (See [[#Identify_Items_to_Sell.2FBuy|Identify 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 =
= Player Use Cases =
<uml>
<uml>
:Hiring Player: --> (Hire NPC)
:Hiring Player: --> (Hire NPC)
:Hiring Player: --> (Define Locations)
:Hiring Player: --> (Script Hired NPC)
:Hiring Player: --> (Script Hired NPC)
:Hiring Player: --> (Extend Hire)
:Hiring Player: --> (Define Locations)
:Hiring Player: --> (Release NPC)
:Hiring Player: --> (Release NPC)
:Player: --> (Interact with Hired NPC\nNPC Dialogues)
:Player: --> (Interact with Hired NPC\nNPC Dialogues)
:Player: --> (Buy/Sell)
:Player: --> (Buy Items)
</uml>
</uml>
== Hire NPC ==
== Hire NPC ==
Player can hire a NPC to do work for either the player or his guild.
Player can hire a NPC to do work for either the player or his guild.  
 
To limit the number of Hired NPCs each player will only be able to hire at most one NPC. Guild might be allowed to hire more NPCs.
 
=== Activity Diagram ===
=== Activity Diagram ===
Using a NPC that hiring out other NPCs to start the hire. Each activity involving player is performed using NPC Dialogues.


<uml>
<uml>
(*) --> "Target NPC"
(*) --> "Target NPC that hires out NPCs"
--> "Open Hire Dialog"
--> "Select working hours"
--> "Select Service"
--> "Select type of NPC to hire"
--> "Select Hiring Period"
--> "Select Working Hours"
--> "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" --> [Custom NPC Dialogue] "Script Hired NPC"
--> "Confirm Hiring"
--> "Confirm Hiring"
"Select Work Location" --> "Confirm Hiring"
--> "Activate Hired NPC"
--> "Pay Hiring Fee"
--> "Store and activate Hired NPC"
--> (*)
--> (*)
</uml>
</uml>


==== Target NPC ====
==== Target NPC that hires out NPCs ====
Player target npc either directly through selecting the NPC or indirect through selection of target in the "/hire" command line.
Player target an NPC that hires out other NPCs.
 
==== Select working hours ====
Through [[NPC Dialogues|NPC Dialogues]] the player can start a hiring process. The player will need to select if a night or day assignment is needed.
 
Choices available:
* Working day
* Working night
 
Example NPC dialogue:
*Player: I would like to hire a NPC.
*NPC: Would you like to hire for day or night?
*Player: For day work.
 
==== Select type of NPC to hire ====
 
Through [[NPC Dialogues]] the player can select type of NPC to hire. Merchant Player will only be available if the player meet a set of requirements Example: Level in crafting.
 
Choices available:
* Guard
* Merchant Player
* Merchant Guild
 
Example NPC dialogue:
*NPC: Would you like a guard or a merchant?
*Player: I would like to have a guard.


==== Open Hire Dialog ====
==== Confirm Hiring ====
Either using the command "/hire" or selecting the Hire Icon from the [[Context Menu]] (See [[Context Menu Design]]). This open the [[Hire NPC Dialog]]. From the [[Hire NPC Dialog]] the hiring player can do the following:
*Select services
*See the price for hiring
*Determine the length of the Hire
*Create/Edit [[Custom NPC Dialogue|Custom NPC Dialogues]] (See the [[#Script Hired NPC|Script Hired NPC]] use case for details.)


==== Select Service ====
Through [[NPC Dialogues]] the player should confirm that he would like to hire.
Select service needed from a list of services:
*Guard
*Buy/Sell Hiring Players Items
*Buy/Sell Guild Items
*[[Custom NPC Dialogue]]


==== Select Hiring Period ====
Selection of hours, days, months or years to hire the NPC.


==== Select Working Hours ====
Example NPC dialogue:
Selection of time of day the NPC will start to work and number of hours up to maximum of a scriptable number of hours per day.
*NPC: You can get one of my guard for 100 trias a day?
*Player: I accept the conditions.


==== Select Working Location ====
==== Activate Hired NPC ====
Selection of a location identified by the player through [[#Define Locations]] activity to be the working location for the NPC.


==== Identify Items to Sell/Buy ====
After hire is confirmed a NPC will be spawned and assigned to the hiring player. The hired NPC will than start to follow the player.
TBD: How to identify the items to sell/buy. For hiring players items, the items should be in storage, but probably not all items in storage should be
eligible for selling?


TBD: For Guild Items container items need to be selected as storage. All items in the container could probably be sold, but not all items are of interest for buying?
== Define Locations ==
Enable the Hire to define locations used when scripting their hired NPCs. This would be Work Locations and Guard Locations.


TBD: How should the price be determinded?
Using the /location command enabling players to define locations for Scripting Hired NPCs. Might need some kind of association so that when character/guild is deleted the location is deleted as well.


==== Script Hired NPC ====
=== Activity Diagram ===
Create/Edit [[Custom NPC Dialogue|Custom NPC Dialogues]] (See the [[#Script Hired NPC|Script Hired NPC]] use case for details.)
<uml>
(*) --> "Go to location"
--> "Define new location"
--> (*)
</uml>


== Script Hired NPC ==
== Script Hired NPC ==
Hired NPCs can be scripted. User open the [[Hire NPC Dialog]] to enter new scripts for the NPC.
Hired NPCs can be scripted. User open the [[Script Hired NPC Dialog]] to enter new scripts for the NPC.
=== Activity Diagram ===
=== Activity Diagram ===
<uml>
<uml>
(*) --> "Target NPC"
(*) --> "Target NPC"
--> "Open Hire Dialog"
--> "Open Script Hired NPC Dialog"
--> "Create/Select Custom Script"
--> "Select Work Location"
--> [Guard Service] "Select Guard Locations"
--> "Edit Custom Script"
"Select Work Location" --> [Sell Items] "Select Item Source"
--> "Edit Custom Script"
--> "Edit Custom Script"
--> "Validate Script"
--> "Validate Script"
Line 93: Line 103:
</uml>
</uml>


==== Validate Script ====
==== Identify Item Source ====
It is important that only valid scripts are given to the server. Need to make sure that the script is correct before script is stored in the db and assigned to the NPC. This validation should identify illegal syntax, validate that the commands are ok for players to use. As an example commands that create new items will not be available for players. See [[Custom NPC Dialogues]] for details.
Select the source of the items to be sold. For Guilds this will be a container the guild dedicate to serve as the storage for the hired merchant.


== Extend Hire ==
==== Select Work Location ====
Opening the [[Hire NPC Dialog]] enable the Hiring Player to extend the hire period and pay the extra fee.
From a list of locations defined by the Player using the /locate operation a work location can be defined for the Hired NPC.


=== Activity Diagram ===
==== Validate Script ====
<uml>
It is important that only valid scripts are given to the server. Need to make sure that the script is correct before script is stored in the db and assigned to the NPC. This validation should identify illegal syntax, validate that the commands are ok for players to use. As an example commands that create new items will not be available for players. See [[Custom NPC Dialogue|Custom NPC Dialogues]] for details.
(*) --> "Target NPC"
--> "Open Hire Dialog"
--> "Update Hiring Period"
--> "Confirm Hiring"
--> "Pay Hiring Fee"
--> "Store and activate Hired NPC"
--> (*)
</uml>
 
== 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>


== Release NPC ==
== Release NPC ==
A NPC that is no longer needed can be released. This will be done from the Hire dialog.
A NPC that is no longer needed can be released. This will be done from the [[Script Hired NPC Dialog]].


=== Activity Diagram ===
=== Activity Diagram ===
Line 129: Line 119:
<uml>
<uml>
(*) --> "Target NPC"
(*) --> "Target NPC"
--> "Open Hire Dialog"
--> "Open Script Hired Dialog"
--> "Release Hired NPC"
--> "Release Hired NPC"
--> "Confirm Release"
--> "Confirm Release"
Line 137: Line 127:


== Interact with Hired NPC ==
== Interact with Hired NPC ==
Using the NPC Dialogue to interact with the NPC. [[Custom NPC Dialogue|Custom NPC Dialogues]] created through the NPC Hire process provides the input to the NPC Dialogue system to provide custom dialogues.
Using the [[NPC Dialogues]] to interact with the NPC. [[Custom NPC Dialogue|Custom NPC Dialogues]] created through the Script Hired NPC process provides the input to the [[NPC Dialogues]] system to provide custom dialogues.


=== Activity Diagram ===
=== Activity Diagram ===
Line 149: Line 139:
</uml>
</uml>


== Buy/Sell ==
== Buy Items ==
Using the standard interface to sell and buy stuff from NPCs.
Using the standard interface to buy stuff from NPCs.
=== Activity Diagram ===
=== Activity Diagram ===


<uml>
<uml>
(*) --> "Target NPC"
(*) --> "Target NPC"
--> "Select Buy/Sell"
--> "Select Buy"
--> "Perform Trade"
--> "Perform Trade"
--> "Close Buy/Sell Dialog"
--> "Close Buy Dialog"
--> (*)
--> (*)
</uml>
</uml>
= Admin Use Cases =
In this context admin is defined as setting or rule team members.
<uml>
:Admin: --> (Script NPC that hire out NPCs)
</uml>
== Script NPCs that hire out NPCs ==
This activity creates [[NPC Dialogues]] for the NPC that are going to hire out NPCs.
<uml>
(*) --> Select NPCs that hire
--> Create NPC Dialogue\nQuest
-->(*)
</uml>
=== Select NPCs that hire ===
Selection of NPCs are outside scope of this design. That is part of the Setting process.
=== Create NPC Dialogue ===
The [[NPC Dialogues]] will through [[Response Operation|Response Operations]] define the hired NPCs. Each NPC that will hire out other NPCs might be different but they must include steps to:
* Start Hire
* Confirm Hire
They might include steps to:
* Select working hours
* Select type of NPC to hire
** Guard
** Merchant Player Items
** Merchant Guild Items
* Select experience level
** Trainee
** Expert


= Hired NPC Use Cases =
= Hired NPC Use Cases =
<uml>
<uml>
:Hired NPC: --> (Guard)
:Hired NPC: --> (Guard)
:Hired NPC: --> (NPC dialogue)
:Hired NPC: --> (NPC dialogue)
:Hired NPC: --> (Buy/Sell Hiring Players Items)
:Hired NPC: --> (Sell Player Items)
:Hired NPC: --> (Buy/Sell Guild Items)
:Hired NPC: --> (Sell Guild Items)
</uml>
</uml>
== Guard ==
== Guard ==
Perform Guard duties. Pre-programmed guard action. Player select working hours, working position, a number of check points and interval for checking thous.
Perform Guard duties. Pre-programmed guard action. Player select working hours, working position, a number of check points and interval for checking thous.
Line 183: Line 212:
Through Quest script syntax with user safe commands enabling custom scripts to be crated for the NPC.
Through Quest script syntax with user safe commands enabling custom scripts to be crated for the NPC.


== Buy/Sell Hiring Players Items==
== Sell Player Items==
NPC can sell and buy either personal. Using the standard trade front end with the trading character.
NPC can sell items for the hiring player. Using the standard trade front end with the trading character.


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


<uml>
<uml>
(*) --> "Player Request Buy/Sell Dialog"
(*) --> "Player Request Sell Dialog"
--> "Present Hiring Players Items"
--> "Present Players Items"
--> "Perform Trade"
--> "Perform Trade"
--> "Update Hiring Players Items"
--> "Update Hiring Players Items"
Line 196: Line 225:
</uml>
</uml>


== Buy/Sell Guild Items==
== Sell Guild Items==
NPC can sell and buy guild items. Using the standard trade front end with the trading character.
NPC can sell guild items. Using the standard trade front end with the trading character.


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


<uml>
<uml>
(*) --> "Player Request Buy/Sell Dialog"
(*) --> "Player Request Sell Dialog"
--> "Present Guild Items"
--> "Present Guild Items"
--> "Perform Trade"
--> "Perform Trade"
Line 211: Line 240:
= Detailed Design =
= 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.
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.
== Database ==
To keep track of hired NPCs and store the scripts new elements will be needed in the DB. Creating one new record to keep all information regarding hiring. This will be equivalent to the server side HireSession object.
<uml>
class character << (D,orchid) >> {
  +id
}
class npc_hired_npcs << (D,orchid) >> {
  +hired_npc_id : int
  +owner_id : int
  +guild : bool
  +container_item_id : int
  +working_hours : TBD
  +work_location : TBD
  +guard_positions : TBD
  +script : TEXT
}
note right of npc_hired_npcs
NEW record to keep hired npc information.
*hired_npc_id points to the NPC that is hired.
*owner_id points to the player that hired this npc.
*container_item_id points to the container
containing items to be sold.
*script contain a Custom NPC Dialogue
end note
character "2" -- "0..n" npc_hired_npcs : >
</uml>
== State Diagrams ==
=== Hire Session States ===
<uml>
[*] --> Hiring : Start Hire
Hiring --> Hired
Hired --> [*] : Release
state Hired {
  [*] --> NotScripted
  NotScripted --> Scripted : Confirm Script
  state NotScripted as "Not Scripted"
}
</uml>
== Sequence Diagrams ==
== Sequence Diagrams ==
This section will be started when Use Cases has been agreed.
This section will be started when Use Cases has been agreed.
=== Message Sequences ===
Sequence diagrams with focus on the messages going between the different programs.
==== Message Sequence Start Hire ====
<uml>
actor Player
participant Client
participant Server
participant NPCClient
database Database
Player -> Client : Context select
Client -\\ Server : psUserActionMessage
note right: action = context\nSee Context Menu Design for server details.
Client //- Server : psGUIInteractMessage
Player <- Client : Display Context menu
Player -> Client : Select Talk
Client -\\ Server : psUserCmdMessage
note right: command = "/npcmenu"
Client //- Server : psDialogMenuMessage
Player <- Client : Display Dialog Menu
Player -> Client : Select text
note right: "I would like to hire a NPC"
Client -// Server : psChatMessage
Server -> Server : Start Hire
database Database
note over Player, Database
  Some more sequences to decide working hour, type of NPC to hire, etc.
  Using more Dialog Menu Messages and Chat Messages. Server update HireSession.
end note
</uml>
See also [[Context Menu Design]].
==== Message Sequence Confirm Hire ====
<uml>
actor Player
participant Client
participant Server
participant NPCClient
database Database
Player -> Client: Select text
note right: "I confirm hiring"
Client -\\ Server : psChatMessage
Server -> Server : Confirm Hire
Server -> Database : hired_npcs
note right: Update hired_npcs with this new hire.
Client //- Server : psChatMessage
Player <- Client: Display chat
note right: "You hired a NPC"
Server -\\ NPCClient : psNewNPCCreatedMessage
NPCClient -> Database : sc_npc_definition
note right: Update NPC definition with record for new NPC.
Client //- Server : psPersistActor
note right: Spawn the new Hired NPC
Player <- Client : Display hired NPC
Server -// NPCClient : psPersistActor
Server -// NPCClient : psNPCCommandsMessage
note right
  Server assign hired NPC to player.
  Add information to NPCClient about working location, guard positions etc. as applicable.
end note
Server //- NPCClient : psNPCCommandsMessage
note right: Cmd DRDATA
Client //- Server : psDRMessage
Player <- Client: NPC Movement
note right: Hired NPC moving up to player.
</uml>
==== Message Sequence Script Hire ====
<uml>
actor Player
participant Client
participant Server
participant NPCClient
database Database
== Start ==
Player -> Client: Select context menu script
Client -\\ Server : psHiredNPCScriptMessage
activate Server
note right: "Request script"
Client //- Server : psHiredNPCScriptMessage
deactivate Server
note right: "Request Reply with script"
Player <- Client : Display Script Dialog
== Set Work Location ==
Player -> Client: Push work location
Client -\\ Server : psHiredNPCScriptMessage
note right: "Work Location"
activate Server
Server -> Server : Get Current Location
Server -\\ NPCClient : CheckWorkLocation
note right
  Verify that location is close to a waypoint
  and that a path from location to waypoint
  can be found.
end note
activate NPCClient
Server //-- NPCClient
deactivate NPCClient
Client //- Server :  psHiredNPCScriptMessage
note right: "Result from location verification"
deactivate Server
== Script ==
Player -> Client: Edit script
Player -> Client: Push Validate
Client -\\ Server : psHiredNPCScriptMessage
note right: "Validate script"
activate Server
Client //- Server : psHiredNPCScriptMessage
deactivate Server
note right: "Validate Reply"
Player <- Client : Update Script Dialog
== Confirm ==
Player -> Client: Push Confirm
</uml>
=== Server Sequence Diagrams ===
Sequence diagrams showing whats going on inside the server.
==== Server Start Hire Sequence ====
This sequence will establish the HireSession object in the HireManager. NetworkHandling is an abstraction of all the network related stuff.
<uml>
actor Network
control NetworkHandling
Network -\\ NetworkHandling : psChatMessage
NetworkHandling -> ChatManager : HandleChatMessage
note right: CHAT_NPC, Question to start hiring.
ChatManager -> ChatManager : CheckNPCResponse
ChatManager -> NpcResponse : ExecuteScript
NpcResponse -> HireManager : StartHire
create HireSession
HireManager -> HireSession
</uml>
==== Server Confirm Hire Sequence ====
<uml>
actor Network
control NetworkHandling
Network -\\ NetworkHandling : psChatMessage
NetworkHandling -> ChatManager : HandleChatMessage
note right: CHAT_NPC, Confirming hire.
ChatManager -> ChatManager : CheckNPCResponse
ChatManager -> NpcResponse : ExecuteScript
NpcResponse -> HireManager : ConfirmHire
activate HireManager
HireManager -> HireSession : VerifyPendingHireConfigured
HireManager -> EntityManager : CreateHiredNPC
note right: Spawn a new NPC
activate EntityManager
participant NpcManager
database Database
EntityManager -> Database : Copy of master NPC
EntityManager -> NpcManager : NewNPCNotify
NpcManager -\\ Network : psNewNPCCreatedMessage
EntityManager -\\ Network : psPersistActor
deactivate EntityManager
HireManager -> HireSession : SetHiredNPC
HireManager -> HireSession : Save
deactivate HireManager
</uml>
==== Server Script Hired NPC Sequence ====
<uml>
actor Network
control NetworkHandling
participant HireManager
participant HireSession
database Database
</uml>
== Classes ==
<uml>
class HireManager {
  +StartHire()
  +ConfirmHire()
}
class HireSession {
  -state : HireState;
  -ownerId : PID
  -hiredNPCId : PID
  -guild : bool
  -script : csString
  +HireSession(owner:gemActor)
  +SetHiredNPC(hiredNPC:gemNPCActor)
  +HireConfirmed()
  +Save()
}
HireManager "1" *-- "0..n" HireSession : hireSessions
</uml>
<uml>
ResponseOperation <|-- XXResponseOp
class XXResponseOp{
}
note right
  Number of NEW operations.
  XX=StartHire,HireWorkingHour,HireNPCType,ConfirmHire,Etc.
end note
</uml>
= Utility Functions =
== Admin /hire command ==
A admin /hire command equivalent to the NPC Dialogues will be created to allow testing and verification. Will also work as a GM tool to manipulate hires.
=== Sequence Diagram ===
<uml>
actor Admin
Admin -\\ Server : /hire start
Server -> Server : Start New Hire
Admin -\\ Server : /hire type "Merchant Guild"
Server -> Server : Set type for hire session.
Admin -\\ Server : /hire confirm
Server -> Server : Confirm Hire
Admin //- Server : New Hired NPC
Admin -\\ Server : /hire release
Server -> Server : Release Hire
</uml>
[[Category:Engine documents]] [[Category:Server Design]]

Latest revision as of 18:33, 11 February 2019

This desing realize the Scriptable Entities functionality.

Player Use Cases

Hire NPC

Player can hire a NPC to do work for either the player or his guild.

To limit the number of Hired NPCs each player will only be able to hire at most one NPC. Guild might be allowed to hire more NPCs.

Activity Diagram

Using a NPC that hiring out other NPCs to start the hire. Each activity involving player is performed using NPC Dialogues.

Target NPC that hires out NPCs

Player target an NPC that hires out other NPCs.

Select working hours

Through NPC Dialogues the player can start a hiring process. The player will need to select if a night or day assignment is needed.

Choices available:

  • Working day
  • Working night

Example NPC dialogue:

  • Player: I would like to hire a NPC.
  • NPC: Would you like to hire for day or night?
  • Player: For day work.

Select type of NPC to hire

Through NPC Dialogues the player can select type of NPC to hire. Merchant Player will only be available if the player meet a set of requirements Example: Level in crafting.

Choices available:

  • Guard
  • Merchant Player
  • Merchant Guild

Example NPC dialogue:

  • NPC: Would you like a guard or a merchant?
  • Player: I would like to have a guard.

Confirm Hiring

Through NPC Dialogues the player should confirm that he would like to hire.


Example NPC dialogue:

  • NPC: You can get one of my guard for 100 trias a day?
  • Player: I accept the conditions.

Activate Hired NPC

After hire is confirmed a NPC will be spawned and assigned to the hiring player. The hired NPC will than start to follow the player.

Define Locations

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

Using the /location command enabling players to define locations for Scripting Hired NPCs. Might need some kind of association so that when character/guild is deleted the location is deleted as well.

Activity Diagram

Script Hired NPC

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

Activity Diagram

Identify Item Source

Select the source of the items to be sold. For Guilds this will be a container the guild dedicate to serve as the storage for the hired merchant.

Select Work Location

From a list of locations defined by the Player using the /locate operation a work location can be defined for the Hired NPC.

Validate Script

It is important that only valid scripts are given to the server. Need to make sure that the script is correct before script is stored in the db and assigned to the NPC. This validation should identify illegal syntax, validate that the commands are ok for players to use. As an example commands that create new items will not be available for players. See Custom NPC Dialogues for details.

Release NPC

A NPC that is no longer needed can be released. This will be done from the Script Hired NPC Dialog.

Activity Diagram

Interact with Hired NPC

Using the NPC Dialogues to interact with the NPC. Custom NPC Dialogues created through the Script Hired NPC process provides the input to the NPC Dialogues system to provide custom dialogues.

Activity Diagram

Buy Items

Using the standard interface to buy stuff from NPCs.

Activity Diagram

Admin Use Cases

In this context admin is defined as setting or rule team members.

Script NPCs that hire out NPCs

This activity creates NPC Dialogues for the NPC that are going to hire out NPCs.

Select NPCs that hire

Selection of NPCs are outside scope of this design. That is part of the Setting process.

Create NPC Dialogue

The NPC Dialogues will through Response Operations define the hired NPCs. Each NPC that will hire out other NPCs might be different but they must include steps to:

  • Start Hire
  • Confirm Hire

They might include steps to:

  • Select working hours
  • Select type of NPC to hire
    • Guard
    • Merchant Player Items
    • Merchant Guild Items
  • Select experience level
    • Trainee
    • Expert

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.

Sell Player Items

NPC can sell items for the hiring player. Using the standard trade front end with the trading character.

Activity Diagram

Sell Guild Items

NPC can sell 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.

Database

To keep track of hired NPCs and store the scripts new elements will be needed in the DB. Creating one new record to keep all information regarding hiring. This will be equivalent to the server side HireSession object.

State Diagrams

Hire Session States

Sequence Diagrams

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

Message Sequences

Sequence diagrams with focus on the messages going between the different programs.

Message Sequence Start Hire

See also Context Menu Design.

Message Sequence Confirm Hire

Message Sequence Script Hire

Server Sequence Diagrams

Sequence diagrams showing whats going on inside the server.

Server Start Hire Sequence

This sequence will establish the HireSession object in the HireManager. NetworkHandling is an abstraction of all the network related stuff.

Server Confirm Hire Sequence

Server Script Hired NPC Sequence

Classes

Utility Functions

Admin /hire command

A admin /hire command equivalent to the NPC Dialogues will be created to allow testing and verification. Will also work as a GM tool to manipulate hires.

Sequence Diagram