Giving mountains production and resources.

Yeah, you can simply use the whole file and place it in your mod folder.

And I'm guessing I'd also have to make a Resources SQL file if I wanted to create some code that can later be used for something like:

Code:
<Resource_InvalidTerrains> </Resource_InvalidTerrains>

In order to prevent certain resources from spawning on specific terrain types.

For example:

Truffles can spawn on ValidFeatures such as forests, but here's the problem - truffles should spawn on forests but not ValidTerrains like tundras yet at the same time only spawn on forests. You can set ValidTerrains to grasslands and plains but this will also mean that truffles will spawn on grasslands and plains without the forest feature and that's a problem... I don't want truffles appearing on grasslands and plains if they have no forest so instead I just wanted to block the tundra terrain from spawning these mushrooms. That way the truffles would spawn only on forests but in warm areas on grasslands.

But how would such a SQL code look like? I guess I could simply take a text file, change the extension to ".sql" but I have no idea how to create the code for the file itself.
 
Hm, actually I don't think this is doable with SQL/XML changes alone. XML and SQL files do actually the same, they're just a different notation of the same thing (except for the graphical user interface, which is XML only). And you can only change things that are already present in the game, and unfortunately there is no "invalid terrain" table for resources; there's only valid terrain or valid features. You can get e.g. DB Browser for SQLite to inspect the current game database in your Userdata/Cache folder (DebugConfiguration.sqlite), there you'll see all the tables you can change data in.

To achieve what you want you'd probably have to modify the map generation scripts themselves, which are written in Lua. It's a relatively easy language, but if you've never done any programming before, good luck. :D
 
Top Bottom