;
; Lua Scenario Template Rules
; This file is organized very similarly to the rules.txt file.
; It is designed to provide you with some of the functionality
; offered by Lua Events in a familiar format
;
; Custom Combat Groups and Modifiers
; A) Unit Name: No direct effect, but if the unit name doesn't match
; the name for the unit with the same ID, a warning is printed
; in the console
; B) Combat Group Membership mask: 0: not in group; 1: in group
; 0000000000000001 Group 0
; 0000000000000010 Group 1
; 0000000000000100 Group 2
; 0000000000001000 Group 3
; 0000000000010000 Group 4
; 0000000000100000 Group 5
; 0000000001000000 Group 6
; 0000000010000000 Group 7
; 0000000100000000 Group 8
; 0000001000000000 Group 9
; 0000010000000000 Group 10
; 0000100000000000 Group 11
; 0001000000000000 Group 12
; 0010000000000000 Group 13
; 0100000000000000 Group 14
; 1000000000000000 Group 15
; C) Percentage Increment: Determines how much the modifier masks change with
; each increase. 25 means the increment is 25%
; D) Attack Modifier mask: 0: Can't attack group, 1-9: multiply attack power by percentage increment
; when attacking that group. That is, if the increment is 25,
; 1: 25% power, 2: 50% power, 3: 75% power, 4: 100%, 5: 125%
; *: attack with normal power against group
; E) Defense Modifier mask: 0-9: multiply defender power by the percentage increment
; when defending against attacks from that group.
; That is, if the increment is 33.
; 1: 33% of normal, 2: 66% of normal, 3: 99% normal, 4: 132% normal, etc
; *: defend at normal value against group
; A B C D E
; Combat Group Names
; This section defines names for the 16 combat groups
; in the @LSTCOMBATGROUPS section,
; starting with Group 0 in the first line.
; These names will be used for some automatically generated
; documentation.
@LSTCOMBATGROUPNAMES
Combat Group 0, ; Combat Group 0
Combat Group 1, ; Combat Group 1
Combat Group 2, ; Combat Group 2
Combat Group 3, ; Combat Group 3
Combat Group 4, ; Combat Group 4
Combat Group 5, ; Combat Group 5
Combat Group 6, ; Combat Group 6
Combat Group 7, ; Combat Group 7
Combat Group 8, ; Combat Group 8
Combat Group 9, ; Combat Group 9
Combat Group 10, ; Combat Group 10
Combat Group 11, ; Combat Group 11
Combat Group 12, ; Combat Group 12
Combat Group 13, ; Combat Group 13
Combat Group 14, ; Combat Group 14
Combat Group 15, ; Combat Group 15
; Demotions
; A) Unit Name: No direct effect, but if the unit name doesn't match
; the name for the unit with the same ID, a warning is printed
; in the console
; B) Demotion Group Membership mask: 0: not in group; 1: in group
; 0000000000000001 Group 0
; 0000000000000010 Group 1
; 0000000000000100 Group 2
; 0000000000001000 Group 3
; 0000000000010000 Group 4
; 0000000000100000 Group 5
; 0000000001000000 Group 6
; 0000000010000000 Group 7
; 0000000100000000 Group 8
; 0000001000000000 Group 9
; 0000010000000000 Group 10
; 0000100000000000 Group 11
; 0001000000000000 Group 12
; 0010000000000000 Group 13
; 0100000000000000 Group 14
; 1000000000000000 Group 15
;
; C) Demotion Unit: If a unit is defeated, replace it with the unit
; corresponding id number (starting at 0). nil means the unit is
; not replaced upon destruction
; D) Destroy if Killed By Mask: 0: Ignore this group for demotions
; 1: If killer is in this group, destroy the unit instead of demoting it.
; E) Demotion Settings:
; 00000001 Vet Status Change: 0: Keep current vet status when demoted
; 1: Give vet status upon demotion
; 2: Remove vet status upon demotion
; 00000010 Demote only if veteran: 0: Demote regardless of vet status
; 1: Demote only if veteran
; 0000ab00 Damage to replacing unit: Replacing unit should be given
; ab damage upon creation, i.e. 00002300
; would create a unit with 23 damage already
; 11110000 Reserved (no effect)
; A B C D E
@LSTDEMOTION
; Promotions
; A) Unit Name: No direct effect, but if the unit name doesn't match
; the name for the unit with the same ID, a warning is printed
; in the console
; B) Veteran Status Chance: Percent chance for a unit to be given veteran status
; C) Promotion Group Membership mask: 0: not in group; 1: in group
; 0000000000000001 Group 0
; 0000000000000010 Group 1
; 0000000000000100 Group 2
; 0000000000001000 Group 3
; 0000000000010000 Group 4
; 0000000000100000 Group 5
; 0000000001000000 Group 6
; 0000000010000000 Group 7
; 0000000100000000 Group 8
; 0000001000000000 Group 9
; 0000010000000000 Group 10
; 0000100000000000 Group 11
; 0001000000000000 Group 12
; 0010000000000000 Group 13
; 0100000000000000 Group 14
; 1000000000000000 Group 15
; D) Promotion Unit: If a unit is victorious in combat, it may be promoted to the unit with
; this id number (starting at 0). nil means the unit can't be promoted
; E) Promotion Chance: Percent chance for a unit to be promoted to the new unit.
; F) Do Not Promote For Kill By Mask: 0: ignore this group for promotions
; 1: If defeated unit is in this group, do not promote the unit
; G) Promotion Flags:
; 00000001 Non Vet Upgrade: 1: unit can upgrade if not vet 0: must be vet to upgrade
; 00000010 Change Vet Status: 0:unit retains current vet status 1: unit loses vet status
; if it has it 2: unit gains vet status if it doesn't have it
; 00000100 Heal Unit: 0: Unit retains existing damage upon upgrade 1: unit fully healed
; 00001000 Preserve HP: 0: Unit keeps existing damage 1: Unit keeps existing hitpoints
; e.g. 20 hp unit with 7 hp (13 damage) left upgraded to 30 hp unit type:
; 0: new hp is 17 (13 damage), 1: new hp is 7 (23 damage)
; 00010000 Spend Move: 0-9: spend this many movement points upon upgrade *: spend all movement
; 00100000 Not assigned
; 01000000 Not assigned
; 10000000 Not Assigned
;
; A B C D E F G
@LSTPROMOTION
; Production Veteran Status
; A) Unit Name: No direct effect, but if the unit name doesn't match
; the name for the unit with the same ID, a warning is printed
; in the console
; B) Base Veteran Status Chance Increment: Percent chance the unit produced will be
; veteran, before applying improvements and wonders
; C) Standard Improvement Veteran Chance Increment: Percent chance that a barracks,
; port facility, or airport will produce a veteran unit
; (add this with the base chance)
; D) Wonder Veteran Chance Increment: Percent chance that a unit produced by a civ
; owning Sun Tzu or Lighthouse will be veteran
; (add this with previous chances for total chance)
; E) First Supplemental Improvement: ID of improvement or wonder that will add
; a chance for a produced unit to be veteran
; (Pyramids is ID 40 in this system, Hanging Gardens 41 and so on)
; nil means don't use this improvement
; F) First Supplemental Veteran Chance Increment: If the supplemental improvement is in
; the city, or the wonder is owned and active by the tribe, then
; this is the percent chance that the produced unit will be veteran
; (add with all previous chances for the total chance)
; G) Second Supplemental Improvement: ID of improvement or wonder that will add
; a chance for a produced unit to be veteran
; (Pyramids is ID 40 in this system, Hanging Gardens 41 and so on)
; nil means don't use this improvement
; H) Second Supplemental Veteran Chance Increment: If the supplemental improvement is in
; the city, or the wonder is owned and active by the tribe, then
; this is the percent chance that the produced unit will be veteran
; (add with all previous chances for the total chance)
; I) Tribe Bonus Mask:
; 0-9: Multiply value by 10%, and add that chance to the probability a unit
; will be produced veteran by the associated tribe/government
; *: 100% chance the tribe/govt will produce a veteran unit
; 0000000000000001 Tribe 0 (Barbarians)
; 0000000000000010 Tribe 1
; 0000000000000100 Tribe 2
; 0000000000001000 Tribe 3
; 0000000000010000 Tribe 4
; 0000000000100000 Tribe 5
; 0000000001000000 Tribe 6
; 0000000010000000 Tribe 7
; 0000000100000000 Anarchy
; 0000001000000000 Despotism
; 0000010000000000 Monarchy
; 0000100000000000 Communism
; 0001000000000000 Fundamentalism
; 0010000000000000 Republic
; 0100000000000000 Democracy
; 1000000000000000 Unassigned Bit
;
; A B C D E F G H I
@LSTPRODUCTIONVETERANSTATUS