PDA

View Full Version : Addon: Shapeshift Shadowform v0.15


sarf
10-11-2004, 09:22 AM
Greetings!

This is the mod shine-shine and all Shadow priests have been waiting for (I hope) - the Shapeshift Shadowform mod. It will add another button to your (hopefully empty) shapeshift buttons, and will allow you to cast the Shadowform spell from there.

Download it here:
http://www.fukt.bth.se/~k/wow/scripts/ShapeshiftShadowform/

Todo: Check and see if the action bar gets updated when you press the button. If not, it should change to the appropriate action bar.[list:87d4860574] Was fixed in v0.10. Use an update function and check buffs to determine when Shadowform is activated/fades. Was fixed in v0.10 Will override action page 1 with the shapeshift page. No cool animation, but at least you'll get a fresh new action page! :)[/list:u:87d4860574]
Many thanks to shine-shine for debugging!

Sarf
---
Cthulhu Saves. He might get hungry later.

Anonymous
10-11-2004, 11:25 AM
Please note that I tested the mod without Cosmos.

Shapeshift bar: the small shapeshift bar (with the Shadowform spell) doesn't appear and disappear when the mod is toggled by a binding key, it will only appear, or disappear (depending on whether the mod is enabled or disabled), when Shadowform is actually cast. Other than that, it looks just like one would expect.

Icon: the icon that appears in the spell book becomes darker when Shadowform is active, and retains a yellow frame around it, when active, much like the blue frame that briefly appears when pushing any spell/ability button. The icon on the shapeshift bar is dark when Shadowform is inactive, and normal when it is (should be reversed). Also, it doesn't have the yellow frame around it when Shadowform is active.

Shadowform action bar: when in Shadowform, the action bar doesn't change.
I don't quite understand what you are referring to with "shapeshiftID+6."

sarf
10-11-2004, 04:49 PM
Thanks for the feedback - for an AddOn which were hacked together in the morning (prior to going to school to iron out a report I've still not started working with :oops: ) it seems to be relatively bug-free. Well, at least it works. :)

Shapeshift bar:
Will now be updated when the AddOn is toggled on/off.

Icon:
Fixed the "darkened out" thingy (hopefully). This might lead to some issues with the cooldown timer as well as with casting the darn thing (I had to modify a variable called isCastable).
The yellow bar is a no-no. The Shapeshift buttons lack this, and to keep my AddOn from interfering too much, I won't add it at this time.

Shadowform action bar:
The cryptic notice about ID+6 was more for my sake than for yours. Anyhow, as I expected, the change of action bars was NOT automatic (duh!) so I went ahead and did it myself. Note, however, that to go back to the proper action bar page you have to use the shapeshift button. I could perhaps patch it so it would do this in all instances, but that would have to wait.

You'll have to wait until the evening to get any more versions done other than this one. My teammate is glaring at me, and if his looks could kill, I'd probably be working at the report instead of doing this. ;)

Download it at the address above (version 0.02).

Sarf
---
Initiative comes to those who wait.

sarf
10-11-2004, 05:32 PM
v0.03 is out, will fix the "fading/activation" problem.

Sarf
---
Outside of a dog, a book is a man's best friend. Inside of a dog it's too dark to read.

shine-shine
10-11-2004, 05:42 PM
Note: regarding v0.02.

When activating the mod, the icon is dark, even if the spell is already active. Also, the action bar changes immediately when the button is clicked, but if there's no mana the spell won't be cast; the action bar, however, will change all the same.

Also regarding the action bar, it would be infinitely more comfortable if it would act as the druid's shapeshifting action bars. Namely, when a druid shapeshifts, the shapeshift action bar visually slides from the bottom of the existing action bar to cover it (no matter which one of the six available action bars is currently displayed). More over, one can still scroll through the six action bars and return to the shapeshifting action bar (which replaces the first of the six action bars) One cannot, however, return to the first action bar without going out of the shapeshifting mode. I realize that it sounds very fancy, but this functionality is already available for the druid, and thus shouldn't be too difficult to find in the original UI. Is there no way to replicate this whole mechanism (short of the function that detects when the priest is in shapeshifting mode - by the existence of the Shadowform buff) from the druid? It's bound to be somewhere in the existing interface files.

