Welcome to the TWC Wiki! You are not logged in. Please log in to the Wiki to vote in polls, change skin preferences, or edit pages. See HERE for details of how to LOG IN.

Difference between revisions of "Conditions (M2-Scripting)"

From TWC Wiki
Jump to navigationJump to search
(Conditions Table)
(Conditions Table)
Line 6: Line 6:
  
 
== Conditions Table ==
 
== Conditions Table ==
 +
 +
''This table is a Work in Progress, if you would like to help out, please [http://www.twcenter.net/forums/private.php?do=newpm&u=14571 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.''
  
 
{|class="wikitable sortable" border="1" cellpadding="4" cellspacing="0"
 
{|class="wikitable sortable" border="1" cellpadding="4" cellspacing="0"

Revision as of 18:15, 20 September 2008

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.

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
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