Could anyone help a noob like me edit a mod to fit my personal needs?

Orivaa

Chieftain
Joined
Jun 18, 2014
Messages
17
I want to play as China and make a huge Great Wall across a set of mountain ranges on YnAMP. To this end, since I don't want to have to make have to find a way to settle cities in a really weird way, I've decided to use the Build Great Wall Outside Territory mod. But this doesn't work on luxury resources and such (or is it just forests?), so since I'm also using the Make All Resources Harvestable mod, I was wondering if there's a way to make it so the builder can harvest the resources OUTSIDE my own territory. I posted a question about it in the mod's thread, but got no response.
Is there a way to edit either of these mods to either allow the building of the Great Wall on luxury/strategic tiles, or harvest the resources from those tiles outside my territories?
 
Last edited:
How about terrains? I've seen a category called "validterrains" in a lot of mods, with names like deserts, tundra, ect. Is there a name for tiles with resources that could be added to that list of "validterrains"? If you can make a mod that allows the building of improvements outside your territory, and a mod that lets you harvest any resource, shouldn't you be able to combine those two things?
 
Not sure about the code to allow them to be build outside locations .. but I was toying with this the other day
This should let you build the wall on anything and get the resources for them.. You should be able to combine this with another mod to allow you to build them outside and on/over mountains
Code:
    <Improvement_ValidResources>
        <!-- Mine-->
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_COPPER"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_DIAMONDS"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_JADE"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_MERCURY"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_SALT"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_SILVER"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_ALUMINUM"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_COAL"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_IRON"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_NITER"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_URANIUM"/>
        <!-- Quarry-->
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_GYPSUM"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_MARBLE"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_STONE"/>
        <!-- Farm-->
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_RICE"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_WHEAT"/>
        <!-- Plantation-->
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_BANANAS"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_CITRUS"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_COCOA"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_COFFEE"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_COTTON"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_DYES"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_INCENSE"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_SILK"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_SPICES"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_SUGAR"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_TEA"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_TOBACCO"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_WINE"/>
        <!-- Pasture-->
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_CATTLE"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_SHEEP"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_HORSES"/>
        <!-- Camp-->
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_DEER"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_FURS"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_IVORY"/>
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_TRUFFLES"/>
        <!-- Oil -->
        <Row ImprovementType="IMPROVEMENT_GREAT_WALL" ResourceType="RESOURCE_OIL"/>
    </Improvement_ValidResources>
 
I don't know if i stole these lines of code from that great wall mod or not


<Improvement_ValidFeatures>
<Row ImprovementType="IMPROVEMENT_GREAT_WALL" FeatureType="FEATURE_FLOODPLAINS"/>
<Row ImprovementType="IMPROVEMENT_GREAT_WALL" FeatureType="FEATURE_FOREST" />
<Row ImprovementType="IMPROVEMENT_GREAT_WALL" FeatureType="FEATURE_MARSH"/>
</Improvement_ValidFeatures>
 
Dunno if you were to add

<Improvement_ValidFeatures>
<Row ImprovementType="IMPROVEMENT_GREAT_WALL" FeatureType="FEATURE_FLOODPLAINS"/>
<Row ImprovementType="IMPROVEMENT_GREAT_WALL" FeatureType="FEATURE_FOREST" />
<Row ImprovementType="IMPROVEMENT_GREAT_WALL" FeatureType="FEATURE_MARSH"/>
<Row ImprovementType="IMPROVEMENT_GREAT_WALL" FeatureType="TERRAIN_GRASS_MOUNTAIN"/>
<Row ImprovementType="IMPROVEMENT_GREAT_WALL" FeatureType="TERRAIN_PLAINS_MOUNTAIN" />
<Row ImprovementType="IMPROVEMENT_GREAT_WALL" FeatureType="TERRAIN_DESERT_MOUNTAIN"/>
<Row ImprovementType="IMPROVEMENT_GREAT_WALL" FeatureType="TERRAIN_TUNDRA_MOUNTAIN"/>
<Row ImprovementType="IMPROVEMENT_GREAT_WALL" FeatureType="TERRAIN_SNOW_MOUNTAIN" />
</Improvement_ValidFeatures>

Although you'd still need builders to be able to go there... There is another mod floating around that makes mountain tiles passable, but has a huge movement cost.. Maybe you could grab that and edit it, and someone smarter than I could maybe make that reduced movement cost only available to builders?
 
In table <Improvement_ValidFeatures> the column FeatureType must refer to a valid feature registered within table <Features>. So attempting to state this will be rejected:
Code:
<Row ImprovementType="IMPROVEMENT_GREAT_WALL" FeatureType="TERRAIN_GRASS_MOUNTAIN"/>
 <Row ImprovementType="IMPROVEMENT_GREAT_WALL" FeatureType="TERRAIN_PLAINS_MOUNTAIN" />
 <Row ImprovementType="IMPROVEMENT_GREAT_WALL" FeatureType="TERRAIN_DESERT_MOUNTAIN"/>
 <Row ImprovementType="IMPROVEMENT_GREAT_WALL" FeatureType="TERRAIN_TUNDRA_MOUNTAIN"/>
 <Row ImprovementType="IMPROVEMENT_GREAT_WALL" FeatureType="TERRAIN_SNOW_MOUNTAIN" />
None of these are FeatureTypes, they are TerrainTypes.
 
I think that's what it is though.. I just downloaded the passable mountains mod I was talking about after you posted that, and this is whats in the code


<GameInfo>
<Terrains>
<Update>
<Where TerrainType="TERRAIN_GRASS_MOUNTAIN" />
<Set MovementCost="5" Impassable="0" DefenseModifier="3" />
</Update>
<Update>
<Where TerrainType="TERRAIN_PLAINS_MOUNTAIN" />
<Set MovementCost="5" Impassable="0" DefenseModifier="3" />
</Update>
<Update>
<Where TerrainType="TERRAIN_DESERT_MOUNTAIN" />
<Set MovementCost="5" Impassable="0" DefenseModifier="3" />
</Update>
<Update>
<Where TerrainType="TERRAIN_TUNDRA_MOUNTAIN" />
<Set MovementCost="5" Impassable="0" DefenseModifier="3" />
</Update>
<Update>
<Where TerrainType="TERRAIN_SNOW_MOUNTAIN" />
<Set MovementCost="5" Impassable="0" DefenseModifier="3" />
</Update>
</Terrains>
</GameInfo>


So it might not be a feature, but I think it might be what mountains are named as?
 
None of that makes those TERRAIN types into FEATURE types. It just makes them passable. This defines what is acceptable for table <Improvement_ValidFeatures>
Code:
CREATE TABLE "Improvement_ValidFeatures" (
		"ImprovementType" TEXT NOT NULL,
		"FeatureType" TEXT NOT NULL,
		PRIMARY KEY(ImprovementType, FeatureType),
		FOREIGN KEY (ImprovementType) REFERENCES Improvements(ImprovementType) ON DELETE CASCADE ON UPDATE CASCADE,
		FOREIGN KEY (FeatureType) REFERENCES Features(FeatureType) ON DELETE CASCADE ON UPDATE CASCADE);
This part of this line is the important part:
Code:
(FeatureType) REFERENCES Features(FeatureType)
It specifies that column FeatureType within table Improvement_ValidFeatures must have all entries referring to a valid FeatureType designation that is registered within table Features. Nothing else is allowed within table Improvement_ValidFeatures for column FeatureType.
 
Back
Top Bottom