FreeOrion

Forums for the FreeOrion project
It is currently Fri Jun 22, 2018 7:43 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed May 23, 2018 10:50 am 
Offline
Vacuum Dragon
User avatar

Joined: Mon Apr 10, 2017 4:25 pm
Posts: 601
How does ~/default/scripting/species/common/weapons.macros work?

For example:
Code:
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).


Top
 Profile  
 
PostPosted: Wed May 23, 2018 3:21 pm 
Offline
Psionic Snowflake

Joined: Tue Sep 30, 2014 10:01 am
Posts: 485
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

_________________
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
PostPosted: Wed May 23, 2018 4:04 pm 
Offline
Vacuum Dragon
User avatar

Joined: Mon Apr 10, 2017 4:25 pm
Posts: 601
Ok then.
I didn't know the weapons (pilots) species trait affected the fighters. Good to know.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group