Quick Modding Questions Thread

can anyone tell me how to update a schema file (Expansion2_Schema.sql) with a mod? I tried to use import but it didn't work. I'm not familiar with sql, and I'm gonna insert a new column into an existing table.
Code:
ALTER TABLE Buildings ADD IsDummy	boolean		NOT NULL CHECK (IsDummy IN (0,1))	default 0;
Has to be done as an UpdateDatabase Action-Type and the file must be an SQL file. You cannot alter a pre-existing table using XML.

Importing a file will have no effect -- you can only alter the Schema by an UpdateDatabase action, and you can only create entirely new tables like here
Code:
CREATE TABLE IF NOT EXISTS 
	DummyUnlocker_CityImprovedLocalResources (
	DummyBuildingType	text		REFERENCES Buildings(BuildingType)		default null,
	ResourceType		text		REFERENCES Resources(ResourceType)		default null,
	CustomModId		text);
Or you can alter an existing table as shown but you cannot otherwise re-define an existing gametable -- attempting to do so will merely cause the game to stop reading the SQL or XML file at that point in the code, rejecting that and all further contents of the file.

/ urp -- I didn't see that @Gedemon already answered with :ninja: speed .. I guess I need to get better glasses! /
 
Last edited:
Is there a way for a Project to require a building to run? I thought I had it working with adding the building in Project_XP2 but either my testing was wrong that stopped working. There is a RequiredBuilding now in Project table, but that doesn't have any effect.

For what it's worth i'm trying to add a project that requires the stave church.
 
Is it possible for a building to be unlocked with one tech/civic or another tech/civic? For example, Amphitheater can be unlocked by acquiring the Drama and Poetry civic, OR by acquiring the Feudalism civic?
 
Is it possible for a building to be unlocked with one tech/civic or another tech/civic? For example, Amphitheater can be unlocked by acquiring the Drama and Poetry civic, OR by acquiring the Feudalism civic?
No.

At least not by any direct methods in the Buildings table. The Prereq must be a single Civic or a single Technology.

It might be possible to create a workable solution that would not be bug happy using the new tables introduced by the Secret Societies (as I recall) that specify a building is unlocked by an effect -- which in terms of game-code is via a modifier. Whether or not the game would properly understand a CivicModifier that unlocked a building for a player or not is another issue.
 
Last edited:
If you are adding 3d model art for the buildings for example as replacements for standard buildings then you will have to make the district they are placed in reflect all the possible combinations of the two buildings plus the other buildings for that district so that the new 3d art assets all work together.

If you are not trying to add 3d model art then there's no real impediment so long as they'd be mutually exclusive.
 
is there a decent guide on how I'd go about duplicating something? Basically making like a library_2 or Archer_2. I spent a few hours and I'm having trouble finding out how to go about it (icons, and art assets for units if I duplicate them as well)

I won't be adding 3d models to buildings though.
 
