Sid Meier's Civilization VI

Sid Meier's Civilization VI

Angryr's Ancient Policies
pauloel7 2019 年 4 月 17 日 下午 12:09
God King
I tried to mix up this policy versions but incurred into some issue I cannot find/resolve. Modding.log shows this message right below GodKing.sql line: " Warning: UpdateDatabase - Error Loading SQL." I'm posting the code below. If you could take a look and let me know what's the necessary fix, please do, thank you!
< >
正在显示第 1 - 4 条,共 4 条留言
pauloel7 2019 年 4 月 17 日 下午 12:09 
-- GodKing
-- Author: Angryr
-- DateCreated: 4/8/2017 11:47:01 PM
--------------------------------------------------------------
-- To restore old version (+1 Gold and +1 Faith in all cities) replace the code below with the commented out code at the bottom of the file.
-- Same with GodKing_Text.sql
--------------------------------------------------------------

------------------------------
-- God King
-- +1 Amentity in the Capital.
------------------------------

-- Create the requirement that the city requires a palace (surprisingly it doesn't exist yet).
INSERT INTO Requirements (RequirementId, RequirementType)
VALUES
('REQUIREMENT_CITY_HAS_PALACE', 'REQUIREMENT_CITY_HAS_BUILDING');

INSERT INTO RequirementArguments (ModifierId, Name, Value)
VALUES
('REQUIREMENT_CITY_HAS_PALACE', 'BuildingType', 'BUILDING_PALACE');

INSERT INTO RequirementSets (RequirementSetId, RequirementSetType)
VALUES
('CITY_HAS_PALACE', 'REQUIREMENTSET_TEST_ALL');

INSERT INTO RequirementSetRequirements
VALUES
('CITY_HAS_PALACE', 'REQUIREMENT_CITY_HAS_PALACE');

-- Create & attach the modifier for the "+1 amentity in the capital".
INSERT INTO Modifiers (ModifierId, ModifierType, SubjectRequirementSetId)
VALUES
('GOD_KING_AMENTITY', 'MODIFIER_PLAYER_CITIES_ADJUST_POLICY_AMENITY', 'CITY_HAS_PALACE');

INSERT INTO ModifierArguments (ModifierId, Name, Value)
VALUES,
('GOD_KING_AMENTITY', 'Amount', 1);

INSERT INTO PolicyModifiers (PolicyType, ModifierId)
VALUES
('POLICY_GOD_KING', 'GOD_KING_AMENTITY');

---------------------------------------
-- God King
-- +1 Gold and +1 Faith in ALL cities.
---------------------------------------

-- Remove the two existing "capital" modifiers.
DELETE FROM PolicyModifiers
WHERE ModifierId IN ('GOD_KING_GOLD', 'GOD_KING_FAITH');

-- Create & attach the modifier for the "+1 Gold in all cities" and the "+1 Faith in all cities".
INSERT INTO Modifiers (ModifierId, ModifierType)
VALUES
('GOD_KING_ALLCITYGOLD', 'MODIFIER_PLAYER_CITIES_ADJUST_CITY_YIELD_CHANGE'),
('GOD_KING_ALLCITYFAITH', 'MODIFIER_PLAYER_CITIES_ADJUST_CITY_YIELD_CHANGE');

INSERT INTO ModifierArguments (ModifierId, Name, Value)
VALUES
('GOD_KING_ALLCITYGOLD', 'YieldType', 'YIELD_GOLD'),
('GOD_KING_ALLCITYGOLD', 'Amount', 1),
('GOD_KING_ALLCITYFAITH', 'YieldType', 'YIELD_FAITH'),
('GOD_KING_ALLCITYFAITH', 'Amount', 1);

INSERT INTO PolicyModifiers (PolicyType, ModifierId)
VALUES
('POLICY_GOD_KING', 'GOD_KING_ALLCITYGOLD'),
('POLICY_GOD_KING', 'GOD_KING_ALLCITYFAITH');
pauloel7 2019 年 4 月 18 日 上午 5:05 
I suspect it's the new (first) code, 'cause I've tried commenting it out and it worked. Question remains, though, what is its rectification so we can get both working?
pauloel7 2019 年 4 月 18 日 上午 5:29 
Think I got it:

-- GodKing
-- Author: Angryr
-- DateCreated: 4/8/2017 11:47:01 PM
--------------------------------------------------------------
-- To restore old version (+1 Gold and +1 Faith in all cities) replace the code below with the commented out code at the bottom of the file.
-- Same with GodKing_Text.sql
--------------------------------------------------------------

------------------------------
-- God King
-- +1 Amentity in the Capital.
------------------------------

-- Create the requirement that the city requires a palace (surprisingly it doesn't exist yet).
INSERT INTO RequirementSets (RequirementSetId, RequirementSetType) VALUES
('A_CITY_HAS_PALACE', 'REQUIREMENTSET_TEST_ALL');

INSERT INTO RequirementSetRequirements (RequirementSetId, RequirementId) VALUES
('A_CITY_HAS_PALACE', 'A_REQ_CITY_HAS_PALACE');

INSERT INTO Requirements (RequirementId, RequirementType) VALUES
('A_REQ_CITY_HAS_PALACE', 'REQUIREMENT_CITY_HAS_BUILDING');

INSERT INTO RequirementArguments (RequirementId, Name, Value) VALUES
('A_REQ_CITY_HAS_PALACE', 'BuildingType', 'BUILDING_PALACE');

-- Create & attach the modifier for the "+1 amentity in the capital".
INSERT INTO Modifiers (ModifierId, ModifierType, SubjectRequirementSetId) VALUES
('GOD_KING_AMENTITY', 'MODIFIER_PLAYER_CITIES_ADJUST_POLICY_AMENITY', 'A_CITY_HAS_PALACE');

INSERT INTO ModifierArguments (ModifierId, Name, Value) VALUES
('GOD_KING_AMENTITY', 'Amount', 1);

INSERT INTO PolicyModifiers (PolicyType, ModifierId) VALUES
('POLICY_GOD_KING', 'GOD_KING_AMENTITY');

---------------------------------------
-- God King
-- +1 Gold and +1 Faith in ALL cities.
---------------------------------------

-- Remove the two existing "capital" modifiers.
DELETE FROM PolicyModifiers
WHERE ModifierId IN ('GOD_KING_GOLD', 'GOD_KING_FAITH');

-- Create & attach the modifier for the "+1 Gold in all cities" and the "+1 Faith in all cities".
INSERT INTO Modifiers (ModifierId, ModifierType)
VALUES
('GOD_KING_ALLCITYGOLD', 'MODIFIER_PLAYER_CITIES_ADJUST_CITY_YIELD_CHANGE'),
('GOD_KING_ALLCITYFAITH', 'MODIFIER_PLAYER_CITIES_ADJUST_CITY_YIELD_CHANGE');

INSERT INTO ModifierArguments (ModifierId, Name, Value)
VALUES
('GOD_KING_ALLCITYGOLD', 'YieldType', 'YIELD_GOLD'),
('GOD_KING_ALLCITYGOLD', 'Amount', 1),
('GOD_KING_ALLCITYFAITH', 'YieldType', 'YIELD_FAITH'),
('GOD_KING_ALLCITYFAITH', 'Amount', 1);

INSERT INTO PolicyModifiers (PolicyType, ModifierId)
VALUES
('POLICY_GOD_KING', 'GOD_KING_ALLCITYGOLD'),
('POLICY_GOD_KING', 'GOD_KING_ALLCITYFAITH');
pauloel7 2019 年 4 月 18 日 上午 5:30 
GodKing_Text.sql:

-- GodKing_Text
-- Author: Angryr
-- DateCreated: 4/8/2017 11:47:09 PM
--------------------------------------------------------------
-- To restore old version (+1 Gold and +1 Faith in all cities) replace the code below with the commented out code at the bottom of the file.
-- Same with GodKing.sql
--------------------------------------------------------------

UPDATE LocalizedText
SET Text = '+1[ICON_Gold] and +1[ICON_Faith] in all cities. +1[ICON_Amenities] in the [ICON_Capital] Capital.'
WHERE Tag = 'LOC_POLICY_GOD_KING_DESCRIPTION'
AND Language = 'en_US';
< >
正在显示第 1 - 4 条,共 4 条留言
每页显示数: 1530 50