Games-Axmud

 view release on metacpan or  search on metacpan

lib/Games/Axmud/Profile.pm  view on Meta::CPAN

            # This IV is used with a login mission ($self->loginMode is 'mission', and
            #   $self->loginObjName is set to the name of the GA::Obj::Mission). Typically, the
            #   contents of the mission should look like this:
            #       't Your account',               (Wait for this prompt)
            #       'a',                            (Send account name)
            #       't Password',                   (Wait for this prompt)
            #       'w',                            (Send password)
            #           ... we now wait for GA::Session to choose a character...
            #       't Welcome back to DeathMud',   (This line seen after the character is chosen)
            #       ';login',                       (Mark the character as logged in)
            # List (groups of 3)
            #   0 - the pattern matching a line containing the character's name (because a
            #           perl substitution will be performed, it must match the whole line - begin
            #           and/or end the pattern with '.*' if necessary
            #   1-  the number of the group substring that contains the character's name; can be set
            #           to 0 if only one character name appears per line
            #   2 - the world command to send, usually including a group substring variable, e.g. $1
            loginSpecialList            => [],

            # Automatic quit mode. Users can disconnect from many worlds by sending some kind of
            #   'quit' world command, but at other worlds, it's not so simple. These IVs are used
            #   only when the user types ';quit', ';qquit' or ';quitall'. They are ignored if the
            #   user simply types some kind of 'quit' world command, or if a connection to a world
            #   is terminated remotely.
            #       'normal' - Send the standard 'quit' world command, as defined by the current
            #           highest-priority command cage
            #       'world_cmd' - Send a sequence of world commands
            #       'task' - Run a task (the task is responsible for sending a 'quit' world command)
            #       'task_script' - Run an Axbasic script from within a task (the script is
            #           responsible for sending a 'quit' world command)
            #       'script' - Run an Axbasic script (the script is responsible for sending a 'quit'
            #           world command)
            #       'mission' - Start a mission (the mission is responsible for sending a 'quit'
            #           world command)
            autoQuitMode                => 'normal',
            # For quit mode 'world_cmd', the sequence of commands to send. (Unlike
            #   $self->loginCmdList, no substitutions take place.) If the list is empty, Axmud
            #   reverts to quit mode 'normal'
            autoQuitCmdList             => [],
            # For quit modes 'task', 'task_script', 'script' and 'mission', the name of the task
            #   (formal name or task label), script or mission to start. If an empty string or
            #   'undef', Axmud reverts to quit mode 'normal'
            autoQuitObjName             => undef,

            # If set to FALSE, the world can be sent a string containing multiple commands
            #   (separated by command separators, e.g. 'n;n;w')
            # If set to TRUE, Axmud must send each command separately
            autoSeparateCmdFlag         => TRUE,
            # Slowwalking IVs (implemented by GA::Session as 'excess commands')
            # Some worlds enforce a maximum number of commands per second (or maximum number of
            #   commands per fraction of a second)
            # If this variable is set, commands are counted as they are sent. When the maximum is
            #   reached, further commands are stored temporarily. If this value is set to 0, no
            #   maximum is used; all commands are sent immediately
            excessCmdLimit              => 0,
            # The time period (in seconds) to wait before sending stored commands. The value 1
            #   means 'wait 1 seconds before sending the next batch of commands). The minimum value
            #   (in case this IV is set to 0) is the same as GA::Session->sessionLoopDelay
            excessCmdDelay              => 1,
            # Some worlds don't explicitly state when a dead character is resurrected. If this flag
            #   is set to TRUE, the Status task will change the character's ->lifeStatus to 'alive'
            #   whenever one of the triggers which detect the current health points (etc) fires, if
            #   the character is dead, asleep or passed out. Otherwise, the Status task will wait
            #   for an explicit regenerated, come around or woken up trigger to fire.
            lifeStatusOverrideFlag      => FALSE,

            # Command prompt patterns - a list of patterns which match the world's command prompts
            # Useful at worlds that don't use EOR or GA, since we don't want to test triggers
            #   against incomplete lines, but we do want to test them against prompts
            # Also useful at worlds (like Dead Souls) that, when display several room statements
            #   at once, add the beginning of the room statement to the end of the previous prompt
            #   (as the GA::Session code is able to split the line, at that point)
            # The pattern should normally begin with an initial ^ character, but must not end with
            #   a terminal $ character (because if it does, it can't be used to split lines)
            cmdPromptPatternList        => [],
            # Empty line suppression. If set to 0, no empty lines are suppressed. If set to 1, all
            #   empty lines are suppressed. If set to n (where n > 1), all consecutive lines from
            #   n onwards are suppressed (e.g. n = 3, 2 consecutive empty lines are preserved, all
            #   further consecutive empty lines are suppressed)
            suppressEmptyLineCount      => 0,
            # Flag set to TRUE if empty line suppression should only be applied after the character
            #   is marked as logged in (preserving the world's initial ASCII art, if present); set
            #   to FALSE if empty line suppression should be applied immediately
            suppressBeforeLoginFlag     => FALSE,

            # The name of the dictionary used by this world (the dictionary often has the same name
            #   as the world). Set to 'undef' until a dictionary is created for it
            dict                        => undef,
            # If this flag is TRUE, the Locator task will collect unknown words (words which appear
            #   in room statements, but which aren't in our dictionary), in order to provide a
            #   convenient list of words that could be added to the dictionary
            collectUnknownWordFlag      => FALSE,
            # If this flag is TRUE, the Locator task will collect all contents lines, without
            #   splitting the line into objects, and store them in the dictionary (this flag isn't
            #   affected by the setting of $self->collectUnknownWordFlag; both that flag and this
            #   one can be set to TRUE)
            collectContentsFlag         => FALSE,
            # Flag set to TRUE if objects in the same room and with the same name (e.g. two orcs)
            #   can be identified as 'orc 1' and 'orc 2' in commands sent to the world
            numberedObjFlag             => TRUE,    # 'orc 1' and 'orc 2' possible on DS
            # In worlds which specify multiples in contents lines like this:
            #   (2) A big axe
            # ...a pattern which matches the portion '(2)'
            # The pattern must contain a group substring. The first group substring is used as the
            #   multiple (other group substrings are ignored). In the example above, we would use
            #   the pattern '\((\d+)\)'
            # Ignored if set to 'undef' (or an empty string). A matching pattern is NOT used as the
            #   multiple if the group substring does not contain a positive integer (1 is
            #   acceptable, but 0 is not)
            multiplePattern             => undef,

            # Logging preferences for this world. The default settings are stored in
            #   GA::Client->constSessionLogPrefHash; the current settings are stored here. Hash in
            #   the form
            #       $logPrefHash{log_file_type} = TRUE or FALSE
            logPrefHash                 => {},      # Set below

            # The unit for counting the character's age. It matches one of the keys in the current
            #   dictionary's ->timeHash and ->timePluralHash IVs, which are the same in every
            #   language; so the value of this IV *must* be one of the English words 'second',
            #   'minute', 'hour', 'day', 'week', 'month', 'year', 'decade', 'century' or

lib/Games/Axmud/Profile.pm  view on Meta::CPAN

            questCashCount              => 0,

            # Character's current level (if known), e.g. 100
            level                       => 0,
            # Character's current alignment (if known), usually a string
            alignment                   => undef,
            # Hash of spells (etc) that currently affect the character, in the form
            #   $affectHash{spell} = undef
            affectHash                  => {},

            # The progression of skills. These variables store the default progression for the
            #   guild; this is copied to the character profile (whenever 'factory settings' need to
            #   be restored), where the character's own skill progression is stored
            # This flag is set to TRUE if a reset has been done at least once (needs to be done, in
            #   order for the Advance task to work)
            resetSkillsFlag             => FALSE,
            # What method is used to advance skills
            # 'order' - advance skills in a pre-determined order
            # 'cycle' - advance skills on a repeating cycle
            # 'combo' - advance skills in the pre-determined order then, when that list is
            #   exhausted, start advancing skills in the repeating cycle
            advanceMethod               => 'order',
            # When ->advanceMethod = 'combo', whether we are on the 'order' or 'cycle' stage (undef
            #   if ->advanceMethod = 'order' or 'cycle' )
            advanceMethodStatus         => undef,
            # The pre-determined list of skills (an empty list if not used)
            advanceOrderList            => [],
            # The current list of skills, emptied as it is used (refreshed from
            #   $self->advanceOrderList as necessary)
            currentAdvanceOrderList     => [],
            # The pre-determined cycle of skills (an empty list if not used)
            advanceCycleList            => [],
            # The current cycle of skills (refreshed from ->advanceCycleList as necessary)
            currentAdvanceCycleList     => [],

            # The character's own skill progression variables. The basic list is imported from the
            #   current guild with $self->resetSkills (and can be reset at any time)
            # e.g. skill and current level, e.g. 'fighting' => 10
            skillLevelHash              => {},
            # no. times the skill has been advanced, e.g. 'fighting' => 15
            skillAdvanceCountHash       => {},
            # Total XP spent advancing this skill (0 if unknown)
            skillTotalXPHash            => {},
            # XP required to advance this skill once more (undef if unknown)
            skillNextXPHash             => {},
            # Total cash spent advancing this skill (0 if unknown)
            skillTotalCashHash          => {},
            # Cash required to advance this skill once more (undef if unknown)
            skillNextCashHash           => {},

            # The character's skill advance history - a list of GA::Obj::SkillHistory objects, each
            #   representing an advance, in the order they were advanced
            skillHistoryList            => [],

            # Number of lives left
            lifeCount                   => 0,
            # Number of times killed
            deathCount                  => 0,
            # Total number of lives, including already used up
            lifeMax                     => 0,
            # 'alive', 'sleep', 'passout', 'dead'
            lifeStatus                  => 'alive',

            # Many worlds have a 'wimpy' setting, allowing the char to automatically run away before
            #   death
            remoteWimpy                 => 0,
            remoteWimpyMax              => 100,
            # Axmud's local wimpy fulfills the same purpose, however the maximum value is always
            #   100
            localWimpy                  => 0,
            constLocalWimpyMax          => 100,

            # The character's age (in the world's standard age unit, defined by
            #   GA::Profile::World->charAgeUnit)
            age                         => 0,

            # Axmud stores cash as a single currency, even if the world uses multiple coins; e.g.
            #   two gold and two silver coins will be stored as 2.5 units - a unit representing gold
            #   coins
            # The character's bank balance (if known)
            bankBalance                 => 0,
            # How much money the character has in their pockets (if known)
            purseContents               => 0,

            # Number of fights involving the character (two simultaneous opponents = 2 fights)
            fightCount                  => 0,
            # Total number of kills achieved by the character
            killCount                   => 0,
            # Number of fights that ended with the character running away when wimpy mode was
            #   activated
            wimpyCount                  => 0,
            # Number of fights that ended in other kinds of defeat, e.g. death or loss of
            #   consciousness for the character
            fightDefeatCount            => 0,

            # Some guilds don't use fights, e.g. bards might perform songs which can be successes
            #   or failures. These are called 'interactions'.
            interactCount               => 0,
            # How many successful interactions
            interactSuccessCount        => 0,
            # How many failed interactions
            interactFailCount           => 0,
            # How many failed interactions led to a fight
            interactFightCount          => 0,
            # How many failed interactions that, generally, cause the character to need to run away
            #   quickly
            interactDisasterCount       => 0,

            # How many fights/interactions caused a target to flee, when the character is able to
            #   pursue
            fleeCount                   => 0,
            # How many fights/interactions ended when a target escaped, meaning the character isn't
            #   able to pursue
            escapeCount                 => 0,

            # A record of all the things killed, updated by the Attack task. Two hashes, one
            #   containing the main noun of the victim (e.g. 'orc'), the other, the base string
            #   (e.g. 'big hairy orc'). Hash in the form
            #       $fightVictimHash{main_noun} = number_of_times_killed
            fightVictimHash             => {},
            # Hash in the form
            #   $fightVictimStringHash{base_string} = number_of_times_killed



( run in 3.690 seconds using v1.01-cache-2.11-cpan-75ffa21a3d4 )