Skip to content

Commit

Permalink
Add More Named values for pedia
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelCourtney committed Oct 20, 2022
1 parent fec33c2 commit dfe2a07
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 18 deletions.
10 changes: 5 additions & 5 deletions default/scripting/specials/planet/FORTRESS.focs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ Special
Species
]
effects = [
SetMaxShield value = Value + ( 100 * [[PLANET_SHIELD_FACTOR]] )
SetMaxDefense value = Value + ( 30 * [[PLANET_DEFENSE_FACTOR]] )
SetMaxTroops value = Value + 30
SetDetection value = Value + 30
SetMaxShield value = Value + (NamedReal name = "FORTRESS_SPECIAL_SHIELD_BONUS" value = (100 * [[PLANET_SHIELD_FACTOR]] ))
SetMaxDefense value = Value + (NamedReal name = "FORTRESS_SPECIAL_DEFENSE_BONUS" value = (30 * [[PLANET_DEFENSE_FACTOR]] ))
SetMaxTroops value = Value + (NamedReal name = "FORTRESS_SPECIAL_TROOPS_BONUS" value = 30)
SetDetection value = Value + (NamedReal name = "FORTRESS_SPECIAL_DETECTION_BONUS" value = 30)

//Regeneration
SetShield value = Value + ( min(5.0, max(Value, 0.25*Target.Construction)) * [[PLANET_SHIELD_FACTOR]] )
SetDefense value = Value + ( 1 * [[PLANET_DEFENSE_FACTOR]] )
SetDefense value = Value + (NamedReal name = "FORTRESS_SPECIAL_DEFENSE_REGEN" value = ( 1 * [[PLANET_DEFENSE_FACTOR]] ))
]
[[EG_SYSTEM_MINES(3,70,SOURCE)]] //Priority deliberately not a macro

Expand Down
18 changes: 13 additions & 5 deletions default/scripting/techs/defense/BarrierShield.focs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
scope=Planet() & OwnedBy(empire=Source.Owner),
accountinglabel="DEF_TECH_ACCOUNTING_LABEL",
priority=DEFAULT_PRIORITY,
effects=SetMaxShield(value=Value + (30 * PLANET_SHIELD_FACTOR)),
effects=SetMaxShield(value=Value + NamedReal(name="DEF_PLAN_BARRIER_SHLD_1_MAX_SHIELD_FLAT", value=30 * PLANET_SHIELD_FACTOR)),
),
EffectsGroup(
scope=Planet() & OwnedBy(empire=Source.Owner) & (LocalCandidate.LastTurnAttackedByShip < CurrentTurn - 1),
Expand Down Expand Up @@ -47,7 +47,9 @@
scope=Planet() & OwnedBy(empire=Source.Owner),
accountinglabel="DEF_TECH_ACCOUNTING_LABEL",
priority=DEFAULT_PRIORITY,
effects=SetMaxShield(value=Value + (60 * PLANET_SHIELD_FACTOR)),
effects=SetMaxShield(
value=Value + NamedReal(name="DEF_PLAN_BARRIER_SHLD_2_MAX_SHIELD_FLAT", value=60 * PLANET_SHIELD_FACTOR)
),
),
EffectsGroup(
scope=Planet() & OwnedBy(empire=Source.Owner) & (LocalCandidate.LastTurnAttackedByShip < CurrentTurn - 1),
Expand Down Expand Up @@ -80,7 +82,9 @@
scope=Planet() & OwnedBy(empire=Source.Owner),
accountinglabel="DEF_TECH_ACCOUNTING_LABEL",
priority=DEFAULT_PRIORITY,
effects=SetMaxShield(value=Value + (90 * PLANET_SHIELD_FACTOR)),
effects=SetMaxShield(
value=Value + NamedReal(name="DEF_PLAN_BARRIER_SHLD_3_MAX_SHIELD_FLAT", value=90 * PLANET_SHIELD_FACTOR)
),
),
EffectsGroup(
scope=Planet() & OwnedBy(empire=Source.Owner) & (LocalCandidate.LastTurnAttackedByShip < CurrentTurn - 1),
Expand Down Expand Up @@ -113,7 +117,9 @@
scope=Planet() & OwnedBy(empire=Source.Owner),
accountinglabel="DEF_TECH_ACCOUNTING_LABEL",
priority=DEFAULT_PRIORITY,
effects=SetMaxShield(value=Value + (150 * PLANET_SHIELD_FACTOR)),
effects=SetMaxShield(
value=Value + NamedReal(name="DEF_PLAN_BARRIER_SHLD_4_MAX_SHIELD_FLAT", value=150 * PLANET_SHIELD_FACTOR)
),
),
EffectsGroup(
scope=Planet() & OwnedBy(empire=Source.Owner) & (LocalCandidate.LastTurnAttackedByShip < CurrentTurn - 1),
Expand Down Expand Up @@ -146,7 +152,9 @@
scope=Planet() & OwnedBy(empire=Source.Owner),
accountinglabel="DEF_TECH_ACCOUNTING_LABEL",
priority=DEFAULT_PRIORITY,
effects=SetMaxShield(value=Value + (150 * PLANET_SHIELD_FACTOR)),
effects=SetMaxShield(
value=Value + NamedReal(name="DEF_PLAN_BARRIER_SHLD_5_MAX_SHIELD_FLAT", value=150 * PLANET_SHIELD_FACTOR)
),
),
EffectsGroup(
scope=Planet() & OwnedBy(empire=Source.Owner) & (LocalCandidate.LastTurnAttackedByShip < CurrentTurn - 1),
Expand Down
5 changes: 4 additions & 1 deletion default/scripting/techs/learning/FORCE_FIELD.focs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
scope=Planet() & OwnedBy(empire=Source.Owner),
stackinggroup="PLANET_SHIELDS_STACK_FF",
priority=DEFAULT_PRIORITY,
effects=SetMaxShield(value=Value + (10 * PLANET_SHIELD_FACTOR), accountinglabel="LRN_FORCE_FIELD"),
effects=SetMaxShield(
value=Value + NamedReal(name="LRN_FORCE_FIELD_MAX_SHIELD_FLAT", value=10 * PLANET_SHIELD_FACTOR),
accountinglabel="LRN_FORCE_FIELD"
),
)
],
graphic="icons/tech/forcefield_harmonics.png",
Expand Down
14 changes: 7 additions & 7 deletions default/stringtables/en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9646,7 +9646,7 @@ FORTRESS_SPECIAL
Fortress

