| General | Hosted Sites | Civ5 | CivRev | Civ4Col | Civ4 | Civ3 | Civ2 | Civ1 | Misc | Marketplace |
![]() |
|
|
Welcome to Civilization Fanatics' Center. You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support. |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
King
Join Date: May 2011
Posts: 946
|
[Poll] Which style for the LUA reference on the wiki?
EDIT: For a preview of what the private beta looks like, see this post.
Hello. The official wiki has not been updated after G&K and it is not possible to edit it for us. As a result there is currently no good documentation source for modders. I intend to fix by updating the CivFanatics wiki. I already have a nice piece of code that mixes data from multiples sources (official wiki, LUA dumps, etc) in order to produce a formatted output and upload it to the CF wiki. But I need to know which style you prefer. Currently three styles are present on the wiki, despite a few number of pages. Here are the competitors: 2k style Pros: it's simple but robust. The summary displays a quick listing while the page itself is a detailed listing. Functions' details are immediately available by clicking a link on the summary, without any page loading. Cons: it's long (but it could be made shorter) and painful to browse, and we cannot display too much information per function (no long examples). It could be made better with the table of contents on the right. Categorized listing Pros: it's elegant and short, and the categorization can be helpful. Cons: the categorization actually does not really work that well (maybe there should be fewer categories), and you always need to open a new page in order to see the details of a function. Should we try to provide more informations, the result would be quickly disturbing. Array Pros: most of the information is here and it's still very compact. Cons: it's a giant ugly array. While the provided civ4 example has a reasonable length, civ5 objects are monsters with many many functions. Which do you prefer? Finally, other suggestions are welcome but please note this is only a wiki. So forget sophisticated formatting and javascript, most of those would not work. We need to stick to the wiki formatting for the most part. PS: No, no actual poll. I am more interested in your comments than in numbers. PPS: All links would be blue (red is only for missing links).
__________________
Reseed! Preview and regenerate map in-game. Ingame Editor (IGE): An in-game editor for terrain, units, cities, civilizations, etc. Lua and UI reference Last edited by DonQuiche; Sep 05, 2012 at 02:06 AM. |
|
|
|
|
|
#2 |
|
Tangaroa
![]() |
From the perspective of someone not knowing but wanting to get into LUA, I like the 2K style, simply because it gives examples of the format (If the examples are actually existing)
__________________
"I saw our people spreading throughout the land and across the oceans, expanding our kingdom, discovering new people and great riches in faraway lands" - More Civilizations. Most Recent: Tibet "We built wonderous monuments honouring the gods, which reached up to touch the very fabric of the heavens." - More Wonders. Most Recent: Todai-ji |
|
|
|
|
|
#3 |
|
King
Join Date: May 2011
Posts: 946
|
Glad to learn you're jumping on the LUA wagon, Pouakai.
![]() Now the full content would be available in every format, it's just that in the second and third ones you would have to click a link and open a new page to learn more. Does it affect your preference? EDIT: However most of the time you would click only to discover there is NO available example, this would be quite frustrating.
__________________
Reseed! Preview and regenerate map in-game. Ingame Editor (IGE): An in-game editor for terrain, units, cities, civilizations, etc. Lua and UI reference Last edited by DonQuiche; Aug 07, 2012 at 11:26 PM. |
|
|
|
|
|
#4 |
|
King
Join Date: May 2011
Posts: 946
|
Some tests later.
Once the 2k style is purged of all blanks, it is easy to realize there is about no example and parameters' description: Test2 The result is clearly not there is almost no benefit while the useless space consumption is obvious. So I made another try with a table, I like the result, most of the informations are readily available: Test3. It could be combined with few categories maybe, and the summary could be included in a row below the function but there is rarely a summary available. The example and parameters documentation would only be displayed on the function's page but since they are rarely available anyway... EDIT: And here is a variant: Test4
__________________
Reseed! Preview and regenerate map in-game. Ingame Editor (IGE): An in-game editor for terrain, units, cities, civilizations, etc. Lua and UI reference Last edited by DonQuiche; Aug 08, 2012 at 01:43 AM. |
|
|
|
|
|
#5 |
|
Emperor
Join Date: Aug 2002
Location: Seoul, South Korea
Posts: 1,277
|
So long as there are examples at the end... That is the most frustrating thing with current wikis.
__________________
Visit my Viking Age scenario at: http://forums.civfanatics.com/showthread.php?t=228787 And my Europe map for European Medieval Mod at: http://forums.civfanatics.com/showthread.php?t=229384 |
|
|
|
|
|
#6 | |
|
King
Join Date: May 2011
Posts: 946
|
Quote:
But I am certainly not going to write thousand examples. I am not even sure I will write a single one. ![]() The content will be mostly the one you will find on the vanilla wiki. But up-to-date, conveniently formatted, with consistent data types and full of automatically gathered informations. Now maybe I will try to extract single-line examples from the LUA game files but the result would probably be useless.
__________________
Reseed! Preview and regenerate map in-game. Ingame Editor (IGE): An in-game editor for terrain, units, cities, civilizations, etc. Lua and UI reference Last edited by DonQuiche; Aug 08, 2012 at 01:44 AM. |
|
|
|
|
|
|
#7 | |
|
Say No 2 Net Validations
![]() ![]() |
Is it possible to make a combo out of categorized listing and the array setup?
So that you do not get a single page per function, but an array per category? Because sometimes you don't know exactly for what you are searching, or in which class it is available, so you need all the functions to search in them. But then again sometimes you deal only with 1 class, and want only to have the functions in this class, and not all the functions. For the Civ4 Python, there are 2 APIs available, one listing, and an array per category. I tend to use both, due to the different needs. Quote:
That's IMHO even preferable. You can first discuss the pros and cons without voting, and if you have narrowed the exact options down to something more specific, then you can poll it out. If you don't poll it, the discussion tends to go to a consensus decision, which can need too long and active participators might drop out, because it's too tiring. |
|
|
|
|
|
|
#8 | |||
|
King
Join Date: May 2011
Posts: 946
|
Quote:
![]() Quote:
Now this is also something I thought about but I wasn't sure about it, hence why I would like to see an example. Other things I imagined are: * Cross-pages categories, so that you could quickly see all resources-related functions, whether they are in City or in Plot * One global index: sometimes it's useful. But obviously those two features would require to have one page per function. While I can easily have them automatically generated, it bothers me to have tons of nearly empty pages, and that all links will be blue in the types' pages. I would then need another way to quickly emphasize which links do contain examples or parameters descriptions. Also, categories is the only way to have a wiki that is easy to edit: while my pages generator doesn't need them, humans will because they won't edit five pages in a row just to correct one mistake in a function signature. They should fix one, or atmost two, pages (the function page and the type page). Quote:
But if I can, in the end, link three models and ask people which one they like best, why not? I think I will start a new thread then. PS: Is there a way to flag a page for auto-deletion? Or should I add those to a dedicated category? Do you have some way to quickly delete 1k pages for example (I won't generate them if you cannot delete them in a batch)?
__________________
Reseed! Preview and regenerate map in-game. Ingame Editor (IGE): An in-game editor for terrain, units, cities, civilizations, etc. Lua and UI reference Last edited by DonQuiche; Aug 08, 2012 at 12:56 PM. |
|||
|
|
|
|
|
#9 |
|
Deity
Join Date: Jun 2008
Posts: 2,067
|
First of all, thanks so much for taking on this effort! Very much appreciated.
The methods need to be in a single page (for each object type) with their args and return values. I use the wiki in two ways:
If someone wants to categorize or build tables, that's fine. It can be done later and separately, with links that take you right to the specific method. There is no reason for this kind of organization to take away from functionality. |
|
|
|
|
|
#10 |
|
King
Join Date: May 2011
Posts: 946
|
@Pzyryk
I do agree with you on the fact that we need a page per type where functions are listed with their signatures (args and returned values) because this information is so important. ![]() While I proposed alternative choices that do not expose signatures, I do not expect them to get many support but I want to be sure. Regarding categories, global index, etc, they would not replace the page we talked about. They would be an additional way to browse the functions and not the default one. And it does not remove functionality: unless we opt for the 2k style where everything is presented on a single page, a mere signatures listing like test3 does not expose parameters description or examples, so we would need one page per function just for those additional informations. And as soon as we have one page per function, we can categorize them. The only impact of wanting categories is that we always need to create one page per function rather than just create the ones where we actually have examples or comments to expose. This is because wikis build categories automatically according to "tags" you insert into a page.
__________________
Reseed! Preview and regenerate map in-game. Ingame Editor (IGE): An in-game editor for terrain, units, cities, civilizations, etc. Lua and UI reference |
|
|
|
|
|
#11 |
|
Proud father and civ-nut!
Join Date: Aug 2003
Location: Eastern Front
Posts: 1,006
|
I second Pazyryk's response and also thank you for going to the effort.
__________________
“The Pope? How many divisions has he got?” Josef Stalin Current Project: The Great Patriotic War - WWII on the Eastern Front |
|
|
|
|
|
#12 | ||
|
Say No 2 Net Validations
![]() ![]() |
Ahh...there.
Okay, but I meant not with the additional info in other pages, but all the necessary stuff in that one. Quote:
Quote:
+1 for the latter. You'll have to ask deanej about that. He's currently the only person with beaurocrat level in the wiki (I'm just a normal user there). |
||
|
|
|
|
|
#13 | ||
|
King
Join Date: May 2011
Posts: 946
|
Quote:
And regarding categories, do you think it should be small categories like in Categorized listing or fewer and broader categories? Quote:
![]() EDIT: I forgot you also wanted an array. I am quite skeptical about an array that would include every information but...
__________________
Reseed! Preview and regenerate map in-game. Ingame Editor (IGE): An in-game editor for terrain, units, cities, civilizations, etc. Lua and UI reference Last edited by DonQuiche; Aug 08, 2012 at 06:28 PM. |
||
|
|
|
|
|
#14 |
|
King
Join Date: May 2011
Posts: 946
|
Here is the preview for the TerrainID page.
In the 2k wiki, the LUA enumerations "TerrainTypes", "CivilizationTypes" etc, were used as types in the functions' signatures. This was confusing because those parameters actually expect an integer for the corresponding ID column, not a string for the type column. So instead I introduced TerrainID, CivilizationID, etc pseudo-types. Each of them get his own page that connects the TerrainID pseudo-type, the TerrainTypes LUA enumeration, and the Civ5Terrains data table together. There would be no page for the TerrainTypes enumeration, instead the home page would link directly to the TerrainID page. Note that the whole page is automatically generated, including the examples.
__________________
Reseed! Preview and regenerate map in-game. Ingame Editor (IGE): An in-game editor for terrain, units, cities, civilizations, etc. Lua and UI reference |
|
|
|
|
|
#15 | |
|
King
Join Date: May 2011
Posts: 946
|
Quote:
Well, I am not fond of it. When compared to Test3 or Test8 for example, it is far easier to browse #3 and #8, and I do not think the parameters' comments are worth it: imho they're typically an information that ought to be only displayed in the detailed page of every function and not in the functions listing.
__________________
Reseed! Preview and regenerate map in-game. Ingame Editor (IGE): An in-game editor for terrain, units, cities, civilizations, etc. Lua and UI reference Last edited by DonQuiche; Aug 09, 2012 at 03:32 AM. |
|
|
|
|
|
|
#16 |
|
Deity
Join Date: Jun 2008
Posts: 2,067
|
Test7 looks fine to me. I may have missed something in the discussion above, but is it possible to have a "contents" list at the top with links to these fuller entries below (like 2kgames wiki)? (Test3 and 8 were empty when I looked at them.)
A point of correction (tangential to the current discussion so I put in spoiler): Spoiler:
|
|
|
|
|
|
#17 |
|
King
Join Date: May 2011
Posts: 946
|
@Pazyryk
Unfortunately, I don't think it is possible with this kind of presentation (I guess one has to use standard section headers for the TOC to include them) but I will run some tests. So for you the best layout so far is the test7? And thank you pointing out that mistake, I will fix that.
__________________
Reseed! Preview and regenerate map in-game. Ingame Editor (IGE): An in-game editor for terrain, units, cities, civilizations, etc. Lua and UI reference |
|
|
|
|
|
#18 |
|
Deity
Join Date: Jun 2008
Posts: 2,067
|
Some of the tests are now empty (3 & 8), so I can't evaluate all.
But what I'm trying to describe is a combination of Test2 and Test7. I.e., you have a "Contents" section like Test2. When you click on a method, it does not take you to a different page, but takes you "down-page" to a full description that looks like your layout in Test7. (I think you might be telling me this is difficult or impossible, but I'm not sure.) 95% of the methods don't need any explanation beyond the signature. So having links to 100s of empty pages seems kind of inelegant. It also makes user contribution feel...well...a little daunting. I'd be happy to contribute explanatory text or example usage for a few methods -- for some that are unclear or took some effort to use successfully (or indicate those that don't work at all). But faced with 100s of "red links" to empty pages, I feel like I'm going to be dragged into some giant accounting effort that I'd rather avoid. The only problem I see with Test7 is that you have many signature and return values that don't need any explanation, and won't ever get them unless we have some OCD modders here (my apologies to anyone with OCD, no offence intended). So perhaps 70% of the text here is just clutter. Unfortunately, since this is automated it's probably all or none. Synthesizing my rambling above, I guess what I really would like is Test2, but with the option to add text below the function (not via page link). Whoever enters text here can supply what is needed, which may be explanation of args, example usage or something else. |
|
|
|
|
|
#19 | |||||
|
King
Join Date: May 2011
Posts: 946
|
Quote:
Quote:
Quote:
At this point you probably think it's not: you also wanted the detailed informations when available, didn't you? But this is the point: they are never available on this whole page! So if we hide the clutter, then we get a flat list as the one you see. And at this point, the list itself is so compact that it becomes redundant with the table of contents. So either we keep the clutter in and then it's just test7 + a toc, with a twenty kilometers long page full of clutter. Or we remove the clutter and the natural conclusion is test4. Quote:
Quote:
* Those pages are easy to edit since the template is already here. The clutter is present but only on the functions pages. * We can easily create thematic categories by tagging those pages. this allows the creation of a global index and thematic cross-types indexes (all function for resources in the API for example). * The links are not red anymore. And if we want to emphasize functions pages with actual user-provided content, we could just add one or two icons on the right side of the function signature in the listings. * One page allows long examples. Those ones are hard to insert a single big page. EDIT: here is a sample of a function page: test9
__________________
Reseed! Preview and regenerate map in-game. Ingame Editor (IGE): An in-game editor for terrain, units, cities, civilizations, etc. Lua and UI reference Last edited by DonQuiche; Aug 09, 2012 at 10:53 AM. |
|||||
|
|
|
|
|
#20 |
|
Deity
Join Date: Jun 2008
Posts: 2,067
|
I guess that's fine. I just want some kind of quick visual cue that the method does what it appears to do and I need not look further, which is the case for 95% of them. The red link is perhaps a clue but a flawed one (some overly-eager modder might decide to add helpful comments to everything). The icons idea sounds great though. I could imagine two important icons:
(!) Known or suspected not to work. (*) Non-intuitive usage. The latter is somewhat subjective, but I doubt it would be overly used in a bad way. An example would be Map.Areas(), which you might guess iterates over either pArea or iArea (the value returned by plot:GetArea()), but does neither. --------- Just a comment on your data type notation: I like that you are consistently using "buildingID" to mean row ID (int) and "buildingType" to mean row Type (string). However, how are you handling unit object index (the value returned by unit:GetID())? I always use unitID for the table row and unitIndex for the object index, but Firaxis freely mixes the two, making it impossible to derive a standard that is consistent with the method names. Last edited by Pazyryk; Aug 09, 2012 at 01:14 PM. |
|
|
|
![]() |
| Bookmarks |
|
| Thread Tools | |
|
|