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

(closed fixed) Custom Agenda Help

Discussion in 'Mod Creation Help' started by SlySlySly, Apr 4, 2017.

  1. SlySlySly

    SlySlySly Warlord

    Joined:
    Feb 8, 2017
    Messages:
    293
    Gender:
    Female
    Location:
    Denver
    I'm working on a custom civ and leader. I need help with the agenda.

    Agenda: Kakushintekina Jogi - "Innovative Ruler," likes civilizations with a high science output and happy people, dislikes civilizations that have barbarians or rebels near their cities.

    Can someone help me make this? Please?
     
  2. kantorr

    kantorr Chieftain

    Joined:
    Mar 1, 2017
    Messages:
    51
    What you're doing with an "Agenda" is just attaching modifiers to a Leader. The chain of attaching the modifiers should look like this:
    <-- Modifier 2
    Leader <-- Agenda <-- Trait <-- Modifier 1
    <-- Modifier 3

    It doesn't look like you have attached the agenda to the leader (don't know if you're just omitting it here). But from the Leaders.xml it looks like it would be this:
    <HistoricalAgendas>
    <Row LeaderType="LEADER_YOURLEADER" AgendaType="AGENDA_AKANE_JOGI" />
    </HistoricalAgendas>

    Most of that stuff looks right. Your traitmodifiers are backwards, but I don't know if the game cares.
    <TraitModifiers>
    <Row TraitType="TRAIT_AGENDA_AKANE_JOGI" ModifierId="MODIFIER_AGENDA_HIGH_SCIENCE" />
    </TraitModifiers>

    You dont need anything in the kinds tag I wouldnt think.

    You'll need an AiList to list the favors, such as high science, barb clearing etc. This just makes the Ai choose science over other yields. This doesn't affect diplomacy.
    <AiListTypes>
    <Row ListType="AkaneJogiHighScience" />
    </AiListTypes>

    <AiLists>
    <Row ListType="AkaneJogiHighScience" AgendaType="AGENDA_AKANE_JOGI" System="Yields" /> --Here is where the agenda is attached to an AiList
    </AiLists>

    <AiFavoredItems>
    <Row ListType="AkaneJogiHighScience" Item="YIELD_SCIENCE" Value="20" />

    Now that I assume you have a leader, the leader has an agenda, a basic AI agenda, an attached agenda with a modifier and the high science modifier. Now you just need to define the modifiertype and its arguments, as well as a requirementset and then that should be done.
    <Modifiers>
    <Row>
    <ModifierId>MODIFIER_AGENDA_HIGH_SCIENCE</ModifierId>
    <ModifierType>MODIFIER_PLAYER_DIPLOMACY_SIMPLE_MODIFIER</ModifierType>
    <SubjectRequirementSetId>PLAYER_HAS_HIGH_SCIENCE</SubjectRequirementSetId> --Without this req set, you would get the diplo bonus no matter what
    </Row>
    </Modifiers>
    <ModifierArguments>
    <Row>
    <ModifierId>MODIFIER_AGENDA_HIGH_SCIENCE</ModifierId>
    <Name>InitialValue</Name>
    <Value>6</Value> --This is the diplo bonus
    </Row>
    <Row>
    <ModifierId>MODIFIER_AGENDA_HIGH_SCIENCE</ModifierId>
    <Name>StatementKey</Name>
    <Value>LOC_DIPLO_KUDO_LEADER_ANY_REASON_AGENDA_HIGH_SCIENCE</Value> --Could be any text you want
    </Row>
    <Row>
    <ModifierId>MODIFIER_AGENDA_HIGH_SCIENCE</ModifierId>
    <Name>SimpleModifierDescription</Name>
    <Value>LOC_DIPLO_MODIFIER_DESCRIPTION_HIGH_SCIENCE</Value> --Could be any text value you want
    </Row>
    <Row>
    <ModifierId>MODIFIER_AGENDA_HIGH_SCIENCE</ModifierId>
    <Name>HiddenAgenda</Name>
    <Value>true</Value> --could be false if you want everyone to see it I guess
    </Row>
    </ModifierArguments>

    That's just from a first look. I haven't made an agenda yet but I have a lot of xp in modifiers. Also, be aware that you will get database errors in the database log if your modifiers/agendas/anything doesn;t have a unique name. Like AGENDA_HIGH_SCIENCE is already a vanilla modifier. The way you currently have it you're just using the vanilla modifiers, which is fine if you want to keep it the same.
     
  3. SlySlySly

    SlySlySly Warlord

    Joined:
    Feb 8, 2017
    Messages:
    293
    Gender:
    Female
    Location:
    Denver
    What is the LOC_DIPLO_MODIFIER_DESCRIPTION_HIGH_SCIENCE exactly? Also would I do negative number if the value for dipole modifier should make feelings more negative
     
    Last edited: Apr 7, 2017
  4. SlySlySly

    SlySlySly Warlord

    Joined:
    Feb 8, 2017
    Messages:
    293
    Gender:
    Female
    Location:
    Denver
    Code:
    <GameInfo>
      <Kinds>
        <InsertOrIgnore Kind="KIND_TRAIT"/>
      </Kinds>
    
      <Types>
        <Row Kind="KIND_TRAIT" Type="TRAIT_AGENDA_AKANE_JOGI"/>
      </Types>
    
      <Traits>
        <Row Description="LOC_PLACEHOLDER" Name="LOC_PLACEHOLDER"
             TraitType="TRAIT_AGENDA_AKANE_JOGI"/>
      </Traits>
    
      <Agendas>
        <Row AgendaType="AGENDA_AKANE_JOGI"
             Description="LOC_AGENDA_AKANE_JOGI_DESCRIPTION"
             Name="LOC_AGENDA_AKANE_JOGI_NAME"/>
      </Agendas>
    
      <AgendaTraits>
        <Row AgendaType="AGENDA_AKANE_JOGI" TraitType="TRAIT_AGENDA_AKANE_JOGI"/>
      </AgendaTraits>
    
      <TraitModifiers>
        <Row ModifierId="MODIFIER_AGENDA_HIGH_SCIENCE" TraitType="TRAIT_AGENDA_AKANE_JOGI"/>
    
        <Row ModifierId="MODIFIER_AGENDA_HATES_BARBS"
             TraitType="TRAIT_AGENDA_AKANE_JOGI"/>
    
        <Row ModifierId="MODIFIER_AGENDA_HAPPY_POPULACE"
             TraitType="TRAIT_AGENDA_AKANE_JOGI"/>
      </TraitModifiers>
      <Modifiers>
        <Row>
            <ModifierId>MODIFIER_AGENDA_HIGH_SCIENCE</ModifierId>
            <ModifierType>MODIFIER_PLAYER_DIPLOMACY_SIMPLE_MODIFIER</ModifierType>
            <SubjectRequirementSetId>PLAYER_HAS_HIGH_SCIENCE</SubjectRequirementSetId>
        </Row>
       </Modifiers>
       <ModifierArguments>
        <Row>
            <ModifierId>MODIFIER_AGENDA_HIGH_SCIENCE</ModifierId>
            <Name>InitialValue</Name>
            <Value>6</Value>
        </Row>
        <Row>
            <ModifierId>MODIFIER_AGENDA_HIGH_SCIENCE</ModifierId>
            <Name>StatementKey</Name>
            <Value>LOC_DIPLO_KUDO_LEADER_ANY_REASON_AGENDA_HIGH_SCIENCE</Value>
        </Row>
        <Row>
            <ModifierId>MODIFIER_AGENDA_HIGH_SCIENCE</ModifierId>
            <Name>SimpleModifierDescription</Name>
            <Value>LOC_DIPLO_MODIFIER_DESCRIPTION_HIGH_SCIENCE</Value>
        </Row>
        <Row>
            <ModifierId>MODIFIER_AGENDA_HIGH_SCIENCE</ModifierId>
            <Name>HiddenAgenda</Name>
            <Value>true</Value>
        </Row>
       </ModifierArguments>
       <Modifiers>
        <Row>
            <ModifierId>MODIFIER_AGENDA_HATES_BARBS</ModifierId>
            <ModifierType>MODIFIER_PLAYER_DIPLOMACY_SIMPLE_MODIFIER</ModifierType>
            <SubjectRequirementSetId>PLAYER_IGNORES_BARBARIAN_CAMPS</SubjectRequirementSetId>
        </Row>
       </Modifiers>
       <ModifierArguments>
        <Row>
            <ModifierId>MODIFIER_AGENDA_HATES_BARBS</ModifierId>
            <Name>InitialValue</Name>
            <Value>-8</Value>
        </Row>
        <Row>
            <ModifierId>MODIFIER_AGENDA_HATES_BARBS</ModifierId>
            <Name>StatementKey</Name>
            <Value>LOC_DIPLO_WARNING_LEADER_ANY_REASON_AGENDA_HATES_BARBS</Value>
        </Row>
        <Row>
            <ModifierId>MODIFIER_AGENDA_HATES_BARBS</ModifierId>
            <Name>SimpleModifierDescription</Name>
            <Value>LOC_DIPLO_MODIFIER_DESCRIPTION_HATES_BARBS</Value>
        </Row>
        <Row>
            <ModifierId>MODIFIER_AGENDA_HATES_BARBS</ModifierId>
            <Name>HiddenAgenda</Name>
            <Value>true</Value>
        </Row>
       </ModifierArguments>
       <Modifiers>
        <Row>
            <ModifierId>MODIFIER_AGENDA_HAPPY_POPULACE</ModifierId>
            <ModifierType>MODIFIER_PLAYER_DIPLOMACY_SIMPLE_MODIFIER</ModifierType>
            <SubjectRequirementSetId>PLAYER_HAS_HIGH_HAPPINESS</SubjectRequirementSetId>
        </Row>
       </Modifiers>
       <ModifierArguments>
        <Row>
            <ModifierId>MODIFIER_AGENDA_HAPPY_POPULACE</ModifierId>
            <Name>InitialValue</Name>
            <Value>5</Value>
        </Row>
        <Row>
            <ModifierId>MODIFIER_AGENDA_HAPPY_POPULACE</ModifierId>
            <Name>StatementKey</Name>
            <Value>LOC_DIPLO_KUDO_LEADER_ANY_REASON_AGENDA_HAPPY_POPULACE</Value>
        </Row>
        <Row>
            <ModifierId>MODIFIER_AGENDA_HAPPY_POPULACE</ModifierId>
            <Name>SimpleModifierDescription</Name>
            <Value>LOC_DIPLO_MODIFIER_DESCRIPTION_HAPPY_POPULACE</Value>
        </Row>
        <Row>
            <ModifierId>MODIFIER_AGENDA_HAPPY_POPULACE</ModifierId>
            <Name>HiddenAgenda</Name>
            <Value>true</Value>
        </Row>
       </ModifierArguments>
    </GameInfo>
    [CODE]
    Would this work properly?
     
  5. kantorr

    kantorr Chieftain

    Joined:
    Mar 1, 2017
    Messages:
    51
    Anything with LOC_ is going to just be a text value. You could just put "Likes civs who has high science, doesn't like civs who ignore science." The description argument is usually something you see in game. Not sure what statement key is. Hidden agenda probably refers to the agenda not being visible until a higher diplomatic level. Negative # would be a negative Diplo value, yes.

    From a glance, assuming all those requirement sets are vanilla and already defined (which they look like they are) the code looks good. I would reorganize though. You should put all 3 modifiers in one modiifer tag like: (the names are fine how they are)
    Code:
    <Modifiers>
        <Row>
            <ModifierId>Mod_1</ModifierId>
            <ModifierType>Type</ModifierType>
            <SubjectRequirementSetId>SRSI</SubjectRequirementSetId>
        </Row>
        <Row>
            <ModifierId>Mod_2</ModifierId>
            <ModifierType>Type</ModifierType>
            <SubjectRequirementSetId>SRSI</SubjectRequirementSetId>
        </Row>
        <Row>
            <ModifierId>Mod_3</ModifierId>
            <ModifierType>Type</ModifierType>
            <SubjectRequirementSetId>SRSI</SubjectRequirementSetId>
        </Row>
    </Modifiers>
    
    Same thing for the modifier arguments and any other time you add multiple things to the same database table.
     
    Last edited: Apr 7, 2017
  6. SlySlySly

    SlySlySly Warlord

    Joined:
    Feb 8, 2017
    Messages:
    293
    Gender:
    Female
    Location:
    Denver
    So they are essentially the little thing in the diplo menu that say why? And where do I put that text, what file?
     
  7. kantorr

    kantorr Chieftain

    Joined:
    Mar 1, 2017
    Messages:
    51
    Add the following inside your <Components> tag in your modinfo. Might be component don't remember.
    Code:
    <UpdateText id="TEXT">
        <Items>
            <File>LocalizedText.xml</File>
        </Items>
    </UpdateText>
    
    Also you need to add the file to your files section at the bottom of the modinfo for it to update, other wise the localized text won't appear in game. This tells civ to load your custom text ingame from that file.

    Copy one of the shorter text xmls from base assets text. Get rid of all the text but one and you can just rename it to LOC_DIPLO_MOD.... And place your text in there
     

Share This Page