Difference between revisions of "Drop rates/Script"

From Wildermyth Wiki
m
m
Line 204: Line 204:
== Artifacts ==
== Artifacts ==


If weapon is selected to drop, there is a chance that it will be an [[artifact]] weapon. The chance starts at 0, increases by %s each time a non-artifact weapon drops, and decreases by %s each time an artifact weapon drops. The following artifacts can appear as random drops. Each artifact within a given category is equally likely to drop. Accordingly, the table lists each artifact's effective drop rate, which is calculated as the category weight divided by the number of droppable artifacts in that category.
If weapon is selected to drop, there is a chance that it will be an [[artifact]] weapon. The chance starts at 0, increases by %s each time a non-artifact weapon drops, and decreases by %s each time an artifact weapon drops. The following artifacts can appear as random drops. Each artifact within a given category is equally likely to drop. Accordingly, the table lists each artifact's effective drop rate, which is calculated as the category's relative drop rate divided by the number of droppable artifacts in that category.
'''%(artifactSpawnChanceIncreasePerFailure,artifactSpawnChanceDecreasePerSuccess)
'''%(artifactSpawnChanceIncreasePerFailure,artifactSpawnChanceDecreasePerSuccess)
string += weaponTable
string += weaponTable

Revision as of 07:41, 27 May 2022

This is a Python script to generate the Drop rates tables. Copy the code in the box below into a text file named wikiDropRates.py (or whatever you want) inside the Wildermyth directory. Then run it by calling python wikiDropRates.py from the command line.[1] It will create a text file named wikiDropRates.txt with the appropriate wiki-formatted content.

  1. More precisely, you can put the script anywhere, but you need to call it from the Wildermyth directory.