[R&F] Several Modding Questions; Creating a Civilization

Liliette

Chieftain
Joined
Feb 13, 2018
Messages
1
Location
Island of Nunya
Hey modding community! I'm a pretty beginner modder, and while I have attempted to make a functional civilization before and had it work half-decently, I didn't really understand ANY of what I was doing and it was basically just a copy-paste civ.

In short, I'm trying to create the civilization detailed in the spoiler, and I have a decent grasp of how to make the simpler things work, like making fishing boats provide an additional +1 Gold and Food, and the general syntax of XML and SQL formatting (of which I think SQL is far easier), but dynamic modifiers, requirement sets, and overall making it into a complete, playable civ confounds me.

Spoiler Assyrian Semiramis :
Civilization Ability: Four Corners of the World
Captured cities gain +15% border growth and citizen growth rate. Gain a settler each time a wonder is built.
Unique District: Garden of Vanity
Theater Square replacement, gains Culture and Gold equal to its tile’s appeal.​

Unique Unit: Bashmu
Horseman replacement, +5 combat strength within 7 tiles of ally territory, cheaper to produce.

Tech - - - - Horseback Riding
Prod. - - - -60
Melee - - - 35
Move - - - -4
Maint. - - - 2​

Leader Ability: Daughter of Atargatis
Campuses, Commercial Hubs, and Gardens of Vanity gain +3 Production and +1 Food when built adjacent to a river. Fishing boats provide an additional +1 Gold and +1 Food.​

Leader Unique Unit: Sikera Ushum
Siege Tower replacement, has a ranged attack with 1 range, more expensive to maintain.

Tech - - - -Construction
Prod. - - - 100
Ranged - -20
Range - - -1
Move - - - -2
Maint. - - - 3​


As far as specific questions;
  1. How to give captured cities (not settled) +15% to border growth and citizen growth?
  2. How to grant a settler to a city upon completing a wonder?
  3. How to give a yield to a district based on the appeal of its tile?
    1. As a caveat to the above; not quite like Australia's charming and breathtaking, but rather 1 Appeal = 1 Yield, 2 Appeal = 2 Yield, 3 Appeal = 3 Yield, etc.
  4. How to give a (unique) unit a combat strength bonus when near allied territory or cities?
  5. How to give a yield to a District for being constructed adjacent to a river?
  6. How to give a support unit a ranged attack? Is that even possible?
Those are the basis of the civ, I'm not going to bother with art, models, icons, etc. YET. Like I said before I've created a mod before, and watched/read MANY tutorials and guides, so I have some understanding, but it's not comprehensible at the time.

Thanks for any help you guys can/want to provide!
 
5 is pretty easy as the Dutch have a similar ability in place. It would go something like this:
Code:
<GameData>   
    <TraitModifiers>
        <Row TraitType="YOUR_TRAIT_ID" ModifierId="YOUR_TRAIT_MODIFIER_ID"/>
    </TraitModifiers>
    
    <Modifiers>
        <Row ModifierId="YOUR_TRAIT_MODIFIER_ID" ModifierType="MODIFIER_PLAYER_CITIES_RIVER_ADJACENCY"/>
    </Modifiers>
    
    <ModifierArguments>
        <Row ModifierId="YOUR_TRAIT_MODIFIER_ID"    Name="Amount" Value="2"/>
        <Row ModifierId="YOUR_TRAIT_MODIFIER_ID"    Name="Description" Value="LOC_DISTRICT_RIVER_SCIENCE"/>
        <Row ModifierId="YOUR_TRAIT_MODIFIER_ID"    Name="DistrictType" Value="DISTRICT_CAMPUS"/>
        <Row ModifierId="YOUR_TRAIT_MODIFIER_ID"    Name="YieldType" Value="YIELD_SCIENCE"/>
    </ModifierArguments>
</GameData>

You can change the district affected, the yield gained and the amount of that yield gained by changing the modifier arguments. You can look at the games localization files for the description.
 
