The totpp library: Difference between revisions

From Scenario League Wiki
Jump to navigationJump to search
(Created Page)
 
m (Added to category lua resources)
 
Line 1: Line 1:
[[Category: Resources]]
[[Category:Lua Resources]]
Back To [[TOTPP Functions]]
Back To [[TOTPP Functions]]



Latest revision as of 20:17, 26 January 2019

Back To TOTPP Functions


The `totpp` library is available for individual ToTPP patches to register sub-libraries in, to allow interacting with them from the game.


totpp.movementMultipliers (provided by the Movement multipliers patch)

road (get/set)

totpp.movementMultipliers.road -> integer

Returns the road movement multiplier if it is set, `nil` otherwise. Ephemeral.


railroad (get/set)

totpp.movementMultipliers.railroad -> integer

Returns the railroad movement multiplier if it is set, `nil` otherwise. Ephemeral.


alpine (get/set)

totpp.movementMultipliers.alpine -> integer

Returns the alpine movement multiplier if it is set, `nil` otherwise. Ephemeral.


river (get/set)

totpp.movementMultipliers.river -> integer

Returns the river movement multiplier if it is set, `nil` otherwise. Ephemeral.


aggregate (get)

totpp.movementMultipliers.aggregate -> integer

Returns the aggregate movement multiplier (the lcm of the four multipliers above). This value is recalculated when setting any of the individual multipliers. This is an alias for `civ.cosmic.roadMultiplier`.