FORTRESS_SPECIAL_DESC
'''Increases [[metertype METER_SHIELD]] by +800, [[metertype METER_DEFENSE]] by +180, [[metertype METER_TROOPS]] by +30 and [[metertype METER_DETECTION]] by +30. Shields will be regenerated by 40 per turn and Defense by 6 per turn. Mines will reduce the [[metertype METER_STRUCTURE]] of enemy ships in the system by 24 per turn. Every turn there is a 5% chance of a Sentry being spawned to protect the system, unless one is already present.
'''Increases [[metertype METER_SHIELD]] by +[[value FORTRESS_SPECIAL_SHIELD_BONUS]], [[metertype METER_DEFENSE]] by +[[value FORTRESS_SPECIAL_DEFENSE_BONUS]], [[metertype METER_TROOPS]] by +[[value FORTRESS_SPECIAL_TROOPS_BONUS]] and [[metertype METER_DETECTION]] by +[[value FORTRESS_SPECIAL_DETECTION_BONUS]]. Shields will be regenerated by 40 per turn and Defense by [[value FORTRESS_SPECIAL_DEFENSE_REGEN]] per turn. Mines will reduce the [[metertype METER_STRUCTURE]] of enemy ships in the system by 24 per turn. Every turn there is a 5% chance of a Sentry being spawned to protect the system, unless one is already present.

This planet has been prepared for defense by one of the ancient Precursor civilizations. It's brimming with planetary shields, weaponry and sensory equipment to withstand any kind of siege. Everything is still fully functional and surprisingly user friendly.'''

Expand Down Expand Up @@ -12885,7 +12885,7 @@ LRN_FORCE_FIELD
Force-Field Harmonics

LRN_FORCE_FIELD_DESC
'''Increases max [[metertype METER_SHIELD]] on all planets by 80 and unlocks basic ship shielding technology. [[metertype METER_SHIELD]] are generally much more expensive than armor, due to the technology needed to produce shielding fields, but shields provide a far stronger defense than [[encyclopedia ARMOR_TITLE]]. However, there can only be one active shield generator on a ship, so shield parts do not stack.
'''Increases max [[metertype METER_SHIELD]] on all planets by [[value LRN_FORCE_FIELD_MAX_SHIELD_FLAT]] and unlocks basic ship shielding technology. [[metertype METER_SHIELD]] are generally much more expensive than armor, due to the technology needed to produce shielding fields, but shields provide a far stronger defense than [[encyclopedia ARMOR_TITLE]]. However, there can only be one active shield generator on a ship, so shield parts do not stack.

Like Fourier analysis of sound, electromagnetism, strong and weak forces may be expressed as harmonic quantum standing-wave superpositions of force-carrier particles. By selectively amplifying these harmonics, forces may be arbitrarily controlled to shield, attack, contain or support.'''

Expand Down Expand Up @@ -13868,31 +13868,31 @@ DEF_PLAN_BARRIER_SHLD_1
Planetary Barrier Shield 1

DEF_PLAN_BARRIER_SHLD_1_DESC
Increases max [[metertype METER_SHIELD]] on planets by 240, cumulative with [[tech LRN_FORCE_FIELD]], and regenerates each turn by 8 plus the greater of (i) 2 times the value of the planets' [[metertype METER_CONSTRUCTION]] or (ii) 8 (so long as the shields are not already knocked to zero).
Increases max [[metertype METER_SHIELD]] on planets by [[value DEF_PLAN_BARRIER_SHLD_1_MAX_SHIELD_FLAT]], cumulative with [[tech LRN_FORCE_FIELD]], and regenerates each turn by 8 plus the greater of (i) 2 times the value of the planets' [[metertype METER_CONSTRUCTION]] or (ii) 8 (so long as the shields are not already knocked to zero).

DEF_PLAN_BARRIER_SHLD_2
Planetary Barrier Shield 2

DEF_PLAN_BARRIER_SHLD_2_DESC
Increases max [[metertype METER_SHIELD]] on planets by 480, cumulative with other shield boosts, and regenerates each turn by 8 plus the greater of (i) 8 times the value of the planets' [[metertype METER_CONSTRUCTION]] or (ii) 32 (so long as the shields are not already knocked below 24).
Increases max [[metertype METER_SHIELD]] on planets by [[value DEF_PLAN_BARRIER_SHLD_2_MAX_SHIELD_FLAT]], cumulative with other shield boosts, and regenerates each turn by 8 plus the greater of (i) 8 times the value of the planets' [[metertype METER_CONSTRUCTION]] or (ii) 32 (so long as the shields are not already knocked below 24).

DEF_PLAN_BARRIER_SHLD_3
Planetary Barrier Shield 3

DEF_PLAN_BARRIER_SHLD_3_DESC
Increases max [[metertype METER_SHIELD]] on planets by 720, cumulative with other shield boosts, and regenerates each turn by 8 plus the greater of (i) 16 times the value of the planets' [[metertype METER_CONSTRUCTION]] or (ii) 72 (so long as the shields are not already knocked below 40).
Increases max [[metertype METER_SHIELD]] on planets by [[value DEF_PLAN_BARRIER_SHLD_3_MAX_SHIELD_FLAT]], cumulative with other shield boosts, and regenerates each turn by 8 plus the greater of (i) 16 times the value of the planets' [[metertype METER_CONSTRUCTION]] or (ii) 72 (so long as the shields are not already knocked below 40).

DEF_PLAN_BARRIER_SHLD_4
Planetary Barrier Shield 4

DEF_PLAN_BARRIER_SHLD_4_DESC
Increases max [[metertype METER_SHIELD]] on planets by 1200, cumulative with other shield boosts, and regenerates each turn by 8 plus the greater of (i) 20 times the value of the planets' [[metertype METER_CONSTRUCTION]] or (ii) 144 (so long as the shields are not already knocked below 72).
Increases max [[metertype METER_SHIELD]] on planets by [[value DEF_PLAN_BARRIER_SHLD_4_MAX_SHIELD_FLAT]], cumulative with other shield boosts, and regenerates each turn by 8 plus the greater of (i) 20 times the value of the planets' [[metertype METER_CONSTRUCTION]] or (ii) 144 (so long as the shields are not already knocked below 72).

DEF_PLAN_BARRIER_SHLD_5
Planetary Barrier Shield 5

DEF_PLAN_BARRIER_SHLD_5_DESC
Increases max [[metertype METER_SHIELD]] on planets by an additional 1200, cumulative with other shield boosts and regenerates each turn by 8 plus the greater of (i) 40 times the value of the planets' [[metertype METER_CONSTRUCTION]] or (ii) 256 (so long as the shields are not already knocked below 112).
Increases max [[metertype METER_SHIELD]] on planets by an additional [[value DEF_PLAN_BARRIER_SHLD_5_MAX_SHIELD_FLAT]], cumulative with other shield boosts and regenerates each turn by 8 plus the greater of (i) 40 times the value of the planets' [[metertype METER_CONSTRUCTION]] or (ii) 256 (so long as the shields are not already knocked below 112).

DEF_SYST_DEF_MINE_1
System Defense Mines 1
Expand Down

0 comments on commit dfe2a07

Please sign in to comment.