WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   world of warcraft programming (https://www.wowinterface.com/forums/showthread.php?t=39193)

perlsyntax 03-07-11 10:25 AM

world of warcraft programming
 
I start out to program in world of worldcraft and not sure what tools i need to use without worry about virus.

Is there a IDE i can use with all the tools i need for windows 7?


How do i install Lua in windows?

Aprikot 03-07-11 10:52 AM

I use LuaWoW with Notepad++ which is discussed in this thread (a few down from yours :)).

You don't need Lua installed on your system to write WoW AddOns, but if you want it anyway lua.org is where to start.

perlsyntax 03-07-11 10:55 AM

Quote:

Originally Posted by Aprikot (Post 231228)
I use LuaWoW with Notepad++ which is discussed in this thread (a few down from yours :)).

You don't need Lua installed on your system to write WoW AddOns, but if you want it anyway lua.org is where to start.

That good to hear.

what this tool call WowLua do?I reading the WoW programming book and tell me i need Lua install but i guest that not true then.

Aprikot 03-07-11 11:18 AM

1 Attachment(s)
To test Lua code outside of WoW, yes you would need a Lua interpreter, but if you're testing your code in WoW itself, you don't. Having said that, if you're learning from scratch via the book, I'd do what it says. :D

WowLua is a WoW-specific syntax highlighting plugin for your text editor. It highlight elements of the WoW API in addition to normal Lua syntax highlighting.

I have mine currently set like the Lua highlighting on these forums:

perlsyntax 03-07-11 11:23 AM

[quote=Aprikot;231232]To test Lua code outside of WoW, yes you would need a Lua interpreter, but if you're testing your code in WoW itself, you don't. Having said that, if you're learning from scratch via the book, I'd do what it says. :D

WowLua is a WoW-specific syntax highlighting plugin for your text editor. It highlight elements of the WoW API in addition to normal Lua syntax highlighting.


I unzip it where all the files go then?

Aprikot 03-07-11 11:56 AM

The Lua for Windows installer is at http://code.google.com/p/luaforwindows/downloads/list. It will install like a normal Windows app (C:\Program Files\, etc.) and will associate .lua files with lua.exe.

This installer also includes SciTE which is a decent text editor that will get you through the book's examples and such. You don't need Notepad++...it's a matter preference.

perlsyntax 03-07-11 11:59 AM

Quote:

Originally Posted by Aprikot (Post 231239)
The Lua for Windows installer is at http://code.google.com/p/luaforwindows/downloads/list. It will install like a normal Windows app (C:\Program Files\, etc.) and will associate .lua files with lua.exe.

This installer also includes SciTE which is a decent text editor that will get you through the book's examples and such. You don't need Notepad++...it's a matter preference.

How you get that editor to open up?

Aprikot 03-07-11 01:38 PM

If you ran the Lua for Windows installer it should be at C:\Program Files\Lua\5.1\SciTE\...double click SciTE.exe.

perlsyntax 03-07-11 01:40 PM

Quote:

Originally Posted by Aprikot (Post 231249)
If you ran the Lua for Windows installer it should be at C:\Program Files\Lua\5.1\SciTE\...double click SciTE.exe.

I think i just use notepad++ how would i write out a wowaddon?

Aprikot 03-07-11 01:45 PM

Quote:

Originally Posted by perlsyntax (Post 231250)
how would i write out a wowaddon?

For that, I'll refer you to http://www.google.com/search?sourcei...ng+a+wow+addon and the site which accompanies your book: http://wowprogramming.com/.

Good luck! :)

perlsyntax 03-08-11 09:52 AM

Quote:

Originally Posted by Aprikot (Post 231249)
If you ran the Lua for Windows installer it should be at C:\Program Files\Lua\5.1\SciTE\...double click SciTE.exe.

i found it now nice editor

When you stat out your programs in lua do you need a bang sign like you do in perl?

Xrystal 03-08-11 10:23 AM

Looking at the various addons available will help you see what lua and xml files look like.

Mischback 03-08-11 10:25 AM

You should really consider reading your book... ;)

WoW uses Lua as the scripting engine to bring addons "to life", every addon will consist of Lua-code. You don't have to use a bang, 'cause there's no other interpreter working... ;)

When starting an addon, simply create a folder in your "Interface\AddOns", name it "MyFirstAddon", create a file inside named "MyFirstAddon.toc", fill the toc with life (see wowpedia.org for this), create a script file "whatever.lua", reference it in the toc and there you go with your Lua-code.

The HowTos on wowpedia may be a good starting point, the site helped me through a lot of trouble while starting: http://www.wowpedia.org/HOWTOs

Don't forget about the API-documentation there, it's as helpful as the CPAN for Perl. Many code examples, many good hints.

Ketho 03-08-11 10:48 AM

Might as well link to these threads/tutorials:

zynix 03-09-11 09:48 AM

Quote:

Originally Posted by Aprikot (Post 231232)
I have mine currently set like the Lua highlighting on these forums:

Aprikot, I really like the way you have set it up, is there any way, that you can upload, or otherwise distribute the settings?
Or maybe a guide to make it look awesome ;)
Thanks :)

Aprikot 03-09-11 02:22 PM

Quote:

Originally Posted by zynix (Post 231361)
Aprikot, I really like the way you have set it up, is there any way, that you can upload, or otherwise distribute the settings?
Or maybe a guide to make it look awesome ;)
Thanks :)

Sure :). The color settings are in "LuaWoW.xml" which I tried to attach, but exceeds the 200 KB cap for XML attachments :(. Here's the relevant part of that file:

xml Code:
  1. <LexerStyles>
  2.         <!-- ext is the "user defined" one that you set within Notepad++. -->
  3.         <LexerType name="LuaWoW" desc="WoW Gmod Lua" excluded="no" ext="lua">
  4.             <WordsStyle name="DEFAULT" styleID="0" fgColor="E5E5E5" bgColor="202020" fontName="" fontStyle="0" fontSize="" />
  5.             <WordsStyle name="LUA COMMENT BLOCKS" styleID="1" fgColor="808080" bgColor="202020" fontName="" fontStyle="2" fontSize="" />
  6.             <WordsStyle name="CPP COMMENT BLOCKS" styleID="2" fgColor="00A000" bgColor="202020" fontName="" fontStyle="0" fontSize="" />
  7.             <WordsStyle name="LUA COMMENT LINES" styleID="3" fgColor="808080" bgColor="202020" fontName="" fontStyle="2" fontSize="" />
  8.             <WordsStyle name="CPP COMMENT LINES" styleID="4" fgColor="008000" bgColor="202020" fontName="" fontStyle="0" fontSize="" />
  9.             <WordsStyle name="NUMBERS" styleID="5" fgColor="CC66CC" bgColor="202020" fontName="" fontStyle="0" fontSize="">if else for while</WordsStyle>
  10.             <WordsStyle name="OPERATORS" styleID="6" fgColor="66CC66" bgColor="202020" fontName="" fontStyle="0" fontSize="">bool long int char</WordsStyle>
  11.             <WordsStyle name="STRINGS" styleID="8" fgColor="FF0000" bgColor="202020" fontName="" fontStyle="0" fontSize="" />
  12.             <WordsStyle name="CHARACTERS" styleID="9" fgColor="FF0000" bgColor="202020" fontName="" fontStyle="2" fontSize="" />
  13.             <WordsStyle name="LITERAL STRINGS" styleID="11" fgColor="009090" bgColor="202020" fontName="" fontStyle="0" fontSize="" />
  14.             <!-- name is what shows up in the styler config for that style. -->
  15.             <!-- styleID must be 20 through 29 and must be 20 plus the value of the keywordClass. -->
  16.             <!-- keywordClass can be a number between 0 and 8 and corresponds with the group of Keywords above. -->
  17.             <WordsStyle name="LUA INSTRUCTIONS" styleID="20" fgColor="B1B100" bgColor="202020" fontName="" fontStyle="0" fontSize="" keywordClass="0" />
  18.             <WordsStyle name="LUA CONSTANTS" styleID="21" fgColor="0066CC" bgColor="202020" fontName="" fontStyle="0" fontSize="" keywordClass="1" />
  19.             <WordsStyle name="WOW GLOBAL FUNCTIONS" styleID="22" fgColor="CC6600" bgColor="202020" fontName="" fontStyle="0" fontSize="" keywordClass="2" />
  20.             <WordsStyle name="WOW UIOBJECT FUNCTIONS" styleID="23" fgColor="468C46" bgColor="202020" fontName="" fontStyle="0" fontSize="" keywordClass="3" />
  21.             <WordsStyle name="ACE2 FUNCTIONS/CONSTANTS" styleID="24" fgColor="D682FF" bgColor="000000" fontName="" fontStyle="0" fontSize="" keywordClass="4" />
  22.             <WordsStyle name="ACE3 FUNCTIONS/CONSTANTS" styleID="25" fgColor="8000FF" bgColor="000000" fontName="" fontStyle="0" fontSize="" keywordClass="5" />
  23.             <WordsStyle name="WOW GLOBAL TABLES" styleID="26" fgColor="006666" bgColor="202020" fontName="" fontStyle="0" fontSize="" keywordClass="6" />
  24.             <WordsStyle name="UNUSED" styleID="27" fgColor="804040" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" keywordClass="7" />
  25.             <WordsStyle name="UNUSED" styleID="28" fgColor="804040" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" keywordClass="8" />
  26.         </LexerType>
  27.     </LexerStyles>

This file will be in Notepad++'s plugins config dir after you install the LuaWoW plug (C:\Users\%me%\AppData\Roaming\Notepad++\plugins\config\ on Windows 7).

Install intstructions for LuaWoW itself are at http://code.google.com/p/luawow/wiki/InstallNotepad.

You'd just need to open LuaWoW.xml and replace the existing <LexerStyles> code with the above.

zynix 03-11-11 10:10 AM

Quote:

Originally Posted by Aprikot (Post 231382)
Sure :)

