How are trading post defined int he game?

TTSev

Chieftain
Joined
Oct 25, 2019
Messages
28
Hi,

I've never done any programming in my life and I tried to do some modding by finding other mods doing similar things and adapting it for what I want to do. I published my first mod a couple days ago (SPM Ressource Yields Balance) which was simply about changing ressource yields.
For my next try I got into doing pantheons and I manage to do several ones so far no published yet. But for one of them I have no idea how to do it, if it's even possible.
It would be 'Spirit of Ingenuity - +2 science for your cities in which you have a trading post.'
But I couldn't see on the game file how the trading post was defined nor any modifier or requirement usint it so I'm kinda lost as to how I could do it.
I think I have the core of it, but I have no idea how I could create the propoer requirement of a trading post built by a trade route from that player in the city.

Code:
    <Beliefs>

        <Row BeliefType="BELIEF_SPM_SPIRIT_OF_INGENUITY"
             Name="LOC_BELIEF_SPM_SPIRIT_OF_INGENUITY_NAME"
             Description="LOC_BELIEF_SPM_SPIRIT_OF_INGENUITY_DESCRIPTION"
             BeliefClassType="BELIEF_CLASS_PANTHEON" />

    </Beliefs>
    <Types>

        <Row Type="BELIEF_SPM_SPIRIT_OF_INGENUITY"
             Kind="KIND_BELIEF" />

    </Types>
    <BeliefModifiers>

        <Row BeliefType="BELIEF_SPM_SPIRIT_OF_INGENUITY"
             ModifierID="SPM_SPIRIT_OF_INGENUITY_SCIENCE_TRADING_POST" />

    </BeliefModifiers>
    <Modifiers>

        <Row ModifierId="SPM_SPIRIT_OF_INGENUITY_SCIENCE_TRADING_POST"
             ModifierType="MODIFIER_ALL_CITIES_ATTACH_MODIFIER"
             SubjectRequirementSetId="PLAYER_HAS_PANTHEON_REQUIREMENTS" />
        <Row ModifierId="SPM_SPIRIT_OF_INGENUITY_SCIENCE_TRADING_POST_MODIFIER"
             ModifierType="DISTRICTS_ADJUST_YIELD"
 SubjectRequirementSetId="SPM_SPIRIT_OF_INGENUITY_SCIENCE_TRADING_POST_REQUIREMENTS" />

    </Modifiers>
    <ModifierArguments>

        <Row ModifierId="SPM_SPIRIT_OF_INGENUITY_SCIENCE_TRADING_POST"
             Name="ModifierId"
             Value="SPM_SPIRIT_OF_INGENUITY_SCIENCE_TRADING_POST_MODIFIER" />
        <Row ModifierId="SPM_SPIRIT_OF_INGENUITY_SCIENCE_TRADING_POST_MODIFIER"
             Name="DistrictType"
             Value="DISTRICT_CITY_CENTER" />
        <Row ModifierId="SPM_SPIRIT_OF_INGENUITY_SCIENCE_TRADING_POST_MODIFIER"
             Name="YieldType"
             Value="YIELD_SCIENCE" />
        <Row ModifierId="SPM_SPIRIT_OF_INGENUITY_SCIENCE_TRADING_POST_MODIFIER"
             Name="Amount"
             Value="2" />

    </ModifierArguments>
 
Back
Top Bottom