Module:SoulUnlock/doc: Difference between revisions

Jump to navigation Jump to search
Sur (talk | contribs)
m get_max example
Sur (talk | contribs)
m localize, write_accumulated, get_max finished
Line 1: Line 1:
=Overview=
=Overview=
overview
Data for what is unlocked at each increment of Souls. Data is stored and loaded from [[Data:SoulUnlockData.json]].
 
The data is accumulated into another format that is used by the currently written functions.


=Functions=
=Functions=
==get_max==
==get_max==
desc
Retrieve's maximum value for a given key in the accumulated data


===Example===
===Examples===
{{#invoke:SoulUnlock|get_max|RequiredGold}}
<code><nowiki>{{#invoke:SoulUnlock|get_max|RequiredGold}}</nowiki></code> {{#invoke:SoulUnlock|get_max|RequiredGold}}<br>
{{#invoke:SoulUnlock|get_max|PowerIncreases}}
<code><nowiki>{{#invoke:SoulUnlock|get_max|PowerIncrease}}</nowiki></code> {{#invoke:SoulUnlock|get_max|PowerIncrease}}<br>
<code><nowiki>{{#invoke:SoulUnlock|get_max|AbilityUnlocks}}</nowiki></code> {{#invoke:SoulUnlock|get_max|AbilityUnlocks}}<br>
<code><nowiki>{{#invoke:SoulUnlock|get_max|AbilityPoints}}</nowiki></code> {{#invoke:SoulUnlock|get_max|AbilityPoints}}<br>
 
==localize==
Localize a key as its stored to the current language using [[Module:Lang]].
 
===Examples===
<code><nowiki>{{#invoke:SoulUnlock|lang|RequiredGold}}</nowiki></code> {{#invoke:SoulUnlock|localize|RequiredGold}}<br>
<code><nowiki>{{#invoke:SoulUnlock|lang|PowerIncrease}}</nowiki></code> {{#invoke:SoulUnlock|localize|PowerIncrease}}<br>
<code><nowiki>{{#invoke:SoulUnlock|lang|AbilityUnlocks}}</nowiki></code> {{#invoke:SoulUnlock|localize|AbilityUnlocks}}<br>
<code><nowiki>{{#invoke:SoulUnlock|lang|AbilityPoints}}</nowiki></code> {{#invoke:SoulUnlock|localize|AbilityPoints}}<br>
 
==write_accumulated==
Writes the accumulated data to wikitext. Not a format that is ready to be displayed on a wiki page yet. Used for debugging for any lua editors working off of the accumulated data as opposed to the original data.


==accumulate==
''Note: the keys outputted are localized to english. See the localization map at the top of the Module source.''
desc


===Example===
===Example===
<code><nowiki>{{#invoke:SoulUnlock|write_accumulated}}</nowiki></code><br>
{{#invoke:SoulUnlock|write_accumulated}}
{{#invoke:SoulUnlock|write_accumulated}}