1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

What is the best way to make unworkable terrain workable? Ideally compatible with other mods.

Discussion in 'CivBE - Modding Help & Mod Creation' started by Galgus, Oct 20, 2016.

  1. Galgus

    Galgus Chieftain

    Joined:
    Aug 22, 2012
    Messages:
    1,695
    I'm aware of Ryika's method in Workable Mountains to essentially set a feature on Mountains that can be worked, but I'm looking for a way to do that in a different mod that would, ideally, still be compatible with Workable Mountains and any others using its added feature.

    Would having the same lua putting the feature down in two mods cause any problems, or would that be the best way to do it?

    Is there any way to simply disable the graphical only status of a terrain?

    I tried to here, but it didn't fix that XML file not loading while it tried to treat Trenches as a terrain capable of receiving yield bonuses.

    <Terrains>
    <Update>
    <Set GraphicalOnly="false" />
    <Where Type="TERRAIN_TRENCH" />
    </Update>
    </Terrains>
     
  2. Ryika

    Ryika likes cookies and milk.

    Joined:
    Aug 30, 2013
    Messages:
    8,323
    Don't quite remember the details anymore, but I'm pretty sure that when I was working on that mod I assumed that some terrains are just hard-coded to not be able to have base yields, hence the workaround (which is for the most part taken from the Civ5 Version of Workable Mountains by SushiSquid).

    To answer your actual question: Yes, you could use the same code to make both mods compatible, but if you want to add yields to the same terrain-type you'd of course have to use the same dummy-feature, because every tile can only have one feature.
    Which means that you'd need to put it into a separate file if you want to use xml, because it will cause an error if the game tries to add a feature-type that already exists. (I'd assume there's probably a workaround in SQL)

    In general I wouldn't place much value on keeping your mods compatible with Workable Mountains though, it's not upgraded for Rising Tide, and I don't plan to upgrade and maintain it either.
    Though, if you want to implement it into your mods, feel free to do so, but don't forget to credit SushiSquid for the code then.
     

Share This Page