EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > UI Developer Discussion

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 02-03-2006, 04:47 PM
maddbomber83's Avatar
maddbomber83 maddbomber83 is offline
A Fallen Diplomat
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Oggok
Posts: 52
Default Click to Cast V1.0

Hello fellow developers!
I have created a new addon that I call Click to Cast. It was inspired by CColdiron's Coldy's Priest Groupwindow w/Effect Buttons.

I have uploaded a patch to his window that enables Click to Cast.

I also have my player window with this enabled.
http://www.eq2interface.com/download...fo.php?id=4169

The mod will take the characters SubClass and Level, compare it to a list, and cast a spell when you click. Currently Click to Cast is set up for 4 types of spells. Cures for Noxious, Arcane, Elemental and Trauma. It can easily be adapted for any other type of spell (pet heals come to mind).

To add this code to your mod, you just have to include the base file, and activate the spell page that you want to cast. I'll run through the chain of events real quick so you have an idea of what is going on.

So to mod a group window, add the base file to your mod.
Code:
<include>MaddBomber_UseAbility_Group.xml</include>
There are 4 pages that corispond to the 4 types of spells (Noxious, Arcane, Elemental and Trauma).
So you need to activate the page for the type of spell you want to cast. I use a button with a
Code:
OnPress="UseAbility.Elemental.Activated=true"
Now you'll need to add some parent. to that for the right level.

Done! thats it.

Now my code will take over for a brief second. First the page you activated (Elemental) will set the class and level in a data object based off /GameData.Self.SubClass and Level.

It will then Reference that XML file, lets say your a Warden level 7. It goes to the Warden page, goes to the Elemental section (because that is the page that was activated), goes to the level 7 section, and executes that code. So, that code should say something like,
Code:
useability Cure Elemental
Here is a block of code from one of the class files.
Code:
<Data Name="Noxious"
1="number.id"
2="number.id"
3="number.id"
4="number.id"
5="number.id"
6="number.id"
7="useability Cure Noxious"
8="number.id"
9="number.id"
10="number.id"
If I activated the Noxious page, and was a level 7 warden, the game would cast Cure Noxious.

Since each class has its own file, it is easy to change and swap.

Some quick notes, you can't include the same physical page twice. So like right now i'm uploading my player window with click to cast. I can't include "newfile" in both the group window and the player window. So I add an end to it.
Code:
MaddBomber_UseAbility_Group.xml
MaddBomber_UseAbility_Player.xml
That file includes the file class.xml from a folder. The folder for each version of UseAbility needs to be different. So Cure_Group and Cure_Player
Now your good to go.

Any questions, comments, suggestions let me know!

My hopes are that Click to Cast's base files (the class files) are easily patched to different mods so that they can be shared between all click to cast enabled windows.

Also, it is not limited to spells. The program will just run whatever is in those " ", so you could have the guardian Noxious one say, Heal me I'm sick! into group chat.
__________________

Last edited by maddbomber83 : 02-03-2006 at 05:13 PM.
Reply With Quote
  #2  
Unread 05-21-2006, 04:07 AM
Lodrelhai's Avatar
Lodrelhai Lodrelhai is offline
A Grassland Beetle
Interface Author - Click to view interfaces
 
Join Date: Jan 2006
Server: Crushbone
Posts: 63
Default

Hi there! This is a nice ui and a great patch! At least as long as they don't pull another "change all the spells!" revamp on us. Was just curious about one thing, though.

michsageman242 also made a patch for this which adds a 5th button under the character name. Probably not vital to have - you've already made the 4 buttons completely customizeable for more than just the cures - but I do like the 5th button option. Been trying to fit it into the current ui settings, but no luck so far.

Here's what I've done to try and fit this in:

in the eq2ui_mainhud_groupmembers.xml file, I added the following under each group member:

<Page Location="33,1" Name="Spell" OnHoverIn="Opacity=1.000" ScrollExtent="66,14" Size="66,14">
<Button BackgroundOpacity="0.000" LocalTooltip="Cast Spell" Name="Spell" OnPress="parent.parent.parent.parent.UseAbility.Spell.Activated=true" PackLocation="left,top" PackLocationProp="0000/0001,0000/0001" ScrollExtent="14,14" Size="14,14"></Button>
</Page>

In the MaddBomber_UseAbility_Group.xml I added:

<Page Name="Spell" OnActivate="parent.Data.Class=(parent.SubClass.text)
parent.Data.Level=(parent.level.text)
parent.Use.activated=false
onDeactivate=(&apos;parent.use.OnEffectFinished=parent.Class.&apos&apos;##&apo s;(parent.data.class)&apos;##&apos;(&apos;.&apos&apos;##&apos;(Name)&apos;##&a pos;(&apos;.&apos&apos;##&apos;(parent.data.level)
parent.Use.activated=true
activated=false"/>

And in the Dirge.xml (my main is a Dirge, so I was testing on her) I added:

<Data Name="Spell"
1="useability Hyran's Angry Sonata"
2="useability Hyran's Angry Sonata"
...
69="number.id"
70="number.id"
/>

(spell name was filled in up to my character's current level, 36).

The button tooltip displays on mouseover, but the spell won't trigger. I put Fueled by Hate under the Noxious lvls 1-36 and that works fine. Any thoughts? Or should I just be happy with my 4 customizeables?

Thanks!

Last edited by Lodrelhai : 05-21-2006 at 04:40 AM.
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 06:14 PM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI