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

Dynamic Traits Discussion

Discussion in 'Civ4 Fallout: Tame The Waste (FTTW)' started by Lib.Spi't, Jan 28, 2015.

  1. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    (Coming in Alpha5)

    What is Dynamic Traits?
    Original Mod Component Thread

    Dynamic Traits is a system that lets the Leader of each Faction gain and lose traits depending on what actions they take.

    So for example if you kill lots of enemy units, you might get a 'Bloodlust' Trait that gives you various Trait Based Bonuses or Penalties.

    This thread is to discuss the possibilities of this new system.

    Trait Tags:

    FTTW Traits Tag Info

    Full Trait Entry
    Spoiler :
    Code:
    Full info 
    Values in optional tags are the default that will be applied if the tag is not present
    
    <TraitInfo>
      <Type>TRAIT_XXX</Type>
      <Description>TXT_KEY_TRAIT_XXX</Description>
      <ShortDescription>TXT_KEY_TRAIT_XXX_SHORT</ShortDescription>
      <Help>TXT_KEY_TRAIT_XXX_HELP</Help>
      <iHealth>0</iHealth>
      <iHappiness>0</iHappiness>
      <iMaxAnarchy>-1</iMaxAnarchy>
      <iUpkeepModifier>0</iUpkeepModifier>
      <iLevelExperienceModifier>0</iLevelExperienceModifier>
      <iGreatPeopleRateModifier>0</iGreatPeopleRateModifier>
      <iGreatGeneralRateModifier>0</iGreatGeneralRateModifier>
      <iDomesticGreatGeneralRateModifier>0</iDomesticGreatGeneralRateModifier>
      <iMaxGlobalBuildingProductionModifier>0</iMaxGlobalBuildingProductionModifier>
      <iMaxTeamBuildingProductionModifier>0</iMaxTeamBuildingProductionModifier>
      <iMaxPlayerBuildingProductionModifier>0</iMaxPlayerBuildingProductionModifier>
      <ExtraYieldThresholds>
        <iExtraYieldThreshold>0</iExtraYieldThreshold>
        <iExtraYieldThreshold>0</iExtraYieldThreshold>
        <iExtraYieldThreshold>0</iExtraYieldThreshold>
        <iExtraYieldThreshold>0</iExtraYieldThreshold>
        <iExtraYieldThreshold>0</iExtraYieldThreshold>
      </ExtraYieldThresholds>
      <TradeYieldModifiers>
        <iYield>0</iYield>
        <iYield>0</iYield>
        <iYield>0</iYield>
        <iYield>0</iYield>
        <iYield>0</iYield>
      </TradeYieldModifiers>
      <CommerceChanges>
        <iCommerce>0</iCommerce>
        <iCommerce>0</iCommerce>
        <iCommerce>0</iCommerce>
        <iCommerce>0</iCommerce>
      </CommerceChanges>
      <CommerceModifiers>
        <iCommerce>0</iCommerce>
        <iCommerce>0</iCommerce>
        <iCommerce>0</iCommerce>
        <iCommerce>0</iCommerce>
      </CommerceModifiers>
      <PeaceCommerceModifiers>
        <iCommerce>0</iCommerce>
        <iCommerce>0</iCommerce>
        <iCommerce>0</iCommerce>
        <iCommerce>0</iCommerce>
      </PeaceCommerceModifiers>
      <PillageCommerceModifiers>
        <iCommerce>0</iCommerce>
        <iCommerce>0</iCommerce>
        <iCommerce>0</iCommerce>
        <iCommerce>0</iCommerce>
      </PillageCommerceModifiers>
      <PillageYieldModifiers>
        <iYield>0</iYield>
        <iYield>0</iYield>
        <iYield>0</iYield>
        <iYield>0</iYield>
        <iYield>0</iYield>
      </PillageYieldModifiers>
      <FreePromotions>
        <FreePromotion>
          <PromotionType>NO_PROMOTION</PromotionType>
          <bFreePromotion>1</bFreePromotion>
        </FreePromotion>
      </FreePromotions>
      <FreePromotionUnitCombats>
        <FreePromotionUnitCombat>
          <UnitCombatType>NO_UNITCOMBAT</UnitCombatType>
          <bFreePromotionUnitCombat>1</bFreePromotionUnitCombat>
        </FreePromotionUnitCombat>
      </FreePromotionUnitCombats>
      <UnitClassProductionModifiers>
        <UnitClassProductionModifier>
          <UnitClassType>NO_UNITCLASS</UnitClassType>
          <iProductionModifier>0</iProductionModifier>
        </UnitClassProductionModifier>
      </UnitClassProductionModifiers>
      <UnitCategoryProductionModifiers>
        <UnitCategoryProductionModifier>
          <UnitCategoryType>NO_UNITCATEGORY</UnitCategoryType>
          <iProductionModifier>0</iProductionModifier>
        </UnitCategoryProductionModifier>
      </UnitCategoryProductionModifiers>
      <UnitRaceProductionModifiers>
        <UnitRaceProductionModifier>
          <UnitRaceType>NO_RACE</UnitRaceType>
          <iProductionModifier>0</iProductionModifier>
        </UnitRaceProductionModifier>
      </UnitRaceProductionModifiers>
      <iFreeSpecialist>0</iFreeSpecialist>
      <FreeSpecialistCounts>
        <FreeSpecialistCount>
          <SpecialistType>NO_SPECIALIST</SpecialistType>
          <iFreeSpecialistCount>0</iFreeSpecialistCount>
        </FreeSpecialistCount>
      </FreeSpecialistCounts>
      <SpecialistValids>
        <SpecialistValid>
          <SpecialistType>NO_SPECIALIST</SpecialistType>
          <bValid>1</bValid>
        </SpecialistValid>
      </SpecialistValids>
      <SpecialistExtraCommerces>
        <iCommerce>0</iCommerce>
        <iCommerce>0</iCommerce>
        <iCommerce>0</iCommerce>
        <iCommerce>0</iCommerce>
      </SpecialistExtraCommerces>
      <SpecialistCommerceChanges>
        <SpecialistCommerceChange>
          <SpecialistType>NO_SPECIALIST</SpecialistType>
          <CommerceChanges>
            <iCommerce>0</iCommerce>
            <iCommerce>0</iCommerce>
            <iCommerce>0</iCommerce>
            <iCommerce>0</iCommerce>
          </CommerceChanges>
        </SpecialistCommerceChange>
      </SpecialistCommerceChanges>
      <SpecialistCommercePercentChanges>
        <SpecialistCommercePercentChange>
          <SpecialistType>NO_SPECIALIST</SpecialistType>
          <SpecialistCommercePercents>
            <iCommerce>0</iCommerce>
            <iCommerce>0</iCommerce>
            <iCommerce>0</iCommerce>
            <iCommerce>0</iCommerce>
          </SpecialistCommercePercents>
        </SpecialistCommercePercentChange>
      </SpecialistCommercePercentChanges>
      <SpecialistYieldChanges>
        <SpecialistYieldChange>
          <SpecialistType>NO_SPECIALIST</SpecialistType>
          <YieldChanges>
            <iYield>0</iYield>
            <iYield>0</iYield>
            <iYield>0</iYield>
            <iYield>0</iYield>
            <iYield>0</iYield>
          </YieldChanges>
        </SpecialistYieldChange>
      </SpecialistYieldChanges>
      <SpecialistYieldPercentChanges>
        <SpecialistYieldPercentChange>
          <SpecialistType>NO_SPECIALIST</SpecialistType>
          <SpecialistYieldPercents>
            <iYield>0</iYield>
            <iYield>0</iYield>
            <iYield>0</iYield>
            <iYield>0</iYield>
            <iYield>0</iYield>
          </SpecialistYieldPercents>
        </SpecialistYieldPercentChange>
      </SpecialistYieldPercentChanges>
      <bCoreTrait>0</bCoreTrait>
      <ParentTrait>NO_TRAIT</ParentTrait>
      <ChildTrait>NO_TRAIT</ChildTrait>
      <iKilledUnitCounterMod>0</iKilledUnitCounterMod>
      <iCityTakenCounterMod>0</iCityTakenCounterMod>
      <iPlayerKilledCounterMod>0</iPlayerKilledCounterMod>
      <iImprovementPillagedCounterMod>0</iImprovementPillagedCounterMod>
      <iCityRazedCounterMod>0</iCityRazedCounterMod>
      <iVassalGainedCounterMod>0</iVassalGainedCounterMod>
      <iUnitGainedLevelCounterMod>0</iUnitGainedLevelCounterMod>
      <iGPPointsCounterMod>0</iGPPointsCounterMod>
      <iGPBornCounterMod>0</iGPBornCounterMod>
      <iNumTradeRoutesCounterMod>0</iNumTradeRoutesCounterMod>
      <iPopGrowthCounterMod>0</iPopGrowthCounterMod>
      <iUnitLostCounterMod>0</iUnitLostCounterMod>
      <iCityLostCounterMod>0</iCityLostCounterMod>
      <iReligionFoundedCounterMod>0</iReligionFoundedCounterMod>
      <iExcessHappinessCounterMod>0</iExcessHappinessCounterMod>
      <iExcessHealthCounterMod>0</iExcessHealthCounterMod>
      <iAttackVictoryCounterMod>0</iAttackVictoryCounterMod>
      <iDefenseVictoryCounterMod>0</iDefenseVictoryCounterMod>
      <iWonderConstructedCounterMod>0</iWonderConstructedCounterMod>
      <iFoodCounterMod>0</iFoodCounterMod>
      <iHammersCounterMod>0</iHammersCounterMod>
      <iCommerceCounterMod>0</iCommerceCounterMod>
      <iScienceCounterMod>0</iScienceCounterMod>
      <iCultureCounterMod>0</iCultureCounterMod>
      <iGoldCounterMod>0</iGoldCounterMod>
      <UnitCombatKilledCounterMods>
        <UnitCombatKilledCounterMod>
          <UnitCombatType>NO_UNITCOMBAT</UnitCombatType>
          <iCounterMod>0</iCounterMod>
        </UnitCombatKilledCounterMod>
      </UnitCombatKilledCounterMods>
      <ResourceOwnedCounterMods>
        <ResourceOwnedCounterMod>
          <ResourceType>NO_BONUS</ResourceType>
          <iCounterMod>0</iCounterMod>
        </ResourceOwnedCounterMod>
      </ResourceOwnedCounterMods>
    </TraitInfo>

    Links to Python Trait Threads


    List of Actions That Can Influence Traits:
    Spoiler :
    bCoreTrait
    ParentTrait
    ChildTrait
    iKilledUnitCounterMod
    iCityTakenCounterMod
    iPlayerKilledCounterMod
    iImprovementPillagedCounterMod
    iCityRazedCounterMod
    iVassalGainedCounterMod
    iUnitGainedLevelCounterMod
    iGPPointsCounterMod
    iGPBornCounterMod
    iNumTradeRoutesCounterMod
    iPopGrowthCounterMod
    iUnitLostCounterMod
    iCityLostCounterMod
    iReligionFoundedCounterMod
    iExcessHappinessCounterMod
    iExcessHealthCounterMod
    iAttackVictoryCounterMod
    iDefenseVictoryCounterMod
    iWonderConstructedCounterMod
    iFoodCounterMod
    iHammersCounterMod
    iCommerceCounterMod
    iScienceCounterMod
    iCultureCounterMod
    iGoldCounterMod
    UnitCombatKilledCounterMods
    ResourceOwnedCounterMods


    When Built:
    Specific Units Can Also Affect Traits
    Specific Buildings Can Also Affect Traits
    Specific Improvements Can Also Affect Traits

    Trait Title:
    Gains: Means how to get points towards this trait
    Losses: Means how to lose points towards this trait
    Effect: Means what the trait will actually do.
     
  2. Randomness

    Randomness ...

    Joined:
    Jul 15, 2008
    Messages:
    557
    Location:
    ...
    I'm really excited for this! I was really disapointed that RiFE never finished their implementation of this, so it's great to see it incorporated here.
     
  3. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    Yes, we have archid to thank for bringing it to the end zone, it is very exciting!

    I am also negotiating with(begging) to get the Traits file expanded with even more functionality, so if he pulls any of that out the bag as well, we are going to have a lot of fun ahead!

    Feel free to brainstorm any thoughts or ideas about stuff!
     
  4. Archid

    Archid Warlord

    Joined:
    Oct 30, 2009
    Messages:
    287
    Location:
    North Wales, UK
    I want to get all the components from the K-Fallout code base incorporated first then I can move onto expanding what traits can do.

    If you want a trait to do something add a new ticket please into SourceForge here and I'll eventually get round to it :)

    I have a whole host of trait enhancements in my own mod so I may already have code for some of these.
     
  5. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    Yeah, I know that's your plan and it is all good!

    You already have my ever growing list of thoughts, so I figured I would leave you alone to get on with it! :D

    It is all tremendously exciting. Now I just need the mod supporters to start talking and helping me generate and flesh out ideas and concepts for all the new toys that are coming our way! :D
     
  6. Randomness

    Randomness ...

    Joined:
    Jul 15, 2008
    Messages:
    557
    Location:
    ...
    Could traits have trait prereqs? It would be really cool to do "trait trees". For example, if a civ gains the "Scientific" and "Agressive" traits, they could gain a trait that gives science from combat. It could also open up the possibility of civ specific traits. For example, the Mutants trait could allow a variety of other traits that give bonuses to fallout, some millitaristic, some economic, ect.
     
  7. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    Yes, I have discussed the possibility of something like this with Archid, (well I say discussed,more like said 'it would be cool if') We will see what comes down the road.

    What we do have currently is 'Trait Levels' that stack up on each other, so we can have trait lines, but right now not trait trees.

    But we can have a trait that requires you to develop science and/or(by setting it to very low we can simulate it, but points will be points, we can't make two types of points) combat actions to get it.

    We currently don't have a mod for yield/commerce from combat.

    They may come in the future though.

    Keep the ideas coming, if we can get some conversations going, hopefully more people will be inclined to join them!
     
  8. Archid

    Archid Warlord

    Joined:
    Oct 30, 2009
    Messages:
    287
    Location:
    North Wales, UK
    The changes to trait tags in FTTW are on the FTTW modding corner web site here

    @Lib - you might want to update the link in the first post to use this URL instead
     
  9. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    Yes, well done and will do!

    All done first post updated! thanks for reminding me to do that!
     
  10. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    ok random half finished ideas time.

    Mining Trait:
    Gains: Building Mines, Possesing 'Mined' Bonus Resources.
    Losses: Building Quarries, Building Windmills
    Effect: Perhaps certain buildings get a boost from this trait. (need to look into trait effects on various entities)

    Farming Trait:
    Gains: Building Gardens/Farms, Possesing 'Farmed' Bonus Resources.
    Losses: Building Quarries, Building Workshops, etc.
    Effect: Perhaps certain buildings get a boost from this trait. (need to look into trait effects on various entities)

    Ranching Trait:
    Gains: Building Ranches/Pastures, Possesing 'Domesticated Animal' Bonus Resources.
    Losses: Building Quarries, Building Workshops, etc.
    Effect: Perhaps certain buildings get a boost from this trait. (need to look into trait effects on various entities)
     
  11. Archid

    Archid Warlord

    Joined:
    Oct 30, 2009
    Messages:
    287
    Location:
    North Wales, UK
    I'm curious as to why every trait has to have negative effects as well. I thought the point of dynamic traits was to try and include the concept that you get better at something the more you do it.

    In my comments I am presuming these traits are going to be gained by counters rather than hard-coded to a faction or faction leader. As an example by blocking Quarries with Mining you are effectively saying that a faction knows how to build (and can have built) Quarries, until suddenly one day they forget how to do that because they are also building a lot of mines (or whatever the counter mod is for the Mining trait). The Mining trait could then be replaced by another and suddenly the faction reqains the knowledge of how to build Quarries. With these negatives you are saying that there is a finite amount of knowledge in a civilization and if you learn something new you much forget something to make room for it. Gaining a trait, which should be a positive thing for a civ could become crippling and it can be very difficult to lose a trait.
     
  12. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    not sure if you are reading my thoughts right there.

    Gains: Means how to get points towards this trait
    Losses: Means how to lose points towards this trait
    Effect: Means what the trait will actually do.

    So with these traits you could think of them a bit like long term investment. If you build mines, you get a boost to your mining industry. If you build farms you get a boost to your farming industry.

    It is my first very limited and sleepy thoughts on an idea to kind of simulate your leader/nation ecomonic policy and long term investment strategies.

    The ways in which you invest in the development of your lands, may lead you to become 'weighted' towards that industry, kind of simulating the idea that your population moves in this direction, because that is where the subsidies and government money is being spent.

    Right now I am just struggling to hold in my head a complete picture of what can influnce traits, and what traits can influence.
     
  13. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    Baby Boom Trait:
    Gains: Food Production, City growth
    Losses: hammer production
    Effect: Some kind of boost towards population growth.
     
  14. Archid

    Archid Warlord

    Joined:
    Oct 30, 2009
    Messages:
    287
    Location:
    North Wales, UK
    One thing that the new DynTraits that I am working on differs is that there is the concept of trait classes and you define the max number of traits that a leader can gain per class rather than overall number of traits.

    Using this if you create an 'Improvements' class, for want of better terminology for now, you can add your Mining, Ranching, etc. into that class and then only allow leaders to have a single trait of this class. This negates the need for negative counters to try and suppress other traits, the mechanics mean that only the one that you really focus on has a chance of being gained. It would also allow specific factions, if the game lore allows it, to have up to 2 of these traits as a differentiator.
     
  15. Archid

    Archid Warlord

    Joined:
    Oct 30, 2009
    Messages:
    287
    Location:
    North Wales, UK
    Traits can also be set to be mutually exclusive if you don't want to add a new trait class
     
  16. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    Yes both of those features sound like they would add some interesting choices.
     
  17. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    We now have the ability to make Trait Trees, with both And/Or Options.

    We can also have Traits that exclude/remove other traits.
     

Share This Page