Module:GenericData/doc: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
LVL (talk | contribs)
Updated doc for soul distribution function
LVL (talk | contribs)
Removed deprecated function, added new soul distribution functions, and updated get_rejuv_param.
Line 10: Line 10:


===Examples===
===Examples===
<code><nowiki>{{#invoke:GenericData|get_objective_param|GoldPerOrb}}</nowiki></code>
<code><nowiki>{{#invoke:GenericData|get_objective_param|Tier1GoldKill}}</nowiki></code>


{{#invoke:GenericData|get_objective_param|GoldPerOrb}}
{{#invoke:GenericData|get_objective_param|Tier1GoldKill}}


==get_rejuv_param==
==get_rejuv_param==
Provides access to "RejuvParams" data.
Provides access to data related to the Rejuvenator.
 
'''Note:''' Some values (e.g., buff stats like <code>MaxHP</code>) are hard-coded in the module, while others are read from the "RejuvParams" table in [[Data:GenericData.json]]. Some JSON parameters may be for obsolete mechanics.


===Parameters===
===Parameters===
* '''key''' - key to access
* '''key''' - The key to access (e.g., <code>MaxHP</code>, <code>RejuvinatorRebirthDuration</code>).
* '''midboss_deaths''' - (OPTIONAL) list index to access that represents how many times midboss has died, if the provided key's value is a list
* '''index''' - (OPTIONAL) The list index to access if the key's value is an array.


===Examples===
===Examples===
<code><nowiki>{{#invoke:GenericData|get_rejuv_param|RejuvinatorExpirationWarningTiming}}</nowiki></code>
<code><nowiki>{{#invoke:GenericData|get_rejuv_param|MaxHP}}</nowiki></code>


{{#invoke:GenericData|get_rejuv_param|RejuvinatorExpirationWarningTiming}}
{{#invoke:GenericData|get_rejuv_param|MaxHP}}


<code><nowiki>{{#invoke:GenericData|get_rejuv_param|TrooperHealthMult|3}}</nowiki></code>
<code><nowiki>{{#invoke:GenericData|get_rejuv_param|RejuvinatorRebirthDuration|1}}</nowiki></code>


{{#invoke:GenericData|get_rejuv_param|TrooperHealthMult|3}}
{{#invoke:GenericData|get_rejuv_param|RejuvinatorRebirthDuration|1}}


==get_tiered_item_price==
==get_tiered_item_price==
Line 34: Line 36:


===Parameters===
===Parameters===
* '''tier''' - list index to access that represents the tier of the item
* '''tier''' - The list index to access, which represents the tier of the item.


===Examples===
===Examples===
Line 41: Line 43:
{{#invoke:GenericData|get_tiered_item_price|5}}
{{#invoke:GenericData|get_tiered_item_price|5}}


==get_lane_phase_gold_share_frac==
==get_trooper_gold_share_frac==
Provides access to "LanePhaseGoldShareFrac" data (soul distribution percentages when multiple players kill a lane trooper).
Provides access to "TrooperKillGoldShareFrac" data (soul distribution percentages when multiple players kill a lane trooper).


===Parameters===
===Parameters===
* '''index''' - Number of players splitting the souls (1 = solo, 2 = duo, etc.)
* '''index''' - The number of players splitting the souls (1 = solo, 2 = duo, etc.).


===Examples===
===Examples===
<code><nowiki>{{#invoke:GenericData|get_lane_phase_gold_share_frac|1}}</nowiki></code>
<code><nowiki>{{#invoke:GenericData|get_trooper_gold_share_frac|3}}</nowiki></code>
{{#invoke:GenericData|get_lane_phase_gold_share_frac|1}}
 
{{#invoke:GenericData|get_trooper_gold_share_frac|3}}
 
==get_hero_gold_share_frac==
Provides access to "HeroKillGoldShareFrac" data (soul distribution percentages when multiple players kill an enemy hero).
 
===Parameters===
* '''index''' - The number of players splitting the souls (1 = solo, 2 = duo, etc.).


<code><nowiki>{{#invoke:GenericData|get_lane_phase_gold_share_frac|2}}</nowiki></code>
===Examples===
{{#invoke:GenericData|get_lane_phase_gold_share_frac|2}}
<code><nowiki>{{#invoke:GenericData|get_hero_gold_share_frac|4}}</nowiki></code>


<code><nowiki>{{#invoke:GenericData|get_lane_phase_gold_share_frac|3}}</nowiki></code>
{{#invoke:GenericData|get_hero_gold_share_frac|4}}
{{#invoke:GenericData|get_lane_phase_gold_share_frac|3}}

Revision as of 21:27, 4 August 2025

Overview

Provides access to generic/miscellaneous data from Data:GenericData.json

Functions

get_objective_param

Provides access to "ObjectiveParams" data.

Parameters

  • key - key to access

Examples

{{#invoke:GenericData|get_objective_param|Tier1GoldKill}}

1250

get_rejuv_param

Provides access to data related to the Rejuvenator.

Note: Some values (e.g., buff stats like MaxHP) are hard-coded in the module, while others are read from the "RejuvParams" table in Data:GenericData.json. Some JSON parameters may be for obsolete mechanics.

Parameters

  • key - The key to access (e.g., MaxHP, RejuvinatorRebirthDuration).
  • index - (OPTIONAL) The list index to access if the key's value is an array.

Examples

{{#invoke:GenericData|get_rejuv_param|MaxHP}}

10%

{{#invoke:GenericData|get_rejuv_param|RejuvinatorRebirthDuration|1}}

180

get_tiered_item_price

Provides access to "ItemPricePerTier" data.

Parameters

  • tier - The list index to access, which represents the tier of the item.

Examples

{{#invoke:GenericData|get_tiered_item_price|5}}

6400

get_trooper_gold_share_frac

Provides access to "TrooperKillGoldShareFrac" data (soul distribution percentages when multiple players kill a lane trooper).

Parameters

  • index - The number of players splitting the souls (1 = solo, 2 = duo, etc.).

Examples

{{#invoke:GenericData|get_trooper_gold_share_frac|3}}

36%

get_hero_gold_share_frac

Provides access to "HeroKillGoldShareFrac" data (soul distribution percentages when multiple players kill an enemy hero).

Parameters

  • index - The number of players splitting the souls (1 = solo, 2 = duo, etc.).

Examples

{{#invoke:GenericData|get_hero_gold_share_frac|4}}

17%