I also noticed something interesting. While the icon in the spell book doesn't change (except appearing darker and with the aforementioned yellow frame), it does change (to a completely different icon) if it is placed on an action bar. I think it should change on the little shapeshifting bar as it does on action bars (this would make it much easier to spot than the difference between a darker and lighter version of the same icon).

It would seem logical, but perhaps technically difficult, to run a constant loop that checks for the presence of the buff icon, and when one is detected, the script would display the appropriate action bar. This would allow, theoretically, to both reuse the code that handles the druid's shapeshifting action bar functionality, as well as save the trouble of changing the icon when the spell is active (just place the actual spell button there, instead of a macro, and the client will change its icon as it does any other spell that's present on an action bar).

shine-shine
10-11-2004, 05:47 PM
In v0.03 the action bar doesn't change at all.

sarf
10-11-2004, 06:08 PM
Note: regarding v0.02.

When activating the mod, the icon is dark, even if the spell is already active. Also, the action bar changes immediately when the button is clicked, but if there's no mana the spell won't be cast; the action bar, however, will change all the same.
Well, the action bar switch should be fixed in v0.03. Oh well, guess I'll have to push it to v0.04.

[snip]
It's bound to be somewhere in the existing interface files.
Yes, there is a function that does this. Unfortunately, it is called CastShapeshiftForm and takes an id (of a shapeshift button) as an argument. It does... magic things. Perhaps if I let it "pass thru" to the default UI magic would happen.
Of course, it might also break WoW. Try out v0.03 and then tell me if I should do the pass-thru kinda thing.

I also noticed something interesting. While the icon in the spell book doesn't change (except appearing darker and with the aforementioned yellow frame), it does change (to a completely different icon) if it is placed on an action bar. I think it should change on the little shapeshifting bar as it does on action bars (this would make it much easier to spot than the difference between a darker and lighter version of the same icon).
I'm sure it would. If you'd provide me with the name of the texture to change to, I could actually do it.
I can change the texture of the shapeshift button depending on whether Shadowform is active.

It would seem logical, but perhaps technically difficult, to run a constant loop that checks for the presence of the buff icon, and when one is detected, the script would display the appropriate action bar. This would allow, theoretically, to both reuse the code that handles the druid's shapeshifting action bar functionality, as well as save the trouble of changing the icon when the spell is active (just place the actual spell button there, instead of a macro, and the client will change its icon as it does any other spell that's present on an action bar).
Unfortunately, shapeshift buttons are not the same as normal action buttons. They get their information through other sources than normal spells. It is strange that the texture change - I'll have to look into that (someday) ... hmm, it looks like ActionButtons use still another way to access the texture. Oh well.

I'll add the texture effect, fix the "always dark" bug, fix the actionbar not changing bug and try the pass-thru effect in v0.04.

Sarf
---
Spacetime isn't curved, it's positively bent.

sarf
10-11-2004, 06:09 PM
v0.04 is released.

Going to have to go work on the report soon. May take a while for the next version to "hit the shelf".

Sarf
---
A printer consists of three main parts: the case, the jammed paper tray and the blinking red light.

shine-shine
10-11-2004, 06:32 PM
It seems magic doesn't just happen.
In v0.04 the icon doesn't change to a darker form, in fact, ithe button doesn't cast Shadowform at all. Casting from the spell book or an action bar doesn't result in the changing of the action bar, either.

I'm not sure how to check the id of the alternative icon, so here's an image (and I'm sorry for having to make you look for it). http://beta.camera.co.il/temp/shadowform-alt.jpg

Edit: in the macro icons table, it's on the 14th row, counting from the bottom, second left.

sarf
10-11-2004, 07:26 PM
No worries, I'll just have to get a BLP viewer.

<WHACK>

Done.

Hmm... I chose a spell called AntiShadow... it looked and sounded like it was something appropriate.

v0.05 is out now.

Sarf
---
If peanut butter cookies are made from peanut butter, then what are Girl Scout cookies made out of?

shine-shine
10-12-2004, 10:58 AM
I've tested v0.05 (with the new patch, interface id changed to 3986).
The icon remains the same when Shadowform is active. The action bar doesn't change.

I tested the shapeshifting interface of the druid some more, as I feel it would be best to mimic something familiar. When the druid shapeshifts, the first (of six) action bars is replaced with the new action bar (with a nifty slide of the new bar from beneath to cover the existing one). If the action bar that's currently displayed is not the first one, it will still replace the first action bar with the shapeshift-specific one, but will continue displaying the active (2-6) action bar. However, the shapeshift-specific action bar is right there. replacing the first, of the six, action bar. The only way to access the original first action bar is to shapeshift to normal form.

sarf
10-12-2004, 01:38 PM
I've tested v0.05 (with the new patch, interface id changed to 3986).
The icon remains the same when Shadowform is active. The action bar doesn't change.
Interesting.

I tested the shapeshifting interface of the druid some more, as I feel it would be best to mimic something familiar. When the druid shapeshifts, the first (of six) action bars is replaced with the new action bar (with a nifty slide of the new bar from beneath to cover the existing one). If the action bar that's currently displayed is not the first one, it will still replace the first action bar with the shapeshift-specific one, but will continue displaying the active (2-6) action bar. However, the shapeshift-specific action bar is right there. replacing the first, of the six, action bar. The only way to access the original first action bar is to shapeshift to normal form.
As I said, I can't emulate the way shapeshifting works at the moment UNLESS I do some cool patching.

It is annoying that the action bar does not change.

I will have to check this out myself after all, probably by using my Rogue. There might be issues that result from this, however, and I won't be able to work on the module until later tonight.

Sarf
---
"Pleasure's a sin, and sometimes sin's a pleasure" - Lord Byron

sarf
10-12-2004, 02:56 PM
v0.07 is ready. It overrides action page 1. It worked with Stealth. I changed the icon to one more ... shapeshift:ish and noticeable.

Sarf
---
I salivate at the sight of mittens.

shine-shine
10-12-2004, 03:34 PM
In v0.07 when activating the mod, the following error pops up: [string "Interface\AddOns\ShapeshiftShadowForm\Shape..."]:454: attempt to index local `tooltiptext' (a nil value). The error keeps coming up instantly all the while the mod is active. The small shapeshifting bar is visible, but is empty. Casting Shadowform from the spell book doesn't change the action bar.

sarf
10-12-2004, 04:02 PM
Fudge.

Just when you think you can do one small change untested, it blows up in your face.

Anyhow... new version out now that should change this. Everything should work after this, as that was the only "minor, inconsequential" thing I did after testing it.

<GRUMBLE>

Sarf
---
I thought about how mothers feed their babies with little tiny spoons and forks, so I wonder what Chinese mothers use. Toothpicks?

shine-shine
10-12-2004, 04:30 PM
In v0.08 the icon is there, but it doesn't change when in Shadowform, and neither does the action bar.

sarf
10-12-2004, 04:50 PM
Download the newest version 0.09-test and run the following code :
/script ShapeshiftShadowform_DumpBuffs();Log out normally, then go to your WTF\Account\<YOUR ACCOUNT NAME HERE>\SavedVariables.lua and copy the entry named ShapeshiftShadowform_DumpedBuffs to this thread.

Note that the action bar you switch to is VERY likely to have zero action buttons placed it.

Sarf
---
The future ain't what it used to be.

shine-shine
10-12-2004, 05:21 PM
Error: [string "Interface\AddOns\ShapeshiftShadowForm\SHape...]:417: attempt to index global `ShapeshiftShadowform_DumpedBuffs' (a nil value)

sarf
10-12-2004, 05:26 PM
All right.

Download the updated version of 0.09-test.

Sarf
---
Some days you're the dog; some days you're the hydrant.

sarf
10-12-2004, 05:55 PM
By the way, I hope I didn't forget to tell you to do the dump when you have activated Shadowform, so that it is part of your buffs.

Sarf
---
Information Highway Roadkill

shine-shine
10-12-2004, 05:59 PM
Here it is. Shadowform, as well as another positive buff were active.

ShapeshiftShadowform_DumpedBuffs = {
["Bad"] = {
},
["GoodPassive"] = {
},
}

sarf
10-12-2004, 06:18 PM
Please retry with the new v0.09-test. I am sorry I can not try out the dumpbuffs myself, but I do not have WoW at my current computer.

Sarf
---
"HERBS: ******** for cavemen" - Daniel Rutter

shine-shine
10-12-2004, 06:25 PM
Error: [string "Interface\AddOns\ShapeshiftShadowform\Shape...]:403: Usage: GetPlayerBuff(index [,"filter"])

sarf
10-12-2004, 06:29 PM
Try the new new new version of 0.09. :(

Sarf
---
Ingredients: chopped pork shoulder with ham, salt, water, sugar, sodium.

shine-shine
10-12-2004, 06:33 PM
No error this time, but the buffs are still not detected:

ShapeshiftShadowform_DumpedBuffs = {
["buffs"] = {
},
}


By the way, trying this out:
/script DEFAULT_CHAT_FRAME:AddMessage(GetPlayerBuff(2));

If I have 3 buffs it returns an id, otherwise "-1". Maybe this'll help you in some way.

sarf
10-12-2004, 06:49 PM
I am using that one, but in a slightly non-logical way.

Anyhow. Try the newest version of 0.09 - I've checked so that it reports Stealth OK.

Sarf
---
And the Lord spake unto Elvis, "Thou hast spoken against me Elvis, and I curse thee to have thy blue suede shoes trod upon for all time..."

shine-shine
10-12-2004, 06:52 PM
Here we go:

ShapeshiftShadowform_DumpedBuffs = {
["buffs"] = {
[1] = "Freeze",
[2] = "Power Word: Shield",
[3] = "Shadowform",
},
}

sarf
10-12-2004, 07:01 PM
OK. Thanks for your patience, by the way!

Does it work?

E.g. have you tried it with the new version?

Sarf
---
DEBAUCHEE, n. One who has so earnestly pursued pleasure that he has had the misfortune to overtake it.

shine-shine
10-12-2004, 07:13 PM
Alright, it's close now. The icon works great (even retains a yellow frame around itself when Shadowform is active) with the little exception that when Shadowform is active, the displayed icon is not the right one. The action bar changes as it should (although maybe it should not switch to the first action bar, like the case is with druids; it replaces the first one, but it doesn't switch to it automatically).

There is a problem with the new action bar: when it first appears one can grab spells from it and drop onto it perfectly well. However, after the displayed action bar was changed to something else and back (even to the first bar, which is hidden underneath and is never displayed), one cannot pick up spells from the new action bar, or drop spells onto it. Although it is the one that is displayed, when trying to pick up a spell, the corresponding spell on the first action bar is picked up instead. The same goes for dropping spells - it will be dropped into the first action bar and not into the new one.

Other than that, it looks great!

sarf
10-12-2004, 07:29 PM
Alright, it's close now. The icon works great (even retains a yellow frame around itself when Shadowform is active) with the little exception that when Shadowform is active, the displayed icon is not the right one. The action bar changes as it should (although maybe it should not switch to the first action bar, like the case is with druids; it replaces the first one, but it doesn't switch to it automatically).
Aha... so the first action bar is replaced but not switched to if you are on page 2-6? Interesting... The icon was chosen at random. I thought it looked cool. :) Anyhow... getting the right icon is low priority at the moment.

