How To Create New Retinue Members

By SubRosa

To start with, before you change any of your data files, be sure to make a backup copy of them first. That way if worse comes to worse you can always restore your original in case you really mess something up.

There are 3 files that must be edited in order to create or modify retinue members.

  • RTW\Data\Export_Descr_Ancillaries.txt
  • RTW\Data\Export_Descr_Ancillary_enums.txt
  • RTW\Data\Text\Export_Ancillaries.txt

Part One

Start in RTW\Data\Export_Descr_Ancillaries.txt. You will find the file is divided into two halves. The upper showing the ancillary information, and the second showing the trigger conditions needed for a general to acquire the ancillary in the game. They are divided by this:

;===============================================================
;== ANCILLARY TRIGGERS START HERE ==============================
;===============================================================

Be very careful editing this file. You must keep the info text above this divider, and the trigger text beneath it, otherwise the game will crash. Furthermore, you must also maintain the same order of entires above and below the divider. Meaning if you put your info text is the last before the divider, the trigger data must be the last at the end of the file. If say you put the info text say first and the trigger data last, the game will crash.

Okay, with that coding minefield avoided, it is time to get down to creating a new retinue member. For this exercise I will use a Priestess of Kybele as an example. This is for a mod in which temples of Kybele have been added, being a temple_of_justice for a new Amazon culture.

We start with the info data in the upper part of the file. The simplest thing to do is to copy an existing retinue member that is similar to what you want. Then make alterations. In this case I copied a priest_of_Papay to use as a basis. Then I simply changed every place it says Papay with Kybele.

;------------------------------------------
Ancillary priest_of_Kybele
   Image OLDER_WOMAN_ANCILLARY.TGA
   Description priest_of_Kybele_desc
   EffectsDescription priest_of_Kybele_effects_desc
   Effect PublicSecurity 2
   Effect Management 1
   Effect Law 1

Now for the sake of showing all the options available here, I am going to add in a pair of exclusions. The first is ExcludedAncillaries, which prevents your general from gaining this new retinue member if they already have the ancillaries listed there. The second is ExcludeCultures, which prevents the listed cultures from gaining this ancillary. In this case, Kybele is the Queen of the Heavens and the Earth, and being an all-around righteous girl she cannot abide perversions of justice. So her priestess will not play with a Crooked Judge. Likewise, Kybele was imported to Rome near the end of the Punic Wars, and (according to her publicity machine) gave Rome victory. Hence no Carthaginian may have her priestesses as retinue members.

;------------------------------------------
Ancillary priest_of_Kybele
   Image OLDER_WOMAN_ANCILLARY.TGA
   ExcludedAncillaries crooked_judge
   ExcludeCultures carthaginian
   Description priest_of_Kybele_desc
   EffectsDescription priest_of_Kybele_effects_desc
   Effect PublicSecurity 2
   Effect Management 1
   Effect Law 1

Here is a breakdown of what each part of the code means:

  • Ancillary [ancillary name] - This is the internal name of the retinue member. It must be unique!
  • Image [image name] - This is the image that will be displayed in the game. You can find the images in the pack files, RTW\Data\UI\Ancillaries. They are 33 x 41 pixel .tga files. So you can create more so long as you use the same size, format, and folder location.
  • ExcludedAncillaries [ancillary name] - A general with the ancillaries listed here cannot gain this retinue member. It appears that only three ExcludedAncillaries may be listed.
  • ExcludeCultures [culture] - A character of the cultures listed here cannot gain this retinue member.
  • Description [ancillary name]_desc - This is the string that the game will look for in Export_Ancillaries.txt to display the description you see in game.
  • EffectsDescription [ancillary name]_effects_desc - This is the string that the game will look for in Export_Ancillaries.txt to display the effects info.
  • Effect [game effect] [level]These are the game effects and their level of intensity. Any number of effects can be granted. The effects used for Ancillaries can also be used for Traits, and vice versa.

Here is a list of possible Effects:
  • MovementPoints
  • Command
  • Attack
  • Defence
  • Management
  • Influence
  • TroopMorale
  • SenateStanding
  • PopularStanding
  • Ambush
  • MovementPoints
  • Law
  • SiegeAttack
  • SiegeDefence
  • Construction
  • PublicSecurity
  • Unrest
  • LineOfSight
  • Electability
  • Trading
  • Squalor
  • BribeResistance
  • PersonalSecurity
  • TrainingAgents
  • Subterfuge
  • Negotiation
  • Bribery
  • Farming
  • Mining
  • SiegeEngineering
  • NightBattle
  • NavalCommand
  • HitPoints
  • InfantryCommand
  • CavalryCommand
  • Combat_V_Roman
  • Combat_V_Greek
  • Combat_V_Slave
  • Combat_V_Carthaginian
  • Combat_V_Eastern
  • Combat_V_Barbarian
  • Combat_V_Egyptian
  • Fertility
  • TaxCollection
  • Looting
  • Training Animal Units
  • BodyguardValour
  • BattleSurgery
  • GrainTrading
  • health

Now we go to the end of the file and add our trigger data. For our example I again copy the trigger of the priest_of_Papay and change the name to Kybele.

;------------------------------------------
Trigger trigger_priest_of_Kybele
   WhenToTest CharacterTurnEnd
   Condition EndedInSettlement
      and RemainingMPPercentage = 100
      and SettlementBuildingExists >= temple_of_justice_temple
      and FactionType pontus
      and IsGeneral
   
   AcquireAncillary priest_of_Kybele chance 15