3 seams doable too, try dropping this in and see how it works, I'm not sure if it will add a point for each tier of appeal or just choose 1. Also the descriptions might not work, so you'll have to check the values after placement.
Code:
    <TraitModifiers>
        <Row TraitType="YOUR_TRAIT_ID" ModifierId="TRAIT_CAMPUS_A1"/>
        <Row TraitType="YOUR_TRAIT_ID" ModifierId="TRAIT_CAMPUS_A2"/>
        <Row TraitType="YOUR_TRAIT_ID" ModifierId="TRAIT_CAMPUS_A3"/>
        <Row TraitType="YOUR_TRAIT_ID" ModifierId="TRAIT_CAMPUS_A4"/>
        <Row TraitType="YOUR_TRAIT_ID" ModifierId="TRAIT_CAMPUS_A5"/>
        <Row TraitType="YOUR_TRAIT_ID" ModifierId="TRAIT_CAMPUS_A6"/>
    </TraitModifiers>
    
    <Modifiers>
        <Row ModifierId="TRAIT_CAMPUS_A1" ModifierType="MODIFIER_PLAYER_DISTRICTS_ADJUST_YIELD_BASED_ON_APPEAL"/>
        <Row ModifierId="TRAIT_CAMPUS_A2" ModifierType="MODIFIER_PLAYER_DISTRICTS_ADJUST_YIELD_BASED_ON_APPEAL"/>
        <Row ModifierId="TRAIT_CAMPUS_A3" ModifierType="MODIFIER_PLAYER_DISTRICTS_ADJUST_YIELD_BASED_ON_APPEAL"/>
        <Row ModifierId="TRAIT_CAMPUS_A4" ModifierType="MODIFIER_PLAYER_DISTRICTS_ADJUST_YIELD_BASED_ON_APPEAL"/>
        <Row ModifierId="TRAIT_CAMPUS_A5" ModifierType="MODIFIER_PLAYER_DISTRICTS_ADJUST_YIELD_BASED_ON_APPEAL"/>
        <Row ModifierId="TRAIT_CAMPUS_A6" ModifierType="MODIFIER_PLAYER_DISTRICTS_ADJUST_YIELD_BASED_ON_APPEAL"/>
    </Modifiers>
    
    <ModifierArguments>
        <Row ModifierId="TRAIT_CAMPUS_A1" Name="YieldType" Value="YIELD_SCIENCE"/>
        <Row ModifierId="TRAIT_CAMPUS_A1" Name="RequiredAppeal" Value="1"/>
        <Row ModifierId="TRAIT_CAMPUS_A1" Name="YieldChange" Value="1"/>
        <Row ModifierId="TRAIT_CAMPUS_A1" Name="DistrictType" Value="DISTRICT_CAMPUS"/>
        <Row ModifierId="TRAIT_CAMPUS_A1" Name="Description" Value="LOC_DISTRICT_APPEAL_SCIENCE"/>
        
        <Row ModifierId="TRAIT_CAMPUS_A2" Name="YieldType" Value="YIELD_SCIENCE"/>
        <Row ModifierId="TRAIT_CAMPUS_A2" Name="RequiredAppeal" Value="2"/>
        <Row ModifierId="TRAIT_CAMPUS_A2" Name="YieldChange" Value="1"/>
        <Row ModifierId="TRAIT_CAMPUS_A2" Name="DistrictType" Value="DISTRICT_CAMPUS"/>
        <Row ModifierId="TRAIT_CAMPUS_A2" Name="Description" Value="LOC_DISTRICT_APPEAL_SCIENCE"/>
        
        <Row ModifierId="TRAIT_CAMPUS_A3" Name="YieldType" Value="YIELD_SCIENCE"/>
        <Row ModifierId="TRAIT_CAMPUS_A3" Name="RequiredAppeal" Value="3"/>
        <Row ModifierId="TRAIT_CAMPUS_A3" Name="YieldChange" Value="1"/>
        <Row ModifierId="TRAIT_CAMPUS_A3" Name="DistrictType" Value="DISTRICT_CAMPUS"/>
        <Row ModifierId="TRAIT_CAMPUS_A3" Name="Description" Value="LOC_DISTRICT_APPEAL_SCIENCE"/>
        
        <Row ModifierId="TRAIT_CAMPUS_A4" Name="YieldType" Value="YIELD_SCIENCE"/>
        <Row ModifierId="TRAIT_CAMPUS_A4" Name="RequiredAppeal" Value="4"/>
        <Row ModifierId="TRAIT_CAMPUS_A4" Name="YieldChange" Value="1"/>
        <Row ModifierId="TRAIT_CAMPUS_A4" Name="DistrictType" Value="DISTRICT_CAMPUS"/>
        <Row ModifierId="TRAIT_CAMPUS_A4" Name="Description" Value="LOC_DISTRICT_APPEAL_SCIENCE"/>
        
        <Row ModifierId="TRAIT_CAMPUS_A5" Name="YieldType" Value="YIELD_SCIENCE"/>
        <Row ModifierId="TRAIT_CAMPUS_A5" Name="RequiredAppeal" Value="5"/>
        <Row ModifierId="TRAIT_CAMPUS_A5" Name="YieldChange" Value="1"/>
        <Row ModifierId="TRAIT_CAMPUS_A5" Name="DistrictType" Value="DISTRICT_CAMPUS"/>
        <Row ModifierId="TRAIT_CAMPUS_A5" Name="Description" Value="LOC_DISTRICT_APPEAL_SCIENCE"/>
        
        <Row ModifierId="TRAIT_CAMPUS_A6" Name="YieldType" Value="YIELD_SCIENCE"/>
        <Row ModifierId="TRAIT_CAMPUS_A6" Name="RequiredAppeal" Value="6"/>
        <Row ModifierId="TRAIT_CAMPUS_A6" Name="YieldChange" Value="1"/>
        <Row ModifierId="TRAIT_CAMPUS_A6" Name="DistrictType" Value="DISTRICT_CAMPUS"/>
        <Row ModifierId="TRAIT_CAMPUS_A6" Name="Description" Value="LOC_DISTRICT_APPEAL_SCIENCE"/>
    </ModifierArguments>
 
Back
Top Bottom