WoWBench/FAQ: Difference between revisions
< WoWBench
Jump to navigation
Jump to search
m (→WoWBench Frequently Asked Questions: (stupid formatting)) |
m (→Using) |
||
Line 2: | Line 2: | ||
''Feel free to add a question of your own!'' __NOTOC__ | ''Feel free to add a question of your own!'' __NOTOC__ | ||
{{tocright}} | |||
= WoWBench Frequently Asked Questions = | = WoWBench Frequently Asked Questions = | ||
== | == Huh?! == | ||
<div style="margin-left: 3%;"> | |||
{{faqq}}But something like 99% of AddOns are UI-based, and WoWBench doesn't have an UI. What's the point? | |||
* No, using WoWBench to make your graphics look pretty is pointless. But even UI-heavy addons have actual ''code''. Code that can bug. WoWBench helps you fix problems there much faster with its built-in debugging facilities. You can interact with your UI elements with text commands. Read on! | |||
* Also, if your AddOn works with the "mini" version of FrameXML, ''FrameXML-lite'', reloading is much faster than it is in-game! | |||
* | * And even if you're not actively using WoWBench to run your AddOn, you can save time by using its syntax checker mode, "wowbench -x", which checks your Lua and XML files for errors, before doing a full interface reload in-game. | ||
{{faqq}}Does this really work? | |||
* Yep! Some AddOns can go from alpha to release only living inside WoWBench. (Well, almost, you probably want to test it in-game, too =)). It all depends on what APIs you use. If they all already exist, you're fine and dandy. If not, you might be in for some API hacking. | * Yep! Some AddOns can go from alpha to release only living inside WoWBench. (Well, almost, you probably want to test it in-game, too =)). It all depends on what APIs you use. If they all already exist, you're fine and dandy. If not, you might be in for some API hacking. | ||
Line 22: | Line 26: | ||
==== So, how do I add something that's missing? | {{faqq}}Hey! GetSummonConfirmTimeLeft() isn't implemented! | ||
* Nope. It's a community project. People mostly chip in by implementing functions that they need, ''as'' they need them. You're welcome to do so yourself or put it in the [[WoWBench/To do#API wish list|API wish list]], no guarantees on when it'll get done though. ;) | |||
{{faqq}}What about the [[Widget API]]? | |||
* The Widget API is emulated as far as makes sense in a command line environment: | |||
** It will remember texts set in objects and allow you to Get() them. | |||
** It understands clicks and mouseovers (via commands) and correctly fires the corresponding widget event handlers | |||
** It fully understands virtual objects, and the 1.11 simulation understands e.g. the new fourth parameter of [[API CreateFrame]]. | |||
{{faqq}}What about the XML? That's not handled, right? | |||
* Sure it is. WoWBench parses all the XML in FrameXML as well as in your AddOns. Nothing would work otherwise. The XML parser is probably a lot more lenient than Blizzard's own parser as to what object attributes it will allow, etc, but it does the job! | |||
* If you want strict XML verification, I suggest you load Blizzard's "UI.xsd" into an XML editor and verify your XML that way. | |||
{{faqq}}What about the game world? | |||
* The game world is a bit slim at the moment. You can define objects and units, but you can't do very much with them. You can click them and mouse over them, but e.g. quest gossips, vendor interaction, etc is nowhere to be seen. Combat does not exist. Feel free to [[WoWBench/Contributing|contribute]] :-) | |||
* One thing you ''can'' do is log in several of your characters in unique session with the <tt>'''login'''</tt> command. They can communicate with eachother like characters can in-game. | |||
</div> | |||
== Installing == | |||
<div style="margin-left: 3%;"> | |||
{{faqq}}Can I run it under Linux? | |||
* Yes. Just get a Lua parser for your platform and you're good to go. | |||
{{faqq}}I put WoWBench in Interface/Addons but it doesn't work? | |||
* Please read [[WoWBench/Installing]]. WoWBench is ''not an AddOn''. It is as ''replacement for WoW'', that you can run AddOns inside. | |||
</div> | |||
== Using == | |||
<div style="margin-left: 3%;"> | |||
{{faqq}}So, how do I add something that's missing? | |||
* See [[WoWBench/Extending]]. | * See [[WoWBench/Extending]]. | ||
{{faqq}}How do I tweak an already-existing API to work better for my tests? | |||
* See [[WoWBench/Extending]]. | * See [[WoWBench/Extending]]. | ||
= | {{faqq}}Ok, fine, my AddOn loads and I get a prompt. Now what? | ||
:Whatever you want to do. | |||
:* Call functions in your AddOn directly from the prompt: | |||
::: {{Code|MyAddOn_DoSomething("someParameter")}} | |||
:* Make Alice, Bob or Charles (the default player characters) say something: | |||
::: {{Code|say Alice Help! Help! The horrible Murloc Warrior is hitting me!}} | |||
:* Fire an event: | |||
::: {{Code|fire DUEL_REQUESTED Charles}} | |||
:* Run a slash command: | |||
::: {{Code|/myaddon dosomething}} | |||
:* Look at the frame that popped up: | |||
::: {{Code|look MyAddOnMainFrame}} | |||
:* Click a button in it: | |||
::: {{Code|click MyAddOnMainFrameIWinButton}} | |||
:And much more :-) | |||
<div id="scripting"><!-- for link from first page--></div> | |||
{{faqq}}How do I run scripts? -Testing needs looots of repetition! | |||
:* You can automatically run wowbench command line scripts by giving names of .txt files on the command line, e.g.: | |||
::{{code|wowbench MyAddon script.txt}} | |||
:* You can load and run Lua code on demand from the command prompt (or from inside a script file): | |||
::{{code|> dofile("myluacode.lua")}} | |||
</div> | |||
== Problems == | |||
<div style="margin-left: 3%;"> | |||
{{faqq}}I'm getting ''very'' weird errors / It seems like some stuff isn't even loading like it should? | |||
* Try the "-f" switch: {{code|lua wowbench.lua '''-f''' MyAddOn}} to force a re-parse of .toc and .xml files in case the dependencies haven't been updated properly. (WoWBench precompiles .xml files into .xml.lua files to speed subsequent loads up.) | |||
</div> | |||
== Contribute? == | |||
<div style="margin-left: 3%;"> | |||
{{faqq}}Community Project? What's the license? | |||
* WoWBench is released under a [http://www.opensource.org/licenses/bsd-license.php BSD-style license], which basically means anyone can do whatever they want with it, but needs to attribute the effort to the "WoWBench developer community" if used anywhere. | * WoWBench is released under a [http://www.opensource.org/licenses/bsd-license.php BSD-style license], which basically means anyone can do whatever they want with it, but needs to attribute the effort to the "WoWBench developer community" if used anywhere. | ||
{{faqq}}Cool! How can I contribute? | |||
* See [[WoWBench/Contributing]] | * See [[WoWBench/Contributing]] | ||
< | </div> | ||
= See also = | |||
* [[WoWBench/Getting started]] | |||
[[Category:WoWBench|FAQ]] | [[Category:WoWBench|FAQ]] |
Revision as of 18:34, 12 October 2006
WoWBench » FAQ
Feel free to add a question of your own!
WoWBench Frequently Asked Questions
Huh?!
But something like 99% of AddOns are UI-based, and WoWBench doesn't have an UI. What's the point?
- No, using WoWBench to make your graphics look pretty is pointless. But even UI-heavy addons have actual code. Code that can bug. WoWBench helps you fix problems there much faster with its built-in debugging facilities. You can interact with your UI elements with text commands. Read on!
- Also, if your AddOn works with the "mini" version of FrameXML, FrameXML-lite, reloading is much faster than it is in-game!
- And even if you're not actively using WoWBench to run your AddOn, you can save time by using its syntax checker mode, "wowbench -x", which checks your Lua and XML files for errors, before doing a full interface reload in-game.
- Yep! Some AddOns can go from alpha to release only living inside WoWBench. (Well, almost, you probably want to test it in-game, too =)). It all depends on what APIs you use. If they all already exist, you're fine and dandy. If not, you might be in for some API hacking.
- Even if some APIs are missing, you can probably still use WoWBench to debug bits and pieces of your AddOn. Lua doesn't complain about missing functions until something actually tries to call them!
- Nope. It's a community project. People mostly chip in by implementing functions that they need, as they need them. You're welcome to do so yourself or put it in the API wish list, no guarantees on when it'll get done though. ;)
- The Widget API is emulated as far as makes sense in a command line environment:
- It will remember texts set in objects and allow you to Get() them.
- It understands clicks and mouseovers (via commands) and correctly fires the corresponding widget event handlers
- It fully understands virtual objects, and the 1.11 simulation understands e.g. the new fourth parameter of API CreateFrame.
- Sure it is. WoWBench parses all the XML in FrameXML as well as in your AddOns. Nothing would work otherwise. The XML parser is probably a lot more lenient than Blizzard's own parser as to what object attributes it will allow, etc, but it does the job!
- If you want strict XML verification, I suggest you load Blizzard's "UI.xsd" into an XML editor and verify your XML that way.
- The game world is a bit slim at the moment. You can define objects and units, but you can't do very much with them. You can click them and mouse over them, but e.g. quest gossips, vendor interaction, etc is nowhere to be seen. Combat does not exist. Feel free to contribute :-)
- One thing you can do is log in several of your characters in unique session with the login command. They can communicate with eachother like characters can in-game.
Installing
Can I run it under Linux?
- Yes. Just get a Lua parser for your platform and you're good to go.
- Please read WoWBench/Installing. WoWBench is not an AddOn. It is as replacement for WoW, that you can run AddOns inside.
Using
So, how do I add something that's missing?
- See WoWBench/Extending.
- See WoWBench/Extending.
- Whatever you want to do.
- Call functions in your AddOn directly from the prompt:
- Make Alice, Bob or Charles (the default player characters) say something:
- Fire an event:
- Run a slash command:
- Look at the frame that popped up:
- Click a button in it:
- And much more :-)
- You can automatically run wowbench command line scripts by giving names of .txt files on the command line, e.g.:
- You can load and run Lua code on demand from the command prompt (or from inside a script file):
Problems
I'm getting very weird errors / It seems like some stuff isn't even loading like it should?
- Try the "-f" switch: Template:Code to force a re-parse of .toc and .xml files in case the dependencies haven't been updated properly. (WoWBench precompiles .xml files into .xml.lua files to speed subsequent loads up.)
Contribute?
Community Project? What's the license?
- WoWBench is released under a BSD-style license, which basically means anyone can do whatever they want with it, but needs to attribute the effort to the "WoWBench developer community" if used anywhere.