![]() |
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 |
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.
|
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" />Code:
MATCH=Parent.DynamicDataPage.Icon01Name.LocalText==SearchNameCode:
<Page Name="FirePetPage" Visible="false" OnShow="Visible=false do_some_commands" />Code:
Parent.FirePetPage.Visible=FIREPETFOUNDThat's generally how I would make it... though there are certainly some parts I left out aside from repeating things 30x. |
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? |
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/> |
Easiest is probably a toggle button on the pet window. :)
|
Pfft, that's too simple!
It sounded like the OP wanted something at least a tiny bit automatic though. |
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. |
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 :o But thank you for now, and I'll probably return when/if I get around to actually learning xml. Kind regards Flaxer Befallen |
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. |
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 :rolleyes: |
| All times are GMT -5. The time now is 12:41 AM. |
vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI