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 "Events (M2-Scripting)"

From TWC Wiki
Jump to navigationJump to search
m (Protected "Events (M2-Scripting)": Protected until template is complete [edit=sysop:move=sysop])
Line 1: Line 1:
This page is a work in progress, part of the Wiki Scripting Project.
+
__TOC__
 +
 
 +
'''Events''' are the parameters in scripting used to determine the interval at which the script is checked for in order to fire.  They are used to fire a script at a proper time during the game process, such as at the end of a battle, the start of a turn, or the death of a general.  The event is what enables most scripts to work, by finding the proper time to trigger the script.  In determining which event to use, you should consider which Conditions you want to use, and insure the event exports the triggers that those conditions require, or the script won't work as intended.
 +
 
 +
'''These trigger exports 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, religion, event_type.
 +
 
 +
''Events usually export more than one trigger, the most common triggers required from an event are listed here: [[Required Triggers (M2-Scripting)]]''
 +
 
 +
== Events 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 event isn't added twice or skipped, help needs to be coordinated.  Thank you.''
 +
 
 +
''Current Progress: 4/214''
 +
 
 +
'''Key:''' CR = character_record ; F = faction ; S = settlement ; EU = enemy_unit ; PU = player_unit ; TF = target_faction ; RD = resource_description ; RI = region_id ; PB = prior_build
 +
 
 +
{|class="wikitable sortable" border="1" cellpadding="4" cellspacing="0"
 +
|+ style="background:#bfc0f7;" |'''Medieval II DocuDemons - Events Table'''
 +
! style="background:#bfc0f7;" |Identifier!!style="background:#bfc0f7;" |CR!!style="background:#bfc0f7;" |F!!style="background:#bfc0f7;" |S!!style="background:#bfc0f7;" |EU!!style="background:#bfc0f7;" |PU!!style="background:#bfc0f7;" |TF!!style="background:#bfc0f7;" |RD!!style="background:#bfc0f7;" |RI!!style="background:#bfc0f7;" |PB!!style="background:#bfc0f7;" |Other Exports
 +
|-
 +
|[[PreBattle (M2-Scripting)|PreBattle]]||Yes||Yes||No||No||No||No||No||Yes||No||[[nc_character_record (M2-Scripting)|nc_character_record]], [[character_type (M2-Scripting)|character_type]]
 +
|-
 +
|[[PreBattleWithdrawal (M2-Scripting)|PreBattleWithdrawal]]||Yes||Yes||No||No||No||No||No||Yes||No||[[nc_character_record (M2-Scripting)|nc_character_record]], [[character_type (M2-Scripting)|character_type]]
 +
|-
 +
|[[BattleAiCommenced (M2-Scripting)|BattleAiCommenced]]||No||Yes||No||No||No||No||No||No||No||None
 +
|-
 +
|[[BattleDelayPhaseCommenced (M2-Scripting)|BattleDelayPhaseCommenced]]||No||Yes||No||No||No||No||No||No||No||None
 +
|-class="sortbottom"
 +
|Identifier||CR||F||S||EU||PU||TF||RD||RI||PB||Other Exports
 +
|}
 +
 
 +
 
 +
'''Template:''' |[[Events (M2-Scripting)|Identifier]]||CR||F||S||EU||PU||TF||RD||RI||PB||Other Exports
 +
 
 +
== See Also ==
 +
*[[Scripting Knowledge Compendium (M2-Scripting)]] - For the index of scripting information
 +
*[[Conditions (M2-Scripting)]] - For information on Conditions and links to Condition pages
 +
*[[Commands (M2-Scripting)]] - For information on Commands and links to Command pages
 +
*[[Modding:Coding]]
 +
 
 +
== External Links ==
 +
*[http://www.twcenter.net/forums/downloads.php?do=file&id=1579 Ultimate DocuDemons 4.0]
 +
*[http://www.twmodsquad.com/index.php?PHPSESSID=37262cff4c104c4935a64eea165d9f72&cat=1 TW Mod Squad - Scripting]
 +
*[http://forums.totalwar.org/vb/showthread.php?t=73016 List of Events, Commands, and Conditions from CA]
 +
*[http://www.twcenter.net/forums/forumdisplay.php?f=743 J@mes TWC-U Scripting Class]
 +
*[http://forums.totalwar.org/vb/showthread.php?t=82855 alpaca's Script-o-Rama]
 +
*[http://www.twcenter.net/forums/showthread.php?t=176050 GrnEyedDvl's Scripts n' Stuff]
 +
*[http://forums.totalwar.org/vb/showthread.php?t=77177 alpaca's Beginner Scripting Tutorial]

Revision as of 19:53, 3 October 2008

Events are the parameters in scripting used to determine the interval at which the script is checked for in order to fire. They are used to fire a script at a proper time during the game process, such as at the end of a battle, the start of a turn, or the death of a general. The event is what enables most scripts to work, by finding the proper time to trigger the script. In determining which event to use, you should consider which Conditions you want to use, and insure the event exports the triggers that those conditions require, or the script won't work as intended.

These trigger exports 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, religion, event_type.

Events usually export more than one trigger, the most common triggers required from an event are listed here: Required Triggers (M2-Scripting)

Events 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 event isn't added twice or skipped, help needs to be coordinated. Thank you.

Current Progress: 4/214

Key: CR = character_record ; F = faction ; S = settlement ; EU = enemy_unit ; PU = player_unit ; TF = target_faction ; RD = resource_description ; RI = region_id ; PB = prior_build

Medieval II DocuDemons - Events Table
Identifier CR F S EU PU TF RD RI PB Other Exports
PreBattle Yes Yes No No No No No Yes No nc_character_record, character_type
PreBattleWithdrawal Yes Yes No No No No No Yes No nc_character_record, character_type
BattleAiCommenced No Yes No No No No No No No None
BattleDelayPhaseCommenced No Yes No No No No No No No None
Identifier CR F S EU PU TF RD RI PB Other Exports


Template: |Identifier||CR||F||S||EU||PU||TF||RD||RI||PB||Other Exports

See Also

External Links