The totpp library

From Scenario League Wiki
Revision as of 20:17, 26 January 2019 by Prof. Garfield (talk | contribs) (Added to category lua resources)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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`.