1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Questions I haven't been able to answer on my own. Any help is appreciated

Discussion in 'Mod Creation Help' started by Oathkeeper Oblivion, Dec 5, 2020.

  1. Oathkeeper Oblivion

    Oathkeeper Oblivion Chieftain

    Joined:
    Oct 23, 2020
    Messages:
    23
    After learning how to mod and spending near 100 hours modding civ 6 with a group, there are still some questions I can't answer and modifiers/requirements I cannot find. Thank you in advance, I hope to give back to this community as much as I've been given.

    1. Are abilities that target enemy Civs possible? For example, a new leader trait that gives -5% science production to any Civ you are at war with.

    2. Possible to make a requirement set that tracks the amount of gold a player posseses? For the purpose of triggering a gift at certain milestones (ex: at 250 gold acquire a boost to currency)

    3. Possible to make a requirement that checks how far you are away from the coast? Hojo's ability works if you are within 1 tile of a coast, I'm wondering if I can up that to 2 or 3 with RequirementArguments maybe?
    4. Possible to make a requirement that an enemy unit is nearby? I've asked this on this forum before but have yet to find an answer. For example; The Varu unit (x) applies a modifier to adjacent units (y). Instead, I would like the modifier to be applied to the unit itself (x) with a requirement that enemy units (y) are adjacent or nearby.
    5. In R&F, researching a tech ahead of the world's era is more expensive. Is this something I can bring into Vanilla Civ? I cannot find requirements for tracking player and world era in Vanilla civ.

    6. What can I bring from scenarios into regular or vanilla civ? Can I bring the Aliens Civ from Red Death? Would I be able to recreate the heroes from the Heroes and Legends scenario in vanilla civ? Are the modifiers and types available when not running those scenarios?

    7. The Pirates scenario introduced a unit that is able to board onto and disembark from ships. Is this an ability I could bring into vanilla civ, allowing ships to transport units across the sea?
    After running through testing over so many wasted hours, I figured I'd reach out for help to answer these questions that stump me repeatedly. I'd appreciate any help or advice.
     
  2. Zegangani

    Zegangani Warlord

    Joined:
    Oct 9, 2020
    Messages:
    215
    Gender:
    Male
    As much as I've been given by this community too, just like you I want to do my part and give something back.

    1) Actually NO. But You can target a trait for a specific Civilization (Like No suprise War against Canada), but that works only with DiplomaticActionTypes, such as declaring War/Friendship, denounce, make Peace...). You can just use it as a modifier trigered by Buildings, Governors...

    2) There is a "REQUIRES_HAS_HIGH_INCOME" requirement (I think it's for some Agenda), but don't know what that "High" is. It seems there is no requirement such as "tracks the amount of gold a player posseses". But this (your Goal) is definitely doable with Lua coding.

    4) Search in Requirements for Opponents, you will find plenty requirement types for a nearby opponent (such as being on a certain terrain type, Promotion Type, being fortified, Domain...)

    Hetairos Unit Ability (+5 Combat Bonus from adjacent Great General) is similar to what you want to achieve:

    Modifiers:
    Code:
    ModifierId:
    HETAIROI_GREAT_GENERAL_COMBAT_BONUS
    ModifierType:
    MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH
    SubjectRequirementSetId:
    UNIT_ADJACENT_TO_GREAT_GENERAL_REQUIREMENTS
    ModifierArguments:
    Code:
    ModifierId:
    HETAIROI_GREAT_GENERAL_COMBAT_BONUS
    Name:
    Amount
    Value:
    5
    Requirement:
    Code:
    RequirementId:
    UNIT_ADJACENT_TO_GREAT_GENERAL
    RequirementType:
    REQUIREMENT_PLOT_ADJACENT_FRIENDLY_UNIT_TYPE_MATCHES 
    RequirementArguments
    Code:
    RequirementId:
    UNIT_ADJACENT_TO_GREAT_GENERAL
    Name:
    UnitType
    Value:
    UNIT_GREAT_GENERAL
    RequirementId:
    UNIT_ADJACENT_TO_GREAT_GENERAL
    Name:
    IncludeCenter
    Value:
    true
    RequirementSets
    Code:
    RequirementSetId:
    UNIT_ADJACENT_TO_GREAT_GENERAL_REQUIREMENTS
    RequirementSetType:
    REQUIREMENTSET_TEST_ALL 
    RequirementSetRequirements:
    Code:
    RequirementSetId:
    UNIT_ADJACENT_TO_GREAT_GENERAL_REQUIREMENTS
    RequirementId:
    UNIT_ADJACENT_TO_GREAT_GENERAL 
    5) The Cost Change of Techs/Civics of being ahead or behind the current era is not a Requirement but a Global Parameter. You can Find it in the GlobalParameters Table. The current costs are set to +20% for being ahead of the current era and -20% for being behind it (for both, Techs and Civics).
    ("CIVIC_COST_PERCENT_CHANGE_AFTER_GAME_ERA" "CIVIC_COST_PERCENT_CHANGE_BEFORE_GAME_ERA" "TECH_COST_PERCENT_CHANGE_AFTER_GAME_ERA" "TECH_COST_PERCENT_CHANGE_BEFORE_GAME_ERA")

    6) There is a Mod that brought "The Black Death Scenario" as a Mod, so you can play it in a regular game (Plague with all the Doctors and stuff - although I haven't tried it yet). So maybe it's possible what you want. see here: Plague Mod. The Mod is not compatibile with some UI Mods (No wonder).

    7) I'm also interrested in implementing this in the regular Game. It would just add more realism to Unit transportation (and make the Game more interesting), maybe also with desabling Land Units to embark, so you can only transport them via Naval Units. It's Like your 6# Question, perhaps Yes! (with a lot of re-coding)

    Edit: @raen made a very helpful tool to search the database configuration. I highly suggest using it while modding (for Reference purposes).
     
    Last edited: Dec 6, 2020

Share This Page