Aller au contenu

Photo

Where is the code that handles left click events for the quickcast and hotbar menu?


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

#1
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
I looked at quickspell.xml and hotbar.xml in the UI folder of the NeverwinterNights2 directory and I didn't see any code that handles leftclick events.  Does anyone know how the server interfaces with the quickcast or hotbar buttons.  I saw leftclick events for the quick conversion, metamagic, and scroll buttons, but nothing for the buttons that contain the spells in the quickcast menu or the buttons that you drag to the hotbar. 

Any help would be greatly appreciated.  Thanks.

#2
_Knightmare_

_Knightmare_
  • Members
  • 643 messages
In hotbar.xml I see a LeftClick under the section:

OnLeftClick=UIButton_Input_HotbarLeftClick()

Didn't see anything either in the quickspell.xml (saw no "quickcast.xml).

Sorry not very useful. Might want to do a repost of this under the Custom Content forums if you have not already done so. People who deal with the game engine itself hang out there.

Modifié par _Knightmare_, 25 décembre 2010 - 06:15 .


#3
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
You would have to recreate the quick cast basically, it's engine but you can make your own system to replace it. OnLeftClick and UI coding is really the answer to your question, Sunjammer has a tutorial or two on it, on the vault.

#4
M. Rieder

M. Rieder
  • Members
  • 2 530 messages

painofdungeoneternal wrote...

You would have to recreate the quick cast basically, it's engine but you can make your own system to replace it. OnLeftClick and UI coding is really the answer to your question, Sunjammer has a tutorial or two on it, on the vault.


Thanks for the info.  What I want to do is not important enough for me to do that.  I'm going to have to find another route. 

#5
M. Rieder

M. Rieder
  • Members
  • 2 530 messages

_Knightmare_ wrote...

In hotbar.xml I see a LeftClick under the section:

OnLeftClick=UIButton_Input_HotbarLeftClick()

Didn't see anything either in the quickspell.xml (saw no "quickcast.xml).

Sorry not very useful. Might want to do a repost of this under the Custom Content forums if you have not already done so. People who deal with the game engine itself hang out there.


Actually you were helpful.  You suggested that I go back and look at the 2DA again.  I did, and found out that it *is* possible to change what things can be targeted.  Very easily, so it seems.  In 5 minutes I just made it where you can cast mirror image on other characters.  That would be useful for buffing your tank, eh?  Thanks for the advice. 

I did it by modifying the hexidecimal value in spells.2DA.  If you go into the Data folder, then look at spells.txt, there is a detailed description of the 2DA fields.  One field is called "target type".  This number controls what can be targeted by a spell, apparently.

I have only tested it with mirror image (that's the spell I wanted to modify), but I'm going to check it with others since this could be very useful to me in my campaign.

Again, thanks. 

Modifié par M. Rieder, 25 décembre 2010 - 07:20 .