Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoWBench/Extending
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= Modifying and extending for local use = <div style="margin-left: 3%; max-width: 50em;"> The easiest and most non-invasive way to modify existing functionality, or implementing "hacks" for APIs that do not yet exist, is probably to add a new file to the bottom of [[WoWBench/Documentation#world.toc|world.toc]] and have that (re-)define APIs that you need. Example world.toc: ''(more above...)'' world.xml worldcmds.lua '''#My local hacks''' '''myhacks.lua''' Example myhacks.lua: function CursorCanGoInSlot(slot) ''your code here'' end Remember that Lua functions can be re-defined as many times as you like. At the end of world.toc, WoWBench has finished defining everything built-in. All that remains to be loaded after that point is FrameXML and AddOns. If you want to modify something ''after'' FrameXML has loaded, the best way is probably to create a new "AddOn" (new directory with .toc and everything) that contains your "myhacks.lua", and list that addon as the first one on the command line. Of course just flat out modifying what's already there works too, but you might end up regretting it when you download a new copy of WoWBench. == Using command-line .txt files to temporarily load hacks == <div style="margin-left: 3%;"> As of v1.11.0.a4, WoWBench will accept .txt file names on the command line. These files will parse just like anything you enter on the command line. Example commandline script to add extensions and tweak things: dofile("myhacks.lua"); dofile("hacks/someotherhacks.lua"); some_var = some_value; say Bob Oh, schnapps! You'd just load this with something like: : <tt>lua wowbench.lua MyAddon myscript.txt</tt> </div> == We want your hacks, too! == <div style="margin-left: 3%;"> If there's even a remote chance that your local hacks can be useful to anyone else, we'll gladly accept them! See [[WoWBench/Contributing]] and [[WoWBench/Hacks]]. </div> </div> = Guidelines for adding to WoWBench = <div style="margin-left: 3%; max-width: 50em;"> {{Stub/Other}} == Widgets == Since WoWBench is command line driven, much of the Widget API is just duds. Methods that are not implemented, but have not yet caused problems for anyone, call <tt>_notimplemented("class.methodname")</tt>, which causes an assert. If any of these methods cause problems for you, but you judge that it is not important for them to be emulated in any way, just '''replace "_notimplemented" with "_ignore_notimplemented"'''. Do not simply remove the call; it is useful to be able to modify _ignore_notimplemented() to spot problems in the future. </div> [[Category:WoWBench]]
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Stub/Box
(
edit
)
Template:Stub/Other
(
edit
)