Jump to content
  • Advertisement
  • entries
  • comments
  • views


Sign in to follow this  


Thankfully I am more organized in this project than in Morning's Wrath, I tend to design systems on paper before I even touch the code.

While I /normally/ don't do this I am going to release the basic spec/concept documents that are being used for the dialogue and inventory systems.

I want to know what you think of it =)

Dialogue System:

Data Model:
Each entity has a map of topic objects, keyed by the topic name:

name: unique topic id for the entity
text - the actual display text for the topic
visible - if the topic is visible or not
action - the lua function to call on the entity script
currentState - the current state of the topic (by default this value is 0)
visitedState - the value 'currentState ' was in when you last chose this topic (by default this value is -1)

Topic Presentation:
showing and hiding topics allows for topics to present themselves or to be finished

Topic Progression:
when topics are shown, if currentState and visitedState are not equal (by default)
the topic is shown as fully illuminated (not yet visited). When a topic is chosen visitedState is updated
to the value of currentState. If currentState and visited state are equal (after a topic is read) the topic
is displayed slightly greyed to show that the topic has already been visited.
Using the associated setTopicState function you can progress the topic state, when this is done the current
and visited states will differ showing that the topic has new information to display.
if the topic state is changed you should always provide more information on the topic, a best practice is
to add a very short summary of the preceding dialogue as the end-state.

Reserved Topics:
the first topic created should always be the 'hello' topic, this topic is not shown in the topics list
but instead is automatically called when you begin conversation with an entity.

Conversation Availability:
Entities who have no topics or no visible topics cannot be spoken to.
If an entities topics become all invisible during conversation the conversation ends when the next topic
choice arrives.

Handling Topic Choices:
When a topic is chosen the system ends the topic choice interface, and calls the associated function on the
entities script, from there it is up to the script code to choreograph the conversation using general logic and
the associated dialogue commands.

Speaking and Expression:
characters can speak via the talk command.

talk(entity,"This is some dialogue.","action");

this makes the character's dialogue appear above them, and they will play the action animation if it exists.

NOTE: perhaps use an acting markup language?
flesh out this system =)
Dialogue Relative ASCII Markup Actions

Script Control Functions:
createTopic(this,"myFather","Did you know my father?",true,"onTopicMyFather");

Inventory System:

Data Model:

The game has a list of inventory items
And a pointer to the currently held item if applicable

An inventory item is simply an entity.
While it is possible to place an inventory item in the world, the image differences
between world and inventory usually prohibit this.
in normal operation when an item in world is taken, the Take verb is handled
and the appropriate inventory entity is created and can be placed into the inventory

Inventory Presentation:

Inventory items are shown in a rectangular grid in the Inventory menu, if the inventory size
exceeds the viewable space scroll arrows will become apparent at the lower left and right
if a scroll is possible the arrows will be visible in that direction.

Item Self Interaction:

while in the inventory an item can be interacted with.
left clicking an item will show the standard verb radial menu, with such options as
look at
talk to

in the default case, use will put them item in your 'hand' where it can be used with other items
or used in the game world.

when an item is in hand you can still see the item in-inventory, but this does not mean you have two.

Item With Item Interaction:

when an item is in hand and the item is clicked on another inventory item, this signals an attempt
to 'combine' the items.

an onUse message is raised on both items,ONLY IF THE ITEMS ARE DIFFERENT, and the opposite respective item is passed.
at the end of this action the hand is emptied, the result of the combine is up to the onUse function, by default nothing happens.

Item With World Interaction:

if an item is clicked on a world entity, an onUse message is raised, and the item is passed to the function,
at the end of this action the hand is emptied, the result of this is up to the onUse event, by default nothing happens.


[topicID](state) //used for speaking about topics
Sign in to follow this  


Recommended Comments

Sounds like a plan... ;)

This is starting to sound and look very very interesting, I´ll be waiting. I love RPG´s but there hasn´t been very good ones in ages, I just love Fallout 2, Baldur´s Gate I.

Good luck!

Share this comment

Link to comment
Weeee, I can't wait for a good ol` RPG too... Wait, adventure game? Crap, I'm confused.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!