The more I think about it, the more I like it. It could also help fix a problem I've had with trade logic.
I'm not sure I follow "a trade checkpoint" though.
Sorry, I was a bit vague with that one.
When trading, the ships or wagons have to go to either the admin centre or a trade dock, or a Tradehouse. I just thought the Warehouse could double as a way to receive resources from the coast without having boats or putting your admin centre on the shoreline, or as a way to receive resources from anywhere on your borders without having a massive surplus of people with wagons.
Thanks Shawn.
(P.S. is there a more multi-mod compatible way to add resources to the game, like through mutators?)
Ah, make them trade receivers. Sure, that'd be easy.
Depends on what you mean by resources, I've seen people use them a few different ways. For any case though, you can add them through any old data file. There's nothing special about the name of the data files.
For example: if I wanted to add gold, I could just make a new file called "gold.xml":
<game_data>
<item name="Gold" icon="i_gold">
<description>It's shiny!</description>
</item>
</game_data>
That's all you need if you just want a new item that can be produced and used.
Adding a natural resource that can be found and exploited (like gold ore) is a little more involved, first add that resource through adding a resource tag, like so:
<game_data>
<item name="Gold" icon="i_gold">
<description>It's shiny!</description>
</item>
<resource name="Gold"></resource>
</game_data>
I would then have to add terrain containing that resource to the world, which is where mutators would come in. First, define a biome and terrain to contain the gold, which could be modified from the way tin works.
<game_data>
<item name="Gold" icon="i_gold">
<description>It's shiny!</description>
</item>
<resource name="Gold"></resource>
<biome id="highlands_gold" name="Highlands">
<terrain_mapping id="peak_small" likelyhood="2"></terrain_mapping>
<terrain_mapping id="trees_sparse_0" likelyhood="1"></terrain_mapping>
<terrain_mapping id="trees_sparse_1" likelyhood="1"></terrain_mapping>
<terrain_mapping id="grass" likelyhood="12"></terrain_mapping>
<terrain_mapping id="ore_gold" likelyhood="1"></terrain_mapping>
</biome>
<terrain id="ore_gold" map_image="map_tin_gold" is_walkable="true" is_swimmable="false" move_cost="1" resource="Gold">
<base_animation type="idle" image="t_tin_gold" frame_width="64" frame_height="64" frame_count="1" facing="none" sound="none" layer="0.0" loop_time="0.5"></base_animation>
</terrain>
</game_data>
Now the only thin that's left is to make that biome available during world generation. We can do this in the same file, or a new file to keep things clean.
<game_data>
<add_element parent_type="region_feature" parent_id_attribute="id" parent_id_value="basic_landmass">
<region_feature id="basic_landmass_highlands_with_gold" regions_per_occurrence="60" minimum_occurrences="1" shape="blob" min_size="1" max_size="1" margin="0" core_biome="highlands" fringe_biome="highlands">
<inclusion_feature id="basic_landmass_highlands_gold" cells_per_occurrence="2" minimum_occurrences="1" shape="blob" core_biome="highlands_gold" fringe_biome="highlands_gold"></inclusion_feature>
</region_feature>
</add_element>
</game_data>And now there should be gold scattered throughout the world
I