AI Able to "Discover" Uranium in the Renaissance

SidmanII

Chieftain
Joined
Jun 27, 2020
Messages
5
This mod I've been working on for the past few weeks involves taking the tech tree and various other bits from the "Into the Renaissance" scenario and applying it to the wider game along with downgrading/replacing later era unique units. In effect, civilizations such as America or Brazil are not automatically weaker in a game that only goes up to the Renaissance era.

As I'm playing through and testing the mod for anything I missed, Arabia offers me a trade deal that involves some uranium early in the game (started in the Renaissance era). This should not be happening since I locked uranium and all the other strategic resources behind the repeating future tech. I saved the game, exited, loaded up the game with the IGE mod to view where they are getting the uranium from, and see that they settled a city on top of a source of it. Overall I'm stumped and tired.

The save game with the uranium example as well as the mod are attached to this post.
 

Attachments

I decided to make another attempt at solving this and probably found the solution. The relevant lines in my mod are such:

Code:
<Resources>
        <Update>
            <Where Type="RESOURCE_COAL"/>
            <Set TechReveal="" TechCityTrade=""/>
        </Update>
        <Update>
            <Where Type="RESOURCE_OIL"/>
            <Set TechReveal="" TechCityTrade=""/>
        </Update>
        <Update>
            <Where Type="RESOURCE_ALUMINUM"/>
            <Set TechReveal="" TechCityTrade=""/>
        </Update>
        <Update>
            <Where Type="RESOURCE_URANIUM"/>
            <Set TechReveal="" TechCityTrade=""/>
        </Update>
</Resources>
<Resources>
        <Update>
            <Where Type="RESOURCE_COAL"/>
            <Set>
                <TechReveal>TECH_FUTURE_TECH</TechReveal>
            </Set>
        </Update>
        <Update>
            <Where Type="RESOURCE_ALUMINUM"/>
            <Set>
                <TechReveal>TECH_FUTURE_TECH</TechReveal>
            </Set>
        </Update>
        <Update>
            <Where Type="RESOURCE_OIL"/>
            <Set>
                <TechReveal>TECH_FUTURE_TECH</TechReveal>
            </Set>
        </Update>
        <Update>
            <Where Type="RESOURCE_URANIUM"/>
            <Set>
                <TechReveal>TECH_FUTURE_TECH</TechReveal>
            </Set>
        </Update>
</Resources>

You may ask why I used two resources tables, but that's exactly the question I asked when I saw that the developers had two resources tables in the "Into the Renaissance" scenario. I simply copied and pasted those lines into my mod thinking, "well if this worked for them, then it should work for me." That obviously didn't happen.

I then redid the lines into this:
Code:
<Resources>
        <Update>
            <Where Type="RESOURCE_COAL"/>
            <Set>
                <TechReveal>TECH_FUTURE_TECH</TechReveal>
                <TechCityTrade>NULL</TechCityTrade>
                <AIStopTradingEra>ERA_ANCIENT</AIStopTradingEra>
            </Set>
        </Update>
        <Update>
            <Where Type="RESOURCE_ALUMINUM"/>
            <Set>
                <TechReveal>TECH_FUTURE_TECH</TechReveal>
                <TechCityTrade>NULL</TechCityTrade>
                <AIStopTradingEra>ERA_ANCIENT</AIStopTradingEra>
            </Set>
        </Update>
        <Update>
            <Where Type="RESOURCE_OIL"/>
            <Set>
                <TechReveal>TECH_FUTURE_TECH</TechReveal>
                <TechCityTrade>NULL</TechCityTrade>
                <AIStopTradingEra>ERA_ANCIENT</AIStopTradingEra>
            </Set>
        </Update>
        <Update>
            <Where Type="RESOURCE_URANIUM"/>
            <Set>
                <TechReveal>TECH_FUTURE_TECH</TechReveal>
                <TechCityTrade>NULL</TechCityTrade>
                <AIStopTradingEra>ERA_ANCIENT</AIStopTradingEra>
            </Set>
        </Update>
        <Update>
            <Where Type="RESOURCE_ARTIFACTS"/>
            <Set>
                <TechReveal>TECH_FUTURE_TECH</TechReveal>
                <TechCityTrade>NULL</TechCityTrade>
                <AIStopTradingEra>ERA_ANCIENT</AIStopTradingEra>
            </Set>
        </Update>
</Resources>

I got rid of the double tables and made the lines like this in hopes of either stopping the AI from acquiring these resources or making the AI no longer value them in trades. I then saved the changes. tried again with the attached save, and Arabia no longer had uranium to trade. I even made sure they didn't trade it away to someone else with the IGE mod and saw that they had met no one besides me at that point in the game.

Let this be a lesson in disabling resources for others.
 
Nope. After placing a citadel down during a war, one of the AI sent a trade request to buy some aluminum from me. Still stuck on this roadblock.

EDIT: No longer stuck on the roadblock. The code should look like this:

Code:
<Resources>
        <Update>
            <Where Type="RESOURCE_COAL"/>
            <Set>
                <TechReveal>TECH_FUTURE_TECH</TechReveal>
                <TechCityTrade>TECH_FUTURE_TECH</TechCityTrade>
                <AIStopTradingEra>ERA_ANCIENT</AIStopTradingEra>
            </Set>
        </Update>
        <Update>
            <Where Type="RESOURCE_ALUMINUM"/>
            <Set>
                <TechReveal>TECH_FUTURE_TECH</TechReveal>
                <TechCityTrade>TECH_FUTURE_TECH</TechCityTrade>
                <AIStopTradingEra>ERA_ANCIENT</AIStopTradingEra>
            </Set>
        </Update>
        <Update>
            <Where Type="RESOURCE_OIL"/>
            <Set>
                <TechReveal>TECH_FUTURE_TECH</TechReveal>
                <TechCityTrade>TECH_FUTURE_TECH</TechCityTrade>
                <AIStopTradingEra>ERA_ANCIENT</AIStopTradingEra>
            </Set>
        </Update>
        <Update>
            <Where Type="RESOURCE_URANIUM"/>
            <Set>
                <TechReveal>TECH_FUTURE_TECH</TechReveal>
                <TechCityTrade>TECH_FUTURE_TECH</TechCityTrade>
                <AIStopTradingEra>ERA_ANCIENT</AIStopTradingEra>
            </Set>
        </Update>
        <Update>
            <Where Type="RESOURCE_ARTIFACTS"/>
            <Set>
                <TechReveal>TECH_FUTURE_TECH</TechReveal>
                <TechCityTrade>TECH_FUTURE_TECH</TechCityTrade>
                <AIStopTradingEra>ERA_ANCIENT</AIStopTradingEra>
            </Set>
        </Update>
</Resources>

I tested this by keeping the TechCityTrade for coal set as NULL while updating the other strategic resources to TECH_FUTURE_TECH. I then used the IGE mod to throw down a bunch of coal and uranium in my territory, set up a combination of mines, great people improvements, and cities on top of the resources. I then opened up the trade view on an AI player which showed that I had 20-something coal to trade and no uranium.

I will continue to test before declaring this problem over.
 
Last edited:
Back
Top Bottom