Code:
;==========================================================================================================================; INFORMATION on MODDING THIS FILE
;-----------------------------------------------------------------------------------------------------
; WHAT SHOULD BE DONE:
; - merging traits TooOldToFight with Senile (the first is redundant)
; - initial
;-----------------------------------------------------------------------------------------------------
;- many people contributed, and there're various mechanism in the file; some coding problems were not known at the time of their creation (see below)
;- some traits may be used as "instruments" in the script or EDA - don't delete anything unless you're 100% sure they are not used
;- there's already a lot of traits visible for the player so it's better to fuse some of them (and not add more)
;- a general rule: the fewer effects a trait has, the better (it's easy to grasp for the player)
;- in the triggers, for safety reasons it's better to use > than = (eg.: > 95 is better than = 100, or [ >4 <6 ] than [=5])
;- it seems that the probability 1% (Chance 1) is bugged - it's better to use RandomPercent > 80 and Chance 5
;- for optimalisation of processing time, use the rarest condition as the first condition in a trigger (eg. "RandomPercent > 80" will skip reading the rest of the conditions in 80% of cases)
;- if a criterium is not possible (eg. SettlementBuildingExists outside of settlement) it's always TRUE. This may ruin your triger.
;- "PostBattle" fires also after autoresolved battles. There's no simple way to ensure the player fought the battle manually.
;- the AI gets special traits and special triggers for some traits - pay attention to it.
;---------- NEW GENERALS --------------------------------------------------------------
;- Coming of Age does NOT take place in a settlement => therefore condition "SettlementBuildingExists" will not work
;- for a general recruited from a building (as a unit) the OfferedForAdoption triggers fire
;- Adoption is into family tree => FatherTrait will work as condition (in most cases it makes little sense but might be useful in certain situations)
;- for scripted and starting generals there must be special triggers at CharacterTurnStart
;---------- ANTITRAIT + NOGOINGBACK bug --------------------------------------------------------------
; in vanilla M2TW and in Stainless Steel the main trait-relatged bug is the AntiTrait plus NoGoingBack; also any AntiTrait is prone to be bugged.
; In the SSHIP the end-goal is to get rid of all Antitraits and all NoGoingBack. The ways of dealing with it:
; 1. pairs of traits that are given to every general -> fusion of both traits into one, introduction of the initial value, and triggers only for that one
; 2. for rarer traits being clear Antitraits it's bad method because it will clogg the generals' panel with too many traits, so
; leave triggers as they're but at the end introduce a ClearingHouse: taking away a point for both so that at the end only one has a positive value
; 3. more Antitratis - as above but with more complicated triggers
; 4. NoGoingBack - creation of large threshold making it in practice NGB (eg. trait has 1,2,3, and NGB should be at 3rd level, then it has 1,2,13)
; be aware that crashes were reported if using this method so pay attention that the higher value of threshold should go first and the first threshold should not have "Gain" or "Epithet"
;
;---------- DIFFICULTY LEVELS ----------------------------------------------------------------
;
;-- you may differentiate difficulties (2 - normal, 3 - hard, 4 - very hard) with "and I_EventCounter DifficultyLevel = 3" (use = but not < > as, for unknown reason, the latter sometimes don't work)
;-- be very careful and check if your changes doesn't disable the script (this happens but is easy to spot once you run the game - a red ERROR in the left bottom corner)
;
;-- if the character is at sea, he is by default abroad - if you don't want such a situation, add the condition "not InEnemyLands"
;-- if you're using condition "PopulationOwnReligion <", you should also use "not AtSea" (otherwise there's an error reported in log)
;
;---------- USEFUL FAMILY TRAITS ----------------------------------------------------------------------
; MarriageCertificate - is married
; HaveChilds - have children
; BiologicalSon, BastardSon, Adopted, MarriedIntoFamily - each general has such a status (bastard means: born to another mother)
;
; Important: Republics no longer transmit Factionleader 1 by blood, instead those with royal blood gain it by having good traits and lose it by having bad ones (simulate acceptability to the electors).
; this aspect should be reviewed in the light of compatibility of the triggers
;
;---------- USEFUL SSHIP CAMPAIGN TRAITS ---------------------------------------------------------------------
; ArmyIsCamping - last turn eneded outside of settlement, having not moved last turn, may be differentiated <>50% religion
; CounterOfBattles (and 2 other traits for higher numbers) - shows if a general was in battles and how much experience does he have
; GovernorExperience - shows if the general has a governor experience (and how long: in 10s of years)
;
;---------- USEFUL HEALTH & PSYCHOLOGY TRAITS ---------------------------------------------------------
;
; FIT_FOR_OFFICE depicts physical and psychical health - you may use it as proxy of the minimum for overall health. It comprises:
; Intelligent > 3, Insane < 2, Paranoia < 4, Slothful < 3, AbsentMinded < 1, AbsentMindedGeneral < 1, Senile < 2, Diseased < 1, HaleAndHearty > 2
; note that: TooOldToFight doesn't disqualify from office!
;
; PRO MEMORIA:
;- Senile - is condition to get many traits - at some point one may rather replace it with "FitForOffice" trait that embraces the broader notion of overall health
;
; FOR FURTHER MODDING:
; triggers based on "Building completed", "Visiting settlement with", "Sitting in the settlement with"
; can be moved to the relevant triggers section: they'll contain additional conditions, therefore one cannot economize on the number of triggers
; bribe resistance (1 = 10%) should be reviewed
;---------- POST-BATTLE TRAITS ---------------------------------------------------------
;
; (1) Triggers fire only for the commanding general, not for all generals fighting in the battle.
;
; (2) It is not possible to guarantee by code that the effects of the battle would be acquired only if the player fought the battle personally (they fire also when autoresolving).
; However, at least on the higher difficulties the autoresolve mechanism is calibrated in such a way that you'd lose a battle if you'd autoresolve and the odds are not much into your favour.
; As a result, if you want to ensure that the triggers would fire only if the player personally played a battle, it's enough to put conditions that a battle is fought against the low odds (eg. BattleOdds < 0.9) and the results are good (BattleSuccess >= clear).
;
; (3) The other side of the coin is that you should put a cap on the triggers for "bad traits", eg.: and BattleOdds <= 3
; If there's no such cap, then they will fire on any autoresolving and provide those bad traits very often.
; Therefore always put a cap for PostBattle triggers.
; (4) Some conditions do not actually work.
; However, some do work: NumEnemiesInBattle,
;----------------------------------------------------------------------------------------------------------------------------------
;
;- AGENTS:
;
;----- Gameplay:
;- the use of the agents should be "natural" for any M2TW player - there're no special rules or tricks; the mechanism are from the Stainless Steel 6.4. with addition of the health and age issues (it was highly un-historical that the eldest agents were the fastest and all-round the best).
;- to make the player confident some hints will appear during a few first turns (in the form of the historical events) - the player may or may not pay attention, he may just behave instinctively and rationally, and everything should be go smoothly. There's no need for any external manual.
;
;----- Difficulty levels:
;- bonuses for the difficulty levels have been introduced for all agents.
;- since the player is likely to have better agents as the game progresses (eg. he'll have the guilds giving skills etc.)
;- the bonuses/maluses are progressively more and more disadventagous for the player;
;- at Easy/Normal there're buffs for the player (or de-buffs for non-playable agents), they stop after 200 turns
;- at Hard the AI agents get some bonuses right from the beginning
;- at VeryHard the AI agents get also additional bonuses after 100 turns, and another after 300 turns (so that they're tripled)
;
;----- Triggers:
;- all player's agents may benefit from visiting settlements with certain buildings, their actions and various events;
;- for a few agents (spy, assassins, diplomats, priests, princesses) there're benefits from visiting certain regions;
;- all agents have triggers to fall ill what results in lower movement range and lack of ability get more skills; they recover naturally;
;- all agents have triggers for losing natural skills as they age;
;- the triggers for external events (like volcano eruptions, raiding etc.) have not been introduced (yet);
;- the AI gets special triggers to compensate that they don't know many rules the player knows (eg. visiting cities with buildings);
;- there're separate triggers for the AI agents spawned by script (since they don't get those given at creation)
;
;----------------------------------------------------------------------------------------------------------------------------------