|
Post by Moongaze on Jun 25, 2007 16:37:59 GMT -5
Well, if ya wanna help me out a little ... I can't get ANYONE to link me a rage potion. Would you mind grabbing the spell name for me?
Just type:
/script GetItemSpell("NameOfRagePotion");
And post the spell name it returns. Try it for two different potions. If the spell is the same, awesome. I just need one. If they are different, I'll need each spell name. I think you'll need the item in inventory to get the spell name.
|
|
|
Post by Exuro on Jun 25, 2007 16:40:10 GMT -5
It's monday nite, everyone prey for stage 4. Well, monday nite for me, its prolly about noon for moongaze.....but still, we all have hopes.
|
|
|
Post by lothaer on Jun 25, 2007 16:48:55 GMT -5
Rage Potion - 5631 Greater Rage Potion - 5633 Mighty Rage Potion - 13442
i hope this is what u were after.
FYI wowhead is a awsome source for itemIDs just type in the name of the item need the ID for then mouse over the item and look at the Loading bar (the bar at the bottom of the page) or click the item and on the next page ull see the item ID in the web link.
|
|
|
Post by Moongaze on Jun 25, 2007 18:27:39 GMT -5
I have the itemIDs already, got those from wowhead I just need the spell they cast. If you type: /script message(GetItemSpell("Rage Potion")); /script message(GetItemSpell("Greater Rage Potion")); /script message(GetItemSpell("Mighty Rage Potion")); Each time one of those lines are typed in on your chat window, a message box will appear with the spell name of that item. It ONLY works if you have the item in your inventory. You could replace the names of the items (and the quotes) with just the item ID and it will work (I think) ... IF and only IF you've seen the item before. I haven't seen any of them, so they're not in my item cache (which is why I was hoping someone would link the item in-game, since I have a debugging tooltip that displays a LOT of information about any item or spell I mouse over). An example would be: /script message(GetItemSpell("Refreshing Spring Water")); When you type that in, you'll get a message box that says "Drink" because all normal types of water cast the spell "Drink" So, with the spell names that the rage items use (hopefully the same spell name), I can auto-find all current rage potions, and any new rage potion that ever appears in WOW. This is the way I find items and ensure that the item list is always up-to-date, at addon run-time
|
|
|
Post by Moongaze on Jun 25, 2007 18:55:58 GMT -5
... That's right, it is Monday isn't it. Haha. I don't have an early version of stage 4 ready yet. Maybe tonight ... MAYBE. And by tonight, I mean tonight my time. Which will be Tuesday morning for most of you. If an early stage 4 is released, you will not have an expanded Button Settings window. It will still have the three click types, and that's it. However, the dropdown list will be populated with everything I've talked about, and most of them will be functional. The ones that would not work, I would remove from the list to avoid complications. Also, the tooltips might display some empty info for the click if you assign something other than "Menu" or "Spell/Item/Macro" I'm still ironing out some details on the stance support to make my life easier. ;D I leave town on Friday, not Thursday like I thought, so I might wait until Thursday night to release as much of Stage 4 that is finished, instead of Weds. I'm sure you would all rather me work one extra day and add a few more things. Of course, I'll still be updating while I'm in California ... I just won't be coding as often as I would like. This next part may go over some people's heads. It's just an explanation of how some of my menu code works. If you're interested, it might be a good read, and give you more insight to how the hell I keep some of the memory usage down One of the reasons why the Stage 4 is taking a little longer than I anticipated is due to the dropdown menus that I decided to design. Knowing that there would be a crazy amount of items to select in these dropdown, I needed something more memory efficient. I designed a crazy way of making dropdowns that relies on very little code, which will make it much easier for me to add new drop-down menu items in the future. These dropdown also generate very little garbage when you open a submenu dropdown list, do you're memory usage doesn't increase by crazy amounts either. To give you an idea: Normally, when you want to make a dropdown menu, you have to manually code each dropdown list item. This usually calls for 3-9 lines of code, per item. Since each of my list items runs a small piece of code (usually updating a setting, or a button attribute), we'll just assume that each menu item would take 10 lines of code. Now, with the normal way of making menus, I have about 70 items. That's 70 x 10 lines of code = 700 lines of code, JUST for menu item selection. Now, add in the menu creation (another 10-15 lines of code), and we're up at 715 lines of code. If I want to modify the code for a list item, I would need to search for it (which would suck) and then change anywhere between 1-5 lines of code. That's a pain, and adding NEW options also sucks, because I have to re-organize some stuff. An estimate of memory usage, JUST for the drop drown menus for the Button Settings window: 17k. O.o So, 715 lines of code for the menus, 17k of memory. Doing it the normal way. With the method I use, I have one line of code per menu item. But this one line of code is special and kills two birds with one stone. It is a database entry for the localized menu item name. I kid you not. I build these menus off of the localized name code I have. So if that's the case, just ignore the 70 lines of code, since they don't count (they already exist, for localization's sake, and would be called upon in the normal way of doing things anyway). I have another database of menu options, which has maybe 14 entries. This also has localization code built into it, but there are two extra parts per database entry: A button type number, and the localization index for the submenu items. So, ignoring the first part, we have the button type number and the localization index. Let's just be over-generous and say that each of these 14 entries takes up 40 bytes of script memory. 660 bytes, but let's just call it 1k. Now, the menu generation is a little large (50 lines of code) and clocks in at maybe 3k of memory. This 3k of memory is shared for EVERY dropdown menu that I make, because it makes any and all dropdowns. So, in the end, the Button Settings window dropdowns technically take up 4k of memory. If I add 200 new items to the menu, it would take another 1k of memory, max, whereas the normal way would increase it by another 60k. ;D I don't even know why I explain that, but I might as well leave it in anyway ;D
|
|
|
Post by lothaer on Jun 25, 2007 19:05:53 GMT -5
OK the spells are, in order of level
Rage Great Rage Mighty Rage
|
|
|
Post by Moongaze on Jun 25, 2007 20:02:38 GMT -5
... I hate you Blizzard. I hate you so much. ;D
I'll add the search term of "Rage" to the item spell searching to catch them, and sort them by strength based upon their item levels. That should work out fairly well. Thanks lothaer!
|
|
|
Post by happyburger on Jun 25, 2007 20:43:42 GMT -5
geeze moon thats some crazy idea for the dropdowns.... i wish i was as good at coding as you but alas i'm subject to the 'normal' way.... bet my badminton is better
|
|
|
Post by lothaer on Jun 25, 2007 21:15:28 GMT -5
no problem Moon, i can always find shit
|
|
|
Post by Exuro on Jun 25, 2007 22:07:55 GMT -5
Nice coding. May I duggest though that you still release as much of stage 4 on wed. as you can that way it can be tested for any really annoying bugs. This way you can release a patch and some extra features on thurs. before you leave. The reason I say this is because it would be annoying if you released stage 4 on thurs., left for vacation, and there was some really annoying bugs that we have to deal w/ for two weeks or however long your gone.
Btw im not trying to tell you how to manage your time. You're amazing for just investing as much time as you do in this addon, its just a suggestion.
|
|
|
Post by Moongaze on Jun 25, 2007 22:27:02 GMT -5
Sounds like a good idea. I'll see what I can do. Maybe tonight and tomorrow I can get a lot of work done and be ready for a Weds release, and then tidy some stuff up before I leave. Of course, while I'm away, I'll still be fixing bugs that appear, and if it is a nasty bug, I will have a fix within a day or two
|
|
|
Post by Exuro on Jun 25, 2007 22:35:06 GMT -5
O I didn't realize you were going to be able to do coding over vacation to fix bugs. Btw, I was just wondering b/c it isn't in the official list, is the center sphere button and the new trade options in stage 4?
|
|
|
Post by Moongaze on Jun 25, 2007 23:09:08 GMT -5
Probably not for the release this week, but they will be in by the end of Stage 4. I still haven't modified the Stage Breakdown thread =) I forgot the other night, hehe
|
|
wolftusk
Very Talkative Beta Tester
Posts: 140
|
Post by wolftusk on Jun 26, 2007 6:55:02 GMT -5
Moon,
Looks like you are cutting down on the code by making more abstract functionality just reference data so that specifies how to act on that functionality. good stuff!
|
|
larania
Very Talkative Beta Tester
Posts: 128
|
Post by larania on Jun 27, 2007 23:46:37 GMT -5
Moon that's some great stuff... But I just noticed that you have separate buttons for the food and drink... Would it be possible to say add one that does Best Drink on left click and Best food on Right click just as an option
|
|
|
Post by Moongaze on Jun 27, 2007 23:55:10 GMT -5
Yeah, you can. Those are just premades. You could select the premade "Drink" button and have: Left: "Use Strongest Water" Right: "Use Weakest Water" And then goto the dropdown for the right click and select "Use Strongest Food" You'll see what I mean when you get your hands on Stage 4 Sadly, the Stage 4 release that will be happening today won't have the premades. It will just have the three dropdown lists with all options available per click.
|
|
larania
Very Talkative Beta Tester
Posts: 128
|
Post by larania on Jun 27, 2007 23:59:50 GMT -5
No worries Moon You are doing great and we all appreciate
|
|
athel
Newbie Beta Tester
Posts: 4
|
Post by athel on Jun 28, 2007 16:37:47 GMT -5
No worries Moon You are doing great and we all appreciate Very very much, and also noticed that in the bags section. There isn't a key ring one menu aswell for the keys. Sorry for putting it out late but jsut noticed it today.
|
|
|
Post by Moongaze on Jun 28, 2007 19:52:47 GMT -5
I can add the keyring I wasn't sure if I should add it, so I left it off. Adding it will be no big deal
|
|