RPTools.net

Discussion and Support

Skip to content

It is currently Sat Dec 16, 2017 9:33 pm 






Reply to topic  [ 5 posts ] 

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
RPTools Team
 
Joined: Tue Feb 07, 2006 1:07 am
Posts: 1766
Location: Austin, Tx
 Post subject: Adopters: CT/IT Events
PostPosted: Sun Jul 26, 2009 12:14 pm 
This post gives a short description of each of the events available to CT & IT. CT only has one event, but IT has many of them. Events for the applications are placed in the eventScripts.xml file located in the chartool/ & inittool/ directories within the game settings files. The eventScripts.xml file contains a single <event-scripts> element that hold all of the application specific events. Each event script is defined by a single <script> element with its @event attribute set to the name of the event.

CT's only event:
  • CHARACTER_LOAD: Called when a combatant is loaded into CT

These are IT's global events.
  • START_ENCOUNTER: Called at the start of an encounter.
  • START_ROUND: Called at the start of each round before a combatant is given initiative.
  • INITIALIZE_INITIATIVE_DATA: Called before IT starts determining initiative
  • INITIATIVE_DETERMINED: Called after IT finishes determining initiative.
  • DETERMINE_INITIATIVE: Called when IT want's to generate the initiative of a combatant.
  • RESOLVE_TIES: Called when a group of combatants have the same initiative value and IT needs to know which one goes first.
  • ADD_COMBATANT: Called when a new combatant is added to the encounter.
  • ADD_GROUP_COMBATANT: Called when a new combatant is added to an IT group.
  • ADD_TIMER: Called when a new timer is added to the encounter.

IT also supports events on its combatants, timers, and phases. All of these scripts are defined in the inittool/initTool.xml file.

The combatant specific events are defined in an <event-scripts> element contained within the <combatant-type> element. This allows each category of combatant to have its own specific event script. The combatant category events generated are:
  • RECEIVE_INITIATIVE: Called when a combatant receives initiative.
  • LOSE_INITIATIVE: Called when a combatant loses initiative.
  • CREATE_COMBATANT: Called when a combatant is created.
  • DELETE_COMBATANT: Called when a combatant is deleted.

The timer specific events are defined in an <event-scripts> element contained within the <timer-type> element. This allows each different type of timer to have its own specific event script. The timer type events generated are:
  • RECEIVE_INITIATIVE: Called when a timer receives initiative.
  • LOSE_INITIATIVE: Called when a timer loses initiative.
  • CREATE_TIMER: Called when a timer is created.
  • DELETE_TIMER: Called when a timer is deleted.
  • TIMER_EXPIRES: Called when a timer expires.
  • CHANGE_TIMER: Called when the timer data changes.

The last set of events are specific to phases. The phase specific events are defined in an <event-scripts> element contained within the <phase-type> element. There is only one <phase-type> element defined withing the initTool.xml file so the same script is executed for each phase. The phase events generated are:
  • RECEIVE_INITIATIVE: Called when a phase receives initiative.
  • LOSE_INITIATIVE: Called when a phase loses initiative.
  • ADD_TO_PHASE: Called when a combatant is added to a phase.
  • REMOVE_FROM_PHASE: Called when a combatant is removed from a phase.
  • PHASE_SORT_VALUE: Called on each combatant in a phase when determining the sort order within the phase.
  • LEAVE_PHASE: Called after the last combatant in the phase has finished with its turn.


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Sep 11, 2007 6:31 pm
Posts: 5412
 Post subject: Re: Adopters: CT/IT Events
PostPosted: Tue May 08, 2012 10:21 am 
Thanks for the run down Jay. Are there any other possible events for CT? Thinking about stuff like might be used to start wizard on first show of a form as opposed to load of the sheet itself...

_________________
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..


Top
 Profile  
 
User avatar  Offline
RPTools Team
 
Joined: Tue Feb 07, 2006 1:07 am
Posts: 1766
Location: Austin, Tx
 Post subject: Re: Adopters: CT/IT Events
PostPosted: Tue May 08, 2012 11:57 am 
There isn't an event, but I think you can set up for a listener. I'll have to check when I get home...


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Sep 11, 2007 6:31 pm
Posts: 5412
 Post subject: Re: Adopters: CT/IT Events
PostPosted: Tue May 08, 2012 12:51 pm 
jay wrote:
There isn't an event, but I think you can set up for a listener. I'll have to check when I get home...



Cool.. along a similar line of thinking, you can set up the CharTool.xml with multiple forms:
Code:
<game-settings>
  <character-sheet-file>forms/sw.jfrm</character-sheet-file>
  <forms>
    <form>
      <name>Default Character Sheet</name>
      <file>forms/sw.jfrm</file>
    </form>
        <form>
      <name>Default Character Sheet2</name>
      <file>forms/swImage.jfrm</file>
    </form>
  </forms>
</game-settings>


Is it currently possible to limit visibility to one form or another based upon some custom criteria. ie, form "2"(in this case swImage.jfrm) is not visible until some certain criteria is set(likely checked by the onLoad event)

_________________
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..


Top
 Profile  
 
User avatar  Offline
RPTools Team
 
Joined: Tue Feb 07, 2006 1:07 am
Posts: 1766
Location: Austin, Tx
 Post subject: Re: Adopters: CT/IT Events
PostPosted: Tue May 08, 2012 2:04 pm 
You can add multiple forms to that XML, but it only causes them to show up in the view menu. All other forms are hidden and have to be brought up manually using scripts (or embedded in each other).


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 5 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 1 guest





cron

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman