This repository has been archived by the owner on Feb 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
2. Player Section
crankycyclops edited this page Jan 7, 2013
·
26 revisions
The player section in game.xml allows you to configure options related to players in the game. This page describes what these settings are.
Configuration for the initial state of each player's inventory. (Optional) | |
Initial configuration for all new players. In the absence of this group of settings, all player attributes will be given an even spread of 10 points each. For more details about player attributes, see Attributes. (Optional) | |
Valid value: Boolean, where 1 means true and 0 means false (Optional)
If true, players start out alive. If false, players start the game being dead. In the absence of this tag, the default is for players to start out alive. |
|
Valid value: Integer greater than or equal to 0 (Optional)
By default, all new players in the game will start out with the number of health points defined in this tag. By default, this value is set to 0. |
|
Valid value: Integer greater than or equal to 0 (Optional)
The maximum number of health points a player can have. A value of 0 means that the player is immortal and cannot be killed by any process that reduces the player's health points. By default, players are immortal. |
|
Valid value: Floating point value between 0 and 1 (Optional)
This setting represents the maximum probability that players will be hit each time they're attacked. The default is 0.5, meaning that during combat players will be hit no more frequently than roughly 50% of the time. The actual probability may be lower, and will be determined by the attacker's strength as defined by their attributes. For more information about combat, see Combat. |
The <inventory>
tag (optional) allows you to configure the player's initial conditions related to their ability to take and hold onto objects in the game. The following settings are currently recognized:
Valid value: Integer greater than or equal to 0 (Optional)
Determines how much stuff the user can hold onto at any one time. A weight of 0 means the user can hold onto an unlimited number of objects. Any integer greater than 0 determines the inventory's maximum capacity. Objects in the game may be configured with a weight greater than 0. The sum total of the weights of all objects in the user's inventory will determine the current weight of the user's inventory. As an example, if object "candle" is defined with a weight of 2, object "sword" is defined with a weight of 10, and the inventory weight is defined to be 11, you can then hold either the candle or the sword, but not both at the same time. You would have to drop the sword to take the candle, or the candle to take the sword. What numbers you choose are subjective and are totally up to you. |
The <attributes>
tag (optional) allows you to configure the player's initial attributes, which define how adept players in the game are to accomplishing various tasks. For more details about player Attributes, see Attributes. The following settings are currently recognized in this section:
Number of attribute points to assign to the player's strength. If the <attributes> section is not present, this value will default to 10. Otherwise, if this tag is missing, the player will get 0 points for strength.
|
|
Number of attribute points to assign to the player's dexterity. If the <attributes> section is not present, this value will default to 10. Otherwise, if this tag is missing, the player will get 0 points for dexterity.
|
|
Number of attribute points to assign to the player's intelligence. If the <attributes> section is not present, this value will default to 10. Otherwise, if this tag is missing, the player will get 0 points for intelligence.
|
<player> ... <inventory> < !-- Player can hold onto an unlimited number of objects --> <weight>0</weight> </inventory> < !-- By default, player attributes are distributed evenly (10 given to each attribute.) Here, you can optionally set your own values, which will be assigned by default to all new players. --> <attributes> <strength>10</strength> <dexterity>10</dexterity> <intelligence>10</intelligence> </attributes> < !-- whether or not creature starts out alive or dead (optional) --> <alive>1</alive> < !-- default starting health (optional) --> <health>10</health> < !-- a max health of 0 means the creature is immortal (optional) --> <maxHealth>10</maxhealth> < !-- default maximum probability of being hit during combat (optional) --> <woundrate>0.5</woundrate> ... </player>