ArteGordon
Wanderer
XmlPoints v1.16b
XmlPoints
v1.16b
updated 1/19/05
ArteGordon
SUMMARY
A system that supports player-vs-player kill tracking, 1-on-1 challenge dueling, multi-player challenge games, shardwide pvp ranking, and pvp rewards.
INSTALLATION:
This thread is no longer updated. GO HERE for the latest version
http://www.runuo.com/forum/showthread.php?t=49903
DESCRIPTION:
This system makes use of the XmlSpawner2 attachment system and the XmlSpawner2 package must be installed to support it. You dont need to use the xmlspawners themselves, and it doesnt matter whether you use the standard distribution spawners or any other spawning system but you do need the XmlSpawner2 package installed.
Because the attachment system neither requires nor makes any changes to serialization/deserializations of any item or mobile (including the playermobile), it can be safely added and removed at any time now or in the future without interfering with any other systems that you might have installed and that includes any existing points system.
Note, only kills by players are recognized by the system. Make sure your accesslevel is player when testing features.
Features:
Points - accumulated or lost based upon PvP kills or deaths, these are used to rank players. Individual and shard-wide standings can be displayed. Amount of Point loss or gain can be made dependent upon the relative Point difference between the players, providing additional incentives for taking on players with higher ranking, and penalties for losing to players of lower ranking. The system can also be configured for automatic point loss if the player does not engage in pvp activity over the specified time window.
Rankings - relative Points standing of players on a shard is maintained and can be displayed for individuals as well as for the entire shard (the top 20). If the Item Identification feature of the XmlSpawner2 installation is enabled (XmlSpawner2 installation step 8), the skill can be used to examine the points and standing of other players as well. Using the [leaderboardsave command, shardwide ranking information can also be periodically saved to a specified xml file.
Duels - The challenge system allows 1-on-1 consensual pvp between players for points.
Challenge Games - The challenge game system supports multi-player consensual pvp games. Current Games: Last Man Standing, Deathmatch, King of the Hill, DeathBall, Team Last Man Standing, Team Deathmatch, Team Deathball, Team King of the Hill, Capture the Flag.
Credits - accumulated through PvP kills, these are used to purchase PvP rewards.
Rewards - the PointsRewardStone allows players to exchange kill credits that are accumulated through PvP activity for rewards including items, mobiles, or attachments. These can be defined in XmlPointReward.cs. Minimum points requirements can also be specified in addition to credit requirements for each reward. To place this just do an "[add pointsrewardstone"
Commands supported:
[getatt - this is the general command from the XmlSpawner2 package for displaying/modifying/deleting attachments on a target. Just execute the command and target a player to open the attachment list. From there you can open the xmlpoints properties by finding the xmlpoints attachment on the list, and selecting the button on the left, or display the points gump by pressing the question mark button on the right. This command is available to GMs or higher only.
[addallpoints - this command will add the xmlpoints attachment to all current players that dont have it yet and can only be run by an administrator.
[removeallpoints - this command will remove the xmlpoints attachment from all current players and can only be run by an administrator.
[checkpoints - this command can be run by players to report their current points standing including rank, available credits, number of kills, number of deaths, and recent kill list (this is the same as using the item identification skill on themselves if that feature has been enabled through XmlSpawner2 installation step 8)
showpoints - when players type this it publicly displays their points overhead.
[topplayers - this command can be run by players to list the current top 20 players ranked by points. This can also be invoked through the points gump.
[challenge - this command can be run by players to allow challenge duels for points. Just issue the command and target another player. The targeted player can then accept or decline the challenge. This can also be invoked through the points gump.
[lmschallenge - this command can be run by players to create a last man standing challenge game.
[deathmatch - this command can be run by players to create a deathmatch challenge game.
[kingofthehill - this command can be run by players to create a king of the hill challenge game.
[deathball - this command can be run by players to create a death ball challenge game.
[teamlmschallenge - this command can be run by players to create a team last man standing challenge game.
[teamdeathmatch - this command can be run by players to create a teamdeathmatch challenge game.
[teamkoth - this command can be run by players to create a new Team king of the hill challenge game.
[teamdeathball - this command can be run by players to create a new Team Deathball challenge game.
[ctfchallenge - this command can be run by players to create a new Capture the Flag challenge game.
[seekills - this command can be run by players to allow them to control whether or not they see the broadcast results of pvp kills. This can also be set through the points gump.
[broadcastkill - this command can be run by players to toggle system-wide broadcasts of their pvp-kills. Broadcast is determined by the winners setting. This can also be set through the points gump.
[systembroadcastkill - this command can be run by GMs to allow system-wide GM override of player BroadcastKill settings. When set to false, no results will be broadcast. When set to true, results will again be broadcast based on players BroadcastKill settings.
[leaderboardsave - this command can be run by administrators to enable/disable the periodic saving of xml leaderboard information to a specified file.
Default settings that can be modified:
- There is a 6 hour minimum time between kills of the same player for point gain. This is set by the static variable m_KillDelay.
- There is a 60 second minimum time between deaths of a player for point loss. This is set by the static variable m_DeathDelay.
- Points gained/lost can depend upon the point difference between the players. Default setting is 5% of the point difference. The percentage gain/loss is set by the m_WinScale and m_LoseScale static variables and this can be changed to whatever you like. If it is set to zero then gain/loss will be fixed at 1 point per kill.
For example, if player1 with 500 points killed player2 with 100 points, player1 would only gain the minimum of 1 point and player2 would lose the minimum of 1 point. But if player2 killed player1, player2 would gain 20 points (5% of 400) and player1 would lose 20 points.
- Credits gained can depend upon the point difference between the players. Default setting is 5% of the point difference. Set by the m_CreditScale
- Players start off with a default of 100 points, set on m_Points.
- broadcasting of kills is on by default. This is set by the m_Broadcast (for players) and m_SystemBroadcast (for GM override) variables.
- rewards can be specified by adding/removing entries to the PointsRewardList in the Initialize method in XmlPointsReward.cs.
- leaderboard save settings can be specified on the command line to the [leaderboardsave command, with default values set in the m_LeaderboardSaveInterval (default 15 mins), m_LeaderboardSaveDirectory (default "Leaderboard"), and m_LeaderboardSaveRanks (default 20) static variables.
- for automatic point loss if the player does not engage in pvp activity the amount of loss and time period can be configured by setting the m_PointsDecay (10 points default) and m_PointsDecayTime ( 15 days default) static variables.
- receiving kill broadcasts is on by default set by the m_ReceiveBroadcasts variable.
- challenges can be cancelled by issuing another challenge and targeting another player (self-target is allowed for this purpose). There is a 15 minute timeout from the time the cancellation request is made. This default time can be changed in the static variable CancelTimeout.
XmlPoints
v1.16b
updated 1/19/05
ArteGordon
SUMMARY
A system that supports player-vs-player kill tracking, 1-on-1 challenge dueling, multi-player challenge games, shardwide pvp ranking, and pvp rewards.
INSTALLATION:
This thread is no longer updated. GO HERE for the latest version
http://www.runuo.com/forum/showthread.php?t=49903
DESCRIPTION:
This system makes use of the XmlSpawner2 attachment system and the XmlSpawner2 package must be installed to support it. You dont need to use the xmlspawners themselves, and it doesnt matter whether you use the standard distribution spawners or any other spawning system but you do need the XmlSpawner2 package installed.
Because the attachment system neither requires nor makes any changes to serialization/deserializations of any item or mobile (including the playermobile), it can be safely added and removed at any time now or in the future without interfering with any other systems that you might have installed and that includes any existing points system.
Note, only kills by players are recognized by the system. Make sure your accesslevel is player when testing features.
Features:
Points - accumulated or lost based upon PvP kills or deaths, these are used to rank players. Individual and shard-wide standings can be displayed. Amount of Point loss or gain can be made dependent upon the relative Point difference between the players, providing additional incentives for taking on players with higher ranking, and penalties for losing to players of lower ranking. The system can also be configured for automatic point loss if the player does not engage in pvp activity over the specified time window.
Rankings - relative Points standing of players on a shard is maintained and can be displayed for individuals as well as for the entire shard (the top 20). If the Item Identification feature of the XmlSpawner2 installation is enabled (XmlSpawner2 installation step 8), the skill can be used to examine the points and standing of other players as well. Using the [leaderboardsave command, shardwide ranking information can also be periodically saved to a specified xml file.
Duels - The challenge system allows 1-on-1 consensual pvp between players for points.
Challenge Games - The challenge game system supports multi-player consensual pvp games. Current Games: Last Man Standing, Deathmatch, King of the Hill, DeathBall, Team Last Man Standing, Team Deathmatch, Team Deathball, Team King of the Hill, Capture the Flag.
Credits - accumulated through PvP kills, these are used to purchase PvP rewards.
Rewards - the PointsRewardStone allows players to exchange kill credits that are accumulated through PvP activity for rewards including items, mobiles, or attachments. These can be defined in XmlPointReward.cs. Minimum points requirements can also be specified in addition to credit requirements for each reward. To place this just do an "[add pointsrewardstone"
Commands supported:
[getatt - this is the general command from the XmlSpawner2 package for displaying/modifying/deleting attachments on a target. Just execute the command and target a player to open the attachment list. From there you can open the xmlpoints properties by finding the xmlpoints attachment on the list, and selecting the button on the left, or display the points gump by pressing the question mark button on the right. This command is available to GMs or higher only.
[addallpoints - this command will add the xmlpoints attachment to all current players that dont have it yet and can only be run by an administrator.
[removeallpoints - this command will remove the xmlpoints attachment from all current players and can only be run by an administrator.
[checkpoints - this command can be run by players to report their current points standing including rank, available credits, number of kills, number of deaths, and recent kill list (this is the same as using the item identification skill on themselves if that feature has been enabled through XmlSpawner2 installation step 8)
showpoints - when players type this it publicly displays their points overhead.
[topplayers - this command can be run by players to list the current top 20 players ranked by points. This can also be invoked through the points gump.
[challenge - this command can be run by players to allow challenge duels for points. Just issue the command and target another player. The targeted player can then accept or decline the challenge. This can also be invoked through the points gump.
[lmschallenge - this command can be run by players to create a last man standing challenge game.
[deathmatch - this command can be run by players to create a deathmatch challenge game.
[kingofthehill - this command can be run by players to create a king of the hill challenge game.
[deathball - this command can be run by players to create a death ball challenge game.
[teamlmschallenge - this command can be run by players to create a team last man standing challenge game.
[teamdeathmatch - this command can be run by players to create a teamdeathmatch challenge game.
[teamkoth - this command can be run by players to create a new Team king of the hill challenge game.
[teamdeathball - this command can be run by players to create a new Team Deathball challenge game.
[ctfchallenge - this command can be run by players to create a new Capture the Flag challenge game.
[seekills - this command can be run by players to allow them to control whether or not they see the broadcast results of pvp kills. This can also be set through the points gump.
[broadcastkill - this command can be run by players to toggle system-wide broadcasts of their pvp-kills. Broadcast is determined by the winners setting. This can also be set through the points gump.
[systembroadcastkill - this command can be run by GMs to allow system-wide GM override of player BroadcastKill settings. When set to false, no results will be broadcast. When set to true, results will again be broadcast based on players BroadcastKill settings.
[leaderboardsave - this command can be run by administrators to enable/disable the periodic saving of xml leaderboard information to a specified file.
Default settings that can be modified:
- There is a 6 hour minimum time between kills of the same player for point gain. This is set by the static variable m_KillDelay.
- There is a 60 second minimum time between deaths of a player for point loss. This is set by the static variable m_DeathDelay.
- Points gained/lost can depend upon the point difference between the players. Default setting is 5% of the point difference. The percentage gain/loss is set by the m_WinScale and m_LoseScale static variables and this can be changed to whatever you like. If it is set to zero then gain/loss will be fixed at 1 point per kill.
For example, if player1 with 500 points killed player2 with 100 points, player1 would only gain the minimum of 1 point and player2 would lose the minimum of 1 point. But if player2 killed player1, player2 would gain 20 points (5% of 400) and player1 would lose 20 points.
- Credits gained can depend upon the point difference between the players. Default setting is 5% of the point difference. Set by the m_CreditScale
- Players start off with a default of 100 points, set on m_Points.
- broadcasting of kills is on by default. This is set by the m_Broadcast (for players) and m_SystemBroadcast (for GM override) variables.
- rewards can be specified by adding/removing entries to the PointsRewardList in the Initialize method in XmlPointsReward.cs.
- leaderboard save settings can be specified on the command line to the [leaderboardsave command, with default values set in the m_LeaderboardSaveInterval (default 15 mins), m_LeaderboardSaveDirectory (default "Leaderboard"), and m_LeaderboardSaveRanks (default 20) static variables.
- for automatic point loss if the player does not engage in pvp activity the amount of loss and time period can be configured by setting the m_PointsDecay (10 points default) and m_PointsDecayTime ( 15 days default) static variables.
- receiving kill broadcasts is on by default set by the m_ReceiveBroadcasts variable.
- challenges can be cancelled by issuing another challenge and targeting another player (self-target is allowed for this purpose). There is a 15 minute timeout from the time the cancellation request is made. This default time can be changed in the static variable CancelTimeout.