Make Stargates zero-speed ships (not buildings)

For what's not in 'Top Priority Game Design'. Post your ideas, visions, suggestions for the game, rules, modifications, etc.

Moderator: Oberlus

Message
Author
User avatar
Oberlus
Cosmic Dragon
Posts: 5715
Joined: Mon Apr 10, 2017 4:25 pm

Re: Make Stargates zero-speed ships (not buildings)

#16 Post by Oberlus »

Vezzra wrote: Mon Dec 31, 2018 10:15 am
Oberlus wrote: Mon Dec 31, 2018 9:14 amI think that could be a good thing to implement now.
Patches welcome :D
:D

So I'm trying to figure out what would it be like:

I guess it needs to modify the stargate foci effects (in file default/scripting/species/common/focus.macros), which I think just controls if a focus type can be used or not on a given planet, and the advanced stargate foci effects (in file default/scripting/species/common/advanced_focus.macros), which seems to control the actual sending/receiving of fleets, to require a minimum value for the Construction meter?

An attempt assuming Construction is the right meter and minimum value is 10:

In focus.macros:

Code: Select all

        Focus
            name = "FOCUS_STARGATE_SEND"
            description = "FOCUS_STARGATE_SEND_DESC"
            location = And [
                Or [
                    Contains Building name = "BLD_STARGATE"
                    And [
                        Contains Building name = "BLD_TRANSFORMER"
                        OwnerHasTech name = "CON_STARGATE"
                    ]
                ]
                Construction low = 10	// ADDITION
            ]
            graphic = "icons/focus/stargate_send.png"

        Focus
            name = "FOCUS_STARGATE_RECEIVE"
            description = "FOCUS_STARGATE_RECEIVE_DESC"
            location = And [
                Or [
                    Contains Building name = "BLD_STARGATE"
                    And [
                        Contains Building name = "BLD_TRANSFORMER"
                        OwnerHasTech name = "CON_STARGATE"
                    ]
                ]
                Construction low = 10	// ADDITION
            ]
            graphic = "icons/focus/stargate_receive.png"
In advanced_focus.macros:

Code: Select all

        EffectsGroup
            scope = And [
                Fleet
                OwnedBy empire = Source.Owner
                ContainedBy And [
                    System 
                    Contains And [
                        Planet
                        OwnedBy empire = Source.Owner
                        Focus type = "FOCUS_STARGATE_SEND"
                        Construction low = 10
                    ]
                ]
            ]
            activation = And [
                Planet
                Focus type = "FOCUS_STARGATE_RECEIVE"
                Construction low = 10
            ]
            stackinggroup = "STARGATE_STACK"
            effects = [
                GenerateSitrepMessage
                    message = "EFFECT_STARGATE"
                    label = "EFFECT_STARGATE_LABEL"
                    icon = "icons/focus/stargate_receive.png"
                    parameters = [
                        tag = "fleet" data = Target.ID
                        tag = "system" data = Source.SystemID
                    ]
                    empire = Source.Owner
                MoveTo destination = And [
                    Contains Source
                    System
                ]
            ]

But what would happen when a planet has the stargate focus set (to receive or send) before the Contruction meter goes belows the chosen minimum? The modification in advanced_focus.macros should make sure that the fleet sending won't occur, but I wonder if the focus should also be forced to change to (maybe) preferred focus of the planet species?

Note: untested until I advance a game to build stargates :)

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Make Stargates zero-speed ships (not buildings)

#17 Post by Vezzra »

Oberlus wrote: Thu Jan 03, 2019 4:19 pmBut what would happen when a planet has the stargate focus set (to receive or send) before the Contruction meter goes belows the chosen minimum? The modification in advanced_focus.macros should make sure that the fleet sending won't occur, but I wonder if the focus should also be forced to change to (maybe) preferred focus of the planet species?
Generating a proper sitrep to notify the player about the situation and leave the focus changing to them would be the best IMO.

Post Reply