This file will be in Notepad++'s plugins config dir after you install the LuaWoW plug (C:\Users\%me%\AppData\Roaming\Notepad++\plugins\config\ on Windows 7).

You'd just need to open LuaWoW.xml and replace the existing <LexerStyles> code with the above.

Thanks mate, but one question:

So I need to have LuaWoW installed?
Isn't there another way?
Because, I don't really feel the need for it ;)

Aprikot 03-11-11 11:23 AM

Quote:

Originally Posted by zynix (Post 231482)
Thanks mate, but one question:

So I need to have LuaWoW installed?
Isn't there another way?
Because, I don't really feel the need for it ;)

No, LuaWoW isn't needed (it's API highlighting). These are the main colors:
  • Background
    • R 32
    • G 32
    • B 32
  • Comment
    • R 128
    • G 128
    • B 128
  • Intruction word
    • R 177
    • G 177
    • B 0
  • Number
    • R 204
    • G 102
    • B 204
  • String
    • R 255
    • G 0
    • B 0
  • Operator
    • R 102
    • G 204
    • B 102

zynix 03-11-11 04:38 PM

Quote:

Originally Posted by Aprikot (Post 231490)
No, LuaWoW isn't needed (it's API highlighting). These are the main colors:
  • Background
    • R 32
    • G 32
    • B 32
  • Comment
    • R 128
    • G 128
    • B 128
  • Intruction word
    • R 177
    • G 177
    • B 0
  • Number
    • R 204
    • G 102
    • B 204
  • String
    • R 255
    • G 0
    • B 0
  • Operator
    • R 102
    • G 204
    • B 102

Awesome, thanks mate :)

Aprikot 03-12-11 09:47 AM

Np. I forgot to include that the default foreground color isn't white but rather 229, 229, 229..nice & ez on tha eyez. :cool:


All times are GMT -6. The time now is 05:24 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI