Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
 
No edit summary
 
Line 1: Line 1:
  +
{{Forumheader|Wowpedia policy}}
−
{{wowapi}}
 
  +
<!-- Please put your content under this paragraph. Be sure to sign your edits with four tildes ~~~~ -->
   
  +
I checked around and didn't find anything about the last news about the RPG, and how to proceed. As you know, CDev questions 2 said the RPG was not canon. Before WP becomes a complete mess with people removing, people tagging or people making new sections, I think we need a policy.
−
These are standard [[Lua]] language functions available in most Lua parsers. Arguably, we could just refer to the [http://www.lua.org Lua web site], but a few function slightly differently in Blizzard's implementation. They are all documented here for consistency.
 
   
  +
This is my take on it:
−
== Lua in the World of Warcraft API ==
 
  +
*Small lines integrated into something bigger: references should be enough.
  +
*Small lines not integrated into something bigger: moved to trivia: "In the RPG blablabla, although it may not be canon".
  +
*Medium texts that can act as standalone: Moved to a "In the RPG" section with a RPG-section tag.
  +
*Articles that are 90% RPG: bring back the RPG tag in the first line of the article, so people know it's from the RPG without needing to check sources one by one.
   
  +
Well, that's my suggestion. Waiting for general consensus before everyone starts to do what they want. Would be nice if this was linked as a sitenotice, so everyone is aware.--[[User:Lon-ami|Lon-ami]] ([[User talk:Lon-ami|talk]]) 11:08, 26 June 2011 (UTC)
−
Note that the [[World of Warcraft API]] does ''not'' provide all standard Lua functions. Notably, operating system and file I/O libraries are not present.
 
   
  +
:I already modified [[:Template:RPG-section]] to clarify. --{{User:Gourra/Sig2}} 11:16, 26 June 2011 (UTC)
−
=== Lua Functions ===
 
−
These functions are part of the Lua programming language (v5.1.1), described [http://www.lua.org/manual/5.1/manual.html here].
 
−
: [[API assert|assert]](value) &nbsp; - asserts a value is non-nil, otherwise shows dialog and outputs debug diagnostic information if you have a debugger attached to wow.exe
 
−
: [[API collectgarbage|collectgarbage]]() &nbsp; - Forces garbage collection. (Added in 1.10.1)
 
−
: [[API date|date]](format, time) &nbsp; - Returns the current date according to the user's machine.
 
−
: [[API error|error]]("error message",level) &nbsp; - Throws an error with the given error message. Use pcall() (see below) to catch errors.
 
−
: [[API gcinfo|gcinfo]]() &nbsp; - Returns the number of kB of add-on memory in use and the current garbage collection threshold (in kB).
 
−
: [[API getfenv|getfenv]](function or integer) &nbsp; - Returns the table representing the stack frame of the given function or stack level.
 
−
: [[API getmetatable|getmetatable]](obj, mtable) &nbsp; - Returns the metatable of the given table or userdata object.
 
−
: [[API loadstring|loadstring]]("Lua code") &nbsp; - Parse the string as Lua code and return it as a function reference.
 
−
: [[API next|next]](table, index) &nbsp; - Returns the next key, value pair of the table, allowing you to walk over the table.
 
−
: [[API pcall|pcall]](func, arg1, arg2, ...) &nbsp; - Returns a boolean value indicating successful execution of func and the error message or func's results as additional values.
 
−
: [[API select|select]](index, list) &nbsp; - Returns the number of items in '''list''' or the value of the item in '''list''' at '''index'''.
 
−
: [[API setfenv|setfenv]](function or integer, table) &nbsp; - Sets the table representing the stack frame of the given function or stack level.
 
−
: [[API setmetatable|setmetatable]](obj, mtable) &nbsp; - Sets the metatable of the given table or userdata object.
 
−
: [[API time|time]](table) &nbsp; - Returns time in seconds since epoch (00:00:00 Jan 1 1970)
 
−
: [[API type|type]](var) &nbsp; - Returns the type of variable as a string, "number", "string", "table", "function" or "userdata".
 
−
: [[API unpack|unpack]](table) &nbsp; - Returns the contents of its argument as separate values.
 
−
: [[API xpcall|xpcall]](func, err) &nbsp; - Returns a boolean indicating successful execution of func and calls err on failure, additionally returning func's or err's results.
 
   
  +
::I don't think that's enough to handle the problem. I'd call for community discussion.--[[User:Lon-ami|Lon-ami]] ([[User talk:Lon-ami|talk]]) 12:04, 26 June 2011 (UTC)
−
=== Math Functions ===
 
   
  +
:::I'm well aware of that, but it's a start. --{{User:Gourra/Sig2}} 12:07, 26 June 2011 (UTC)
−
Most of these functions are shorthand references to the Lua math library (which is available via "math.", see [http://lua-users.org/wiki/MathLibraryTutorial MathLibraryTutorial] for more info).
 
   
  +
::::I think we need a smaller icon for certain situations(example denizens of deepholm that are only on the RPG)something like the icons on expansions.--[[User:Ashbear160|Ashbear160]] ([[User talk:Ashbear160|talk]]) 12:15, 26 June 2011 (UTC)
−
The trigonometry functions are not just references; they have degree&rarr;radian conversion wrappers. Blizzard's versions work with degrees. Lua's standard math library works with radians.
 
   
  +
:::::Should Appendix 3 be back to the mainspace? I thought we banished it, and that wouldn't change no matter the new stance.
−
: [[API abs|abs]](value) &nbsp; - Returns the absolute value of the number.
 
  +
:::::As for that small information, I'd just leave it in a "trivia" section. Not worth tdo what you ask, considering it's not canon anymore.--[[User:Lon-ami|Lon-ami]] ([[User talk:Lon-ami|talk]]) 12:18, 26 June 2011 (UTC)
−
: [[API acos|acos]](value) &nbsp; - Returns the arc cosine of the value in degrees.
 
−
: [[API asin|asin]](value) &nbsp; - Returns the arc sine of the value in degrees.
 
−
: [[API atan|atan]](value) &nbsp; - Returns the arc tangent of the value in degrees.
 
−
: [[API atan2|atan2]](y, x) &nbsp; - Returns the arc tangent of Y/X in degrees.
 
−
: [[API ceil|ceil]](value) &nbsp; - Returns the ceiling of value.
 
−
: [[API cos|cos]](degrees) &nbsp; - Returns the cosine of the degree value.
 
−
: [[API deg|deg]](radians) &nbsp; - Returns the degree equivalent of the radian value.
 
−
: [[API exp|exp]](value) &nbsp; - Returns the exponent of value.
 
−
: [[API floor|floor]](value) &nbsp; - Returns the floor of value.
 
−
: [[API frexp|frexp]](num) &nbsp; - Extract mantissa and exponent from a floating point number.
 
−
: [[API ldexp|ldexp]](value, exponent) &nbsp; - Load exponent of a floating point number.
 
−
: [[API log|log]](value) &nbsp; - Returns the natural logarithm (log base e) of value.
 
−
: [[API log10|log10]](value) &nbsp; - Returns the base-10 logarithm of value.
 
−
: [[API max|max]](value[, values...]) &nbsp; - Returns the numeric maximum of the input values.
 
−
: [[API min|min]](value[,values...]) &nbsp; - Returns the numeric minimum of the input values.
 
−
: [[API mod|mod]](value,modulus) &nbsp; - Returns floating point modulus of value.
 
−
: [[API rad|rad]](degrees) &nbsp; - Returns the radian equivalent of the degree value.
 
−
: [[API random|random]]([ [lower,] upper]) &nbsp; - Returns a random number (optionally bounded integer value)
 
−
: [[API randomseed|randomseed]](seed) &nbsp; - Seed the pseudo random number generator
 
−
: [[API sin|sin]](degrees) &nbsp; - Returns the sine of the degree value.
 
−
: [[API sqrt|sqrt]](value) &nbsp; - Return the square root of value.
 
−
: [[API tan|tan]](degrees) &nbsp; - Returns the tangent of the degree value.
 
   
  +
::::::No, Appendix 3 should be forever banished from the mainspace.
−
=== String Functions ===
 
  +
::::::As for the Deepholm denizens (and other areas) that are only in the RPG, they should be abolished overall from the lists. The last thing we need is '''even ''more''''' icons. --{{User:Gourra/Sig2}} 12:22, 26 June 2011 (UTC)
   
  +
:::::::Well, most of those don't have icons anyway. I'd move them to trivia in list form, something like: "In the RPG, these creatures were denizens of this realm: a, b, c and d, but it's not canon".
−
These string functions are shorthand references to the Lua string library (which is available via "string.", see [http://lua-users.org/wiki/StringLibraryTutorial StringLibraryTutorial] for more info),
 
  +
:::::::As for Appendix 3, I asked because I saw someone moving the information: [[Ettin]].--[[User:Lon-ami|Lon-ami]] ([[User talk:Lon-ami|talk]]) 12:32, 26 June 2011 (UTC)
   
  +
::::::::i don't know if you misunderstood me or not, but what i meant was adding a icon like the one in the [[Template:RPG-section]] but without the text to the list from those that were from the RPG--[[User:Ashbear160|Ashbear160]] ([[User talk:Ashbear160|talk]]) 13:38, 26 June 2011 (UTC)
−
: [[API format|format]](formatstring[, value[, ...]]) &nbsp; - Return a formatted string using values passed in.
 
−
: [[API gsub|gsub]](string,pattern,replacement[, limitCount]) &nbsp; - Globally substitute pattern for replacement in string.
 
−
: [[API strbyte|strbyte]](string[, index]) &nbsp; - Returns the internal numeric code of the i-th character of string
 
−
: [[API strchar|strchar]](asciiCode[, ...]) &nbsp; - Returns a string with length equal to number of arguments, with each character assigned the internal code for that argument.
 
−
: [[API strfind|strfind]](string, pattern[, initpos[, plain]]) &nbsp; - Look for match of pattern in string, optionally from specific location or using plain substring.
 
−
: [[API strlen|strlen]](string) &nbsp; - Return length of the string.
 
−
: [[API strlower|strlower]](string) &nbsp; - Return string with all upper case changed to lower case.
 
−
: [[API strmatch|strmatch]](string, pattern[, initpos]) &nbsp; - Similar to strfind but only returns the matches, not the string positions.
 
−
: [[API strrep|strrep]](seed,count) &nbsp; - Return a string which is count copies of seed.
 
−
: [[API strsub|strsub]](string, index[, endIndex]) &nbsp; - Return a substring of string starting at index
 
−
: [[API strupper|strupper]](string) &nbsp; - Return string with all lower case changed to upper case.
 
−
: [[API tonumber|tonumber]](arg[, base]) &nbsp; - Return a number if arg can be converted to number. Optional argument specifies the base to interpret the numeral. Bases other than 10 accept only unsigned integers.
 
−
: [[API tostring|tostring]](arg) &nbsp; - Convert arg to a string.
 
   
  +
:::::::::I suggest creating a huge category of RPG, containing all things RPG and create RPG characters category inside to include RPG characters and move them over from the Lore Characters category. And also, sorry about the ettin article, didn't know the source was banished, I thought it's just another RPG book... [[Image:IconSmall_HighElf_Male.gif]] '''[[User:Sl2059|Aesindor, The Celestial Paladin]]''' ([[User talk:Sl2059|Leave a Message]]) 15:04, 26 June 2011 (UTC)
   
  +
:I'm going to try the separate the rpg information from he official information in the elemental hierarchy article.--[[User:Ashbear160|Ashbear160]] ([[User talk:Ashbear160|talk]]) 13:38, 26 June 2011 (UTC)
−
These are custom string functions available in WoW but not normal Lua.
 
   
  +
:: I think i've managed.--[[User:Ashbear160|Ashbear160]] ([[User talk:Ashbear160|talk]]) 14:48, 26 June 2011 (UTC)
−
: [[API strtrim|strtrim]](string) &nbsp; - Trim leading and trailing spaces from string.
 
−
: [[API strsplit|strsplit]](delimiter, string) &nbsp; - Return a list of substrings separated by occurrences of the delimiter.
 
−
: [[API strjoin|strjoin]](delimiter, string, string[, ...]) &nbsp; - Join string arguments into a single string, separated by delimiter.
 
   
  +
:::Don't worry, Aesindor. We decided Appendix 3 was D&D long ago :P.
−
=== Table Functions ===
 
  +
:::As for doing changes, try not to do big ones until we decide a policy, or you may get removed (not talking about elemental hierarchy, Ashendant, I think that one looks right).--[[User:Lon-ami|Lon-ami]] ([[User talk:Lon-ami|talk]]) 15:36, 26 June 2011 (UTC)
  +
::::It took a lot of interpretation but i think i got it right--[[User:Ashbear160|Ashbear160]] ([[User talk:Ashbear160|talk]]) 16:13, 26 June 2011 (UTC)
   
  +
:What about all the pictures from the RPG? Like [[Elune]] or [[Queen Azshara]]? --[[User:LemonBaby|LemonBaby]] ([[User talk:LemonBaby|talk]]) 16:45, 26 June 2011 (UTC)
−
These table functions are shorthand references to the Lua table library (which is available via "table.", see [http://lua-users.org/wiki/TableLibraryTutorial TableLibraryTutorial] for more info).
 
   
  +
::I don't think pictures are any problem... at least until we get better ones--[[User:Ashbear160|Ashbear160]] ([[User talk:Ashbear160|talk]]) 17:30, 26 June 2011 (UTC)
−
Be also aware that many table functions are designed to work with tables indexed only with numerical indexes, starting with 1 and without holes (like {[1] = "foo", [3] = "bar"} --- recognize that [2] will be nil in this table). When working with any other tables behavior is not defined and might lead to unexpected results. Not being aware of this fact is one major causes for bugs in code written in Lua.
 
   
  +
I find the Zandalari related pages(especially Rastakhan) and mainly minor races pages(ogre,ogre mage,sea giant and such) abit of trouble... overall I "de-RPed" 270 articles.[[Image:IconSmall_HighElf_Male.gif]] '''[[User:Sl2059|Aesindor, The Celestial Paladin]]''' ([[User talk:Sl2059|Leave a Message]]) 21:27, 26 June 2011 (UTC)
−
: [[API foreach|foreach]](table,function) &nbsp; - Execute function for each element in table.
 
−
: [[API foreachi|foreachi]](table,function) &nbsp; - Execute function for each element in table, indices are visited in sequential order.
 
−
: [[API getn|getn]](table) &nbsp; - Return the size of the table when seen as a list. This is deprecated, it is replaced by the # operator. Instead of table.getn(table), use #(table).
 
−
: [[API ipairs|ipairs]](table) &nbsp; - Returns an iterator of type integer to traverse a table.
 
−
: [[API pairs|pairs]](table) &nbsp; - Returns an iterator to traverse a table.
 
−
: [[API sort|sort]](table[, comp]) &nbsp; - Sort the elements in the table in-place, optionally using a custom comparator.
 
−
: [[API tinsert|tinsert]](table[, pos], value) &nbsp; - Insert value into the table at position pos (defaults to end of table)
 
−
: [[API tremove|tremove]](table[, pos]) &nbsp; - Remove and return the table element at position pos (defaults to last entry in table)
 
   
  +
:Thanks, now there are just a bajillion to go :D --[[User:Ashbear160|Ashbear160]] ([[User talk:Ashbear160|talk]]) 21:48, 26 June 2011 (UTC)
−
=== Bit Functions ===
 
−
World of Warcraft includes the Lua BitLib library (which is available via "bit."). They provide access to C-style bitwise manipulation operators.
 
−
The [http://rrt.sc3d.org/Software/Lua/?page=Software/Lua BitLib-library] is not part of the Lua standard library, but was implemented in WoW with patch 1.9
 
−
: [[API bit.bnot|bit.bnot]](a) - returns the one's complement of a
 
−
: [[API bit.band|bit.band]](w1,...) - returns the bitwise and of the w's
 
−
: [[API bit.bor|bit.bor]](w1,...) - returns the bitwise or of the w's
 
−
: [[API bit.bxor|bit.bxor]](w1,...) - returns the bitwise exclusive or of the w's
 
−
: [[API bit.lshift|bit.lshift]](a,b) - returns a shifted left b places
 
−
: [[API bit.rshift|bit.rshift]](a,b) - returns a shifted logically right b places
 
−
: [[API bit.arshift|bit.arshift]](a,b) - returns a shifted arithmetically right b places
 
−
: [[API bit.mod|bit.mod]](a,b) - returns the integer remainder of a divided by b
 
   
  +
==Categories==
−
Since Lua is a scripting language, using these functions to "compress" your data structures is fairly slow work. Unless you have a very large database and ''need'' to conserve RAM usage, save your information in several, individual variables.
 
  +
We should probably look at stripping some of the categories from articles that are 100% RPG material. It doesn't make sense, for instance, for a non-canon character to be in the Lore Characters category. -- [[User:Dark T Zeratul|Dark T Zeratul]] ([[User talk:Dark T Zeratul|talk]]) 02:13, 27 June 2011 (UTC)
−  
−
== Notes ==
 
−
* Any function that takes the object being modified as its first argument can be written as such:
 
−
-- This
 
−
string = string.format(input, arg1, arg2, ... argn)
 
−
 
−
-- Can be written as this
 
−
string = input:format(arg1, arg2, ... argn)
 
−  
−
string = string.format("%d", "5")
 
−
-- string equals 5
 
−
 
−
string = "%d":format("5")
 
−
-- string still equals 5
 
−  
−
== Also See ==
 
−  
−
* Our page on [[Lua]]. It has plenty of links to Lua reference material.
 
−  
−  
−
<br>
 

Revision as of 02:13, 27 June 2011

Forums: Village pump → The RPG dilemma

I checked around and didn't find anything about the last news about the RPG, and how to proceed. As you know, CDev questions 2 said the RPG was not canon. Before WP becomes a complete mess with people removing, people tagging or people making new sections, I think we need a policy.

This is my take on it:

  • Small lines integrated into something bigger: references should be enough.
  • Small lines not integrated into something bigger: moved to trivia: "In the RPG blablabla, although it may not be canon".
  • Medium texts that can act as standalone: Moved to a "In the RPG" section with a RPG-section tag.
  • Articles that are 90% RPG: bring back the RPG tag in the first line of the article, so people know it's from the RPG without needing to check sources one by one.

Well, that's my suggestion. Waiting for general consensus before everyone starts to do what they want. Would be nice if this was linked as a sitenotice, so everyone is aware.--Lon-ami (talk) 11:08, 26 June 2011 (UTC)

I already modified Template:RPG-section to clarify. --g0urra[T҂C] 11:16, 26 June 2011 (UTC)
I don't think that's enough to handle the problem. I'd call for community discussion.--Lon-ami (talk) 12:04, 26 June 2011 (UTC)
I'm well aware of that, but it's a start. --g0urra[T҂C] 12:07, 26 June 2011 (UTC)
I think we need a smaller icon for certain situations(example denizens of deepholm that are only on the RPG)something like the icons on expansions.--Ashbear160 (talk) 12:15, 26 June 2011 (UTC)
Should Appendix 3 be back to the mainspace? I thought we banished it, and that wouldn't change no matter the new stance.
As for that small information, I'd just leave it in a "trivia" section. Not worth tdo what you ask, considering it's not canon anymore.--Lon-ami (talk) 12:18, 26 June 2011 (UTC)
No, Appendix 3 should be forever banished from the mainspace.
As for the Deepholm denizens (and other areas) that are only in the RPG, they should be abolished overall from the lists. The last thing we need is even more icons. --g0urra[T҂C] 12:22, 26 June 2011 (UTC)
Well, most of those don't have icons anyway. I'd move them to trivia in list form, something like: "In the RPG, these creatures were denizens of this realm: a, b, c and d, but it's not canon".
As for Appendix 3, I asked because I saw someone moving the information: Ettin.--Lon-ami (talk) 12:32, 26 June 2011 (UTC)
i don't know if you misunderstood me or not, but what i meant was adding a icon like the one in the Template:RPG-section but without the text to the list from those that were from the RPG--Ashbear160 (talk) 13:38, 26 June 2011 (UTC)
I suggest creating a huge category of RPG, containing all things RPG and create RPG characters category inside to include RPG characters and move them over from the Lore Characters category. And also, sorry about the ettin article, didn't know the source was banished, I thought it's just another RPG book... IconSmall HighElf Male Aesindor, The Celestial Paladin (Leave a Message) 15:04, 26 June 2011 (UTC)
I'm going to try the separate the rpg information from he official information in the elemental hierarchy article.--Ashbear160 (talk) 13:38, 26 June 2011 (UTC)
I think i've managed.--Ashbear160 (talk) 14:48, 26 June 2011 (UTC)
Don't worry, Aesindor. We decided Appendix 3 was D&D long ago :P.
As for doing changes, try not to do big ones until we decide a policy, or you may get removed (not talking about elemental hierarchy, Ashendant, I think that one looks right).--Lon-ami (talk) 15:36, 26 June 2011 (UTC)
It took a lot of interpretation but i think i got it right--Ashbear160 (talk) 16:13, 26 June 2011 (UTC)
What about all the pictures from the RPG? Like Elune or Queen Azshara? --LemonBaby (talk) 16:45, 26 June 2011 (UTC)
I don't think pictures are any problem... at least until we get better ones--Ashbear160 (talk) 17:30, 26 June 2011 (UTC)

I find the Zandalari related pages(especially Rastakhan) and mainly minor races pages(ogre,ogre mage,sea giant and such) abit of trouble... overall I "de-RPed" 270 articles.IconSmall HighElf Male Aesindor, The Celestial Paladin (Leave a Message) 21:27, 26 June 2011 (UTC)

Thanks, now there are just a bajillion to go :D --Ashbear160 (talk) 21:48, 26 June 2011 (UTC)

Categories

We should probably look at stripping some of the categories from articles that are 100% RPG material. It doesn't make sense, for instance, for a non-canon character to be in the Lore Characters category. -- Dark T Zeratul (talk) 02:13, 27 June 2011 (UTC)