Need som help editing a mod

DeepSoul

Warlord
Joined
Dec 30, 2011
Messages
172
It's about this mod: https://steamcommunity.com/sharedfiles/filedetails/?id=1431566408

I like it for the most part, but he only gets a minor adjacency to holy sites from coast tiles(despite what it says on the steam page), and that's a bit weak since I won't get much out of the combat bonus because of my peaceful playstyle. So I want to change it to a standard adjacency bonus.

Since I don't know how to write the code for that, I would be very greatful if someone can make the adjustment and upload the new file here. Or if you'd rather explain how it's done that would work too.
 
Last edited:
"Adjacent" is a rather common part of the name for a property with that value, search and modify the value.
I did, and they just used Indonesia's already existing ability "Great Nusantara".
 
In that case, you have to copy all ability "Great Nusantara" dependencies, change the names of all properties you want to change, and respective values.

This is the segment where it's added:

INSERT INTO TraitModifiers
(TraitType, ModifierId)
VALUES ('TRAIT_LEADER_RF_LINDISFARNE', 'RF_LINDISFARNE_FAITH_DIFF_REL_KILL'),
('TRAIT_LEADER_RF_LINDISFARNE', 'TRAIT_NUSANTARA_COAST_HOLY_SITE'),
('TRAIT_LEADER_RF_LINDISFARNE', 'RF_LINDISFARNE_SCRIPTORIUM_EXTRA_CULTURE');

The problem is I don't know the code for adding standard adjacency for coast/lake to holy site. If I have to change more segments than this I think it's too complicated for me.
 
You have to make your own TRAIT replicated from TRAIT_NUSANTARA_COAST_HOLY_SITE (and all dependencies, bellow).

Try here, download to search TRAIT_NUSANTARA_COAST_HOLY_SITE, and you will see what props you need to add, changing Modifier Id names, and change the value you want to increase.
 
Last edited:
TRAIT_NUSANTARA_COAST_HOLY_SITE is not actually defined within the Leader Oswald mod. It is merely listed as a TraitModifier for Oswald. The definition of this ModifierId is in the Khmer/Indonesia DLC and is part of Indonesia's core abilities.

The definition from the game's xml files
Code:
<GameData>
	<Modifiers>
		<Row>
			<ModifierId>TRAIT_NUSANTARA_COAST_HOLY_SITE</ModifierId>
			<ModifierType>MODIFIER_PLAYER_CITIES_TERRAIN_ADJACENCY</ModifierType>
		</Row>
	</Modifiers>
	<ModifierArguments>
		<Row>
			<ModifierId>TRAIT_NUSANTARA_COAST_HOLY_SITE</ModifierId>
			<Name>DistrictType</Name>
			<Value>DISTRICT_HOLY_SITE</Value>
		</Row>
		<Row>
			<ModifierId>TRAIT_NUSANTARA_COAST_HOLY_SITE</ModifierId>
			<Name>TerrainType</Name>
			<Value>TERRAIN_COAST</Value>
		</Row>
		<Row>
			<ModifierId>TRAIT_NUSANTARA_COAST_HOLY_SITE</ModifierId>
			<Name>YieldType</Name>
			<Value>YIELD_FAITH</Value>
		</Row>
		<Row>
			<ModifierId>TRAIT_NUSANTARA_COAST_HOLY_SITE</ModifierId>
			<Name>Amount</Name>
			<Value>1</Value>
		</Row>
		<Row>
			<ModifierId>TRAIT_NUSANTARA_COAST_HOLY_SITE</ModifierId>
			<Name>TilesRequired</Name>
			<Value>2</Value>
		</Row>
		<Row>
			<ModifierId>TRAIT_NUSANTARA_COAST_HOLY_SITE</ModifierId>
			<Name>Description</Name>
			<Value>LOC_DISTRICT_NUSANTARA_FAITH</Value>
		</Row>
	</ModifierArguments>
</GameData>
The important bit regarding 'minor' or 'standard' or 'major' adjacency bonus is this row in table ModifierArguments:
Code:
		<Row>
			<ModifierId>TRAIT_NUSANTARA_COAST_HOLY_SITE</ModifierId>
			<Name>TilesRequired</Name>
			<Value>2</Value>
		</Row>
While an Update to this row can certainly be coded to alter the number of tiles required to 1, this would also affect the Indonesia civilization, since this ModifierId is being borrowed for Oswald from the Indonesia Civ. So it would be better to create a clone of this with a different ModifierId as desired for Oswald.

The problem with directly editing the mod files is that if RFormica ever gets around to updating the Oswald mod, any changes you make within the mod will be wiped away by the update. This is essentially the same problem you get when directly-editing any of the game's files -- updates to the game by Firaxis have the potential to wipe any changes you make within the game's xml files.
 
Last edited:
TRAIT_NUSANTARA_COAST_HOLY_SITE is not actually defined within the Leader Oswald mod. It is merely listed as a TraitModifier for Oswald. The definition of this ModifierId is in the Khmer/Indonesia DLC and is part of Indonesia's core abilities.

The definition from the game's xml files
Code:
<GameData>
    <Modifiers>
        <Row>
            <ModifierId>TRAIT_NUSANTARA_COAST_HOLY_SITE</ModifierId>
            <ModifierType>MODIFIER_PLAYER_CITIES_TERRAIN_ADJACENCY</ModifierType>
        </Row>
    </Modifiers>
    <ModifierArguments>
        <Row>
            <ModifierId>TRAIT_NUSANTARA_COAST_HOLY_SITE</ModifierId>
            <Name>DistrictType</Name>
            <Value>DISTRICT_HOLY_SITE</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_NUSANTARA_COAST_HOLY_SITE</ModifierId>
            <Name>TerrainType</Name>
            <Value>TERRAIN_COAST</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_NUSANTARA_COAST_HOLY_SITE</ModifierId>
            <Name>YieldType</Name>
            <Value>YIELD_FAITH</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_NUSANTARA_COAST_HOLY_SITE</ModifierId>
            <Name>Amount</Name>
            <Value>1</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_NUSANTARA_COAST_HOLY_SITE</ModifierId>
            <Name>TilesRequired</Name>
            <Value>2</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_NUSANTARA_COAST_HOLY_SITE</ModifierId>
            <Name>Description</Name>
            <Value>LOC_DISTRICT_NUSANTARA_FAITH</Value>
        </Row>
    </ModifierArguments>
</GameData>
The important bit regarding 'minor' or 'standard' or 'major' adjacency bonus is this row in table ModifierArguments:
Code:
        <Row>
            <ModifierId>TRAIT_NUSANTARA_COAST_HOLY_SITE</ModifierId>
            <Name>TilesRequired</Name>
            <Value>2</Value>
        </Row>
While an Update to this row can certainly be coded to alter the number of tiles required to 1, this would also affect the Indonesia civilization, since this ModifierId is being borrowed for Oswald from the Indonesia Civ. So it would be better to create a clone of this with a different ModifierId as desired for Oswald.

The problem with directly editing the mod files is that if RFormica ever gets around to updating the Oswald mod, any changes you make within the mod will be wiped away by the update. This is essentially the same problem you get when directly-editing any of the game's files -- updates to the game by Firaxis have the potential to wipe any changes you make within the game's xml files.

Making a clone was Raen's suggestion as I understood it, and the only viable option imo. I've done lots of edits to mods and experienced what an update does, which is why I make backups of my edits nowadays. If the update is relavant for me I can add the edited lines to it. But thanks for explaining this.
 
Back
Top Bottom