Skip to content

Instantly share code, notes, and snippets.

@frankhale
Created December 2, 2018 02:58
Show Gist options
  • Select an option

  • Save frankhale/e47f519c199dc1df00b4172cceed2dd4 to your computer and use it in GitHub Desktop.

Select an option

Save frankhale/e47f519c199dc1df00b4172cceed2dd4 to your computer and use it in GitHub Desktop.

Revisions

  1. frankhale created this gist Dec 2, 2018.
    169 changes: 169 additions & 0 deletions mud-domain-model-ideas.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,169 @@
    # Domain Model

    This is a work in progress but is an attemp to model the domain of a typical MUD in psuedo-code

    ## direction

    - name (string)

    ## currency

    - name (string)
    - type (string)
    - amount (int)

    ## trait

    - name (string)
    - value (int)

    ## clothing

    - name (string)
    - type (string)
    - traits (array of traits)

    ## weapon

    - name (string)
    - type (string)
    - traits (array of traits)

    ## player

    - name (string)
    - level (int)
    - inventory (array of items)
    - traits (array of traits)
    - location (room id)
    - currency (array of currency)
    - clothing (array of clothing)
    - weapons (array of weapons)
    - quests (array of quests)
    - achievements (array of achievements)
    - spells (array of spells)
    - recipies (array of recipies)

    ## npc

    - dialog (array)
    - location (room)
    - items (array)
    - currency (array of currency)
    - actions (array of action)
    - vendor (boolean)

    ## mob

    - name (string)
    - level (int)
    - location (room)
    - items (array of items)
    - traits (array of traits)
    - clothing (array of clothing)
    - weapons (array of weapons)
    - spells (array of spells)

    ## market-criteria

    - currencyType (string)
    - purchasePrice (int)
    - sellPrice (int)

    ## item

    - name (string)
    - description (string)
    - properties (array)
    - market-criteria (array of market-criteria)
    - items (array of items)

    ## scenery

    - name (string)
    - description (string)
    - location (array of room ids)
    - actions (array of actions)

    ## action

    - name (string)
    - synonyms (array of strings)
    - action (function)

    ## triggers

    - name (string)
    - trigger (function)

    ## room

    - id (int)
    - name (string)
    - dialog (array of strings)
    - scenery (array of scenery)
    - items (array of items)
    - npcs (array of npcs)
    - exits (array of directions)
    - actions (array of actions)
    - triggers (array of triggers)

    ## house

    - id (string)
    - name (string)
    - rooms (array of rooms)
    - items (array of items)

    ## zone

    - id (int)
    - name (string)
    - description (string)
    - rooms (array of rooms)
    - houses (array of houses)

    ## world

    - id (int)
    - name (string)
    - description (string)
    - player (array of player)
    - zones (array of zones)
    - achievements (array of achievements)

    ## step

    - description (string)
    - condition (function)

    ## quest

    - dialog (array of string)
    - steps (array of steps)
    - reward (array of items)

    ## achievement

    - name (string)
    - steps (array of steps)
    - reward (array of items)

    ## puzzle

    - rooms (array of room ids)
    - steps (array of steps)
    - conclusion (function)

    ## recipe

    - name (string)
    - level (int)
    - ingredients (array of strings)

    ## spell

    - name (string)
    - level (int)
    - dialog (array of strings)
    - effects (function)