Here is what the code means:

  • Trigger [trigger_ancillary name] - This tells the game the trigger info follows, the string starting with the word "trigger" and ending with the ancillary name.
  • WhenToTest [time to test] - This tells the game when to test for the trigger. The end of turn or coming of age are the most common times.
    • CharacterTurnEnd
    • GovernorCityRiots
    • PostBattle
    • GovernorUnitTrained
    • GovernorThrowGames
    • CharacterMarries
    • EnslavePopulation
    • AssassinationMission
    • SufferAssassinationAttempt
    • LeaderOrderedAssassination
    • CharacterComesOfAge
    • HireMercenaries
    • NewAdmiralCreated
    • LeaderOrderedSpyingMission

  • Condition [special condition] - Likewise, these following fields tell the game only to test if all these conditions are met, under the variables included. Each Condition after the first will be on a new line, and will start with the word "and". Any number of Conditions may be set. Conditions may be prefaced with "not", indicating the following condition must not present. When a Condition specifies a percentage, it can be either ">=" greater than, or "<=" less than the value given.

    Conditions allow you to specify if a certain building is needed, or the character has to be of a certain faction, and even type of character. There can be (and typically are) multiple condition fields. The most common ones are that the character is in a settlement and has not moved. Often a specific building being present and the character being of a specific faction are included as well. This allows you to create faction-specific retinue members, and even unique ones. It also allows you to differentiate between retinue members for Generals and those for agents

    Here is a list of possible conditions:

    • EndedInSettlement
    • RemainingMPPercentage = {percentage}
    • SettlementBuildingExists >= {building}
    • FactionType (faction name}
    • FatherTrait {trait} >= {level of trait}
    • Trait {trait} >= {level of trait}
    • IsGeneral
    • CultureType (culture)
    • GeneralFoughtCulture {culture name}
    • TargetFactionCultureType {culture name}
    • Attribute {Command, Influence, or Management} >= {level of attribute}
    • PercentageEnemyKilled >= {percentage}
    • PercentageOfArmyKilled >= {percentage}
    • GeneralFoughtCulture {culture name}
    • AgentType = {assassin, diplomat, spy, admiral, or family)
    • WasAttacker
    • WonBattle
    • BattleSuccess = (clear or crushing)
    • I_ConflictType {Normal, SuccessfulAmbush)
    • BattleOdds (>= 0.5 or < 1.5)
    • I_WithdrawsBeforeBattle
    • EndedInSettlement
    • RemainingMPPercentage
    • SettlementBuildingExist
    • RandomPercent > (percentage)
    • Treasury > (percentage)
    • EndedInEnemyZOC
    • GeneralHPLostRatioinBattle > {percentage}
    • GeneralNumKillsInBattle > (number of kills by general alone)
    • BattleGeneralRouted
    • IsUnderSiege
    • MissionSuccessLevel = (not_successful, slightly_successful, partly_successful, highly_successful)
    • MissionSucceeded
    • GovernorTaxLevel > (tax_high, tax_low)
    • SettlementBuildingFinished
    • AdviseBuild
    • GovernorLoyaltyLevel = (loyalty_disillusioned)
    • IsFactionLeader
    • TrainedUnitCategory {cavalry or infantry}
    • InEnemyLands
    • InBarbarianLands
    • Routs
    • I_TurnNumber
    • WorldwideAncillaryExists {ancillary name}

  • AcquireAncillary [ancillary name] chance   [value] - This is the chance to actually acquire the retinue member listed. The value may be from 1-100. The higher the number meaning the greater the likelihood of gaining the ancillary.

Part Two

Okay, now on to Export_Descr_Ancillary_enums.txt. This is much easier. Only three lines need to be added here.

priest_of_Kybele
priest_of_Kybele_desc
priest_of_Kybele_effects_desc

The code breaking down to this:

  • [ancillary name]- This serves as a pointer to the retinue member's description in Export_Ancillaries.txt.
  • [ancillary name]_desc - This is another pointer to the same file.
  • [ancillary name]_effects_desc - This is another pointer to the same file.

Part Three

Last of all, we go to Export_Ancillaries.txt. This determines the actual text you see displayed in the game. Here we must add 3 sections of text.

{priest_of_Kybele}          Priestess of Kybele
 
{priest_of_Kybele_desc}
A priestess spends half a lifetime studying subjects related to her goddess. She can spend the other half putting it to good use...
 
{priest_of_Kybele_effects_desc}
+1 Management, +2 to public security (improves the chances of detecting and capturing enemy agents), +1 to law (improves public order)

The format being as follows:

  • {[ancillary name]}   [text] - The name of the retinue member you see displayed in the game.
  • {[ancillary name]_desc} - The person's description you see in the game.
  • {[ancillary name]_effects_desc} - The effects you see displayed in the game.

Part Four

Ok, now it is time to see if our new ancillary works. The best way to do this is to edit the RTW\World\Maps\Campaign\Imperial_Campaign\descr_strat.txt file and add the ancillary to an existing general of the appropriate faction. Make sure you use the [ancillary name] as that is the internal name for the ancillary used by the game. Here is an example:

character       Hippolyta, named character, leader, age 55, , x 190, y 80
traits GoodCommander 2 , PublicFaith 1 , Intelligent 2
ancillaries aged_retainer, priest_of_Kybele

Then start a new campaign and look at that general to see if the ancillary is in their retinue. Make sure to mouse-over the picture of the ancillary so you can view the descriptive text as well.

"));