Modding: Difference between revisions

From Ara: History Untold Wiki
updated variables section to give some explanation on the syntax and context
Line 72: Line 72:
For the actual effect, we look at the Modifiers attribute. For example:<syntaxhighlight>
For the actual effect, we look at the Modifiers attribute. For example:<syntaxhighlight>
.Modifiers = @"MODS(ModMul(Strength, 0.25))MODS"
.Modifiers = @"MODS(ModMul(Strength, 0.25))MODS"
</syntaxhighlight>This modifier will add a 25% multiplier to unit strength. Multipliers are additive, so this is adding 25% to the total bonus multiplier, not directly multiplying by 25%, which would be a reduction in strength instead. Negative values are allowed where you'd expect them. (You probably can't reduce the turn count...)
</syntaxhighlight>This modifier will add a 25% multiplier to unit strength. Multipliers are additive, so this is adding 25% to the total bonus multiplier, not directly multiplying by 25%, which would be a reduction in strength instead. Negative values are allowed where you'd expect them. (You probably can't reduce the turn count...)<!-- This syntax is also used for the Condition attribute on events, e.g. .Condition = "AtrActGoalWonCheck(goal_SpecificTriumphLibraryofCelsus)", -->


The table below lists all currently possible variables for use in conditions or modifiers, provided by one of the developers, with Description and Notes for wiki users to add:
The table below lists all currently possible variables for use in conditions or modifiers, provided by one of the developers, with Description and Notes for wiki users to add:

Revision as of 15:34, 5 February 2025

Example of the Settings_v121.txt file

Ara Modding Setup Guide

This document will show you how to get started with modding Ara: History Untold.

In this initial version of mod support, we provide a copy of our source game data files in the Ara installation directory. You can install these source files as a mod in your Documents folder and enable mod loading in the Ara settings. We will walk through each step below.

