-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathreal_fixes_start_biases.sql
55 lines (47 loc) · 2.84 KB
/
real_fixes_start_biases.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
--------------------------------------------------------------
-- Real Fixes
-- Author: Infixo
-- 2019-03-27: Fixes and tweaks for Start Biases (lower number = stronger bias)
-- 2023-04-04: Review, on/off option, support for BBS
--------------------------------------------------------------
-- Set to '0' to disable Start Bias changes
INSERT INTO GlobalParameters (Name, Value) VALUES ('RFX_OPTION_STARTS', '1');
--------------------------------------------------------------
-- AUSTRALIA
UPDATE StartBiasResources SET Tier = 4 WHERE CivilizationType = 'CIVILIZATION_AUSTRALIA' -- IMPROVEMENT_PASTURE: RESOURCE_CATTLE, RESOURCE_HORSES, RESOURCE_SHEEP
AND EXISTS (SELECT 1 FROM GlobalParameters WHERE Name = 'RFX_OPTION_STARTS' AND Value = '1');
-- ENGLAND
UPDATE StartBiasResources SET Tier = 4 WHERE CivilizationType = 'CIVILIZATION_ENGLAND' -- RESOURCE_COAL, RESOURCE_IRON
AND EXISTS (SELECT 1 FROM GlobalParameters WHERE Name = 'RFX_OPTION_STARTS' AND Value = '1');
-- GEORGIA
INSERT OR IGNORE INTO StartBiasTerrains (CivilizationType, TerrainType, Tier)
SELECT 'CIVILIZATION_GEORGIA', TerrainType, 4
FROM Terrains
WHERE Hills = 1 AND TerrainType <> 'TERRAIN_SNOW_HILLS' AND EXISTS (SELECT 1 FROM Civilizations WHERE CivilizationType = 'CIVILIZATION_GEORGIA')
AND EXISTS (SELECT 1 FROM GlobalParameters WHERE Name = 'RFX_OPTION_STARTS' AND Value = '1');
-- INDIA
INSERT OR IGNORE INTO StartBiasTerrains (CivilizationType, TerrainType, Tier)
SELECT 'CIVILIZATION_INDIA', TerrainType, 5
FROM Improvement_ValidTerrains
WHERE ImprovementType = 'IMPROVEMENT_STEPWELL' AND TerrainType <> 'TERRAIN_SNOW'
AND EXISTS (SELECT 1 FROM GlobalParameters WHERE Name = 'RFX_OPTION_STARTS' AND Value = '1');
-- NORWAY
INSERT OR IGNORE INTO StartBiasFeatures (CivilizationType, FeatureType, Tier)
SELECT 'CIVILIZATION_NORWAY', 'FEATURE_FOREST', 5
FROM Civilizations
WHERE EXISTS (SELECT 1 FROM GlobalParameters WHERE Name = 'RFX_OPTION_STARTS' AND Value = '1');
-- SCOTLAND
INSERT OR IGNORE INTO StartBiasTerrains (CivilizationType, TerrainType, Tier)
SELECT 'CIVILIZATION_SCOTLAND', TerrainType, 4
FROM Terrains
WHERE Hills = 1 AND TerrainType <> 'TERRAIN_SNOW_HILLS' AND EXISTS (SELECT * FROM Civilizations WHERE CivilizationType = 'CIVILIZATION_SCOTLAND')
AND EXISTS (SELECT 1 FROM GlobalParameters WHERE Name = 'RFX_OPTION_STARTS' AND Value = '1');
-- SPAIN
UPDATE StartBiasTerrains SET Tier = 4 WHERE CivilizationType = 'CIVILIZATION_SPAIN' AND TerrainType = 'TERRAIN_COAST'
AND EXISTS (SELECT 1 FROM GlobalParameters WHERE Name = 'RFX_OPTION_STARTS' AND Value = '1');
-- SUMERIA
INSERT OR IGNORE INTO StartBiasTerrains (CivilizationType, TerrainType, Tier)
SELECT 'CIVILIZATION_SUMERIA', TerrainType, 5
FROM Improvement_ValidTerrains
WHERE ImprovementType = 'IMPROVEMENT_ZIGGURAT' AND TerrainType <> 'TERRAIN_SNOW'
AND EXISTS (SELECT 1 FROM GlobalParameters WHERE Name = 'RFX_OPTION_STARTS' AND Value = '1');