|
|
Line 214: |
Line 214: |
| |- | | |- |
| |[[I_IsUnitMoveFastSet (M2-Scripting)|I_IsUnitMoveFastSet]]||None||Unit Label||<span style="display:none">10</span>Yes||<span style="display:none">15</span>No | | |[[I_IsUnitMoveFastSet (M2-Scripting)|I_IsUnitMoveFastSet]]||None||Unit Label||<span style="display:none">10</span>Yes||<span style="display:none">15</span>No |
| + | |- |
| + | |[[I_IsUnitMoving (M2-Scripting)|I_IsUnitMoving]]||None||Unit Label||<span style="display:none">10</span>Yes||<span style="display:none">15</span>No |
| + | |- |
| + | |[[I_IsUnitIdle (M2-Scripting)|I_IsUnitIdle]]||None||Unit Label||<span style="display:none">10</span>Yes||<span style="display:none">15</span>No |
| + | |- |
| + | |[[I_UnitStatus (M2-Scripting)|I_UnitStatus]]||None||Unit Label, Action Status||<span style="display:none">10</span>Yes||<span style="display:none">15</span>No |
| + | |- |
| + | |[[I_IsUnitRouting (M2-Scripting)|I_IsUnitRouting]]||None||Unit Label||<span style="display:none">10</span>Yes||<span style="display:none">15</span>No |
| + | |- |
| + | |[[I_IsUnitUnderFire (M2-Scripting)|I_IsUnitUnderFire]]||None||Unit Label||<span style="display:none">10</span>Yes||<span style="display:none">15</span>No |
| + | |- |
| + | |[[I_IsUnitEngaged (M2-Scripting)|I_IsUnitEngaged]]||None||Unit Label||<span style="display:none">10</span>Yes||<span style="display:none">15</span>No |
| + | |- |
| + | |[[I_IsUnitEngagedWithUnit (M2-Scripting)|I_IsUnitEngagedWithUnit]]||None||Unit Label, Other Unit Label||<span style="display:none">10</span>Yes||<span style="display:none">15</span>No |
| + | |- |
| + | |[[I_UnitFormation (M2-Scripting)|I_UnitFormation]]||None||Unit Label, Logic Token, Formation Type||<span style="display:none">10</span>Yes||<span style="display:none">15</span>No |
| |-class="sortbottom" | | |-class="sortbottom" |
| |Identifier||Trigger Requirements||Parameters||Battle||Strat | | |Identifier||Trigger Requirements||Parameters||Battle||Strat |
Conditions are the parameters in scripting used to test for the existence of certain situations, in order to execute the script. They are used to narrow the firing of a script down to a required set of triggers which must come back true in order for the script to be fired. A knowledge of the conditions available allows a scripter to tailor their scripts to very precise situations. Some conditions requires certain triggers in order to be executed, which the event they are using has to export, or the condition can not apply to it.
These trigger requirements are: character_record, nc_character_record, player_unit, enemy_unit, infer_defending_unit, infer_attacking_unit, resource_description, character_action_advice, target_character_record, ransom_type, captured_faction_info, faction, target_faction, unit, mission_success_level, mission_details, event_counter, sm_position, region_id, target_region_id, crusade, target_religion, settlement, target_settlement, prior_build, best_finance_option, advised_build, fort, army, event.
Conditions Table
This table is a Work in Progress, if you would like to help out, please PM Augustus Lucifer. Help is encouraged, but in order to make sure a condition isn't added twice or skipped, help needs to be coordinated. Thank you.
Current Progress: 100/408
Medieval II DocuDemons - Conditions Table
Identifier |
Trigger Requirements |
Parameters |
Battle |
Strat
|
PercentageOfArmyKilled |
character_record |
Logic Token, Test Value |
10Yes |
10Yes
|
BattlePlayerMountClass |
player_unit |
Mount Class |
10Yes |
10Yes
|
LosingMoney |
None |
None |
15No |
10Yes
|
GeneralFoughtCulture |
character_record |
Culture Type |
10Yes |
10Yes
|
I_InBattle |
None |
None |
10Yes |
10Yes
|
WonBattle |
character_record |
None |
10Yes |
10Yes
|
I_WonBattle |
None |
Faction |
10Yes |
10Yes
|
Routs |
character_record |
None |
10Yes |
10Yes
|
Ally_Routs |
character_record |
None |
10Yes |
10Yes
|
GeneralHPLostRatioinBattle |
character_record |
Logic Token, Test Value |
10Yes |
10Yes
|
GeneralFoughtInCombat |
character_record |
None |
10Yes |
10Yes
|
I_PercentageOfArmyKilled |
None |
Alliance Index, Army Index, Logic Token, Percentage |
10Yes |
15No
|
PercentageEnemyKilled |
character_record |
Logic Token, Test Value |
10Yes |
10Yes
|
PercentageBodyguardKilled |
character_record |
Logic Token, Test Value |
10Yes |
10Yes
|
PercentageRoutedOffField |
character_record |
Logic Token, Test Value |
10Yes |
10Yes
|
NumKilledGenerals |
character_record |
Logic Token, Test Value |
10Yes |
10Yes
|
PercentageUnitCategory |
character_record |
Unit Category, Logic Token, Test Value |
10Yes |
10Yes
|
NumFriendsInBattle |
character_record |
Logic Token, Test Value |
10Yes |
10Yes
|
GeneralFoughtFaction |
character_record |
Faction Type |
10Yes |
10Yes
|
GeneralNumKillsInBattle |
character_record |
Logic Token, Test Value |
10Yes |
10Yes
|
NumEnemiesInBattle |
character_record |
Logic Token, Test Value |
10Yes |
10Yes
|
I_ConflictType |
None |
Conflict Type |
10Yes |
10Yes
|
IsNightBattle |
None |
None |
10Yes |
10Yes
|
BattleSuccess |
character_record |
Success Type |
10Yes |
10Yes
|
BattleOdds |
character_record |
Logic Token, Test Value |
10Yes |
10Yes
|
WasAttacker |
character_record |
None |
10Yes |
10Yes
|
I_BattleAiAttacking |
None |
None |
10Yes |
15No
|
I_BattleAiAssaultingCrossing |
None |
None |
10Yes |
15No
|
I_BattleAiAttackingSettlement |
None |
None |
10Yes |
15No
|
I_BattleAiDefendingSettlement |
None |
None |
10Yes |
15No
|
I_BattleAiDefendingHill |
None |
None |
10Yes |
15No
|
I_BattleAiDefendingCrossing |
None |
None |
10Yes |
15No
|
I_BattleAiScouting |
None |
None |
10Yes |
15No
|
I_BattleIsRiverBattle |
None |
Integer |
10Yes |
15No
|
I_BattleIsSiegeBattle |
None |
Integer |
10Yes |
15No
|
I_BattleIsSallyOutBattle |
None |
Integer |
10Yes |
15No
|
I_BattleIsFortBattle |
None |
Integer |
10Yes |
15No
|
I_BattleAttackerNumSiegeEngines |
None |
Siege Engine Class |
10Yes |
15No
|
I_BattleAttackerNumArtilleryCanPenetrateWalls |
None |
Logic Token, Number |
10Yes |
15No
|
I_BattleDefenderNumNonMissileUnitsOnWalls |
None |
Logic Token, Number |
10Yes |
15No
|
I_BattleDefenderNumMissileUnitsOnWalls |
None |
Logic Token, Number |
10Yes |
15No
|
I_BattleSettlementWallsBreached |
None |
None |
10Yes |
15No
|
I_BattleSettlementGateDestroyed |
None |
None |
10Yes |
15No
|
I_BattleSettlementTowerDefence |
None |
Tower Defence Type |
10Yes |
15No
|
I_BattleSettlementFortificationLevel |
None |
Wall Level |
10Yes |
15No
|
BattleBuildingType |
None |
Building Type |
10Yes |
15No
|
I_BattleSettlementGateStrength |
None |
Gate Strength |
10Yes |
15No
|
I_BattleNumberOfRiverCrossings |
None |
Integer |
10Yes |
15No
|
BattlePlayerUnitClass |
player_unit |
Unit Class |
10Yes |
15No
|
BattleEnemyUnitClass |
enemy_unit |
Unit Class |
10Yes |
15No
|
BattlePlayerUnitCategory |
player_unit |
Unit Category |
10Yes |
15No
|
BattleEnemyUnitCategory |
enemy_unit |
Unit Category |
10Yes |
15No
|
BattlePlayerUnitSiegeEngineClass |
player_unit |
Siege Engine Category |
10Yes |
15No
|
BattleEnemyUnitSiegeEngineClass |
enemy_unit |
Siege Engine Category |
10Yes |
15No
|
BattlePlayerUnitOnWalls |
player_unit |
None |
10Yes |
15No
|
BattleEnemyUnitOnWalls |
enemy_unit |
None |
10Yes |
15No
|
BattlePlayerCurrentFormation |
player_unit |
Formation |
10Yes |
15No
|
BattleEnemyCurrentFormation |
enemy_unit |
Formation |
10Yes |
15No
|
BattlePlayerUnitCloseFormation |
player_unit |
None |
10Yes |
15No
|
BattleEnemyUnitCloseFormation |
enemy_unit |
None |
10Yes |
15No
|
BattlePlayerUnitSpecialAbilitySupported |
player_unit |
Special Ability |
10Yes |
15No
|
BattleEnemyUnitSpecialAbilitySupported |
enemy_unit |
Special Ability |
10Yes |
15No
|
BattlePlayerUnitSpecialAbilityActive |
player_unit |
None |
10Yes |
15No
|
BattleEnemyUnitSpecialAbilityActive |
enemy_unit |
None |
10Yes |
15No
|
BattleEnemyMountClass |
enemy_unit |
Mount Class |
10Yes |
15No
|
BattlePlayerUnitMeleeStrength |
player_unit |
Logic Token, Test Value |
10Yes |
15No
|
BattleEnemyUnitMeleeStrength |
enemy_unit |
Logic Token, Test Value |
10Yes |
15No
|
BattlePlayerUnitMissileStrength |
player_unit |
Logic Token, Test Value |
10Yes |
15No
|
BattleEnemyUnitMissileStrength |
enemy_unit |
Logic Token, Test Value |
10Yes |
15No
|
BattlePlayerUnitSpecialFormation |
player_unit |
Formation |
10Yes |
15No
|
BattleEnemyUnitSpecialFormation |
enemy_unit |
Formation |
10Yes |
15No
|
BattlePlayerUnitEngaged |
player_unit |
None |
10Yes |
15No
|
BattleEnemyUnitEngaged |
enemy_unit |
None |
10Yes |
15No
|
BattlePlayerActionStatus |
player_unit |
Action Status |
10Yes |
15No
|
BattleEnemyActionStatus |
enemy_unit |
Action Status |
10Yes |
15No
|
BattlePlayerUnitMovingFast |
player_unit |
None |
10Yes |
15No
|
BattleEnemyUnitMovingFast |
enemy_unit |
None |
10Yes |
15No
|
BattleRangeOfAttack |
player_unit, enemy_unit |
Logic Token, Test Value |
10Yes |
15No
|
BattleDirectionOfAttack |
infer_attacking_unit, infer_defending_unit |
Logic Token, Attack Direction |
10Yes |
15No
|
BattleIsMeleeAttack |
infer_attacking_unit |
None |
10Yes |
15No
|
I_BattlePlayerArmyPercentageOfUnitClass |
None |
Unit Class, Logic Token, Percentage |
10Yes |
15No
|
I_BattleEnemyArmyPercentageOfUnitClass |
None |
Unit Class, Logic Token, Percentage |
10Yes |
15No
|
I_BattlePlayerArmyPercentageOfUnitCategory |
None |
Unit Category, Logic Token, Percentage |
10Yes |
15No
|
I_BattleEnemyArmyPercentageOfUnitCategory |
None |
Unit Category, Logic Token, Percentage |
10Yes |
15No
|
I_BattlePlayerArmyPercentageOfMountClass |
None |
Mount Class, Logic Token, Percentage |
10Yes |
15No
|
I_BattleEnemyArmyPercentageOfMountClass |
None |
Mount Class, Logic Token, Percentage |
10Yes |
15No
|
I_BattlePlayerArmyPercentageOfClassAndCategory |
None |
Unit Class, Unit Category, Logic Token, Percentage |
10Yes |
15No
|
I_BattleEnemyArmyPercentageOfClassAndCategory |
None |
Unit Class, Unit Category, Logic Token, Percentage |
10Yes |
15No
|
I_BattlePlayerArmyPercentageOfSpecialAbility |
None |
Special Ability, Logic Token, Percentage |
10Yes |
15No
|
I_BattleEnemyArmyPercentageOfSpecialAbility |
None |
Special Ability, Logic Token, Percentage |
10Yes |
15No
|
I_BattlePlayerArmyPercentageCanHide |
None |
Hide Type, Logic Token, Percentage |
10Yes |
15No
|
I_BattleEnemyArmyPercentageCanHide |
None |
Hide Type, Logic Token, Percentage |
10Yes |
15No
|
I_BattlePlayerArmyPercentageCanSwim |
None |
Logic Token, Percentage |
10Yes |
15No
|
I_BattleEnemyArmyPercentageCanSwim |
None |
Logic Token, Percentage |
10Yes |
15No
|
I_BattlePlayerArmyIsAttacker |
None |
None |
10Yes |
15No
|
I_BattlePlayerAllianceOddsInFavour |
None |
Logic Token, Integer |
10Yes |
15No
|
I_BattlePlayerAllianceOddsAgainst |
None |
Logic Token, Integer |
10Yes |
15No
|
TotalSiegeWeapons |
character_record |
Logic Token, Number |
15No |
10Yes
|
I_BattleStarted |
None |
None |
10Yes |
15No
|
I_IsUnitMoveFastSet |
None |
Unit Label |
10Yes |
15No
|
I_IsUnitMoving |
None |
Unit Label |
10Yes |
15No
|
I_IsUnitIdle |
None |
Unit Label |
10Yes |
15No
|
I_UnitStatus |
None |
Unit Label, Action Status |
10Yes |
15No
|
I_IsUnitRouting |
None |
Unit Label |
10Yes |
15No
|
I_IsUnitUnderFire |
None |
Unit Label |
10Yes |
15No
|
I_IsUnitEngaged |
None |
Unit Label |
10Yes |
15No
|
I_IsUnitEngagedWithUnit |
None |
Unit Label, Other Unit Label |
10Yes |
15No
|
I_UnitFormation |
None |
Unit Label, Logic Token, Formation Type |
10Yes |
15No
|
Identifier |
Trigger Requirements |
Parameters |
Battle |
Strat
|
Template: |Identifier||Trigger Requirements||Parameters||Battle||Strat
Parameters
This section is incomplete
Descriptions for how each parameter is determined and input will be added, and some similar may be combined. The current order is the order taken from the CA DocuDemons, they will be more properly organized by category/usage later on.
None - To Be Amended
Logic Token - To Be Amended
Test Value - To Be Amended
Percentage - To Be Amended
Army Index - To Be Amended
Alliance Index - To Be Amended
Unit Category - To Be Amended
Faction Type - To Be Amended
Culture Type - To Be Amended
Conflict Type - To Be Amended
Success Type - To Be Amended
Siege Engine Class - To Be Amended
Tower Defence Type - To Be Amended
Wall Level - To Be Amended
Building Type - To Be Amended
Gate Strength - To Be Amended
Unit Class - To Be Amended
Siege Engine Category - To Be Amended
Formation - To Be Amended
Special Ability - To Be Amended
Mount Class - To Be Amended
Action Status - To Be Amended
Attack Direction - To Be Amended
Hide Type - To Be Amended
Unit Label - To Be Amended
Other Unit Label - To Be Amended
Position X - To Be Amended
Position Y - To Be Amended
Distance - To Be Amended
Location 1 - To Be Amended
Location 2 - To Be Amended
Attacker Unit Label - To Be Amended
Target Unit Label - To Be Amended
Radius - To Be Amended
Group Label - To Be Amended
Target Group Label - To Be Amended
Unit Match Type - To Be Amended
Attribute - To Be Amended
Value(float) - To Be Amended
Trait Description - To Be Amended
Level - To Be Amended
Character Type - To Be Amended
Event Type - To Be Amended
Character Faction Type - To Be Amended
Original Faction Type - To Be Amended
Original Culture Type - To Be Amended
Character - To Be Amended
Action - To Be Amended
Distance In Squares - To Be Amended
Religion - To Be Amended
Turns - To Be Amended
Religion Percentage - To Be Amended
Heresy Percentage - To Be Amended
Ancillary Name/Type - To Be Amended
Ransom Type - To Be Amended
Age - To Be Amended
Tax Level - To Be Amended
Success Level - To Be Amended
Stance - To Be Amended
Score Type - To Be Amended
Quantity - To Be Amended
Mission ID - To Be Amended
Turns Remaining - To Be Amended
Source ID - To Be Amended
Transgression Name - To Be Amended
Forgiveness Name - To Be Amended
AI Label - To Be Amended
Event Name - To Be Amended
PositionInRect - To Be Amended
Crusade Outcome - To Be Amended
Difficulty - To Be Amended
Settlement Name - To Be Amended
Building Description - To Be Amended
Plug-In - To Be Amended
Loyalty Value - To Be Amended
Build Type - To Be Amended
Auto-management Type - To Be Amended
Castle/City - To Be Amended
Advice Thread - To Be Amended
Trigger Name - To Be Amended
Message Identifier - To Be Amended
Element ID - To Be Amended
Function ID - To Be Amended
Scroll ID - To Be Amended
Button ID - To Be Amended
UI Element ID - To Be Amended
Script Counter - To Be Amended
Timer ID - To Be Amended
Duration - To Be Amended
Sound Event Tag - To Be Amended
See Also
External Links