Situational Speed

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

Moderator: Oberlus

Post Reply
Message
Author
User avatar
LienRag
Cosmic Dragon
Posts: 2146
Joined: Fri May 17, 2019 5:03 pm

Situational Speed

#1 Post by LienRag »

In the same philosophy than for the Situational Stealth, I dabbled a little bit with Situational Speed : speed that changes depending on where the ship is.

Note though that while I seriously believe that situational stealth is a huge improvement to the game, I don't really know if it's also the case for situational speed; I mostly wanted to try what's possible there, and also remove some frustration I had seeing that Speed parts don't stack¹.

So yes, all Situational Speed parts stack (though usually not with a copy of the same part) and they all stack with regular Speed parts.

That's why the most powerful part I created, the Slingshot effect on-the-fly calculator, is a Core part : at most it will stack with another general speed part that will add +40 speed.

Code: Select all

Part
    name = "FU_SLINGSHOT_EFFECT_CALCULATOR"
    description = "FU_SLINGSHOT_EFFECT_CALCULATOR_DESC"
    exclusions =  "FU_SLINGSHOT_EFFECT_CALCULATOR"
    
    class = Speed
    capacity = 0
    mountableSlotTypes = Core
    buildcost = 15 * [[FLEET_UPKEEP_MULTIPLICATOR]] * [[SHIP_PART_COST_MULTIPLIER]]
    buildtime = 7
    tags = [ "PEDIA_PC_SPEED" ]
    location = OwnedBy empire = Source.Owner

    effectsgroups = [
        EffectsGroup
            scope = Source
            activation = ContainedBy And [
                System 
		Contains Planet
                Not Contains  Planet type = Asteroids // Asteroids are a hazard for navigation, no bonus in systems with Asteroid belts
            ]
	    // stackinggroup = "FU_SLINGSHOT_EFFECT_CALCULATOR_STACK // No stacking group as we want all planets in the system to affect the speed
            accountinglabel = "FU_SLINGSHOT_EFFECT_CALCULATOR"
            effects = SetSpeed value = Value + 5 * (Statistic Sum value = LocalCandidate.SizeAsDouble condition = And [ Planet InSystem id = Source.SystemID ])

    ]

    icon = "icons/ship_parts/slinghshot calculator.png"

#include "/scripting/common/upkeep.macros"
For an Internal part, I had the Lava Supraconduction Generator, that improves Speed in system containing Infernos.

Code: Select all

Part
    name = "FU_LAVA_SUPRACONDUCTION_GENERATOR"
    description = "FU_LAVA_SUPRACONDUCTION_GENERATOR_DESC"
    exclusions =  "FU_LAVA_SUPRACONDUCTION_GENERATOR"
    
    class = Speed
    capacity = 0
    mountableSlotTypes = Internal
    buildcost = 25 * [[FLEET_UPKEEP_MULTIPLICATOR]] * [[SHIP_PART_COST_MULTIPLIER]]
    buildtime = 3
    tags = [ "PEDIA_PC_SPEED" ]
    location = OwnedBy empire = Source.Owner

    effectsgroups = [
        EffectsGroup
            scope = Source
            activation = ContainedBy And [
                System 
		Contains Planet type = Inferno 
            ]
	    stackinggroup = "FU_LAVA_SUPRACONDUCTION_GENERATOR_STACK" 
            	
            effects = SetSpeed value = Value + 5 * (Statistic Sum value = LocalCandidate.SizeAsDouble condition = And [ Planet InSystem id = Source.SystemID Planet type = Inferno ])
	    accountinglabel = "FU_LAVA_SUPRACONDUCTION_GENERATOR"
    ]

    icon = "icons/ship_parts/slinghshot calculator.png"

#include "/scripting/common/upkeep.macros"
And for External parts, I designed the Solar Sails :

Code: Select all

Part
    name = "SP_SOLAR_SAIL"
    description = "SP_SOLAR_SAIL_DESC"
    class = General
    mountableSlotTypes = External
    buildcost = 30 * [[FLEET_UPKEEP_MULTIPLICATOR]] * [[SHIP_PART_COST_MULTIPLIER]]
    buildtime = 6
    tags = [ "PEDIA_PC_GENERAL" ]
    location = OwnedBy empire = Source.Owner
    effectsgroups = [
        EffectsGroup
            scope = Source
            activation = Star type = [ Red ]

            effects = SetSpeed value = Value + 1 
        EffectsGroup
            scope = Source
            activation = Star type = [ Orange ]

            effects = SetSpeed value = Value + 2
        EffectsGroup
            scope = Source
            activation = Star type = [ Yellow ]

            effects = SetSpeed value = Value + 3 
        EffectsGroup
            scope = Source
            activation = Star type = [ White ]

            effects = SetSpeed value = Value + 7 
        EffectsGroup
            scope = Source
            activation = Star type = [ Blue ]

            effects = SetSpeed value = Value + 15 
        ]
    icon = "icons/ship_parts/solarcollector.png"


#include "/scripting/common/upkeep.macros"
It's the only part that stacks with itself (the more Sails you have, the quicker your ship is).
I guess that can make very quick Solar Hull ships, is that a real balance problem ?

Solar Sails can help ambushing ships, especially those who have Solar Concentrators. Since the Sail itself competes with weapons for the External Slots (lasers in the case of Solar Concentrators) I believe it's a feature, not a bug : one will have to design either for range (Sails) or for punch (Lasers).

Since Solar Sails are expensive (I mean, they take an external slot) and gives good bonus mostly on white and blue star, I have some ideas on making them improvable by later techs (like Architectural Monofilaments, for example, or even Spatial Distortion).
Is that a good idea or are they already overpowered ? I really don't know so would like your inputs on this point.



I also designed an hybrid part able to take advantage of multiple situations, the Cybernetic Core :

Code: Select all

Part
    name = "SP_CYBERNETIC_CORE"
    description = "SP_CYBERNETIC_CORE_DESC"
    class = General 
    mountableSlotTypes = Core
    buildcost = 2 * [[FLEET_UPKEEP_MULTIPLICATOR]] * [[SHIP_PART_COST_MULTIPLIER]]
    buildtime = 5
    tags = [ "PEDIA_PC_STEALTH" ]
    location = OwnedBy empire = Source.Owner
    effectsgroups = [
        EffectsGroup
            scope = And [
                Source              
                WithinDistance distance = 100 condition = Star type = BlackHole
                          ]
		// No stacking group : if there are multiple black holes near the ship uses all the slingshot effects
            accountinglabel = "BLACK_HOLE_SLINGSHOT_EFFECT"
            effects = SetSpeed value = Value + 80 // the ship uses slingshot effect 
	    

    

        EffectsGroup
            scope = And [
                Source              
                WithinStarlaneJumps jumps = 0 condition = Star type = Neutron
                          ]

	    stackinggroup = "NEUTRON_SHIELD_STACK"
            accountinglabel = "NEUTRON_SHIELD"
            effects = [
		SetShield value = Value + 7 // uses high-energy particules to build a shield 
	    	SetMaxShield value = Value + 7 
		]
 
    
        EffectsGroup
            scope = Source
		
            activation = ContainedBy And [
                System 
		Contains  condition = And [ Planet 
			HasSpecial name = "COMPUTRONIUM_SPECIAL" ]
            ]
	    stackinggroup = "COMPUTRONIUM_DETECTION_STACK"
            accountinglabel = "COMPUTRONIUM_DETECTION"
            effects = SetDetection value = Value + 60 // Hacks into the Computronium moon to make deep neural network calculations of the info received by the ships's sensors


        EffectsGroup
            scope = Source
            activation = ContainedBy And [
                System 
		Contains  condition = And [ Planet 
			HasSpecial name = "GAIA_SPECIAL" ]
            
            ]
	    stackinggroup = "GAIA_STACK"
            accountinglabel = "GAIA_COORDINATION"
            effects = SetMaxCapacity partname = "FT_BAY_1" value = Value * 2 // Communicating with Gaïa allows for total coordination of the fighters taking of, rising the number of figters able to take of simultaneously

    
        EffectsGroup
            scope = Source
            activation = ContainedBy And [
                System 
		Contains  condition = And [ Planet 
			HasSpecial name = "TIDAL_LOCK_SPECIAL" ]            
            ]
	    stackinggroup = "TIDAL_LOCK_SPECIAL_STACK"
            accountinglabel = "TIDAL_LOCK_SPECIAL_PLASMA_ACCELERATION"
            effects = [
                SetMaxCapacity partname = "SR_WEAPON_3_1" value = Value + 5
                SetCapacity partname = "SR_WEAPON_3_1" value = Value + 5 // Sending a small graviton beam bouncing back and forth inside the gravitational field of this planet-star system allows to reach higher plasma temperatures
            ]

    
        EffectsGroup
            scope = Source
                        activation = ContainedBy And [
                System 
		Contains  condition = And [ Planet 
			HasSpecial name = "TEMPORAL_ANOMALY_SPECIAL" ]            
            
             ]

	    stackinggroup = "STEALTH_GG_STACK"
            accountinglabel = "TEMPORAL_ANOMALY_STEALTH"
            effects = SetStealth value = Value + 60 // The ship is able to exist in a somehow different spacetime due to the Temporal anomaly affecting the planet


        EffectsGroup
            scope = Source


            activation = 
		ContainedBy And [
                System 
		Contains  condition = And [ Planet 
			Planet type = Asteroids 
			Or [
		HasSpecial 	name =  "SUPERCONDUCTOR_SPECIAL"
		HasSpecial 	name = "MONOPOLE_SPECIAL"
            ]
		]
		]
	    // stackinggroup = "MAGNETIZED_ASTEROID_SPECIAL_STACK"
            accountinglabel = "MAGNETIZED_ASTEROID_DISRUPTION"
       	    effects = [
                SetMaxSecondaryStat partname = "SR_ARC_DISRUPTOR" value = Value + 6
                SetSecondaryStat partname = "SR_ARC_DISRUPTOR" value = Value + 6
            ] // Bounces the shots over the charged space created by the Monopole Magnets / the Superconductors deposits in the Asteroid Belt





    ]
    icon = "icons/ship_parts/cyberneticcore.png"


#include "/scripting/common/upkeep.macros"

I'm quite proud of some of these effects, but not completely sure about the part as a whole. If anybody has good ideas to balance it, I'm all ears.

I was able to test all of these parts, but for the Cybernetic Core only for some of its effects (I didn't have any Temporal Anomaly in any of my test game, for example).

I'm certainly not the best for icons, so if someone can make some good ones for these parts, that'll be a boon.

(all my work here is GPL 3)

¹Yes I know that there's very good reasons for them not to stack, but it still is somewhat frustrating for the player.
Attachments
SHP_SOLAR_SAILS.focs.txt
(465 Bytes) Downloaded 53 times
SHP_SLINGHSHOT.focs.txt
(481 Bytes) Downloaded 59 times
SHP_LAVA_SUPRACONDUCTION_GENERATION.focs.txt
(533 Bytes) Downloaded 52 times
SHP_CYBERNETIC.focs.txt
(469 Bytes) Downloaded 62 times
slinghshot calculator.png
slinghshot calculator.png (19.66 KiB) Viewed 2576 times

User avatar
LienRag
Cosmic Dragon
Posts: 2146
Joined: Fri May 17, 2019 5:03 pm

Re: Situational Speed

#2 Post by LienRag »

One thing about the UI : for the Slingshot Calculator and the Lava Supraconduction Generator, there is a "+0" effect that appears when they do not provide any bonus (because they are in a situation where no bonus appears).

This is not a problem, of course.

The problem is that when they do provide a bonus, there is this "+0" line, and then another line "+N" (N being obviously the situational bonus), both lines being attributed to the Slingshot or the Lava, respectively.

Any way to avoid that ?

User avatar
LienRag
Cosmic Dragon
Posts: 2146
Joined: Fri May 17, 2019 5:03 pm

Re: Situational Speed

#3 Post by LienRag »

From my tests (and calculations, since not every Galaxy has the perfect setting for combining these situational speeds), a fully-sailing Solar Hull (with just three non-sail external parts) starting in a system with a Blue Star, and bearing all other Speed parts, would have a total Speed of around 400 (if there are no Asteroid Belts in the system and a few Large planets - especially Infernos - or Gas Giants).

Obviously, such a ship would have very little punch and/or armor, for an extremely high cost.

So I'm not sure that it's that unbalanced ?

User avatar
LienRag
Cosmic Dragon
Posts: 2146
Joined: Fri May 17, 2019 5:03 pm

Re: Situational Speed

#4 Post by LienRag »

Also, I used in the FOCS code the condition "Scope = source" and "Activation = Contained by And [System contains ***** type = ****]"

That means that the ships get the bonus only when they start exactly on a system, not if they pass by in travel.

Since it's Situational Speed, I obviously want the speed to depend on the system, but not necessarily to force the player to stop at each system to restart his trip with the right bonus.

So I probably should have used a WithinDistance¹ condition, but then I don't know how to calculate the StatisticSumValue ? What will be the LocalCandidate then ?


¹ I guess a WithinDistance of 10 would be best ? Or should I use 50 like for the Interstellar Lighthouse ?

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Situational Speed

#5 Post by Ophiuchus »

LienRag wrote: Mon May 24, 2021 6:45 pm Since it's Situational Speed, I obviously want the speed to depend on the system, but not necessarily to force the player to stop at each system to restart his trip with the right bonus.
You could maybe use the NextSystemID valueref to use the sun of the next system you are passing by if you in flight. So you could plot a fast course without needing to care about stops.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

Post Reply