Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imperial stockpile round 3 #1928

Merged
merged 38 commits into from Jan 9, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
a3882b0
Adds a stockpile meter to planets.
geoffthemedio Dec 27, 2017
33c7b1f
Trace logger dump of species during init.
geoffthemedio Dec 28, 2017
1de3ca3
Add stockpile meter to Planet::NextTurnCurrentMeterValue.
geoffthemedio Dec 28, 2017
0ed20e7
-Added stockpile setting macros and related stringtable entries.
geoffthemedio Dec 28, 2017
49391f4
grooming
geoffthemedio Dec 28, 2017
c1f1ecf
Remove as-yet-unused trace from resource panel.
geoffthemedio Dec 28, 2017
58bad65
Added stockpile macros to species. Mostly average, a few great / ulti…
geoffthemedio Dec 28, 2017
9165658
trivial grooming
geoffthemedio Dec 29, 2017
cb36807
Added stockpile meters to GetMeterNameMap.
geoffthemedio Dec 29, 2017
638b574
Trace effects logging in SetActiveMetersToTargetMaxCurrentValues.
geoffthemedio Dec 29, 2017
c8a03a6
grooming
geoffthemedio Dec 29, 2017
002a439
Resetting max stockpile in Planet::ResetTargetMaxUnpairedMeters.
geoffthemedio Dec 29, 2017
5bfb7c3
Trace effects logging before and after first turn SetActiveMetersToTa…
geoffthemedio Dec 29, 2017
8422f09
grooming
geoffthemedio Dec 29, 2017
fd8cf10
Removed unnecessary Source conditions.
geoffthemedio Dec 30, 2017
aa9fb0b
Made stockpile effectsgroups early priority.
geoffthemedio Dec 30, 2017
75c50e3
Removed BuildingType dump info from Building dump info. Was spamming …
geoffthemedio Dec 30, 2017
5ba37d4
Removed redundant block of code resetting stealth meters in Planet code.
geoffthemedio Dec 30, 2017
c6443ef
Effect trace logging tweaks.
geoffthemedio Dec 30, 2017
9e93e41
Removed unused stocokpile location id being passed around.
geoffthemedio Dec 30, 2017
5ecc228
Added stockpile focus icon.
geoffthemedio Dec 31, 2017
be8bd38
-Removed transfer limit and efficiency meters.
geoffthemedio Dec 31, 2017
4f7e4e3
Fixed stockping input limit.
geoffthemedio Dec 31, 2017
a24b5e5
Correctly take preferred focus happiness into account for academy
Dec 19, 2017
b33ca86
Add the SP_SLY
Dec 23, 2017
5def8ed
Add missing colony building/script for SP_SLY
Dec 24, 2017
00d030b
Unlock BLD_COL_SLY on start
Jan 7, 2018
2a40260
Halve the GAS_GIANT_GENerator bonus on gas giants
Jan 8, 2018
0a2278b
Remove stockpile efficiency info from waste info
Dec 26, 2017
2a82de3
Move stockpile_focus to all species, add void prediction tech
Jan 7, 2018
71e1717
Adjust stringtables for Sly and new meter values
Jan 7, 2018
d564d78
Add flux bubble hull
Jan 2, 2018
c4bdc77
Adjust stringtables for flux bubble hull
Jan 7, 2018
f5afa77
Use two effectGroups instead of 'if' in GAS_GIANT_GEN
Jan 8, 2018
22f75d9
Fix freak newline occurence
Jan 8, 2018
cb4bfb3
Nerf the Sly - BAD_RESEARCH
Jan 8, 2018
6586340
Simplify VOID_PREDICTION and depend on GENERIC_SUPPLIES
Jan 8, 2018
033738b
Fix some stockpile related stringtable entries
Jan 9, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 15 additions & 2 deletions default/scripting/buildings/INTERSPECIES_ACADEMY.focs.txt
@@ -1,7 +1,7 @@
BuildingType
name = "BLD_INTERSPECIES_ACADEMY"
description = "BLD_INTERSPECIES_ACADEMY_DESC"
buildcost = 30
buildcost = 50
buildtime = 5
location = AND [
// Homeworld
Expand Down Expand Up @@ -72,13 +72,26 @@ BuildingType
scope = And [
Object id = Source.PlanetID
Planet
Focus type = "FOCUS_STOCKPILE"
OwnedBy empire = Source.Owner
Species
]
activation = Source
accountinglabel = "INTERSPECIES_ACADEMY_LABEL"
priority = [[LATE_PRIORITY]]
effects = SetStockpile value = Value + 3
effects = SetStockpile value = Value + 10
EffectsGroup
scope = And [
Object id = Source.PlanetID
Planet
Focus type = "FOCUS_RESEARCH"
OwnedBy empire = Source.Owner
Species
]
activation = Source
accountinglabel = "INTERSPECIES_ACADEMY_LABEL"
priority = [[LATE_PRIORITY]]
effects = SetResearch value = Value + 5

]
icon = "icons/building/science-institute.png"
Expand Down
3 changes: 1 addition & 2 deletions default/scripting/species/SP_LAENFA.focs.txt
Expand Up @@ -10,7 +10,6 @@ Species