Problems modifying promotion class because new promo class is added to meet with existing tag class.
Code:
[2479246.559] [Localization]: StartupErrorMessages.xml
[2479246.559] [Localization]: Input XML does not contain database entry tags. GameData, GameInfo or Database
[2479260.593] [Localization]: Validating Foreign Key Constraints...
[2479260.594] [Localization]: Passed Validation.
[2479260.629] [Configuration]: Validating Foreign Key Constraints...
[2479260.629] [Configuration]: Passed Validation.
[2479283.342] [FullTextSearch]: Initializing FullTextSearch
[2479286.576] [Gameplay]: Validating Foreign Key Constraints...
[2479286.614] [Gameplay]: Passed Validation.
[2479290.495] [Configuration]: Validating Foreign Key Constraints...
[2479290.498] [Configuration]: Passed Validation.
[2479296.930] [HallofFame]: Database found. Checking versions...
[2479296.956] [HallofFame]: Database is up-to-date!
[2479315.007] [FullTextSearch]: FTS - Creating Context
[2479434.527] [Configuration]: Validating Foreign Key Constraints...
[2479434.529] [Configuration]: Passed Validation.
[2479455.049] [Gameplay] ERROR: table Tags has no column named Type
[2479455.049] [Gameplay]: In Query - insert into Tags('Type', 'Kind') values (?, ?);
[2479455.049] [Gameplay]: In XMLSerializer while updating table Tags from file ZaabSpicey_UnitClass.xml.
[2479455.242] [Gameplay] ERROR: Database::XMLSerializer (ZaabSpicey_UnitPromotions.xml): Cannot parse file. Error at Line = 0, col = 0
[2479455.729] [Localization] ERROR: near "Delete": syntax error
[2479455.729] [Localization]: In Query - DELETE FROM LocalizedText WHERE Tag = ? AND Row = ? AND Delete = ?;
[2479455.729] [Localization] ERROR: Database::XMLSerializer (ZaabSpicey_UnitText.xml): There was an error executing the delete statement! See Database.log for details.
[2479455.729] [Localization]: In XMLSerializer while updating table LocalizedText from file ZaabSpicey_UnitText.xml.
[2479457.286] [Gameplay] ERROR: FOREIGN KEY constraint failed
[2479457.286] [Gameplay] ERROR: FOREIGN KEY constraint failed
[2479457.286] [Gameplay]: Validating Foreign Key Constraints...
[2479457.315] [Gameplay] ERROR: Invalid Reference on Units.PromotionClass - "PROMOTION_CLASS_INFANTRY" does not exist in UnitPromotionClasses
[2479457.315] [Gameplay] ERROR: Invalid Reference on Units.PromotionClass - "PROMOTION_CLASS_INFANTRY" does not exist in UnitPromotionClasses
[2479457.315] [Gameplay] ERROR: Invalid Reference on Units.PromotionClass - "PROMOTION_CLASS_INFANTRY" does not exist in UnitPromotionClasses
[2479457.315] [Gameplay] ERROR: Invalid Reference on Units.PromotionClass - "PROMOTION_CLASS_ANTITANK" does not exist in UnitPromotionClasses
[2479457.315] [Gameplay] ERROR: Invalid Reference on Units.PromotionClass - "PROMOTION_CLASS_TANK" does not exist in UnitPromotionClasses
[2479457.315] [Gameplay] ERROR: Invalid Reference on Units.PromotionClass - "PROMOTION_CLASS_INFANTRY" does not exist in UnitPromotionClasses
[2479457.315] [Gameplay] ERROR: Invalid Reference on Units.PromotionClass - "PROMOTION_CLASS_ANTITANK" does not exist in UnitPromotionClasses
[2479457.315] [Gameplay] ERROR: Invalid Reference on Units.PromotionClass - "PROMOTION_CLASS_INFANTRY" does not exist in UnitPromotionClasses
[2479457.315] [Gameplay] ERROR: Invalid Reference on Units.PromotionClass - "PROMOTION_CLASS_INFANTRY" does not exist in UnitPromotionClasses
[2479457.315] [Gameplay] ERROR: Invalid Reference on Units.PromotionClass - "PROMOTION_CLASS_ANTITANK" does not exist in UnitPromotionClasses
[2479457.315] [Gameplay] ERROR: Invalid Reference on Units.PromotionClass - "PROMOTION_CLASS_TANK" does not exist in UnitPromotionClasses
[2479457.315] [Gameplay] ERROR: Invalid Reference on Units.PromotionClass - "PROMOTION_CLASS_INFANTRY" does not exist in UnitPromotionClasses
[2479457.318] [Gameplay]: Failed Validation.
[2479469.049] [Configuration]: Validating Foreign Key Constraints...
[2479469.050] [Configuration]: Passed Validation.
[2479477.857] [FullTextSearch]: FTS - Creating Context
[2479505.709] [FullTextSearch]: FullTextSearch - Shutting down

Can any of you identify where in specific files did error occurs. in which table? (and this seems to affect other parts of the same file and other files as well)
https://drive.google.com/file/d/1_TqBi4KhhRpSI4VCQCg570VilKt0jjNf/view?usp=sharing

^ link to the problematic mod stored in my Google Drive
 
@Lonecat Nekophrodite - I've just had a really brief look (literally downloaded your files and opened the two that are explicitly called out by your error logs above) and there's one error I can immediately see in ZaabSpicey_UnitClass.xml:

Code:
[2479455.049] [Gameplay] ERROR: table Tags has no column named Type

This is indeed true. In your file, lines 15-17 have the following contents:

Code:
<Row Type="ABILITY_ANTITANK" Kind="KIND_ABILITY"/>
        <Row Type="ABILITY_LIGHT_ANTITANK" Kind="KIND_ABILITY"/>
        <Row Type="ABILITY_AT_KILLER" Kind="KIND_ABILITY"/>

