EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 09-14-2008, 04:46 AM
cybersmurf cybersmurf is offline
A Grove Wisp
Interface Author - Click to view interfaces
 
Join Date: Dec 2005
Server: Befallen
Posts: 26
Default Can I change my petwindow midgame?

I was wondering if its at all possible to have a pet-window that changes depending on which pet I summon?
Something like:

If summoned=airpet then
button1-function=shadowstep;attack;
else if summoned=earthpet then
button1-function=attack;

I know how to assing a button multiple functionality, its just the if/else part I'm unsure about.

Is there a workaround like doing a /load_ui airpetwindow, /load_ui firepetwindow etc.. before casting the pet?

Just found out some UIs use Class Detection Triggers, could this be used for pets and if so - how?

Thanks in advance
Flaxer
Befallen

Last edited by cybersmurf : 09-14-2008 at 05:11 AM. Reason: discovered something about class detection triggers
Reply With Quote
  #2  
Unread 09-14-2008, 06:24 AM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Moved your post to the XML modding help forum, in here you'll find a sticky that explains conditionals (if then else statements). You can probably grab the pet type by checking for the name in the effects window.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #3  
Unread 09-15-2008, 01:32 PM
EQAditu's Avatar
EQAditu EQAditu is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Permafrost
Posts: 256
Default

Assuming you can find your moved post again... what you want to do seems entirely possible, though it would probably result in a longer script than you were intending. Mostly because as gm9 said, probably the only way to detect your pet type is to check the spell name on up to 30 maintained spell icons.

If you're up for it, I can write generally what you'd have to accomplish.

You'll need some text elements holding the maintained icon's spell names. (Repeat 30x)
Code:
<Text Name="Icon01Name" Visible="false" DynamicData="/GameData.Maintained.Spell_1.Name" />
You'll need some UI script to check the icon text for your pet buff name.(Repeat 30x)
Code:
MATCH=Parent.DynamicDataPage.Icon01Name.LocalText==SearchName
Found=MATCH ? true : Found
Some hidden Page or Button elements with OnShow/OnActivate handler scripts to do your different commands. (One element pet pet type)
Code:
<Page Name="FirePetPage" Visible="false" OnShow="Visible=false do_some_commands" />
Then you'll need some code to do your branching once you have checked all of the icons for each of the pet names.
Code:
Parent.FirePetPage.Visible=FIREPETFOUND
Parent.EarthPetPage.Visible=EARTHPETFOUND
Only one of the booleans should be true(think switch/case block), so only one page should be made visible causing its OnShow event to be triggered. Hide an element after making it visible so you can use it a second time.

That's generally how I would make it... though there are certainly some parts I left out aside from repeating things 30x.

Last edited by EQAditu : 09-15-2008 at 01:36 PM.
Reply With Quote
  #4  
Unread 09-15-2008, 01:52 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

Another possibility could be to take away the default icons from the pet window. Code up custom ones that have different functionality for each pet.

Then, to change the window functionality, set a variable when you cast the correct pet.

Either check the spell being cast...? Or set the variable in a hotbutton that casts the pet.

Thoughts?
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #5  
Unread 09-15-2008, 02:02 PM
EQAditu's Avatar
EQAditu EQAditu is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Permafrost
Posts: 256
Default

Checking the spell being cast does sound quicker. You just need to create your own DynamicData spell name element like:
Code:
<Text Name="SpellName" DynamicData="/GameData.Spells.Casting" LocalText="NoSpell" Size="0,0" Visible="false" OnShow="do_checking_based_on_LocalText/>
Replace OnShow with actual code that checks for the LocalText matching a pet spell name.
Reply With Quote
  #6  
Unread 09-15-2008, 04:58 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Easiest is probably a toggle button on the pet window.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #7  
Unread 09-15-2008, 06:49 PM
EQAditu's Avatar
EQAditu EQAditu is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Permafrost
Posts: 256
Default

Pfft, that's too simple!

It sounded like the OP wanted something at least a tiny bit automatic though.
Reply With Quote
  #8  
Unread 09-15-2008, 11:29 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

I mean... it's close enough with what was said above:

Make an invisible button on pet window.
Press button when casted spell name matches correct button, that toggles the functions.
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #9  
Unread 09-16-2008, 08:15 AM
cybersmurf cybersmurf is offline
A Grove Wisp
Interface Author - Click to view interfaces
 
Join Date: Dec 2005
Server: Befallen
Posts: 26
Default

Thanks for all the great answers.
I think I'll pick up a book on XML-programming before throwing myself at this project
All my mods up till now have been slight modifications of already good mods so they would fit a conjuror, but I'm not completely sure how it actually works with pages and all the viriables available
But thank you for now, and I'll probably return when/if I get around to actually learning xml.

Kind regards
Flaxer
Befallen
Reply With Quote
  #10  
Unread 09-16-2008, 12:01 PM
EQAditu's Avatar
EQAditu EQAditu is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Permafrost
Posts: 256
Default

Well... I don't think you'll find a book on this. This isn't XML programming as there is no such thing. The XML files are formatted markup language, true... but saying XML programming is like saying HTML programming. It's a poor term as any programming isn't in HTML but JavaScript or ASP/PHP etc.

The UI scripting is specific to EQ2 and pretty much the only source you're going to find on learning that is here in these forums or by looking at premade mods. Oh, and the UI documentation that SoE provides.
Reply With Quote
  #11  
Unread 09-16-2008, 02:01 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

And to add to that, the scripting possible through the UI isn't really anything specific. It's just the game's own UI capabilities.

You can do basic math, If/Else statements, and a few other things that we've figured out collectively along the way
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
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 05:10 PM.


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