Quantcast Beta API discussion - Page 6 - WoWInterface
 
Thread Tools Display Modes
07-18-12, 10:42 AM   #101
Maul
Ion Engines, Engage!
 
Maul's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 401
Originally Posted by zork View Post
Nevertheless. Macro conditions for all the UI states are a must. Thus I sign what Tuller wrote.
Add your voice here as well - http://us.battle.net/wow/en/forum/topic/6079671818

For now, you have to do it insecurely. You could register for "PLAYER_REGEN_DISABLED" and use that event to restore your addon to its proper state, regardless if the pet battle ui is up or not.


Originally Posted by Gethe View Post
You are not "in combat" while in a pet battle. This I know because I was able to open and use the Bartender options while in one.
In ideal conditions, this is true. However, and it *will* happen if this is not addressed, somehow or someway, an addon user will be in a pet battle and someone will figure out how to attack them via PVP (if flagged) or a mob will somehow get a character into combat, and leave the player without their crucial UI elements.
__________________

Twitter: @IonMaul | Windows Live: [email protected] | Google Talk: [email protected]
 
07-20-12, 09:26 AM   #102
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 789
Interesting, comparing builds 15851 and 15882 there are quite a lot of changes.

specID = GetArenaOpponentSpec(arenaId) -- arenaId = 1..4

Hyperlinks now handle battlepet (and are yellow for default pets, but pets with a quality then the color is that quality, i.e. rare is blue), the link looks like
Code:
battlepet:speciesID:level:breedQuality:maxHealth:power:speed
and are shown by triggering
Code:
FloatingBattlePet_Show(tonumber(speciesID), tonumber(level), tonumber(breedQuality), tonumber(maxHealth), tonumber(power), tonumber(speed), string.gsub(string.gsub(text, "^(.*)%[", ""), "%](.*)$", ""))
Notice the variable "text" is the whole string, seems they use the name inside the [] tags and pass it onto the function.

There is a ton of small tweaks and pet battle fixes. I've added a report with changes only (left is newest build, right is just for file size comparison I guess):
Code:
Left base: 5.0.1.15852
Right base: 5.0.1.15851

Name                          Size         Name                          Size
----------------------------------------------------------------------------------
AddOns                        2*817*820    AddOns                        2*811*283
+Blizzard_ArenaUI             33*063       +Blizzard_ArenaUI             32*813
|\Blizzard_ArenaUI.lua        15*591    >> |\Blizzard_ArenaUI.lua        15*341
+Blizzard_BlackMarketUI       41*712       +Blizzard_BlackMarketUI       41*667
|\Blizzard_BlackMarketUI.lua  8*148     >> |\Blizzard_BlackMarketUI.lua  8*103
+Blizzard_CombatText          26*796       +Blizzard_CombatText          26*749
|\Blizzard_CombatText.lua     24*223    >> |\Blizzard_CombatText.lua     24*176
+Blizzard_GlyphUI             33*392       +Blizzard_GlyphUI             33*216
|\Blizzard_GlyphUI.lua        15*754    >> |\Blizzard_GlyphUI.lua        15*578
+Blizzard_InspectUI           65*863       +Blizzard_InspectUI           66*898
|\InspectPVPFrame.xml         5*823     >> |\InspectPVPFrame.xml         6*858
+Blizzard_ItemUpgradeUI       22*074       +Blizzard_ItemUpgradeUI       22*049
|\Blizzard_ItemUpgradeUI.lua  8*770     >> |\Blizzard_ItemUpgradeUI.lua  8*745
+Blizzard_PetBattleUI         130*885      +Blizzard_PetBattleUI         127*309
|\Blizzard_PetBattleUI.lua    58*891    >> |\Blizzard_PetBattleUI.lua    55*315
+Blizzard_PetJournal          145*363      +Blizzard_PetJournal          141*978
|+Blizzard_PetJournal.lua     58*022    >> |+Blizzard_PetJournal.lua     53*798
|\Blizzard_PetJournal.xml     87*079    >> |\Blizzard_PetJournal.xml     87*918
\Blizzard_TalentUI            92*982       \Blizzard_TalentUI            92*914
 \Blizzard_TalentUI.lua       53*321    >>  \Blizzard_TalentUI.lua       53*253
