Aller au contenu

Photo

ACTION_MODE_TRACKING Discovered as 14


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

Hi All,

ACTION_MODE_TRACKING = 14

 

EDIT: Unfortunately, while I can *detect* this action mode, I have been unable to change its state via the SetActionMode function. Maybe somebody else may know how and if this is possible, but I suspect it is not.

 

EDIT 2: While I was unable to use SetActionMode, I have indeed been successful in making use of this information to initiate some other scripts with reference to Tracking. Therefore this may open some doors to builders interested in manipulating/adding to the Tracking feat.
 
With reference to a post I made here:- http://forum.bioware...ies-are-nearby/ in connection with RESTING, I discovered that you can detect when a PC has activated TRACKING. As I could not find this ACTION_MODE listed anywhere, including not within combatmodes.2da, I thought it was worth sharing as it can mean a builder could intercept this ACTION_MODE and perhaps design something around it themselves.
 
In theory, the moment Tracking Mode is activated, it could immediately be switched off again and a custom tracking script used. (Untested.) The SetActionMode does not work here, so any new tracking system would have to work alongside any existing one. :(
 
The modebar.xml needs editing to make a script call before (if need be for anything) and after (mostly used) like so:-
 

OnLeftClick=UIObject_Misc_ExecuteServerScript("gui_modebar_nv","PRIOR")
OnLeftClick0=UIButton_Input_HotbarLeftClick()
OnLeftClick1=UIObject_Misc_ExecuteServerScript("gui_modebar_nv","AFTER")

The above piece of code was used by me to do something with nightvision ... hence the "nv" part, but the principle is the same.

 

This allows the builder to intercept the mode bar button press, detect for the tracking having been switched on, and do whatever they need to do.

I am about to do some simple testing, and will assume this works, unless I edit later.

Cheers,
Lance.


  • BartjeD, Shadooow, Loki_999 et 1 autre aiment ceci

#2
Dann-J

Dann-J
  • Members
  • 3 161 messages

The default version of combatmodes.2DA is not only incomplete, but completely borked due to a comment someone left in it. Here's the version I've been using:

2DA V2.0

                     CombatMode     ActivatedName     DeactivatedName     NeedsTarget
  0                     Detect             58275               58276               0
  1                    Stealth             58277               58278               0
  2                      Parry             58279               58280               0
  3               Power_Attack             58281               58282               0
  4      Improved_Power_Attack             58283               58284               0
  5           DEL_Counterspell             53239               53239               0
  6            Flurry_of_Blows             63811               63812               0
  7                 Rapid_Shot             63809               63810               0
  8           Combat_Expertise              1758                1759               0
  9  Improved_Combat_Expertise              1760                1761               0
 10             Defensive_Cast              1766                1767               0
 11         DEL_Dirty_Fighting              3873                3876               0
 12           Defensive_Stance             84556               84555               0
 13                      Taunt             11468               11468               1
 14                      Track            113788              113789               0
 15            Inspire_Courage            112394              112394               0
 16         Inspire_Competance            112395              112395               0
 17            Inspire_Defense            112396              112396               0
 18       Inspire_Regeneration            112397              112397               0
 19          Inspire_Toughness            112398              112398               0
 20            Inspire_Slowing            112399              112399               0
 21            Inspire_Jarring            112400              112400               0
 22                        DEL              ****                ****               0
 23                     Rescue            185806              185807               0
 24                NightVision             58580               58580               0
 25             Hellfire_Blast            225222              225223               0
 26            Hellfire_Shield            220663              220662               0

  • Lance Botelle aime ceci

#3
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

The default version of combatmodes.2DA is not only incomplete, but completely borked due to a comment someone left in it. Here's the version I've been using:




2DA V2.0

                     CombatMode     ActivatedName     DeactivatedName     NeedsTarget
  0                     Detect             58275               58276               0
  1                    Stealth             58277               58278               0
  2                      Parry             58279               58280               0
  3               Power_Attack             58281               58282               0
  4      Improved_Power_Attack             58283               58284               0
  5           DEL_Counterspell             53239               53239               0
  6            Flurry_of_Blows             63811               63812               0
  7                 Rapid_Shot             63809               63810               0
  8           Combat_Expertise              1758                1759               0
  9  Improved_Combat_Expertise              1760                1761               0
 10             Defensive_Cast              1766                1767               0
 11         DEL_Dirty_Fighting              3873                3876               0
 12           Defensive_Stance             84556               84555               0
 13                      Taunt             11468               11468               1
 14                      Track            113788              113789               0
 15            Inspire_Courage            112394              112394               0
 16         Inspire_Competance            112395              112395               0
 17            Inspire_Defense            112396              112396               0
 18       Inspire_Regeneration            112397              112397               0
 19          Inspire_Toughness            112398              112398               0
 20            Inspire_Slowing            112399              112399               0
 21            Inspire_Jarring            112400              112400               0
 22                        DEL              ****                ****               0
 23                     Rescue            185806              185807               0
 24                NightVision             58580               58580               0
 25             Hellfire_Blast            225222              225223               0
 26            Hellfire_Shield            220663              220662               0

Hi DannJ,

Excellent!

EDIT: Out of interest, where did you find this information?

EDIT 2: I just added this information to: http://nwn2.wikia.co...Combatmodes.2da

Many Thanks for this. :)

Lance.



#4
BartjeD

BartjeD
  • Members
  • 249 messages

Lance, does your edit of the modebar.xml work? I have tried to do that in the past but it didn't take, the mode bar GUI appeared to override whatever change I made. :)



#5
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

Lance, does your edit of the modebar.xml work? I have tried to do that in the past but it didn't take, the mode bar GUI appeared to override whatever change I made. :)


Hi BartjeD,

The intercept calls I make before and after definitely work. BUT, it depends what you want to do with the calls once they are made. For my purposes, I wanted to fire scripts *after* the player had clicked on the modebar to do something alongside/after they had clicked on the modebar.

The advantage of realising the ACTION_MODE_XXXX can still be "detected" when an action is "ON" helps us be able to work around some of the coding of the modebar by making a script do something else subject to which action you are trying to work with.

It's very limited of course, in as much as you can only apply scripts at the time of turning a condition on or off ... but that is better than nothing I believe. :) EDIT: But you could of course OPEN another GUI at the time of activation, which may offer more options, if, say for example, you are a Ranger. i.e. Any PC Ranger who clicks on the TRACKING modebar option has a RANGER TRACKING GUI appear, which may be superior to the default version.

If you need me to explain any more, just ask.

Cheers,
Lance.


  • BartjeD aime ceci

#6
BartjeD

BartjeD
  • Members
  • 249 messages

Which part(s) of modebar .xml did you put your code in? I tried putting it in the listbox like horizontal buttons / pads but that didn't work for me. Could you given an example? This is very cool work :)



#7
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

Which part(s) of modebar .xml did you put your code in? I tried putting it in the listbox like horizontal buttons / pads but that didn't work for me. Could you given an example? This is very cool work :)


Hi BartjeD,

I have .... It's in the first post above. :)

In case it's not clear, the code surrounds the "HotbarLeftClick" lines in the MODE_PAGE and NOT the BARD_PAGE.

Cheers,
Lance.
  • BartjeD aime ceci