Page 1 of 1

How does species/common/weapons.macros work?

Posted: Wed May 23, 2018 10:50 am
by Oberlus
How does ~/default/scripting/species/common/weapons.macros work?

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 
'''
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).

Re: How does species/common/weapons.macros work?

Posted: Wed May 23, 2018 3:21 pm
by Ophiuchus
Oberlus wrote:Second EffectsGroup codes it for... hangars.
Is SecondaryStat of an hangar the damage of its fighters?

i think primarystat for hangars is capacity and secondarystat is damage.
Oberlus wrote:And third EffectsGroup is for flak cannons, right?
yes, SR_WEAPON_0_1 is flak
Oberlus wrote:So a bad pilot species only has two shots (and a ultimate pilot species would have 6).
for weapons primary stat is damage and secondary is shots

Re: How does species/common/weapons.macros work?

Posted: Wed May 23, 2018 4:04 pm
by Oberlus
Ok then.
I didn't know the weapons (pilots) species trait affected the fighters. Good to know.