...however, this is invalid. I think you intended to define these as new entries into the Types table, looking at the syntax you've used. You are attempting to define them as new Tags.

I will try and have a look at your files in detail later - but that's one small starter-for-ten.
 
^ One problem solved and game is running as normal ... until yet another edit to organize units and came a crashing problem
https://drive.google.com/file/d/1_TqBi4KhhRpSI4VCQCg570VilKt0jjNf/view?usp=sharing

Code:
[2659180.322] [Configuration]: Passed Validation.
[2659205.841] [FullTextSearch]: Initializing FullTextSearch
[2659208.336] [Gameplay]: Validating Foreign Key Constraints...
[2659208.372] [Gameplay]: Passed Validation.
[2659212.784] [Configuration]: Validating Foreign Key Constraints...
[2659212.785] [Configuration]: Passed Validation.
[2659217.659] [HallofFame]: Database found. Checking versions...
[2659217.672] [HallofFame]: Database is up-to-date!
[2659236.400] [FullTextSearch]: FTS - Creating Context
[2659254.491] [Configuration]: Validating Foreign Key Constraints...
[2659254.501] [Configuration]: Passed Validation.
[2659267.294] [Gameplay] ERROR: UNIQUE constraint failed: RequirementSetRequirements.RequirementSetId, RequirementSetRequirements.RequirementId
[2659267.294] [Gameplay]: While executing - 'insert into RequirementSetRequirements('RequirementSetId', 'RequirementId') values (?, ?);'
[2659267.294] [Gameplay]: In XMLSerializer while inserting row into table insert into RequirementSetRequirements('RequirementSetId', 'RequirementId') with  values (PDW_VS_MELEE_AND_ANTICAVALRY_REQUIREMENTS, PLAYER_IS_DEFENDER_REQUIREMENTS, ).
[2659267.294] [Gameplay]: In XMLSerializer while updating table RequirementSetRequirements from file ZaabSpicey_UnitPromotions.xml.
[2659267.294] [Gameplay] ERROR: UNIQUE constraint failed: RequirementSetRequirements.RequirementSetId, RequirementSetRequirements.RequirementId
[2659270.720] [Gameplay] ERROR: FOREIGN KEY constraint failed
[2659270.720] [Gameplay] ERROR: FOREIGN KEY constraint failed
[2659270.720] [Gameplay]: Validating Foreign Key Constraints...
[2659270.746] [Gameplay] ERROR: Invalid Reference on ModifierArguments.ModifierId - "ABILITY_ANTITANK" does not exist in Modifiers
[2659270.746] [Gameplay] ERROR: Invalid Reference on ModifierArguments.ModifierId - "ABILITY_AT_KILLER" does not exist in Modifiers
[2659270.746] [Gameplay] ERROR: Invalid Reference on ModifierArguments.ModifierId - "ABILITY_LIGHT_ANTITANK" does not exist in Modifiers
[2659270.751] [Gameplay] ERROR: Invalid Reference on RequirementSetRequirements.RequirementId - "OPPONENT_IS_TANK_REQUIREMENT" does not exist in Requirements
[2659270.751] [Gameplay] ERROR: Invalid Reference on RequirementSetRequirements.RequirementId - "OPPONENT_IS_TANK_REQUIREMENT" does not exist in Requirements
[2659270.751] [Gameplay] ERROR: Invalid Reference on RequirementSetRequirements.RequirementId - "FIRE_AND_ADVANCE_VS_OPPONENT_INFANTRY_REQUIREMENTS_MET" does not exist in Requirements
[2659270.751] [Gameplay] ERROR: Invalid Reference on RequirementSetRequirements.RequirementId - "OPPONENT_IS_INFANTRY_CLASS" does not exist in Requirements
[2659270.751] [Gameplay] ERROR: Invalid Reference on RequirementSetRequirements.RequirementId - "OPPONENT_HAS_LIGHT_AT" does not exist in Requirements
[2659270.762] [Gameplay]: Failed Validation.
[2659289.189] [Configuration]: Validating Foreign Key Constraints...
[2659289.191] [Configuration]: Passed Validation.
[2659293.152] [FullTextSearch]: FTS - Creating Context
[2659303.689] [FullTextSearch]: FullTextSearch - Shutting down

So an exact error spots in each respective mod files please.
 
^ One problem solved and game is running as normal ... until yet another edit to organize units and came a crashing problem
https://drive.google.com/file/d/1_TqBi4KhhRpSI4VCQCg570VilKt0jjNf/view?usp=sharing

So an exact error spots in each respective mod files please.

@Lonecat Nekophrodite - the following error:

Code:
[2659267.294] [Gameplay] ERROR: UNIQUE constraint failed: RequirementSetRequirements.RequirementSetId, RequirementSetRequirements.RequirementId

...is highlighting to you the fact that within your ZaabSpicey_UnitPromotions.xml, lines 333 and lines 335 describe a duplicated addition. Both of these lines are instructing the following to be inserted:

Code:
<Row> <RequirementSetId>PDW_VS_MELEE_AND_ANTICAVALRY_REQUIREMENTS</RequirementSetId> <RequirementId>PLAYER_IS_DEFENDER_REQUIREMENTS</RequirementId> </Row>

If you remove the contents of either line 333 or line 335, this should resolve. For info, the 'ERROR: UNIQUE constraint failed' almost always signals duplication of some kind that is not allowed.

--

For the following group of three errors:

Code:
[2659270.746] [Gameplay] ERROR: Invalid Reference on ModifierArguments.ModifierId - "ABILITY_ANTITANK" does not exist in Modifiers
[2659270.746] [Gameplay] ERROR: Invalid Reference on ModifierArguments.ModifierId - "ABILITY_AT_KILLER" does not exist in Modifiers
[2659270.746] [Gameplay] ERROR: Invalid Reference on ModifierArguments.ModifierId - "ABILITY_LIGHT_ANTITANK" does not exist in Modifiers

...these are referring to your entries within ZaapSpicey_UnitClass.xml, specifically between lines 120-122, where you reference these three entities as Modifiers (ModifierId) within the ModifierArguments code.

If you look directly above this in the same file, you have the following section of code:

Code:
<UnitAbilityModifiers>
        <Row> <UnitAbilityType>ABILITY_ANTITANK</UnitAbilityType> <ModifierId>ANTITANK_COMBAT_BONUS</ModifierId> </Row>
        <Row> <UnitAbilityType>ABILITY_LIGHT_ANTITANK</UnitAbilityType> <ModifierId>LIGHT_AT_COMBAT_BONUS</ModifierId> </Row>
        <Row> <UnitAbilityType>ABILITY_AT_KILLER</UnitAbilityType> <ModifierId>ANTITANK_KILLING_COMBAT_BONUS</ModifierId> </Row>
      
    </UnitAbilityModifiers>
    <Modifiers>
        <Row> <ModifierId>ANTITANK_COMBAT_BONUS</ModifierId> <ModifierType>MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH</ModifierType> <SubjectRequirementSetId>ANTITANK_OPPONENT_REQUIREMENTS</SubjectRequirementSetId> </Row>
        <Row> <ModifierId>LIGHT_AT_COMBAT_BONUS</ModifierId> <ModifierType>MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH</ModifierType> <SubjectRequirementSetId>ANTITANK_OPPONENT_REQUIREMENTS</SubjectRequirementSetId> </Row>
        <Row> <ModifierId>ANTITANK_KILLING_COMBAT_BONUS</ModifierId> <ModifierType>MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH</ModifierType> <SubjectRequirementSetId>ANTITANK_KILLER_OPPONENT_REQUIREMENTS</SubjectRequirementSetId> </Row>

    </Modifiers>

If you note, in the UnitAbilityModifiers table, you are inserting UnitAbilityType x3 with those same labels. But the ModifierId that each of these is linked to are:

ANTITANK_COMBAT_BONUS
LIGHT_AT_COMBAT_BONUS
ANTITANK_KILLING_COMBAT_BONUS

These are the three ModifierId values that you should be using in lines 120-122, rather than the UnitAbilityType values that you have referenced. Your original code, lines 119-124:

Code:
<ModifierArguments>
        <Row> <ModifierId>ABILITY_ANTITANK</ModifierId> <Name>Amount</Name> <Value>10</Value> </Row>
        <Row> <ModifierId>ABILITY_LIGHT_ANTITANK</ModifierId> <Name>Amount</Name> <Value>5</Value> </Row>
        <Row> <ModifierId>ABILITY_AT_KILLER</ModifierId> <Name>Amount</Name> <Value>10</Value> </Row>
      
    </ModifierArguments>

This should be:

