Package mmud.database.entities.game
package mmud.database.entities.game
Provides the JPA Database Entities.
Mapping of database tables to database entities.
database table | entity |
---|---|
mm_usertable | Person |
mm_items | ItemDefinition |
mm_itemtable | Item |
mm_charitemtable | CharitemTable |
List of Database Tables
Tablename | Description |
mm_admin | Contains the userids and passwords of people administrating the mud. |
mm_answers | Contains questions and answers forbots. |
mm_area | (Note)Provides an clustering of rooms called an area. Every room is identified as belonging to a area, the main area beingcalled "Main". |
mm_bannednamestable | Contains names of characters that are not allowed to log on to the mud. Characters that are banned. These are independent of IP address or hostname of the user. |
mm_bantable | A table of persons that are not allowed to log on to the mud. Persons that are banned. These are dependent of IP address or hostname, or even a range of these in the case of dynamic ip/hostnames. |
mm_boardmessages | Contains all messages posted on the publicmessage boards. |
mm_boards | Identifies individual public message boards, |
mm_charattributes | (Note)Attributes of a certain character (player/non-player). |
mm_charitemtable | (Note)Indicates who is carrying which item instances. |
mm_commandlog | Logging table, contains everycommand of every user entered with an appropriate timestamp. |
mm_commands | (Note)Special commands that have to be programmedin methods. |
mm_errormessages | |
mm_events | (Note)Equal to the linux crontab. Can execute methodsat specific recurring times in the game. |
mm_guildranks | (Note)The different ranks that can exist within a guild |
mm_guilds | (Note)The different guilds that are available in the game |
mm_help | Contains help manpages on individual (standard) commands |
mm_ignore | (Note)Contains a list of people playing the game that are ignoring other people playing the game. |
mm_itemattributes | (Note)Attributes of a certain item. |
mm_itemitemtable | (Note)Indicates which item instances contain which item instances. |
mm_items | (Note)Provides item definitions. So, basically, if you have a bucket, the definition would be in this table, while actual instances of the bucket being carried around are in the table mm_itemtable. This table should contain characteristics common to all buckets. |
mm_itemtable | (Note)Provides instances of item definitions. |
mm_log | Logging table, for describing important events in thelife of characters and administrators. |
mm_oldlog | Logging table backup, contains everything older than a day. |
mm_macro | (Note)Contains macros created by players in the game. |
mm_mailtable | (Note)Contains the persons to which a mudmail has been sent (can be more than one). For instance, a mudmail to the deputies will be sent to the four deputies, which means this table contains four entries. |
mm_mailcontents | (Note)Contains mud mail of characters in the game |
mm_methods | (Note)Special methods that can be entered in the database to provide characters with special abilities or to be executed periodically. See related tables mm_commands and mm_events. |
mm_roomattributes | (Note)Attributes of a certain room. |
mm_roomitemtable | (Note)Indicates which room contains which item instances |
mm_rooms | (Note)Contains room definitions. |
mm_shopkeeperitems | (Note)Provides which items a shopkeeper isallowed to sell/buy and when the shopkeeper decides to stop buying itemsfrom characters (i.e. when the shop has plenty of those specific items insupply) |
mm_sillynamestable | |
mm_unbantable | |
mm_usertable | (Note)Contains all characters in the game. |
List of Fields in Each Table
(* denotes primary key)mm_methods
- name
- the name of the method
- src
- the source code of the method in Simkin embedded scripting language syntax.
- owner
- the owner of the object, i.e. the one that is allowed to make changes. If this is NULL, the first one to make any changes owns the item.
- creation
- timestamp, is updated with the current datetime whenever a change takes place on the record in question.
mm_admin
- name
- the name of the administrator. This is usually related to the owner field in other tables.
- passwd
- the password of the administrator encoded in SHA1() method.
- ip
- the ip address last logged of the person entering (currently not used)
- created
- date/time of creation of the row.
- validuntil
- the date until which the account is active.
- email address of the administrator.
mm_commands
- id
- identification of the command
- callable
- whether or not the command is active. Either 0 (inactive) or 1 (active).
- command
- the command which triggers this. % as wildcards are permitted.
- method_name
- the name of the method to be executed. Refers to mm_methods.
- room
- the room in which this command might be active. In case of NULL, the command is activated in all rooms.
- owner
- the owner of the object, i.e. the one that is allowed to make changes. If this is NULL, the first one to make any changes owns the item.
- creation
- timestamp, is updated with the current datetime whenever a change takes place on the record in question.
mm_events
- eventid
- unique identification of the event.
- name
- name of the character issueing the command. Might be NULL, if it is not a specific character issueing the action.
- month
- month in which to execute this event. -1 is every month.
- dayofmonth
- dayofmonth in which to execute this event. -1 is every day.
- hour
- hour in which to execute this event. -1 is every hour.
- minute
- minute in which to execute this event. -1 is every minute.
- dayofweek
- dayofweek in which to execute this event. -1 is every dayofweek. Usually, this value is for if an event should take place once a week on a specific weekday.
- callable
- whether or not the event is active. Either 0 (inactive) or 1 (active).
- method_name
- the name of the method to be executed. Refers to mm_methods.
- room
- the room in which the event is to take place. Might be NULL, if the appropriate action to be taken is related to a person and not to a room.
- owner
- the owner of the object, i.e. the one that is allowed to make changes. If this is NULL, the first one to make any changes owns the item.
- creation
- timestamp, is updated with the current datetime whenever a change takes place on the record in question.
mm_items
- id
- identification of this item definition, integer.
- wieldable
- no longer used
- wearable
- how this item is to be worn as a bitmask, integer. Values : 1=head,2=neck,4=torso,8=arms,16=leftwrist,32=rightwrist,64=leftfinger, 128=rightfinger,256=feet,512=hands,1024=floating,2048=waist, 4096=legs,8192=eyes,16384=ears,32768=body,65536=wield lefthand, 131072=wield righthand,262144=wielding both hands
- container
- whether or not this item can server as a container for other items. Possible values are 0 (no container) or 1 (container). Bear in mind that the following fields are only relevant if container is set to 1: capacity, isopenable, keyid, containtype.
- getable
- whether or not the item can be picked up from the floor. Important: items with a negative id number, are never getable and are mostly used as windowdressing for rooms. In this case the field value is ignored by the mud.
- dropable
- whether or not the item can be dropped unto the floor. Important: items with a negative id number, are never dropable and are mostly used as windowdressing for rooms. In this case the field value is ignored by the mud.
- visible
- will make the item visible or invisible when in a room or in an inventory. The default is visible.
- owner
- the owner of the object, i.e. the one that is allowed to make changes. If this is NULL, the first one to make any changes owns the item.
- creation
- timestamp, is updated with the current datetime whenever a change takes place on the record in question.
- capacity
- the maximum weight a container can contain. Only relevant if container=1.
- isopenable
- whether or not the container can be opened (i.e. has a lid). openable=1, not openable = 0. Only relevant if container=1.
- keyid
- the item definition id of the item that can be used to lock and unlock the container. If the item definition is 0, the container does not have a lock. Only relevant if container=1.
- containtype
- the type of items that are allowed to be stored in the container. Only relevant if container=1. (TODO)
mm_charitemtable
- id
- identification of this item instance
- belongsto
- who owns this item instance
- wearing
- are you wearing or wielding the item. wearing==null means that the item is neither being worn nor wielded.
mm_rooms
- id
- identification of the room
- west, east, north, south, up, down
- ids of neighbouring rooms
- contents
- description of the room
- owner
- the owner of the object, i.e. the one that is allowed to make changes. If this is NULL, the first one to make any changes owns the item.
- creation
- area
- the area to which the room belongs.
- title
- title of the room, it will be visible nicely at the top in header format
- picture
- the picture of the room
mm_usertable
- name
- identification of this character. May only contain [A-z_a-z].
- password
- the password of the character/user. This is encoded into the mysql database using the SHA1() method.
- race
- can be anything, has no effect on the stats of the character.
- god
- what this character is, 0=default user, 1=god user (not used currently), 2=bot, 3=mob, 4=shopkeeper
- alignment
- the good or evil aspect of a character, 0 is evil, 8 is good, and anything in between. The default is 8.
- movementstats
- the ability to move, 0 is exhausted and cannot move, 1000 is fine. The default is 1000.
- lok
- string containing the session cookie of the user when he is logged on and active.
- notes
- notes concerning this user. Can be entered by deputies.
- state
- string containing the state of a user. Can be empty, but is useful for roleplaying to show what is going on with your character.
mm_commandlog
- id
- auto-generated id
- stamp
- timestamp of when the command was entered.
- name
- name of the user that entered the command.
- command
- the command entered by the user. Has a maximum of 255 characters. This limitation should not be a problem unless rather large conversations take place.
mm_macro
- id
- the id of the macro, a unique reference id that is automatically assigned.
- macroname
- the name of the macro, defined by the user.
- contents
- contents of the macro.
- name
- name of the user that defined this macro.
mm_mailtable
- id
- the id of the mail, a unique reference id that is automatically assigned.
- toname
- the name of the person the mudmail was sent to, must be a single user.
- haveread
- if the mail items has been read or not. (read=1, not read=0)
- newmail
- if the mail is new (i.e. has not been read since the previous session.
- deleted
- indicates that the message has been deleted.
- contentsid
- refers to the actual contents of the mudmail
mm_mailcontents
- id
- the id of the mail, a unique reference id that is automatically assigned.
- subject
- the subject of the mudmail
- name
- the name of the person sending the mudmail
- toname
- the name of the person the mudmail was sent to, can also be "guild" or "deputies" or "guild:guildname" or "everybody".
- whensent
- timestamp when the mudmail was sent
- body
- the actual body of the mail
- deleted
- indicates that the message has been deleted.
mm_guilds
- name
- the name of the guild, unique identifies each guild.
- daysguilddeath
- this is a counter that starts counting the days when the number of guild members falls below the minguildmembers threshhold. session.
- maxguilddeath
- this is the maximum threshhold. If the daysguilddeath counter reaches this, the guild will be purged from the database automatically.
- minguildmembers
- the minimum amount of members a guild must have before it becomes active, and to prevent it from being purged.
- minguildlevel
- the minimum level of a player character before he/she is allowed to apply to the guild.
- bossname
- the original guild master of the guild.
- active
- whether or not the guild is active, 1=active, 0=inactive. A new guild is by default inactive and becomes active when it reaches the minimum required amount of guildmembers. See minguildmembers.
- logonmessage
- the logonmessage that guild members will see when they log on.
mm_guildranks
- title
- the title of a rank within the guild, for example 'Head Honcho'.
- guildlevel
- a number that specifies the position of the rank in the hierarchie of ranks. Usually 0 is lowest rank and 100 is highest rank.
- guildname
- a reference to the guild to which this rank belongs.
- accept_access
- NOT USED
- reject_access
- NOT USED
- settings_access
- NOT USED
- logonmessage_access
- NOT USED
mm_ignore
- fromperson
- the person who is ignoring someone
- toperson
- the person that is being ignored.
mm_boardmessages
- boardid
- indicates on which board this message belongs, see mm_boards.
- name
- the person posting a message
- posttime
- timestamp on whn the person posted the message
- message
- the message itself
- removed
- 0 or 1, 1 if message has been removed for offending content by a deputy
-
ClassDescriptionAn attribute interface, containing name, value, value type.Interface on what is allowed to be done with attributes.A chatline, a chatroom that can be defined by players.TODO: feels wrong, need a better solution.Display interface, indicates the things that needs to be shown.An event, defined to execute at a certain time.The composite primary key for a Guildrank.Event logging.Contents of mail someone has sent.It's basically a couple table between the mail sent, and the addressee.This class is customizing the collection of Messages on a Board to only contain messages of the last week with pinned on top.This class is customizing the collection of
Person
s in an entity to only contain active persons.A room.