Difference between revisions of "Item generation"

From TheReincarnation
Jump to: navigation, search
(Created page with "[ 6:06pm ] < Laanders > so item generation [ 6:06pm ] < Laanders > #guild item generation [ 6:06pm ] < Laanders > my $guild_percentage = 0.1 * sqrt($mage->getGuilds() / $mage->ge...")
 
(Complete Revision)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[
+
===Introduction===
6:06pm
+
[[Items|Lesser Item]] [[Item generation|generation]] involves a complex formula and sets of calculations and can be influenced (both boosted and hindered) by numerous factors. First off, [[Guilds|Libraries]] (previously known as [[Guilds]]) are instrumental in the generation of [[Items|Lesser Items]] in that the percentage of a mage's [[land]] consumed by [[Guilds]] is the deciding factor in the computation of [[Item generation]]. Hence, a greater percentage of [[land]] devoted to [[Guilds|Libraries]] has a positive correlation with higher [[Item generation]].
] <
 
Laanders
 
>
 
so item generation
 
[
 
6:06pm
 
] <
 
Laanders
 
>
 
#guild item generation
 
[
 
6:06pm
 
] <
 
Laanders
 
>
 
my $guild_percentage = 0.1 * sqrt($mage->getGuilds() / $mage->getLand());
 
[
 
6:07pm
 
] <
 
Laanders
 
>
 
that's base chance from guilds
 
[
 
6:07pm
 
] <
 
Laanders
 
>
 
then there are bonuses separately
 
[
 
6:07pm
 
] <
 
Laanders
 
>
 
#bonus item generation
 
[
 
6:07pm
 
] <
 
Laanders
 
>
 
my $bonus_percentage = $mage->{mage_generatebonus};
 
[
 
6:09pm
 
] <
 
Laanders
 
>
 
finally it's a random roll, which if it's below the guild_percentage base chance gives one result, and it it's not but still below base + bonuses, it gives a different result
 
[
 
6:09pm
 
] <
 
Laanders
 
>
 
if ($rand < $guild_percentage) {
 
[
 
6:09pm
 
] <
 
Laanders
 
>
 
%item_hash = item::GenerateLesserItems(1,1);
 
[
 
6:09pm
 
] <
 
Laanders
 
>
 
} elsif ($rand < $guild_percentage + $bonus_percentage) {
 
[
 
6:09pm
 
] <
 
Laanders
 
>
 
%item_hash = item::GenerateLesserItems(1);
 
[
 
6:11pm
 
] <
 
Laanders
 
>
 
the different is if the roll was low enough to be under the base chance, you can get also nobooty items
 
[
 
6:12pm
 
] <
 
Laanders
 
>
 
*difference
 
[
 
6:12pm
 
] <
 
Laanders
 
>
 
if the roll just succeeded because of bonuses, you can only get normal items
 
[
 
6:13pm
 
] <
 
Laanders
 
>
 
and not MI or compass
 
  
 +
<br>
 +
===Formula===
  
 
+
'''Base item generation, Libraries'''
---
+
* Base item generation = 0.1 * squareroot(#ofLibraries / #ofLand)
 
+
** (#ofLibraries / #ofLand) essentially means the percentage of Libraries built on ones' land (which is normally displayed under 'Build' option)
Please note this was copy/pasted from an IRC conversation and as such, formatting errors may have altered the code in ways that make it difficult to read.
+
<br>
 +
'''Bonus item generation'''
 +
* Bonus item generation = +/- influencing factors (see below for elaboration)
 +
** Bonus item generation is added onto base item generation chance to increase the odds of generating a [[Items|lesser item]], but will not increase the chances of generating a 'Special' item
 +
<br>
 +
'''Special item generation'''
 +
* Special item generation = 0.015 * (ServerTurnRate)
 +
** There are two items that qualify as 'special' that possess a different generation rate than the rest of the lesser items: [[Magical Compass]]es and [[Minor Indulgence]]s
 +
<br>
 +
===Elaboration of Formula===
 +
The formula(s) are actually quite simple once the process (and the examples) of item generation become clearer. An explanation of the process, in its entirety, is as follows:
 +
* With every turn that is taken, a roll between 1 and 100 is made. Depending on the number that comes up, an item will either be generated or not.
 +
* If the number is below the base item generation chance, then an item WILL be granted; it is only possible to generate a 'Special' item if the roll is below the BASE chance alone, and not within the range of the 'BONUS' chance. If the roll happens to be above the BASE chance but within the range of the BONUS chance, only a lesser item will be granted.
 +
* If the roll was below the BASE chance, then a second roll between 1 and 100 occurs to check if the item generated will be a 'Special' item or not. This is where the third formula above comes into play; if the roll is below the Special item generation chance, a 'Special' item is granted.
 +
* This process is repeated each and every turn.
 +
<br>
 +
===Example of Formula Process===
 +
'''For this scenario, we will assume several things:'''
 +
* Mage is currently on the Lightning server
 +
* Mage has 5,000 [[land|acres]]
 +
* Mage has 500 [[Guilds|Libraries]]
 +
* Mage is currently being smiled upon by [[Luck|Lady Luck]]
 +
* Mage is affected by no other external forces that would influence generation
 +
'''We will compute the chances of item generation, bonus item generation, and special item generation:'''
 +
* The base chance to generate an item each turn is as follows:  .1 * squareroot(500/5000) = .03162277 = 3.16% chance
 +
* The bonus chance to generate an item each turn is as follows: 2% from Luck
 +
* The chance to generate a 'special' item each turn (when applicable) is as follows: 0.015 * (ServerTurnRate) = 0.015 * 1.5 = 2.25%
 +
'''Now, we will employ the chances above on an average turn, exploring the possibilities:'''
 +
* A roll occurs, and the roll comes up as a 3. An item WILL BE generated. Because the roll was below the base chance, a second roll occurs, and that roll comes up as a 2. A 'special item' is generated this turn.
 +
* A roll occurs, and the roll comes up as a 5. A lesser item is granted, with no second roll, because the roll fell within the range of the base generation chance (3.16) + the bonus generation chance (2%, Luck).
 +
* A roll occurs, and the roll comes up as a 3. An item WILL BE generated. Because the roll was below the base chance, a second roll occurs, and that roll comes up as a 56. A 'special' item is NOT generated, as it was not below the 'special' generation chance of 2.25%.
 +
* A roll occurs, and the roll comes up as a 90. No item is granted this turn, neither lesser nor 'special'.
 +
<br>
 +
===Influencing Factors===
 +
The following factors are able to affect the per-turn chance of generating a lesser item (not a 'special' item, as these factors add to 'bonus' generation):
 +
* [[Luck]]: +2%
 +
* [[Luck|Bad Luck]]: -2%
 +
* [[Brewing]] ([[Witch]] [[Hero Abilities|ability]]): +4% + (2%/level)
 +
* [[Enchant Item]] ([[Enchantress]] [[Hero Abilities|ability]]): +2% + (1%/level)
 +
* [[Skill Lore]] ([[Sage]] [[Hero Abilities|ability]]): -1% + (-0.5/level)
 +
* [[Science Favor|Favor from the The God of Science]]: +3%
 +
* [[Science Favor|Patron of the God of Science]]: +4.5%
 +
* [[Science Favor|Most Favoured of the God of Science]]: +6%
 +
* [[Science Favor|Disfavour from the God of Science]]: -3%
 +
* [[Science Favor|Hatred from the God of Science]]: -6%
 +
<br>
 +
===Notes===
 +
* Since [[Guild|Library]] item generation is based on percentage rather than absolute number, a mage who has 2,000 [[land|acres of land]] with 1,000 [[Guilds|Libraries]] will generate more items on a per-turn basis than a mage who has 2,000 [[Guilds|Libraries]] on 6,000 [[land|acres of land]]
 +
* The factors listed above influence the bonus chance to generate an item; hence, they will only aid in the increased generation of lesser items, not 'special' items
 +
* There are no factors that directly affect the chance to generate a 'special' item; the chance to generate a [[Magical Compass]] or a [[Minor Indulgence]] per turn cannot be influenced by anything, and these chances are the same for every mage across the server. However, having a higher percentage of [[land]] devoted to [[Guilds|Libraries]] will indirectly offer a mage additional rolls to generate the two 'special' items
 +
* Because of the formula listed above, the chance to generate a 'special' item is different from server to server depending on the turn rate

Latest revision as of 04:11, 12 October 2015

Introduction

Lesser Item generation involves a complex formula and sets of calculations and can be influenced (both boosted and hindered) by numerous factors. First off, Libraries (previously known as Guilds) are instrumental in the generation of Lesser Items in that the percentage of a mage's land consumed by Guilds is the deciding factor in the computation of Item generation. Hence, a greater percentage of land devoted to Libraries has a positive correlation with higher Item generation.


Formula

Base item generation, Libraries

  • Base item generation = 0.1 * squareroot(#ofLibraries / #ofLand)
    • (#ofLibraries / #ofLand) essentially means the percentage of Libraries built on ones' land (which is normally displayed under 'Build' option)


Bonus item generation

  • Bonus item generation = +/- influencing factors (see below for elaboration)
    • Bonus item generation is added onto base item generation chance to increase the odds of generating a lesser item, but will not increase the chances of generating a 'Special' item


Special item generation

  • Special item generation = 0.015 * (ServerTurnRate)


Elaboration of Formula

The formula(s) are actually quite simple once the process (and the examples) of item generation become clearer. An explanation of the process, in its entirety, is as follows:

  • With every turn that is taken, a roll between 1 and 100 is made. Depending on the number that comes up, an item will either be generated or not.
  • If the number is below the base item generation chance, then an item WILL be granted; it is only possible to generate a 'Special' item if the roll is below the BASE chance alone, and not within the range of the 'BONUS' chance. If the roll happens to be above the BASE chance but within the range of the BONUS chance, only a lesser item will be granted.
  • If the roll was below the BASE chance, then a second roll between 1 and 100 occurs to check if the item generated will be a 'Special' item or not. This is where the third formula above comes into play; if the roll is below the Special item generation chance, a 'Special' item is granted.
  • This process is repeated each and every turn.


Example of Formula Process

For this scenario, we will assume several things:

  • Mage is currently on the Lightning server
  • Mage has 5,000 acres
  • Mage has 500 Libraries
  • Mage is currently being smiled upon by Lady Luck
  • Mage is affected by no other external forces that would influence generation

We will compute the chances of item generation, bonus item generation, and special item generation:

  • The base chance to generate an item each turn is as follows: .1 * squareroot(500/5000) = .03162277 = 3.16% chance
  • The bonus chance to generate an item each turn is as follows: 2% from Luck
  • The chance to generate a 'special' item each turn (when applicable) is as follows: 0.015 * (ServerTurnRate) = 0.015 * 1.5 = 2.25%

Now, we will employ the chances above on an average turn, exploring the possibilities:

  • A roll occurs, and the roll comes up as a 3. An item WILL BE generated. Because the roll was below the base chance, a second roll occurs, and that roll comes up as a 2. A 'special item' is generated this turn.
  • A roll occurs, and the roll comes up as a 5. A lesser item is granted, with no second roll, because the roll fell within the range of the base generation chance (3.16) + the bonus generation chance (2%, Luck).
  • A roll occurs, and the roll comes up as a 3. An item WILL BE generated. Because the roll was below the base chance, a second roll occurs, and that roll comes up as a 56. A 'special' item is NOT generated, as it was not below the 'special' generation chance of 2.25%.
  • A roll occurs, and the roll comes up as a 90. No item is granted this turn, neither lesser nor 'special'.


Influencing Factors

The following factors are able to affect the per-turn chance of generating a lesser item (not a 'special' item, as these factors add to 'bonus' generation):


Notes

  • Since Library item generation is based on percentage rather than absolute number, a mage who has 2,000 acres of land with 1,000 Libraries will generate more items on a per-turn basis than a mage who has 2,000 Libraries on 6,000 acres of land
  • The factors listed above influence the bonus chance to generate an item; hence, they will only aid in the increased generation of lesser items, not 'special' items
  • There are no factors that directly affect the chance to generate a 'special' item; the chance to generate a Magical Compass or a Minor Indulgence per turn cannot be influenced by anything, and these chances are the same for every mage across the server. However, having a higher percentage of land devoted to Libraries will indirectly offer a mage additional rolls to generate the two 'special' items
  • Because of the formula listed above, the chance to generate a 'special' item is different from server to server depending on the turn rate