QuickStart

  1. Find the game data source files in the Ara installation folder at `assets\SourceMods\.
  2. Copy the folder SourceMods (files and sub-folders) it into `Documents\My Games\Ara History Untold\Mods\`. Create the "Mods" folder first if it does not exist.
  3. Navigate to `%LOCALAPPDATA%\Ara History Untold` with File Explorer (open File Explorer with WinKey + E) and open the latest settings text file (e.g. `Settings_V122.txt`).
  4. Set the line `EnableMods=0` to `EnableMods=1`. If this line is missing, add it to the end of the file.
  5. Set the line `GameCoreMod0Source=` to `GameCoreMod0Source="YourModName"`. If this line is missing, add it to the end of the file.
  6. Start Ara – it will load your modified source files from your Documents folder into the game. Multiplayer and achievements will be disabled while mods are enabled.

Step 1: Find the game data source mods files

If you own the game through Steam, you can get to your installation files quickly through the Steam Library tab. For Windows Store installations (e.g. from Game Pass), you can find the top-level Ara folder by starting at `%LOCALAPPDATA%\Microsoft\WindowsApps`.

Find Ara in your Steam library

Right-click the game in the library list, select Manage -> Browse Local Files.

You should have a File Explorer window (WinKey + E) open with the following folder:

Open the `assets\SourceMods` folder and copy the whole folder (files and sub-folders).

Step 2: Paste SourceMods into Mods folder

Use File Explorer to open your Documents folder and navigate to `My Games` and then, in a separate window, the `Ara History Untold` folder.

In `Documents\My Games\Ara History Untold`, create a `Mods` folder (if it does not already exist).

Open the Mods folder and select the Paste the whole SourceMods folder into it.

You should end up with a folder SourceMods in the Mods folder, containing all of the game data files.

Step 3: Enable modding in Ara settings

Open a File Explorer window and navigate to `%LOCALAPPDATA%\Ara History Untold`.

This folder contains a settings file, such as `Settings_v121.txt`. Open the one with the largest version number (the "v121" or similar at the end).

You can open this file using a text editor such as Notepad or Visual Studio Code.

In the file, you should find two lines: `EnableMods=0` and `GameCoreMod0Source=`. If you haven't run the game since the last update, you may need to do so for these to show up. Alternatively, you can also add them to the end of the file manually.

Change these lines to: EnableMods=1 and GameCoreMod0Source="YourModName"

Save and close the file.

Step 4: Run Ara

If you launch Ara again, you should now start with mods enabled and the source files from "YourModName" loaded as your active game rules.

If there are errors loading the mod files, you will receive a data error popup, and the game will proceed loading only its built-in, un-modded data.

(Note: Pressing 'Ctrl-C' will copy all the text from the error popup)

`%LOCALAPPDATA%\Ara History Untold\logs\Ara.log` contains a diagnostic log of the mods loaded (if any) and errors found.

While you are running with mods enabled, achievements and multiplayer will be disabled.

Step 5: Update your folder SourceMods

The original SourceMods folder is changed whenever the game is updated (V1.04, V1.06 and then V1.1). To keep your Mods folder up to date you must

repeat the procedure to copy the SourceMods folder in the game folder to your Mods folder.

Attributes & Modifiers

Buffs have the "Attributes" attribute in their definition that defines a condition for the buff to apply, for example:

.Attributes = @"ATTR(AtrCityStatCheck(ReligionImprovementCount, '>=', 1.0))ATTR"

The above code would allow the buff to trigger (based on the TargetType and Scope values) only when the City has at least one Religion Improvement. For multiple conditions, see this example from one of the Republic Government Policies:

.Attributes = @"ATTR(AtrImprovementDomainCheck(Culture) or AtrImprovementDomainCheck(Government) or AtrImprovementDomainCheck(Science))ATTR"

This buff checks for improvements of Culture, Government, or Science domains. This particular buff (at time of writing) has a TargetType of BuffTargetType.Improvement and a Scope of BuffScope.All, targeting all Improvements you have or are building. For the actual effect, we look at the Modifiers attribute. For example:

.Modifiers = @"MODS(ModMul(Strength, 0.25))MODS"

This modifier will add a 25% multiplier to unit strength. Multipliers are additive, so this is adding 25% to the total bonus multiplier, not directly multiplying by 25%, which would be a reduction in strength instead. Negative values are allowed where you'd expect them. (You probably can't reduce the turn count...)

The table below lists all currently possible variables for use in conditions or modifiers, provided by one of the developers, with Description and Notes for wiki users to add:

Name Description Notes
Invalid
Act Spotted in Adviser Wisdom like so:

AtrNationStatCheck(Act, '<', 2.0)

Era Spotted in NarrativeEvents like so:

AtrNationStatCheck(Era, '=', 5.0)

Population Growth
PopulationTier Spotted in Buffs0 like so:

AtrCityStatCheck(PopulationTier, '<=', 4.0)

PopulationTierCap Housing
BonusPrestigeOnComplete e.g. Museum
PrestigeOnKill
TotalIncomingMoney
Item
Happiness
Education
Health
Prosperity
Wealth
Aesthetics Security
MinHappiness
MinEducation
MinHealth
MinProsperity
MinWealth
MinAesthetics Security
ParagonSpawnChance
ArtistPickChance
EngineerPickChance
StrategistPickChance
BusinessmanPickChance Entrepeneur?
MusicianPickChance
ProphetPickChance
ActivistPickChance
ScientistPickChance
WriterPickChance
ExplorerPickChance
BuildRate
HarvestRate
CraftRate
MasterpieceCreateRate
Production
Maintenance
TaxIncome
IncomeRate
GoldenAgeProgress
GoldenAgeDuration
GoldenAgeBonusPrestigeRate
RegionCount
CityCount
ReligionFollowerCount
ReligionSpreadStrength
ReligionSpreadDistance
ForeignReligionInfluence
ResearchAgreementResearch
ResearchCost
PopulationTierResearch
TotalIncomingResearch
MerchantCount
TradeAgreementCount
AllianceCount
ParagonCount
IsFortified Condition is checked as = 1.0
TradeMoney
Relationship
BaseRelationship
TribeRelationship
BaseTribeRelationship
BaseTribeNotHostileFlag Add +1.0 to make tribes non hostile
ArmyCapLand
ArmyCapAir
ArmyCapSea
CityCap
BonusExpOnTrained
BonusExpOnCombat
LevelUpStrength
Level
FormationBonus
Strength
TerrainStrengthMod Modifier to Strength based on terrain
SiegeDamage Damage to Cities
PillageDamage Damage to improvements
Defense
Speed Movement points
HomeCity
WorkerGain
BonusWorkersOnFoundCity
CannotCounterFlag
MaintenanceFlag
SightRange
ActionRange
WarWeariness
InflictWarWeariness
InflictWarWearinessOnKill
RecoverWarWearinessOnKill
BonusExpOnKill
PreventPillageFlag
BirthRate
DeathRate
ImmigrationRate
EmmigrationRate
HealRate
StartBonusHealth
SiegeDefense
FoodFertility
WoodFertility
StoneFertility
CoinFertility
Pollution
WarDeclarePrestigeCost
EventsGiven
ExtraLocalFood
IsOpenTerrainFlag
IsRoughTerrainFlag
RoadType
MilitaryImprovementCount
CommerceImprovementCount
GovernmentImprovementCount
ReligionImprovementCount
CultureImprovementCount
ScienceImprovementCount
IndustryImprovementCount
DistinctMilitaryImprovementCount
DistinctCommerceImprovementCount
DistinctGovernmentImprovementCount
DistinctReligionImprovementCount
DistinctCultureImprovementCount
DistinctScienceImprovementCount
DistinctIndustryImprovementCount
ArtistParagonCount
EngineerParagonCount
StrategistParagonCount
BusinessmanParagonCount
MusicianParagonCount
ProphetParagonCount
ActivistParagonCount
ScientistParagonCount
WriterParagonCount
ExplorerParagonCount
CityCountDiff
TurnsSinceLastParagonCompletedEvent
TurnsSinceLastMasterpieceCompletedEvent
TurnsSinceWarEvent
TurnsSinceSkirmishWarEvent
TurnsSinceRetaliationWarEvent
TurnsSinceDefenderWarEvent
TurnsSinceAttackerWarEvent
TurnsSinceLastWarVictoryEvent
TurnsSinceLastWarEndedEvent
TurnsSinceLastCombatEvent
TurnsSinceEnteredAllianceEvent
TurnsSinceEnteredResearchAgreementEvent
TurnsSinceTechnologyUnlockedEvent
InWarFlag
InAttackerWarFlag
InDefenderWarFlag
InRetaliationWarFlag
InSkirmishFlag
InWarWithAnyoneFlag
RegionDistanceToFriendlyArmy
CoastalRegionCount
GoldenAgeRemainingTurns
PositiveModifiers
NegativeModifiers
IsCapitalFlag
IsCityCenterFlag
IsOwnedFlag
TriumphFlag
AdjacentToImpassibleFlag
AdjacentToRiverFlag
CoastalLandFlag
HasRiverFlag
ReligionDominantFlag
ReligionFoundedFlag
CurrentTurn
PrestigeTier
UnlockedGovernmentCount
UnassignedExpertCount
OpenExpertSlotCount
UnassignedParagonCount
OpenParagonSlotCount
IsAtPopulationTierCapFlag
IsGrowthStagnantFlag
IsStarvingFlag
HasOpenBordersFlag
HasTradeAgreementFlag
HasResearchAgreementFlag
HasAllianceFlag
WarlikeScore
PeacefulScore
IsAtMaxCityCapFlag
IsCityCenterDefendedFlag
UnitsInReserveCount
LandArmyCount
SeaArmyCount
AirArmyCount
HasMetFlag
UnassignedMerchantCount
MilitaryStrength
MilitaryRatio
UnslottedMasterpieceCount
ReligionFollowersConvertedThisTurnCount
PercentForcesHealth
IdleCraftersCount
AvailableFlag

Guides