foci = [
[[HAS_INDUSTRY_FOCUS]]
[[HAS_STOCKPILE_FOCUS]]
[[HAS_RESEARCH_FOCUS]]
[[HAS_GROWTH_FOCUS]]
[[HAS_ADVANCED_FOCI]]
Expand All @@ -21,7 +20,7 @@ Species
effectsgroups = [
[[AVERAGE_INDUSTRY]]
[[AVERAGE_RESEARCH]]
[[GREAT_STOCKPILE]]
[[GOOD_STOCKPILE]]

[[GOOD_POPULATION]]
[[AVERAGE_HAPPINESS]]
Expand Down
14 changes: 6 additions & 8 deletions default/scripting/species/common/focus.macros
Expand Up @@ -6,14 +6,6 @@ HAS_INDUSTRY_FOCUS
graphic = "icons/focus/industry.png"
'''

HAS_STOCKPILE_FOCUS
''' Focus
name = "FOCUS_STOCKPILE"
description = "FOCUS_STOCKPILE_DESC"
location = Planet
graphic = "icons/focus/stockpile.png"
'''

HAS_RESEARCH_FOCUS
''' Focus
name = "FOCUS_RESEARCH"
Expand Down Expand Up @@ -57,6 +49,12 @@ HAS_ADVANCED_FOCI
location = OwnerHasTech name = "SHP_INTSTEL_LOG"
graphic = "icons/focus/supply.png"

Focus
name = "FOCUS_STOCKPILE"
description = "FOCUS_STOCKPILE_DESC"
location = OwnerHasTech name = "PRO_GENERIC_SUPPLIES"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to tweak the descriptions in a few places to make it clear this tech is required. Maybe also make it a prereq for Void Prediction...?

graphic = "icons/focus/stockpile.png"

Focus
name = "FOCUS_STEALTH"
description = "FOCUS_STEALTH_DESC"
Expand Down
33 changes: 17 additions & 16 deletions default/scripting/species/common/stockpile.macros
Expand Up @@ -2,31 +2,32 @@ NO_STOCKPILE
'''
'''

BAD_STOCKPILE
'''[[STOCKPILE_PER_POP_EFFECTSGROUP(BAD,Value + 0.5 * Target.Population * [[STOCKPILE_PER_POP]])]]
'''

AVERAGE_STOCKPILE
''' EffectsGroup
scope = Source
activation = Planet
accountinglabel = "AVERAGE_STOCKPILE_LABEL"
priority = [[EARLY_PRIORITY]]
effects = SetMaxStockpile value = Value + Target.Population * [[STOCKPILE_PER_POP]] * [[AVERAGE_MULTIPLIER]]
'''[[STOCKPILE_PER_POP_EFFECTSGROUP(AVERAGE,Value + 1 * Target.Population * [[STOCKPILE_PER_POP]])]]
'''

GOOD_STOCKPILE
'''[[STOCKPILE_PER_POP_EFFECTSGROUP(GOOD,Value + 3 * Target.Population * [[STOCKPILE_PER_POP]])]]
'''

GREAT_STOCKPILE
''' EffectsGroup
description = "GREAT_STOCKPILE_DESC"
scope = Source
activation = Planet
accountinglabel = "GREAT_STOCKPILE_LABEL"
priority = [[EARLY_PRIORITY]]
effects = SetMaxStockpile value = Value + Target.Population * [[STOCKPILE_PER_POP]] * [[GREAT_MULTIPLIER]]
'''[[STOCKPILE_PER_POP_EFFECTSGROUP(GREAT,Value + 5 * Target.Population * [[STOCKPILE_PER_POP]])]]
'''

ULTIMATE_STOCKPILE
'''[[STOCKPILE_PER_POP_EFFECTSGROUP(ULTIMATE_STOCKPILE, Value + 15 * Target.Population * [[STOCKPILE_PER_POP]])]]
'''

STOCKPILE_PER_POP_EFFECTSGROUP
''' EffectsGroup
description = "ULTIMATE_STOCKPILE_DESC"
description = "@1@_STOCKPILE_DESC"
scope = Source
activation = Planet
accountinglabel = "ULTIMATE_STOCKPILE_LABEL"
accountinglabel = "@1@_STOCKPILE_LABEL"
priority = [[EARLY_PRIORITY]]
effects = SetMaxStockpile value = Value + Target.Population * [[STOCKPILE_PER_POP]] * [[ULTIMATE_MULTIPLIER]]
effects = SetMaxStockpile value = @2@
'''
5 changes: 4 additions & 1 deletion default/scripting/techs/production/GENERIC_SUPPLIES.focs.txt
Expand Up @@ -15,7 +15,10 @@ Tech
scope = And [
ProductionCenter
OwnedBy empire = Source.Owner
Focus type = "FOCUS_STOCKPILE"
Or [
Focus type = "FOCUS_GROWTH"
Focus type = "FOCUS_STOCKPILE"
]
]
effects = SetMaxStockpile value = Value + 3
]
Expand Down
Expand Up @@ -12,9 +12,13 @@ Tech
scope = And [
ProductionCenter
OwnedBy empire = Source.Owner
Focus type = "FOCUS_STOCKPILE"
Or [
Focus type = "FOCUS_GROWTH"
Focus type = "FOCUS_STOCKPILE"
]
]
effects = SetMaxStockpile value = Value + 3
effects = [SetMaxStockpile value = Value + 1
GiveEmpireTech name = "SHP_SPACE_FLUX_BUBBLE"]
]

#include "/scripting/common/priorities.macros"
35 changes: 35 additions & 0 deletions default/scripting/techs/production/VOID_PREDICTION.focs.txt
@@ -0,0 +1,35 @@
Tech
name = "PRO_VOID_PREDICTION"
description = "PRO_VOID_PREDICTION_DESC"
short_description = "IMPERIAL_STOCKPILE_SHORT_DESC"
category = "PRODUCTION_CATEGORY"
researchcost = 500 * [[TECH_COST_MULTIPLIER]]
researchturns = 7
tags = [ "PEDIA_PRODUCTION_CATEGORY" ]
prerequisites = [
"LRN_MIND_VOID"
"PRO_PREDICTIVE_STOCKPILING"
]
effectsgroups = [
EffectsGroup
scope = And [
ProductionCenter
OwnedBy empire = Source.Owner
NOT Population high = 0
Or [
Focus type = "FOCUS_GROWTH"
Focus type = "FOCUS_LOGISTICS"
Focus type = "FOCUS_STOCKPILE"
]
]
effects = [
SetMaxStockpile value = Value + Target.Population * [[STOCKPILE_PER_POP]] * ( 1
+ 10 * (Statistic If Condition = Focus type = "FOCUS_STOCKPILE")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why dependent on growth or logistics focus?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea was to make the techs independent of the focus, just work better if you combine them.
If we dont want such a thing, PRO_GENERIC_SUPPLIES should be a prereq.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a focus specifically for stockpiling, and the logistics and growth focuses are for other purposes. Doesn't make sense to me to have stockpile related effects depend on them.

+ 5 * (Statistic If Condition = Focus type = "FOCUS_GROWTH")
+ 5 * (Statistic If Condition = Focus type = "FOCUS_LOGISTICS")
)
]
]

#include "/scripting/species/common/stockpile.macros"
#include "/scripting/common/base_prod.macros"