1. Firaxis celebrates the "Asian American and Pacific Islander Heritage Month", and offers a give-away of a Civ6 anthology copy (5 in total)! For all the details, please check the thread here. .
    Dismiss Notice
  2. We have selected the winners of the Old World random draw and competition. For the winning entries, please check this thread.
    Dismiss Notice
  3. Old World has finally been released on GOG and Steam, besides also being available in the Epic store . Come to our Old World forum and discuss with us!
    Dismiss Notice

Opportunities

Discussion in 'Communitas Expansion Pack' started by Thalassicus, Jan 31, 2012.

  1. Thalassicus

    Thalassicus Bytes and Nibblers

    Joined:
    Nov 9, 2005
    Messages:
    11,057
    Location:
    Texas
    Unfortunately I think we have:

    Get major civ mood
    Set major civ mood
    Get minor civ mood
    Set minor civ mood

    I'll ask in the main modding forum.
     
  2. Txurce

    Txurce Deity

    Joined:
    Jan 4, 2002
    Messages:
    8,280
    Location:
    Venice, California
    1. I think so, since some actions you take now affect the modifier. But unless the effect is really diluted, it may be too strong (i.e., lucky) for an Opportunity.

    2. This widens the gulf between the AI and the player, since the AI can't take advantage of it.
     
  3. Seek

    Seek Deity Supporter

    Joined:
    Aug 7, 2010
    Messages:
    3,410
    Events/opportunities that affect City-States would be a welcome addition at least.:)

    ---------

    Slightly off topic, but in the interview with Dennis Shirk on a German site, he mentions that "there will be events in the game" - I wonder, was this the impetus to add them into VEM? (Note, he could've been referring to normal game "events" and not the Civ4-style ones - without the original interview it's impossible to say.)
     
  4. albie_123

    albie_123 Modding In Secret

    Joined:
    Mar 12, 2010
    Messages:
    1,380
    Location:
    Sydney, NSW
    I don't think so. A negative / positive modifier towards another Civ is probably worth less than +5 Production in the long run, and it has a huge historical basis.

    That's a good point.
     
  5. Txurce

    Txurce Deity

    Joined:
    Jan 4, 2002
    Messages:
    8,280
    Location:
    Venice, California
    For me the historical basis is the icing on the cake. It's about how big the modifier is. If it's the effective equivalent of everything else, I'm all for it.
     
  6. albie_123

    albie_123 Modding In Secret

    Joined:
    Mar 12, 2010
    Messages:
    1,380
    Location:
    Sydney, NSW
    I would say it is, but Thal is probably more likely to know about the balance side of things.

    In much the same way XP values are not necessarily equivalent to a yield value, so are relationship modifier values. However, when we consider what '1 point' of relationship does, it is clear that it is not that powerful. That is not to say higher relationships can't be extremely valuable: DoF's, Open Borders, and RA's are all extremely good bonuses. But there are many already existing relationship modifiers at any given point in a game, and so a small modifier is unlikely to be particularly worrying.

    As well as this, it should be considered that a higher relationship value is not always more beneficial. Diplomacy wise, it is better for the player to have a Civ declare war than to declare war on them yourself.

    Because of this, the opportunities should be dependant on what the relationship value is to start off with: If you are good friends with a Civ, there should never be an opportunity that ONLY has negative diplomatic repurcussions, as it is likely the player won't want to lose that friend. On the other hand, if you are mortal enemies with a Civ, opportunities should reflect that: It is unlikely the player is aiming to get a DoF or an RA with them.
     
  7. Thalassicus

    Thalassicus Bytes and Nibblers

    Joined:
    Nov 9, 2005
    Messages:
    11,057
    Location:
    Texas
    I've been improving the inner workings of this (partially described in post #49), and hope to have it finished within a few days. As a player you will mostly notice fewer extremes. Less often will we go for long periods without an opportunity, or get a bunch in quick succession, or get the same one multiple times in a row, and so on. The new system is much easier to balance. It's also easier to write code for (which will make my job easier), since each opportunity now requires 12% as much code as the old version.

    For anyone creating new opportunities, here are the possible targets I've come up with so far:

    • Policy
    • Player (check our relationship with other players)
    • Citystate (we can make much better citystate quests here!)
    • City
    • Building Class
    • Owned Plot
    • Improvement
    • Any Plot
    • Unit
    • Unit Class
    • Turn (always happens on a specific turn)
    • Custom (handled manually, without any automatic checks)
    The first batch of opportunities targeted improvements and building classes.

    Here's an example of how an opportunity is defined with the new system:
    PHP:
    <GameData>
      <
    Triggers>
        <
    Row><Type>COMMERCIAL_FARMING</Type> <ImprovementType>IMPROVEMENT_FARM</ImprovementType></Row>
      </
    Triggers>
      <
    Trigger_Outcomes>
        <
    Row><TriggerType>COMMERCIAL_FARMING</TriggerType> <ID>1</ID><Yield>2</Yield><YieldType>YIELD_FOOD</YieldType> <GoldCost>150</GoldCost></Row>  
        <
    Row><TriggerType>COMMERCIAL_FARMING</TriggerType> <ID>2</ID><Yield>3</Yield><YieldType>YIELD_GOLD</YieldType> <GoldCost>150</GoldCost></Row>  
        <
    Row><TriggerType>COMMERCIAL_FARMING</TriggerType> <ID>3</ID><Yield>1</Yield><YieldType>YIELD_GOLD</YieldType> </Row>
      </
    Trigger_Outcomes>
    </
    GameData>
    The tables:
    Spoiler :
    Code:
    <Table name="Triggers">
      <Column name="ID" type="integer" primarykey="true" autoincrement="true"/>
      <Column name="Type" type="text" notnull="true" unique="true"/>
      <Column name="UnitClass" type="text" reference="UnitClasses(Type)" />
      <Column name="BuildingClass" type="text" reference="BuildingClasses(Type)" />
      <Column name="ImprovementType" type="text" reference="ImprovementType(Type)" />
      <Column name="TriggerClass" type="text" reference="TargetClasses(Type)" />
      <Column name="PrereqTech" type="text" reference="Technologies(Type)" />
    </Table>
    <Table name="TargetClasses">
      <Column name="ID" type="integer" primarykey="true" autoincrement="true"/>
      <Column name="Type" type="text" notnull="true" unique="true"/>
    </Table>
    <Table name="Trigger_Outcomes">
      <Column name="TriggerType" type="text" reference="Triggers(Type)"/>
      <Column name="ID" type="integer" default="1" />
      <Column name="Condition" type="text" default="Events.TrigCondition.Gold" />
      <Column name="GoldCost" type="integer" default="0" />
      <Column name="Action" type="text" default="Events.TrigAction.PlotYield" />
      <Column name="YieldType" type="text" reference="Yields(Type)" />
      <Column name="Yield" type="integer" default="0" />
    </Table>
    Condition and Action are function names to call for an outcome.
     
  8. Sneaks

    Sneaks Brooklyn Bum

    Joined:
    Oct 15, 2010
    Messages:
    1,877
    Location:
    NYC
    I'll try to throw some together soon.
     
  9. albie_123

    albie_123 Modding In Secret

    Joined:
    Mar 12, 2010
    Messages:
    1,380
    Location:
    Sydney, NSW
    Is it possible to make a production modifier from an opportunity, perhaps with a dummy building?

    For example, for an event after a war has ended:

    The end of war has given our nation a chance to recover.

    A &#8211; We must rebuild our infrastructure. (-100 :c5gold:, +30% :c5production: for Buildings for 30 turns)
    B &#8211; We must rebuild our military. (-100 :c5gold:, +30% :c5production: for Military Units for 30 turns)
    C &#8211; Let the local Governments decide how to recover. (+10% :c5production: for 30 turns)

    No idea about the balance. Just as a general idea.
     
  10. Thalassicus

    Thalassicus Bytes and Nibblers

    Joined:
    Nov 9, 2005
    Messages:
    11,057
    Location:
    Texas
    That would be possible.
     
  11. albie_123

    albie_123 Modding In Secret

    Joined:
    Mar 12, 2010
    Messages:
    1,380
    Location:
    Sydney, NSW
    My only fear with the more complex events is that the AI might not know how to use them.
     
  12. Txurce

    Txurce Deity

    Joined:
    Jan 4, 2002
    Messages:
    8,280
    Location:
    Venice, California
    I think examples like the post-war one above work for the AI, because they come out ahead choosing either A or B. Whether A is strategically better than B is something they can't be expected to decide as well as a human player, but that's par for the course.

    I'm curious - if the AI has the gold, do they ever choose C? They shouldn't.
     
  13. Txurce

    Txurce Deity

    Joined:
    Jan 4, 2002
    Messages:
    8,280
    Location:
    Venice, California
    Every time I'm offered the option of paying for gold per turn, I conclude that inflation makes it not worth it. Does anyone play this differently?
     
  14. wobuffet

    wobuffet Barbarian

    Joined:
    Jun 27, 2011
    Messages:
    1,248
    I'm wary that the after-war thing would encourage warmongering, or strategic "wage a meaningless war for a while just to reap the recovery benefits" play.

    There's not really any inflation in Civ V, other than :c5science:RAs and CS :c5influence:Influence. Inflation refers to the rising of prices of goods and services, not the devaluation of money.
     
  15. Txurce

    Txurce Deity

    Joined:
    Jan 4, 2002
    Messages:
    8,280
    Location:
    Venice, California
    I did mean the rising price of goods and services... which quickly makes the gold boost seem devalued.
     
  16. wobuffet

    wobuffet Barbarian

    Joined:
    Jun 27, 2011
    Messages:
    1,248
    Never mind, I was being silly... it's just a semantic thing: the price of any given unit (say, a Knight) doesn't rise over time. The price of a decent unit or building does though, which I assume is what you meant.
     
  17. Txurce

    Txurce Deity

    Joined:
    Jan 4, 2002
    Messages:
    8,280
    Location:
    Venice, California
    Yes, you're right. The idea of playing 150g now to get +3g for the rest of the game just doesn't seem appealing. Does it to you?
     
  18. Seek

    Seek Deity Supporter

    Joined:
    Aug 7, 2010
    Messages:
    3,410
    It's opportunity cost: If the option comes early enough/if there's nothing better to spend your savings on, etc. But I agree that just about any other yield seems more valuable much of the time.

    I do like how events and higher priced RAs have been increasing the value of gold recently in VEM, though.
     
  19. Jaybe

    Jaybe civus fanaticus Supporter

    Joined:
    Sep 24, 2001
    Messages:
    2,583
    Gender:
    Male
    Location:
    Las Vegas, Nevada
    Do you have the gold reserves to pay it and still have a comfortable amount?
    Do you anticipate the game lasting more than 50 more turns?

    If the answer to either of these questions is 'no', then pass. Otherwise, do it! :crazyeye:
     
  20. Txurce

    Txurce Deity

    Joined:
    Jan 4, 2002
    Messages:
    8,280
    Location:
    Venice, California
    Yes, the higher-priced RA's are great. I'm definitely pickier about who I sign them with, even if I have the gold.
     

Share This Page