Thread Tools Display Modes
07-10-10, 06:19 AM   #1
jlrm365
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 113
Question console commands in addon?

Looking at these:
TOC format & Lua functions
and opening a few one / two line addons, with notepad, I am trying to grasp the basics of authoring.

Through wowwiki, I found this:
The Programming Language Lua
which leads to an e-book and video.
Does anyone have any other good lua resources - ideally with addon creation tutorials and / or walk-throughs?

More importantly and the reason for this post, I wanted to know...
Can console commands be included in any part of an addon?

As I play with an older PC, and when I'm on any pc and in Dalaran on a raid night, I've been using the macros on the following page:
How to boost your FPS In-Game

Since opening up those simple addons, looking at the above links and catching a bit of the authoring bug, I thought that it would be nice if I could make myself an addon that included all of the functions of those "prep" macros - listed on that molten-wow page.

Can that be done? If so, how?

Thanks!

  Reply With Quote
07-10-10, 07:02 AM   #2
Waverian
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 188
SetCVar("var", value)
  Reply With Quote
07-10-10, 07:09 AM   #3
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Have you seen the wiki page http://www.wowwiki.com/Getting_start...writing_addons?

Vars from config.wtf ("console commands") can be changed via http://www.wowwiki.com/API_SetCVar (see http://www.wowwiki.com/World_of_Warc...ings_Functions for additional functions).
  Reply With Quote
07-10-10, 07:11 AM   #4
numein
A Cyclonian
 
numein's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 43
As far as I can see those are CVars, so it would be done via SetCVar
(late ... like Waverian sad :P)

Anyway, you have those CVars saved in the config.wtf file in your WTF folder
(you could run those macros first to save all those vars first, in case they aren't listed).
  Reply With Quote
07-10-10, 10:41 AM   #5
jlrm365
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 113
All good info, thanks.

It might be a while before I post again, as I'll have to look into CVar , but thanks.

EDIT:

Leatrix Gfx

I found that tweaking the options of that addon was quite a good way to get my head around CVar.

If anyone else is interested in doing what I asked, playing around with that addon would be a good place to start.

Last edited by jlrm365 : 10-15-10 at 02:34 PM.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » console commands in addon?


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