152
edits
No edit summary |
|||
Line 30: | Line 30: | ||
|Publicity | |Publicity | ||
|} | |} | ||
<syntaxhighlight lang="c#" line="1" start="0"> | Found in FactionBranch.cs on line 374.<syntaxhighlight lang="c#" line="1" start="0"> | ||
if (EClass.rnd(5) == 0 && this.policies.IsActive(2810, -1)) | if (EClass.rnd(5) == 0 && this.policies.IsActive(2810, -1)) | ||
Line 75: | Line 75: | ||
} | } | ||
} | } | ||
</syntaxhighlight>So there's a 80% chance if | </syntaxhighlight> | ||
* So there's a 80% chance per hour that if the policy: "Open for Business" is active, then: | |||
** A number of visitors will arrive. '''This number is: [3 + Land lvl + Your Land's Attractiveness / 5 + Publicity / 2 + 20<sup>^</sup>] * ((100 + Your Land's Attractiveness + 200<sup>^^</sup>) / 100) * (100 + sqrt(Tourist Safety lvl * 3) / 100)''' | |||
** Then if the policy of Celebrity's Heaven is active and the sqrt(Celebrity's Heaven lvl / 2) + 5 is greater than or equal to a random number from 1-100 THEN | |||
** Wealthy visitors are generated based on the Danger Level of the zone. | |||
* If you do not have the Mother Prohibited Zone policy active, mothers can spawn. | |||
** Each visitor gets an allowance of their Character Level * 100. If they are wealthy its: Character Level * 1000. | |||
^<sup>This is if you have a settlement with an Ancient Ruin present</sup> | |||
^^<sup>Currently unsure if this is 200 or 20</sup> | |||
It is highly advisable to make a settlement for Inns / Tourism in a Snowy Biome with an Ancient Ruin. | |||
=== Let's look at a high end example: === | |||
If you had a maxed level Snowy Biome settlement with an Ancient Ruin preset as a feature, then . . . | |||
And you had 100 Publicity and 100 Tourist Safety: | |||
You could expect to find that: | |||
* [3 + 7 + (10 + 15) / 5 + 50 + 20] = 85 | |||
* 85 * ((100 + 25 + 200<sup>^^</sup>) / 100) = 276.25 | |||
* 276.25 * ((100 + sqrt(100 * 3) / 100) = 323 visitors an hour. | |||
IF you assumed that the ^^ amount was 20, instead of 200, then: | |||
The amount of visitors you would expect = 144 visitors an hour. | |||
=== Let's look at a low end example: === | |||
If you were just using a maxed level Meadow . . . | |||
And you had 10 Publicity and 10 Tourist Safety: | |||
You could expect to find that: | |||
* [3 + 7 + 5 + 20] = 35 | |||
* 35 * (100/100) = 35 | |||
* 35 * ((100 + sqrt(10*3) / 100) = 36 visitors an hour. | |||
Further testing is required. | |||
== Housing: Taxes == | == Housing: Taxes == | ||
Line 114: | Line 134: | ||
|Resident Tax | |Resident Tax | ||
|} | |} | ||
<syntaxhighlight lang="c#" line="1" start="1"> | Found in FactionBranch.cs on line 819.<syntaxhighlight lang="c#" line="1" start="1"> | ||
public int GetResidentTax() | public int GetResidentTax() | ||
{ | { | ||
Line 169: | Line 189: | ||
*** If not wealthy: (10 + resident level * 2) * base tax percentage% * hobby tax standard%. | *** If not wealthy: (10 + resident level * 2) * base tax percentage% * hobby tax standard%. | ||
**** For example, a wealthy citizen of lv 5, whose hobby is reading and the resident tax policy level is 9, his tax is (50 + 2 * 5)* 120% * 65% = 46.8. | **** For example, a wealthy citizen of lv 5, whose hobby is reading and the resident tax policy level is 9, his tax is (50 + 2 * 5)* 120% * 65% = 46.8. | ||
** Now we go to the policies. | ** Now we go to the policies. | ||
Line 188: | Line 207: | ||
** But your land is not tax free, so the final tax is 123 orens. Making your blood boil already? Wanna buy a nuke for Mysilia? | ** But your land is not tax free, so the final tax is 123 orens. Making your blood boil already? Wanna buy a nuke for Mysilia? | ||
== Housing: Innkeeping == | |||
{| class="wikitable" | |||
|+ | |||
!Value# | |||
!Element | |||
|- | |||
|(750) | |||
|Bed Comfort | |||
|- | |||
|(2812) | |||
|Traveler's Inn Policy | |||
|- | |||
|(2813) | |||
|Luxury Suite Policy | |||
|} | |||
Found in FactionBranch.cs on line 865.<syntaxhighlight lang="c#" line="1"> | |||
public void CalcInnIncome() | |||
{ | |||
int num = this.CountGuests(); | |||
if (num == 0) | |||
{ | |||
return; | |||
} | |||
int num2 = 0; | |||
int num3 = 0; | |||
foreach (Thing thing in EClass._map.things) | |||
{ | |||
if (thing.IsInstalled) | |||
{ | |||
TraitBed traitBed = thing.trait as TraitBed; | |||
if (traitBed != null && traitBed.owner.c_bedType == BedType.guest) | |||
{ | |||
int maxHolders = traitBed.MaxHolders; | |||
num2 += maxHolders; | |||
num3 += traitBed.owner.LV * (100 + traitBed.owner.Quality / 2 + traitBed.owner.Evalue(750) / 2) / 100 * maxHolders; | |||
} | |||
} | |||
} | |||
num = Mathf.Min(num, num2); | |||
if (num == 0) | |||
{ | |||
return; | |||
} | |||
num3 /= num2; | |||
num3 = num3 * (100 + 5 * (int)Mathf.Sqrt((float)this.Evalue(2812))) / 100; | |||
float num4 = 10f + Mathf.Sqrt((float)num) * 10f; | |||
if (this.policies.IsActive(2813, -1)) | |||
{ | |||
num4 += Mathf.Sqrt((float)this.CountWealthyGuests()) * 50f * (80f + 5f * Mathf.Sqrt((float)this.Evalue(2813))) / 100f; | |||
} | |||
if (this.policies.IsActive(2812, -1)) | |||
{ | |||
num4 = num4 * (float)(100 + num3) / 100f; | |||
} | |||
num4 = Mathf.Min(num4, Mathf.Sqrt((float)this.Worth) / 15f + 5f); | |||
this.incomeInn += EClass.rndHalf((int)num4) + EClass.rndHalf((int)num4); | |||
} | |||
</syntaxhighlight>Num is the count of all guests in your base. | |||
If there's a single bed assigned to guests then: | |||
* Num2 is now max holders Num3 = Guest Bed Value^ * ( 100 + bed quality / 2 + bed comfort value / 2 ) / 100 * max holders. | |||
* The new Num is the min of the count of guests or the max holders of beds. | |||
* Num3 is now Num3 / Num2 | |||
* Num3 = num3 * ( 100 + ( 5 * sqrt ('''Traveler's Inn policy''' lvl ) ) ) / 100. Num4 = 10 + 10 * sqrt ( Num ) | |||
IF the Luxury Suite policy is active, then Num4 = Num4 + sqrt (Wealthy Guest Count * 50 * ( 80 + 5 * sqrt ( '''Luxury Suite policy lvl''' ) ) ) / 100 | |||
IF the Traveler's Inn policy is active, then Num4 = Num4 * ( 100 + Num3 ) / 100 | |||
num4 = the min of ( num4 or ( sqrt (This.Worth<sup>^^</sup>) / 15) + 5) | |||
The income from your Inn in total is now num4 / 2 rounded down * 2 | |||
^<sup>This number is a value currently hidden without the use of mods to detect it.</sup> | |||
^^<sup>It is currently unclear what This.Worth is. Speculation is that it is the value of your entire settlement.</sup> | |||
[[Category:Elin Spoiler]] | [[Category:Elin Spoiler]] | ||
[[Category:EN]] | [[Category:EN]] |
edits