There is a problem with the new action bar: when it first appears one can grab spells from it and drop onto it perfectly well. However, after the displayed action bar was changed to something else and back (even to the first bar, which is hidden underneath and is never displayed), one cannot pick up spells from the new action bar, or drop spells onto it. Although it is the one that is displayed, when trying to pick up a spell, the corresponding spell on the first action bar is picked up instead. The same goes for dropping spells - it will be dropped into the first action bar and not into the new one.

Other than that, it looks great!
Action bar issue is easily fixed.

Found the image link.

New version out.

Sarf
---
Time is but the stream I go a-fishing in.

shine-shine
10-12-2004, 07:35 PM
As for it's appearance, it's great to have the option to disable it through the Cosmos configuration screen, but for people who don't use it, I think it should default to an active state if the character has the Shadowform spell (and if you excuse my constant reference to the druid, who I don't even play, their shapeshifting bar is similarly always visible, once they have the appropriate spells).

Also on the subject of adding finishing touches (only if you're into it - you already an excellent job), the priest has the ability to mind control. When in mind control, a pet bar (not a bonus bar) appears on top of the action bar. The pet bar consists of 10 slots and is 440 pixels in width. I would suggest to shift it to the left, when the shapeshifting bar is active, to avoid having them clash. This will create another problem, however: the spell casting (status) bar will clash with the left-shifted pet bar. Oi :) I'd shift it to the left instead of upwards (some people already have a second bar, and a pet/shapeshift bar on top of that, and pushing the casting bar even further upwards is seems way too much).

Next on our list is the tooltip. Right now, when the addon is active, icons of Shadowform, be where they may, change the tooltip text to "freeze" when Shadowform is inactive, and to the appropriate descriptive tooltip text when it is active.

And just one more, I can't seem to find the appropriate tag to bind it to. I'm positive that there are built-in keybindings to the shapeshift bar. Is it possible they aren't displayed in the options if the player is not of a class that has a shapeshift bar?

shine-shine
10-12-2004, 07:39 PM
Found the image link

Are you referring to the icon? It's still the same (don't worry about that, I'll find the right one). The action bar bug is gone. Great stuff.[/quote]

shine-shine
10-12-2004, 07:47 PM
The active spell texture should be "Spell_Shadow_ChillTouch".

shine-shine
10-12-2004, 07:52 PM
Next on our list is the tooltip. Right now, when the addon is active, icons of Shadowform, be where they may, change the tooltip text to "freeze" when Shadowform is inactive, and to the appropriate descriptive tooltip text when it is active.

This is worse than I first observed. When the addon is active, all tooltips (no matter what you hover) show the Shadowform spell description when Shadowform is active, and "Freeze" when it isn't.

sarf
10-12-2004, 07:55 PM
The bonus action bar and the shape shift bar should be compatible, I think... but if they're not I'll have to steal some code from Cosmos (which have to handle an secondbar, a possible pet bar AND shapeshifting bars, I think). This should prove no great impediment though.

I found the icon by the way.

There should be shapeshift buttons in the Keybindings, but yes, they might not be displayed if you do not have any shapeshift abilities at startup (and the AddOn gets loaded AFTER the normal UI so...).

If you want to, I can add a shapeshift binding or two.

New icon-fixed version up.

Sarf
---
A TV can insult your intelligence, but nothing rubs it in like a computer.

sarf
10-12-2004, 08:01 PM
Yes. The reason the buff stuff didn't work was because I tried to use another tooltip so as to not destroy the one the game uses, but no such luck for me. :(

Hmm... let me try some stunts...

Sarf
---
"Money isn't everything. It's just most everything." - Nica Clark

shine-shine
10-12-2004, 08:04 PM
You darken the icon when Shadowform is active (in ShapeshiftShadowform_GetShapeshiftFormInfo()). There's no need to do it because the active texture appears undarkened in other places.

I think adding a sole keybinding to the sole shapeshifting slot is a good idea.

shine-shine
10-12-2004, 08:18 PM
The bonus action bar and the shape shift bar should be compatible, I think... but if they're not I'll have to steal some code from Cosmos (which have to handle an secondbar, a possible pet bar AND shapeshifting bars, I think). This should prove no great impediment though.

I checked, the ShapeshiftShadowformFrame and the PetActionBarFrame (appears when using Mind Control) overlap. I still think the best thing is to shift the latter a bit to the left, and with it the CastingBarFrame.

shine-shine
10-12-2004, 08:19 PM
The bonus action bar and the shape shift bar should be compatible, I think... but if they're not I'll have to steal some code from Cosmos (which have to handle an secondbar, a possible pet bar AND shapeshifting bars, I think). This should prove no great impediment though.

I checked, the ShapeshiftShadowformFrame and the PetActionBarFrame (appears when using Mind Control) overlap. I still think the best thing is to shift the latter a bit to the left, and with it the CastingBarFrame.

sarf
10-12-2004, 08:29 PM
WHEE!

I managed to get around using a tooltip the sneaky way (basically, I check if any buff has the same "texture" as the shadowform and detect it that way instead). It should work - it detected Stealth without a hitch.

Enjoy v0.12!

I'll see if I can do that bar-shifting thingy sometime later. For now - tea time!

Sarf
---
"A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila." - Mitch Ratliffe

shine-shine
10-12-2004, 08:35 PM
v0.12 fixed the tooltips. Great work!
By the way, the Shadowform icon on the shapeshift bar itself doesn't have a tooltip. I don't know whether you did this on purpose or not; but just so you'd know :)

Just make a small tweak when you update the addon, so as to remove the code that darkens the icon. It's not dark in other places it's shown, and more so, it makes it hard to see what's in there (being smaller than normal icons).

Edit: if you decide to mess around with the whole sliding animation thing, the implementation of it exists in BonusActionBarFrame.lua

sarf
10-12-2004, 08:46 PM
Oops. :oops:

My bad. Didn't think of checking that out.

Anyhow, v0.13 is out. It tries to move the bars a bit.

Tweak SHAPESHIFTSHADOWFORM_BASE_WIDTH (and toggle Shadowform between each tweak) by using the following code:
/script SHAPESHIFTSHADOWFORM_BASE_WIDTH = 30;
Tell me when you find "the sweet spot".

The whole bonusaction bar does NOT co exist with the pet bar though.

Sarf
---
Nobody expects the Spanish Inquisition!

shine-shine
10-12-2004, 08:46 PM
The pet bar is placed perfectly in v0.13.

sarf
10-12-2004, 09:12 PM
Cool!

I just threw out some numbers and they were right... <looks suspicously around for the Candid Camera>

Sarf
---
DUEL, n. A formal ceremony preliminary to the reconciliation of two enemies. Great skill is necessary to its satisfactory observance; if awkwardly performed the most unexpected and deplorable consequences sometimes ensue. A long time ago a man lost his life in a duel.

Anonymous
12-25-2004, 04:37 AM
Id like to get my hands on this but the link seems broken and i just cna not find it any place. alitle help here?

sarf
12-26-2004, 10:14 AM
Sorry, currently my web server is down. If you PM me with your email address, I might be able to mail it to you, or we could arrange something on IM. :(

Sarf
---
If you have to ask, you're not allowed to know.

Shark
01-11-2005, 02:09 PM
Link broken since 2 days.

Anonymous
01-20-2005, 04:47 PM
How do I bind a key to the Shadorform Shapeshift button so that it shifts me in and out of shadowform?

The SHAPESHIFTSHADOWFORM binding only toggles the shadowform button on and off, without actually casting the spell.

sarf
01-20-2005, 05:13 PM
Create a macro to do this :

/script CastShapeshiftForm(1);

THen put the macro somewhere and bind a key to the action button the macro is placed on.

Sarf
---
We could do that, but it would be wrong, that's for sure.

Anonymous
01-20-2005, 05:22 PM
Wouldn't that just be the same as dragging and dropping the Shadowform spell from the spellbook into an action button?

Or does calling it this way cause the action bar switches?

At which point, is there an easy way to just do the following with a macro:

- If shadowform is on, toggle shadowform off and switch to actionbar 1
- If shadowform is off, toggle shadowform on and switch to actionbar 2

Thanks in advance for indulging my noobness.


Create a macro to do this :

/script CastShapeshiftForm(1);

THen put the macro somewhere and bind a key to the action button the macro is placed on.

Sarf
---
We could do that, but it would be wrong, that's for sure.

Anonymous
01-25-2005, 03:50 PM
I am trying this addon now, but there is no Shadowform action page that comes up when I shift to Shadowform. Is there anything in particular I need to change to make that work?

I am using Cosmos and Gypsy at the moment. Cosmos for my action page, second action page and popbar.

Telos sidebar for the 12 slot bars, and Gypsy for the unit mod and buff mod.

Anonymous
03-28-2005, 03:20 AM
Seems not to be working with the 1300 patch

screw579
10-10-2005, 02:18 PM
:X Now imagine if the world was like that.:I

mattswell
11-21-2005, 04:17 AM
mispost :D