Template:Meteorite drops/doc

From Little-Known Galaxy Wiki
Jump to navigation Jump to search

This template uses one or more modules written in the Lua programming language.

For more information, see Wikipedia:Lua or the Lua reference manual on mediawiki.org. Modules used include: Meteorite drops, LootTableUtil.

This template tracks and displays drop data of meteorites. Meteorite drops are a list of several different loot tables. Each loot table has a % to be selected, then the items inside of it have a % chance to be selected. So the math for the overall drop rate is: (LootTablePercent*ItemPercent)*100

This template provides the percent chance to roll in each drop table, then what the default min and max number of items to receive. It passes that information to the module, which will calculate the item percent chance, from the above math equation. If the loot table has min/max number of items override, it will use those numbers rather than the default ones.

Related templates, modules, and tables:

If updates to the meteorite drop list (e.g. Ocean_Meteorite, Ocean_Meteorite_Collectable, Ocean_Meteorite_Rare) happen, those edits need to go on the meteorite page itself. If updates are to any of the shared drop table loot chances/amounts (e.g. Shared_Common_Resources, that needs to be updated on Data:Loot Tables.

Syntax

{{Meteorite drops
|table1= Loot Table ID name from lootTable table. (string)
   |table1chance= Chance for that table to be rolled. (float)
   |table1min= Default minimum number of items. (int)
   |table1max= Default maximum number of items. (int)
   
|table2= Loot Table ID name from lootTable table. (string)
   |table2chance= Chance for that table to be rolled. (float)
   |table2min= Default minimum number of items. (int)
   |table2max= Default maximum number of items. (int)
   
|tableN= Loot Table ID name from lootTable table. (string)
   |tableNchance= Chance for that table to be rolled. (float)
   |tableNmin= Default minimum number of items. (int)
   |tableNmax= Default maximum number of items. (int)
}}

Examples

Item Drop (Rare Viridis)

{{Meteorite drops|table1=Shared_Common_Resources
   |table1chance=.12
   |table1min=5
   |table1max=8
|table2=Shared_Rare_Resources
   |table2chance=0.33
   |table2min=1
   |table2max=1
|table3=Utopia_Ores
   |table3chance=0.33
   |table3min=3
   |table3max=5
|table4=Utopia_Collectables
   |table4chance=0.22
   |table4min=3
   |table4max=5
}}