Code:
<ModifierArguments>
        <Row> <ModifierId>ANTITANK_COMBAT_BONUS</ModifierId> <Name>Amount</Name> <Value>10</Value> </Row>
        <Row> <ModifierId>LIGHT_AT_COMBAT_BONUS</ModifierId> <Name>Amount</Name> <Value>5</Value> </Row>
        <Row> <ModifierId>ANTITANK_KILLING_COMBAT_BONUS</ModifierId> <Name>Amount</Name> <Value>10</Value> </Row>
      
    </ModifierArguments>

--

Lastly, you have the following series of errors appearing:

Code:
[2659270.751] [Gameplay] ERROR: Invalid Reference on RequirementSetRequirements.RequirementId - "OPPONENT_IS_TANK_REQUIREMENT" does not exist in Requirements
[2659270.751] [Gameplay] ERROR: Invalid Reference on RequirementSetRequirements.RequirementId - "OPPONENT_IS_TANK_REQUIREMENT" does not exist in Requirements
[2659270.751] [Gameplay] ERROR: Invalid Reference on RequirementSetRequirements.RequirementId - "FIRE_AND_ADVANCE_VS_OPPONENT_INFANTRY_REQUIREMENTS_MET" does not exist in Requirements
[2659270.751] [Gameplay] ERROR: Invalid Reference on RequirementSetRequirements.RequirementId - "OPPONENT_IS_INFANTRY_CLASS" does not exist in Requirements
[2659270.751] [Gameplay] ERROR: Invalid Reference on RequirementSetRequirements.RequirementId - "OPPONENT_HAS_LIGHT_AT" does not exist in Requirements

At a glance, these errors - I suspect - are derived from the issues completely reading the ZaabSpicey_UnitPromotions.xml, as it is within this file that you define these Requirements. I don't think any additional 'fix' is needed, aside from what I described earlier. If you fix the first and second code sections I cited, this should fall away.

Hopefully this will assist. I haven't actually made the amendments and tried to run them at my end - but I am fairly certain these corrections are accurate, based on troubleshooting against the errors you supplied in Database.log.
 