FrameXML                      6*223*532    FrameXML                      6*216*586
+ActionBarController.lua      5*646     >> +ActionBarController.lua      5*568
+ActionButton.lua             21*848    >> +ActionButton.lua             21*764
+Bindings.xml                 35*302    >> +Bindings.xml                 38*192
+ChatFrame.lua                148*321   >> +ChatFrame.lua                148*136
+Constants.lua                20*202    >> +Constants.lua                19*953
+FloatingPetBattleTooltip.lua 4*201     >> +FloatingPetBattleTooltip.lua 1*736
+FloatingPetBattleTooltip.xml 6*230     >> +FloatingPetBattleTooltip.xml 1*104
+FrameLocks.lua               4*222     >> +FrameLocks.lua               4*166
+GlobalStrings.lua            690*646   >> +GlobalStrings.lua            688*899
+InterfaceOptionsFrame.lua    25*108    >> +InterfaceOptionsFrame.lua    25*038
+ItemRef.lua                  10*737    >> +ItemRef.lua                  10*406
+LevelUpDisplay.lua           31*427    >> +LevelUpDisplay.lua           31*261
+LevelUpDisplay.xml           21*819    >> +LevelUpDisplay.xml           21*793
+LootHistory.lua              16*231    >> +LootHistory.lua              16*179
+MacOptionsFrame.lua          15*832    >> +MacOptionsFrame.lua          15*637
+MacOptionsFrame.xml          29*565    >> +MacOptionsFrame.xml          29*221
+MonkHarmonyBar.lua           2*629     >> +MonkHarmonyBar.lua           2*611
+PVPFrame.lua                 68*779    >> +PVPFrame.lua                 68*650
+PVPFrame.xml                 56*495    >> +PVPFrame.xml                 63*409
+SharedPetBattleTemplates.lua 19*540    >> +SharedPetBattleTemplates.lua 14*385
+SpellBookFrame.lua           51*198    >> +SpellBookFrame.lua           51*142
+StaticPopup.lua              100*405   >> +StaticPopup.lua              100*354
+WatchFrame.lua               70*768    >> +WatchFrame.lua               70*601
\WatchFrame.xml               23*464    >> \WatchFrame.xml               23*464
GlueXML                       938*476      GlueXML                       932*623
+CharacterCreate.lua          46*712    >> +CharacterCreate.lua          42*443
+CharacterCreate.xml          76*068    >> +CharacterCreate.xml          74*510
\GlueStrings.lua              93*165    >> \GlueStrings.lua              93*139
----------------------------------------------------------------------------------

Last edited by Vlad : 07-20-12 at 12:07 PM.
 
07-20-12, 09:30 AM   #103
Meorawr
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Nov 2010
Posts: 193
Originally Posted by Vladinator View Post
there are quite a lot of changes for being just one build digit, hehe.
Current build is 15882, not 15852, that's why

To be fair, I made the same mistake last night when renaming some folders.
 
07-20-12, 11:08 AM   #104
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 789
Silly me, indeed. Was early for me when I started to extract from the mpqs and made a typo.
 
07-20-12, 12:23 PM   #105
Haleth
This Space For Rent
 
Haleth's Avatar
WoWInterface Super Mod
Featured
Join Date: Sep 2008
Posts: 1,173
As of build 15882, addons seem very prone to causing crashes. According to Tukz, both the presence of a slash command and the GetRegions() function can cause this, but there are probably more causes.

At the start of beta (when addons were enabled) I also had to remove a couple of global strings I replaced, the more abstract patterns with end of string '$' or something like '|3-7' seemed to cause this. Not sure if this works again, I'd have to test.

Last edited by Haleth : 07-20-12 at 12:29 PM.
 
07-20-12, 12:34 PM   #106
Maul
Ion Engines, Engage!
 
Maul's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 401
http://us.battle.net/wow/en/forum/topic/6079671818

A [petbattle] macro conditional will be in an upcoming beta build.

Thanks for the feedback!
Yay!
__________________

Twitter: @IonMaul | Windows Live: [email protected] | Google Talk: [email protected]
 
07-20-12, 12:55 PM   #107
ballagarba
A Fallenroot Satyr
 
ballagarba's Avatar
Join Date: Mar 2009
Posts: 22
Originally Posted by Haleth View Post
As of build 15882, addons seem very prone to causing crashes. According to Tukz, both the presence of a slash command and the GetRegions() function can cause this, but there are probably more causes.

At the start of beta (when addons were enabled) I also had to remove a couple of global strings I replaced, the more abstract patterns with end of string '$' or something like '|3-7' seemed to cause this. Not sure if this works again, I'd have to test.
I had a very hard time even getting into the game. But crashes also seem related to having taintLog enabled. Since disabling it, it has become a little more stable...
 
07-20-12, 03:38 PM   #108
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 789
So it appears they want to embed future addons into the game itself, I wouldn't be surprised if the addons folder disappears at some time from exporting the interface code. I assume so because when pet battle bugs appear there are lua errors reporting errors in code we don't have access to, but it's lua.
 
07-20-12, 05:43 PM   #109
TSquared
Big Daddy!
Join Date: May 2008
Posts: 525
Originally Posted by Vladinator View Post
So it appears they want to embed future addons into the game itself, I wouldn't be surprised if the addons folder disappears at some time from exporting the interface code. I assume so because when pet battle bugs appear there are lua errors reporting errors in code we don't have access to, but it's lua.
That is one HUGE leap. How do you go from "WoW uses lua in other areas" to "all addons will be removed" ?
 
07-20-12, 05:53 PM   #110
Shmii
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 13
I had a wildly different understanding of that.

I was under the impression that they/Blizzard had managed to convert more and more of the game engine to lua instead of C/C++.
 
07-20-12, 05:56 PM   #111
Meorawr
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Nov 2010
Posts: 193
Originally Posted by TSquared View Post
That is one HUGE leap. How do you go from "WoW uses lua in other areas" to "all addons will be removed" ?
I think he meant the Blizzard_* folders, not all addons in general.

But I still don't see that ever happening.
 
07-20-12, 06:11 PM   #112
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 816
He said from the EXPORTED files where under Addons Blizzard have the lua equivelents of their "compiled" folders under the runtime Addons. Althought that's still one huge leap
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle and Move Pad Plus.
 
07-20-12, 06:17 PM   #113
TSquared
Big Daddy!
Join Date: May 2008
Posts: 525
Originally Posted by Meorawr View Post
I think he meant the Blizzard_* folders, not all addons in general.

But I still don't see that ever happening.

Ahh, I'm sorry. I did mis-read that.






* I also don't see it happening.
 
07-21-12, 05:11 AM   #114
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 789
Hehe, I'll try clear up any confusion or misunderstanding to my earlier post. :P

What I meant is, since there are signs of lua code running (pet battles) that isn't exported as an addon, meaning we can't see the sources, meaning it makes things just more complicated and busywork to figure out how that particular addons works, what events it uses, API, e.g.

One may say that's a good thing to "bake" all addons into the binary and get rid of all the Blizzard_* addons, but on the other hand if that happens, how can we explore the sources of their LOD addons and learn from them? I think it's an important aspect of both learning how to code for the game, and getting an idea how things work around here.

It's early to say though, they might make the baked addons exportable too, it may be that they just haven't made the export feature export this new type of lua code, so it's no biggie if they fix this for retail release.

I only dislike the idea having the sources completely unavailable and having us guess on API changes and how their addons work. I didn't mean to sound like "they are doing it right now", just saying if they are...

Just a side note, I personally don't see how baking all the Blizzard_* addons would make it any better. Please DO enlighten me though on what you thought!

Last edited by Vlad : 07-21-12 at 05:21 AM.
 
07-21-12, 05:49 AM   #115
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 544
The old/current IsSpellKnown had a lot of "problems" with not recognising known spells. Namely a lot of spell IDs extracted from a combat log event were different than the ID of the same spell in your spell book, the latter of which worked with IsSpellKnown, while the combat log event did not. I've had to make a lot of special cases because of this. As far as I understand this function is now replaced with IsPlayerSpell.. has anyone noticed if this one is at all improved in this regard?

Here's everything I've had to make exceptions for, for the record. Granted, many of these aren't simple strikes or direct damage effects, but it would be cool if these could be considered "known", as well, depending on what the intended purpose of IsPlayerSpell is.
__________________
Grab your sword and fight the Horde!
 
07-21-12, 06:10 AM   #116
Strife[CUK]
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Oct 2006
Posts: 10
Originally Posted by Haleth View Post
As of build 15882, addons seem very prone to causing crashes. According to Tukz, both the presence of a slash command and the GetRegions() function can cause this, but there are probably more causes.

At the start of beta (when addons were enabled) I also had to remove a couple of global strings I replaced, the more abstract patterns with end of string '$' or something like '|3-7' seemed to cause this. Not sure if this works again, I'd have to test.
Experienced crashing with build 15882 on logon, found turning off the taint log fixed the crash.
"/console taintLog 0"
 
07-21-12, 06:41 AM   #117
Haleth
This Space For Rent
 
Haleth's Avatar
WoWInterface Super Mod
Featured
Join Date: Sep 2008
Posts: 1,173
Originally Posted by Vladinator View Post
Hehe, I'll try clear up any confusion or misunderstanding to my earlier post. :P

What I meant is, since there are signs of lua code running (pet battles) that isn't exported as an addon, meaning we can't see the sources, meaning it makes things just more complicated and busywork to figure out how that particular addons works, what events it uses, API, e.g.

One may say that's a good thing to "bake" all addons into the binary and get rid of all the Blizzard_* addons, but on the other hand if that happens, how can we explore the sources of their LOD addons and learn from them? I think it's an important aspect of both learning how to code for the game, and getting an idea how things work around here.

It's early to say though, they might make the baked addons exportable too, it may be that they just haven't made the export feature export this new type of lua code, so it's no biggie if they fix this for retail release.

I only dislike the idea having the sources completely unavailable and having us guess on API changes and how their addons work. I didn't mean to sound like "they are doing it right now", just saying if they are...

Just a side note, I personally don't see how baking all the Blizzard_* addons would make it any better. Please DO enlighten me though on what you thought!
Could you give an example of this? There has always been lua code running out of the Blizzard_* addons, namely in the FrameXML (and on the login screen, GlueXML etc) - but I take it that's not what you mean.

Personally though I simply don't like the mess of all the Blizzard_* folders in my addons, just makes it longer to scroll through and there's nothing you can do with them anyway. Better to just export it all when you need it.

@ Strife[CUK]; Tried this, still crashes from the GetRegions() function and slash commands.

Last edited by Haleth : 07-21-12 at 06:44 AM.
 
07-21-12, 07:23 AM   #118
Ketho
A Molten Giant
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 846
Originally Posted by Haleth View Post
Personally though I simply don't like the mess of all the Blizzard_* folders in my addons, just makes it longer to scroll through and there's nothing you can do with them anyway. Better to just export it all when you need it.
I personally think a few of the pros are the LoadOnDemand/Dependencies functionality, and the possibility to disable them through DisableAddOn (e.g. Blizzard_CompactRaidFrames)
 
07-21-12, 07:30 AM   #119
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 789
Originally Posted by Haleth View Post
Could you give an example of this? There has always been lua code running out of the Blizzard_* addons, namely in the FrameXML (and on the login screen, GlueXML etc) - but I take it that's not what you mean.
No, this is new. The problem is I only saw behind the scenes when pet battles fired lua errors, these were not a part of the default interface, like FrameXML, GlueXML and so forth. There was no source file, only variables (and they were nowhere to be found in the current interface folder either). Now they seem to be fixed, and I have no screenshots, and I can't find any notes containing these specific errors. So all I can say is that it's something new they are doing. I was hoping someone else also played beta and saw these errors during pet battles, am I alone here noticing this?

Originally Posted by Haleth View Post
Personally though I simply don't like the mess of all the Blizzard_* folders in my addons, just makes it longer to scroll through and there's nothing you can do with them anyway. Better to just export it all when you need it.
I agree, but imagine a WoW where all the lua code is baked and you don't have access to anything, except what you can piece together yourself. We would survive, but it would make keeping API documentation a bit harder and more time consuming than it is now, since now we have access to examples on how the API is used (Blizzards code).

A concrete example of code we can't access is nameplates, I noticed a lot of the "<small-letter-prefix>Nameplates" addons use the same framework basically, because someone did the work to figure out how to alter how they look, and now most just use their addon as base and modify it a little. I guess it would be more unique coded addons if just we'd have access to the lua sources instead. Nameplates are probably not in clean lua, probably C or something, so I understand, but I hope they don't make more of their addons into this format since it doesn't help us (modders) at all. :P

Last edited by Vlad : 07-21-12 at 07:47 AM.
 
07-21-12, 07:41 AM   #120
Meorawr
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Nov 2010
Posts: 193
My guess would be that the pet battle code and anything else they're handling via lua is done in an entirely seperate lua state with a much lower-level set of API functions at hand to them, so really exporting those files would be quite pointless. We'd be able to see what they're doing to a point, and learn how it works internally, but we wouldn't be able to really replicate it in our own addons simply because we don't have the full power that they do.

In addition it's all probably compiled into bytecode and embedded somewhere, so they'd either need to not do that or to decompile it during extraction, both of which I'm sure they're not interested in doing (time/effort for the eventual reward aren't worth it).

As for nameplates, I'm sure they're entirely in C. Call it a hunch

Last edited by Meorawr : 07-21-12 at 07:45 AM.
 
 

WoWInterface » Site Forums » Archived Beta Forums » MoP Beta archived threads » Beta API discussion

Thread Tools
Display Modes

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