Modifier関連項目の繋がり方

MODで新しく特殊効果を出すためにModifierを追加するには
数多くの項目を追加する必要が出てくる

Modifierの追加例

INSERT INTO Types (Type, Kind)
VALUES ('TRAIT_GRASS_FOOD', 'KIND_TRAIT')
;
INSERT INTO Traits (TraitType, Name, Description)
VALUES ('TRAIT_GRASS_FOOD', 'LOC_TRAIT_GRASS_FOOD_NAME', 'LOC_TRAIT_GRASS_FOOD_DESCRIPTION')
;
INSERT INTO CivilizationTraits (CivilizationType, TraitType)
VALUES ('CIVILIZATION_JAPAN', 'TRAIT_GRASS_FOOD')
;

INSERT INTO Modifiers (ModifierId, ModifierType, SubjectRequirementSetId)
VALUES ('TRAIT_INCREASED_GRASS_FOOD', 'MODIFIER_PLAYER_ADJUST_PLOT_YIELD', 'PLOT_HAS_GRASS_REQUIREMENTS')
;
INSERT INTO ModifierArguments (ModifierId, Name, Value)
VALUES
	('TRAIT_INCREASED_GRASS_FOOD', 'YieldType', 'YIELD_FOOD')
,	('TRAIT_INCREASED_GRASS_FOOD', 'Amount', 1)
;

INSERT INTO TraitModifiers (TraitType, ModifierId)
VALUES ('TRAIT_GRASS_FOOD', 'TRAIT_INCREASED_GRASS_FOOD')
;

INSERT INTO RequirementSets (RequirementSetId, RequirementSetType)
VALUES ('PLOT_HAS_GRASS_REQUIREMENTS', 'REQUIREMENTSET_TEST_ANY')
;
INSERT INTO RequirementSetRequirements (RequirementSetId, RequirementId)
VALUES
	('PLOT_HAS_GRASS_REQUIREMENTS', 'REQUIRES_PLOT_HAS_GRASS')
,	('PLOT_HAS_GRASS_REQUIREMENTS', 'REQUIRES_PLOT_HAS_GRASS_HILLS')
;
INSERT INTO Requirements (RequirementId, RequirementType)
VALUES
	('REQUIRES_PLOT_HAS_GRASS', 'REQUIREMENT_PLOT_TERRAIN_TYPE_MATCHES')
,	('REQUIRES_PLOT_HAS_GRASS_HILLS', 'REQUIREMENT_PLOT_TERRAIN_TYPE_MATCHES')
;
INSERT INTO RequirementArguments (RequirementId, Name, Value)
VALUES
	('REQUIRES_PLOT_HAS_GRASS', 'TerrainType', 'TERRAIN_GRASS')
,	('REQUIRES_PLOT_HAS_GRASS_HILLS', 'TerrainType', 'TERRAIN_GRASS_HILLS')
;

上記の内容をMODで追加すると
日本文明に"日本の領土内の草原もしくは草原(丘陵)タイルに食料+1"の文明特性が追加される

各項目の繋がり方

上記の文明特性1つ追加に対して
各項目がどういう位置づけでどう繋がっているかを図解すると

CivilizationTraits CivilizationType CIVILIZATION_JAPAN TraitType TRAIT_GRASS_FOOD Traits TraitType TRAIT_GRASS_FOOD Name LOC_TRAIT_GRASS_FOOD_NAME Description LOC_TRAIT_GRASS_FOOD_DESCRIPTION Types Type TRAIT_GRASS_FOOD Kind KIND_TRAIT TraitModifiers TraitType TRAIT_GRASS_FOOD ModifierId TRAIT_INCREASED_GRASS_FOOD Modifiers ModifierId TRAIT_INCREASED_GRASS_FOOD ModifierType MODIFIER_PLAYER_ADJUST_PLOT_YIELD SubjectRequirementSetId PLOT_HAS_GRASS_REQUIREMENTS ModifierArguments ModifierId TRAIT_INCREASED_GRASS_FOOD Name YieldType Value YIELD_FOOD ModifierArguments ModifierId TRAIT_INCREASED_GRASS_FOOD Name Amount Value 1 RequirementSets RequirementSetId PLOT_HAS_GRASS_REQUIREMENTS RequirementSetType REQUIREMENTSET_TEST_ANY RequirementSetRequirements RequirementSetId PLOT_HAS_GRASS_REQUIREMENTS RequirementId REQUIRES_PLOT_HAS_GRASS RequirementSetRequirements RequirementSetId PLOT_HAS_GRASS_REQUIREMENTS RequirementId REQUIRES_PLOT_HAS_GRASS_HILLS Requirements RequirementId REQUIRES_PLOT_HAS_GRASS RequirementType REQUIREMENT_PLOT_TERRAIN_TYPE_MATCHES Requirements RequirementId REQUIRES_PLOT_HAS_GRASS_HILLS RequirementType REQUIREMENT_PLOT_TERRAIN_TYPE_MATCHES RequirementArguments RequirementId REQUIRES_PLOT_HAS_GRASS Name TerrainType Value TERRAIN_GRASS RequirementArguments RequirementId REQUIRES_PLOT_HAS_GRASS_HILLS Name TerrainType Value TERRAIN_GRASS_HILLS ↓日本に特性をセット Trait(特性)にModifierをセット→ ↓領土内のタイルの産出量を調整 [産出物:食料] [産出量:+1] ↑必要条件 ※ANYはセットしたどれか1つの条件を  満たせばSets全体の条件クリア ※ALLはセットした全ての条件を  満たせばSets全体の条件クリア ↓地形の種類があってれば条件クリア [地形の種類:草原] [地形の種類:草原(丘陵)]
[枠内クリックで進行]

全体図(svg)

※旧図解