^ Thanks alot now these problems were fixed completely.
Now on to tech adjustment unit strenghts partially (coded on a specialised XML file)
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Ed Beach (Firaxis Games) -->
<GameInfo>
   <Technologies>
       <Update><Where TechnologyType="TECH_RIFLING"  Description="LOC_TECH_RIFLING_DESCRIPTION" /></Update>
   </Technologies>
   <Tags>
       <Row Tag="CLASS_CQB_SMOOTHBORE" Vocabulary="ABILITY_CLASS"/>       <!--Musket Rifling upgrades-->
       <Row Tag="CLASS_RANGED_SMOOTHBORE" Vocabulary="ABILITY_CLASS"/>       <!--Musket Rifling upgrades-->
   </Tags>
   <TechnologyModifiers>
       <Row TechnologyType="TECH_RIFLING"> <ModifierId>RIFLING_ADJUST_COMBAT_STRENGHT</ModifierId> </Row>
       <Row TechnologyType="TECH_RIFLING"> <ModifierId>RIFLING_ADJUST_RANGED_STRENGHT</ModifierId> </Row>
   </TechnologyModifiers>
   <Modifiers>
       <Row> <ModifierId>RIFLING_ADJUST_COMBAT_STRENGHT</ModifierId> <ModifierType>MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH</ModifierType> <SubjectRequirementSetId>CQB_RIFLE_REQUIREMENTS</SubjectRequirementSetId> </Row>
       <Row> <ModifierId>RIFLING_ADJUST_RANGED_STRENGHT</ModifierId> <ModifierType>MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH</ModifierType> <SubjectRequirementSetId>RANGED_RIFLE_REQUIREMENTS</SubjectRequirementSetId> </Row>
   </Modifiers>
   <ModifierArguments>
       <Row> <ModifierId>RIFLING_ADJUST_COMBAT_STRENGHT</ModifierId> <Name>Amount</Name> <Value>5</Value> </Row>
       <Row> <ModifierId>RIFLING_ADJUST_RANGED_STRENGHT</ModifierId> <Name>Amount</Name> <Value>5</Value> </Row>
   </ModifierArguments>
   <RequirementSets>
       <Row> <RequirementSetId>RIFLING_ADJUST_COMBAT_STRENGHT</RequirementSetId> <RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType> </Row>
       <Row> <RequirementSetId>RIFLING_ADJUST_RANGED_STRENGHT</RequirementSetId> <RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType> </Row>
   </RequirementSets>
   <RequirementSetRequirements>
       <!--Rifling adjusts unit H2H strenght-->
       <Row> <RequirementSetId>CQB_RIFLE_REQUIREMENTS</RequirementSetId> <RequirementId>UNIT_CLASS_CQB_SMOOTHBORE</RequirementId> </Row>
       <Row> <RequirementSetId>CQB_RIFLE_REQUIREMENTS</RequirementSetId> <RequirementId>MELEE_COMBAT_REQUIREMENTS</RequirementId> </Row>
       <!--Rifling adjusts unit ranged strenght-->
       <Row> <RequirementSetId>RANGED_RIFLE_REQUIREMENTS</RequirementSetId> <RequirementId>UNIT_CLASS_RANGED_SMOOTHBORE</RequirementId> </Row>
       <Row> <RequirementSetId>RANGED_RIFLE_REQUIREMENTS</RequirementSetId> <RequirementId>RANGED_COMBAT_REQUIREMENTS</RequirementId> </Row>
   </RequirementSetRequirements>
   <Requirements>
       <Row> <RequirementId>UNIT_CLASS_CQB_SMOOTHBORE</RequirementId> <RequirementType>REQUIREMENT_UNIT_TAG_MATCHES</RequirementType> </Row>
       <Row> <RequirementId>UNIT_CLASS_RANGED_SMOOTHBORE</RequirementId> <RequirementType>REQUIREMENT_UNIT_TAG_MATCHES</RequirementType> </Row>
   </Requirements>
   <RequirementArguments>
       <Row> <RequirementId>UNIT_CLASS_CQB_SMOOTHBORE</RequirementId> <Name>Tag</Name> <Value>CLASS_CQB_SMOOTHBORE</Value> </Row>
       <Row> <RequirementId>UNIT_CLASS_RANGED_SMOOTHBORE</RequirementId> <Name>Tag</Name> <Value>CLASS_RANGED_SMOOTHBORE</Value> </Row>
   </RequirementArguments>
   <ModifierStrings>
       <Row ModifierId="RIFLING_ADJUST_COMBAT_STRENGHT" Context="Preview" Text="+{1_Amount} {LOC_TECH_RIFLING_NAME} {LOC_TECH_DESCRIPTOR_PREVIEW_TEXT}"/>
       <Row ModifierId="RIFLING_ADJUST_RANGED_STRENGHT" Context="Preview" Text="+{1_Amount} {LOC_TECH_RIFLING_NAME} {LOC_TECH_DESCRIPTOR_PREVIEW_TEXT}"/>

   </ModifierStrings>
</GameInfo>

Actually Does {LOC_TECH_DESCRIPTOR_PREVIEW_TEXT} Exists? Is it possible to add modifier strings citing the offensive bonus due to Riflings bestowed upon certain units?

PS. Classes shown here does nothing beyond a receptor of tech bonus. it 'adds' upon existing unit classes just like this in Units.xml in base game
Code:
...
       <Row Type="UNIT_ARTILLERY" Tag="CLASS_SIEGE"/>
       <Row Type="UNIT_ARTILLERY" Tag="CLASS_SIEGE_SETUP"/>
       <Row Type="UNIT_ARTILLERY" Tag="CLASS_FORWARD_OBSERVER"/>
...
Which means. in game term,
1. Artillery is Siege class, ranged unit that basically deals full damage to city and its defenses but limited damage against any combat units.
2. Artillery requires setting up. Basically unable to fire after moving in the same turn.
3. Artillery gets +1 range and sight if observer unit (Balloons or drones) is attached to.

the two dummy promotions shown above works similiar to CLASS_SIEGE_SETUP and CLASS_FORWARD_OBSERVER except that it adds damage if Rifling is researched.
 
Last edited:
This does not do anything
Code:
<Update><Where TechnologyType="TECH_RIFLING"  Description="LOC_TECH_RIFLING_DESCRIPTION" /></Update>
There's no "Set" clause in the update, so the update will do nothing except perhaps cause a syntax error.

