1. I've decided to help with some of the undocumented API functions and it occurred to me to ask - does this info exist somewhere, in the game or elsewhere, or does it need to be found out by trial and error? And what about data types, many of which seem to be just subsets of int? Are they deduced from the functions they're used on or are they actually visible somewhere?

  2. I've decided to help with some of the undocumented API functions and it occurred to me to ask - does this info exist somewhere, in the game or elsewhere, or does it need to be found out by trial and error?

    It's grepping the source for usage (to get names and number of arguments) and then trial and error.

    And what about data types, many of which seem to be just subsets of int? Are they deduced from the functions they're used on or are they actually visible somewhere?

    There is 'type' which is the actual Lua type, i.e. 'string', 'number', etc. There's also 'mtype' which is the 'meta-type', which maps to something on http://wowprogramming.com/docs/api_types.

    When in doubt, just look at another function that is documented the way you want, and follow that pattern. I'll do my best to help, and I review almost every submission to the site.

    Thanks for helping!

  3. By "the source", do you mean stuff from http://wowprogramming.com/utils/xmlbrowser?

    About the types, I meant the meta-types; it seems to me that some things should be listed as a meta-type but aren't. For example: player identifier in pet battles (1 or 2, corresponding to LE_BATTLE_PET_ALLYand LE_BATTLE_PET_ENEMY, as far as I can tell, but I get results I don't understand for using other values), or types of mini pets (beast, critter, etc). So that's why I was wondering if these types come from the game itself in some way or are just defined here for ease of use.

  4. By "the source", do you mean stuff from http://wowprogramming.com/utils/xmlbrowser?

    More extracting it locally, but yes, that. It's much easier to search if you clone it from GitHub or extract it from your client.

    About the types, I meant the meta-types; it seems to me that some things should be listed as a meta-type but aren't. For example: player identifier in pet battles (1 or 2, corresponding to LE_BATTLE_PET_ALLYand LE_BATTLE_PET_ENEMY, as far as I can tell, but I get results I don't understand for using other values), or types of mini pets (beast, critter, etc). So that's why I was wondering if these types come from the game itself in some way or are just defined here for ease of use.

    They're defined here just using that convention. They can be added to the page. But for something like that, its' not really worth a meta type. You can use values = {"LF_BATTLE_PET_ALLY", "LH_BATTLE_PET_ENEMY"} to generate the list of possible values. Meta-type is more for something like '1nil', which are things that return 1 for true and nil for false.

  5. About the types, I meant the meta-types; it seems to me that some things should be listed as a meta-type but aren't. For example: player identifier in pet battles (1 or 2, corresponding to LE_BATTLE_PET_ALLYand LE_BATTLE_PET_ENEMY, as far as I can tell, but I get results I don't understand for using other values), or types of mini pets (beast, critter, etc). So that's why I was wondering if these types come from the game itself in some way or are just defined here for ease of use.

    They're defined here just using that convention. They can be added to the page. But for something like that, its' not really worth a meta type. ... Meta-type is more for something like '1nil', which are things that return 1 for true and nil for false.

    The reason I ask about the types is that many existing types seem like, well, enums that correspond to specific entities, such as itemQuality or standingID. This seems to me like the same sort of meta-type as pet type. Other meta-types are just enums that represent specific in-game elements, for example glyphIndex, inventoryID or ah-list-type, and these seem to me to be the same as the ally/ enemy type. So if there's an inherent difference that makes my examples not worth of being a meta-type, I'd like to understand them to avoid mistakes in the future.

    You can use values = {"LF_BATTLE_PET_ALLY", "LH_BATTLE_PET_ENEMY"} to generate the list of possible values.

    Could you please explain what you meant by that? Where should I use that?

  6. Meta-types are more confusing than they're worth most of the time, and were used for secondary documentation that needs to span an entire class of functions. I wish we had fewer of them, I think describing and showing values makes more sense.

    Here's an example of a function with values:

    http://wowprogramming.com/docs/api/GetItemFamily

  7. Ah, now I see :P Alright then, thanks!