How does species/common/weapons.macros work?
Posted: Wed May 23, 2018 10:50 am
How does ~/default/scripting/species/common/weapons.macros work?
For example:
First EffectsGroup codes the effect on regular ship weapons (mass driver, laser, plasma and death ray). All clear.
Second EffectsGroup codes it for... hangars.
Is SecondaryStat of an hangar the damage of its fighters?
And third EffectsGroup is for flak cannons, right? So a bad pilot species only has two shots (and a ultimate pilot species would have 6).
For example:
Code: Select all
BAD_WEAPONS
'''EffectsGroup
description = "BAD_WEAPONS_DESC"
scope = Source
activation = And [
Ship
Armed
Or [
DesignHasPart name = "SR_WEAPON_1_1"
DesignHasPart name = "SR_WEAPON_2_1"
DesignHasPart name = "SR_WEAPON_3_1"
DesignHasPart name = "SR_WEAPON_4_1"
]
]
effects = [
SetMaxDamage partname = "SR_WEAPON_1_1" value = Value - 1
SetMaxDamage partname = "SR_WEAPON_2_1" value = Value - 2
SetMaxDamage partname = "SR_WEAPON_3_1" value = Value - 3
SetMaxDamage partname = "SR_WEAPON_4_1" value = Value - 5
]
EffectsGroup
scope = Source
activation = And [
Ship
Armed
Or [
DesignHasPart name = "FT_HANGAR_1"
DesignHasPart name = "FT_HANGAR_2"
DesignHasPart name = "FT_HANGAR_3"
DesignHasPart name = "FT_HANGAR_4"
]
]
effects = [
SetMaxSecondaryStat partname = "FT_HANGAR_1" value = Value - 0.5
SetMaxSecondaryStat partname = "FT_HANGAR_2" value = Value - 1
SetMaxSecondaryStat partname = "FT_HANGAR_3" value = Value - 2
SetMaxSecondaryStat partname = "FT_HANGAR_4" value = Value - 3
]
EffectsGroup
scope = Source
activation = And [
Ship
Armed
DesignHasPart name = "SR_WEAPON_0_1"
]
effects =
SetMaxSecondaryStat partname = "SR_WEAPON_0_1" value = Value - 1
'''
Second EffectsGroup codes it for... hangars.
Is SecondaryStat of an hangar the damage of its fighters?
And third EffectsGroup is for flak cannons, right? So a bad pilot species only has two shots (and a ultimate pilot species would have 6).