Code:
		<!---->
		<!-- PROMOTION DESCRIPTION TEXT -->
		<!---->
		<Row Tag="LOC_PROMOTION_DESCRIPTOR_PREVIEW_TEXT">
			<Text>(Promotion)</Text>
		</Row>
		<Row Tag="LOC_POLICY_DESCRIPTOR_PREVIEW_TEXT">
			<Text>(Policy)</Text>
		</Row>
		<Row Tag="LOC_GOVERNMENT_DESCRIPTOR_PREVIEW_TEXT">
			<Text>(Government)</Text>
		</Row>
		<Row Tag="LOC_GREAT_PERSON_DESCRIPTOR_PREVIEW_TEXT">
			<Text>(Great Person)</Text>
		</Row>
		<Row Tag="LOC_RELIGION_DESCRIPTOR_PREVIEW_TEXT">
			<Text>(Religion)</Text>
		</Row>
		<Row Tag="LOC_ABILITY_DESCRIPTOR_PREVIEW_TEXT">
			<Text>(Ability)</Text>
		</Row>
		<Row Tag="LOC_WONDER_DESCRIPTOR_PREVIEW_TEXT">
			<Text>(Wonder)</Text>
		</Row>
So, no there appears to not be a LOC_TECH_DESCRIPTOR_PREVIEW_TEXT so you would have to make one and then hope the game will properly display it for a ModifierString that is essentially technology-based.

None of this stuff is all that difficult to find. You get a search engine like Agent Ransack or you download Notepad++ and use its file-searching capabilities.
 
I have a question of my own, as it happens - after a bit of hiatus from my own project, I'm dipping back in.

Are there specific conditions under which, when building a project out via ModBuddy, the ModArt.xml file is, or isn't, included in the built mod? My current project seems to exclude it, which invariably prevents the ArtDef from functioning. If I manually append the ModArt.xml file into the mod and add a relevant entry in the <Files> section of the .modinfo file, the ArtDef behaves as expected.

I am fairly sure I did not have to do this for my last mod - yet, comparing that project in ModBuddy doesn't suggest I've done anything differently.

On both projects, I have ImportFiles actions both FrontEnd and In-Game - neither include the ModArt.xml file. In all cases, they do include the '(Mod Art Dependency File)', which I believe results in the .dep file being included.

In the current project, there's no ModArt.xml file when built. In the earlier project, the ModArt.xml file clearly appears within the built mod - driving the necessary functionality. Perhaps I am forgetting to do something basic - I just genuinely cannot remember.
 
Mod Art Dependancy File should be listed in Modbuddy under an UpdateArt Action-Type and/or UpdateLogitechARX Action-type rather than an ImportFiles Action-type. I cannot remember now whether you need the Mod Art Dependancy File listed under both action types.

Properly cooked and built mods don't have nor need the ModName.Art.xml file. But it also does not hurt anything to have it as a file within the mod.

Further details on this subject would have to be provided by someone like @Deliverator who understands far more about this PITA we call artdefs and deps. What I have stated up-comment essentially exhausts my limited knowledge on the subject.
 
Mod Art Dependancy File should be listed in Modbuddy under an UpdateArt Action-Type and/or UpdateLogitechARX Action-type rather than an ImportFiles Action-type. I cannot remember now whether you need the Mod Art Dependancy File listed under both action types.

Properly cooked and built mods don't have nor need the ModName.Art.xml file. But it also does not hurt anything to have it as a file within the mod.

Further details on this subject would have to be provided by someone like @Deliverator who understands far more about this PITA we call artdefs and deps. What I have stated up-comment essentially exhausts my limited knowledge on the subject.

Cheers, @LeeS. I am hoping you tagging him draws him here - as I do, indeed, have the UpdateArt Action-Type configured and the Mod Art Dependency File listed. Ultimately, what I likely have here is an issue with the .dep file not containing something it should - which is why the ModArt.xml is required to make the Units.artdef function.

Until the expert(s) show up, I'll continue with workaround I have because the functionality is there, by hook or by crook.
 
Hello, I am trying to make a custom civilization whose unique ability grants them a free scout when starting their first city - just like how the Maori get a builder on their first city.
I've looked through the game files and found that the Maori's unique ability is handled with
Code:
<ModifierId>BUILDER_PRESETTLEMENT</ModifierId>
            <ModifierType>MODIFIER_PLAYER_BUILT_CITIES_GRANT_FREE_UNIT</ModifierType>
            <SubjectRequirementSetId>PLAYER_HAS_ONE_CITY</SubjectRequirementSetId>
I was wondering if anyone knew where the requirement set "PLAYER_HAS_ONE_CITY" is handled in the games files so that I could take a look at how it was configured and set it up myself since my attempts at coding the requirement set by myself have failed. Cheers!
 
Back
Top Bottom