User:Lucien2078

Hey, I saw your ship page edits in the changelog. I'm afraid I have to tell you that adding the tables for the stats like you've been doing is a bad idea. The numbers are quite subject to unannounced change (in fact, a lot of the numbers are completely different in the slots branch in git; some don't even exist anymore!) and it's unrealistic to expect developers to have to edit the wiki every time they modify ship.xml. If you want to include stats, you will have to invent some way of dynamically generating them from ship.xml in bobbens' git repo on github. Failing that, I suggest you leave out the stats and instead only list general info about the ships. --BTAxis 02:39, 8 December 2011 (CST)

==

Yeah, that's something I already thought of (changing stats) and feared. :) Just missed the pages on ship info and wanted to have a "reference book".

"If you want to include stats, you will have to invent some way of dynamically generating them from ship.xml in bobbens' git repo on  github."

That would be a very great idea!!! Problem is I'm very new to Wiki edits so I know nothing about accessing the pages of it. But first let me have a look into ship.xml. Perhaps a script or little tool for automatically creating a wiki page would be a first attempt so that a bot/agent would be able to call such a script over night. I'll keep you informed.

"Failing that, I suggest you leave out the stats and instead only list general info about the ships."

Ok, that's what I'll do for the next time. I guess that something like "Fabricator" and "License" are things (amongst other) that won't change any more. :)

EDIT: Do you know how to embed specific XML data into wiki pages read out from linked files? Or any tutorial on that? I'll also ask "Google" on that... ;) An idea would be to link on ships.xml (in either way, direct or on wiki itself; just uploading a current ships.xml to wiki would at least be better than always editing every ship's pages) and create a field (perhaps with the help of templates) where just a reference on the file and ship name has to be made. Don't know whether this would be realistic in any way. I'm just too inexperienced on wiki edits (learning in progress...).
 * 1) I'll mark the pages I already wrote so it should be clear the stats are only valid for v0.5.0 (which I use). I need/want them as reference book. BTW: Great game! :)
 * 2) I took a look at "ships.xml". Thanks for the hint!!!
 * Ok, found something like http://www.mediawiki.org/wiki/Manual:Importing_XML_dumps to read out XML data. This is complete virgin soil for me so it would take much time to get into that whole thing (at most: time reasons -> I'm not always enthusiastic enough to learn after work). Also I'm not really sure whether this is what we would want. I more thought of directly reading out/parse XML files to extract specific info and put them into fields... via wiki templates...

greetz lucien

==

Using an XML what you would need is an extension that fetches data from an external source directly and converts it into mediawiki formatting on the fly. Something like this, only you'd need to be able to specify which data exactly to show. Not sure if that exists, and no idea how to make it. Alternatively, you could make an XML parser for ship.xml that outputs the stats as a mediawiki formatted table that you can copypaste into the pages. A script like that could be done in python or perl for instance. That still involves manually editing all the pages when drastic changes (such as rebalancing) occur though. Also, about the slots branch I mentioned earlier, ships will have much reduced stats (some reduced to 0) as a lot of the performance now depends on the "core" outfits (engine, system, hull mod) installed on the ship. Ships do however get modifiers for various things, such as -10% top speed or +15% turn rate, which means two ships with the same equipment don't handle the same. Once all this gets merged I suppose this information would also need to be added to the wiki ship pages. However, the Naev devs don't want to maintain a wiki reference like that. Keep that in mind. --BTAxis 19:23, 11 December 2011 (CST)

==

Thanks for your answer!

Something like this, only you'd need to be able to specify which data exactly to show.

Many thanks for this hint! I'll take a closer look at that. At first glance it doesn't look like it would give us the possibility to extract just those data we want. But let's see... I'll keep you on track.

Alternatively, you could make an XML parser for ship.xml that outputs the stats as a mediawiki formatted table that you can copypaste into the  pages. A script like that could be done in python or perl for instance. That still involves manually editing all the pages when drastic changes (such as rebalancing) occur though.

That is exactly what we want to avoid (and where I totally agree with you!): Manual editing. The only thing we eventually could consider that such script would be automatically called by a cron job on the server.

[...] Once all this gets merged I suppose this information would also need to be added to the wiki ship pages.

Those are things to come. When (or rather if?) we're able to read out data from XML files (from wiki directly what would be most desirable to me) and know how to extract just those info we want, this'll be a simple task. I'll keep in mind that just things should be displayed when they're specified and that some other things like those modifiers can also occur.

However, the Naev devs don't want to maintain a wiki reference like that. Keep that in mind.

Absolutely understandable. They have better things to do! ;) While creating those pages I also thought about things like "Hmmm, surely stats will change and always changing the wiki when stats change isn't a fine thing". I just created those pages for me at first and to play around with wiki to gain experience. This whole thing is work in progress and will emerge to a more advanced state. ;)

What about something like JavaScript or something else? Isn't there any possibility to embed " " tags to wiki (with help of extensions) so we could use a DOM parser?

Conclusion: Now I know where to look at first. Again thx for your helpful hints! I'll let you know if I find a way that would at least be a compromise.

EDIT:


 * 1) Based on your hint, BTAxis, I found following: http://wiki.daemonraco.com/wiki/Xml2wiki-dr. It looks like there IS a possibility to extract just the info we need. I'll play with it at the next opportunity! Thx again!!!

greetz lucien

==

Looks promising. I'll talk to Deiz about installing that extension, though that could take a while since he's gone for the holidays. --BTAxis 06:39, 12 December 2011 (CST)

==

Think so, too. I already have some little ideas on how to implement that but this is something I'm somehow forced to try out during creation (lack of experience... :) ).

For my implementation ideas (via template) I would need (at least?) following extensions:


 * Extension:VariablesExtension
 * Extension:StringFunctions
 * Extension:ParserFunctions
 * Extension:Loops
 * XML2Wiki

The only thing I have some concerns about is performance. Don't know how fast "ships.xml" can be parsed by XML2Wiki and what impact that will have on loading the page. That's something to find out. Worst thing would be to write an own extension in PHP. ;)

Another thing: I more think of this wiki as being mostly a representation of the latest "stable release" ([just] for [that] pages only users are interested in like ship stats and so on ;) ) that not always has to be HEAD (though Updating says it's recommended to update as often as possible); so in my opinion it would probably be better to always upload a "stable" version's "ships.xml" to wiki instead of linking to an external repository. I think that would somehow be acceptable. Or pointing to an external dedicated "releases" branch so that no upload has to be done (but there'll probably be more source merging effort I fear). What do you think?

For now: Many thanks for your efforts and... yeah, please keep me informed and tell me when those extensions I requested have been added (if not already done) AND THANKS in advance for that.

So long

Lucien

--Lucien2078 09:48, 12 December 2011 (CST)

==

Quick update, had a short discussion about this on IRC: http://colabti.org/irclogger/irclogger_log/naev?date=2011-12-15#l30

--BTAxis 11:16, 16 December 2011 (CST)


 * Sorry about the long delay. Been quite sick since getting back from Germany. There's already a ship database, although it's a) not finished and b) not publicly-linked. That's not to say I'm ruling out on-wiki documentation of ships and outfits, etc., but I think it's simpler to generate our own static HTML instead of needing to figure out Mediawiki's XML dump format.


 * I think parsing ship.xml with Mediawiki would prove... difficult. Because there are optional fields, fields that occur multiple times, and it's a large monolithic file, you'd essentially need to reimplement Naev's ship parser for use on the wiki. If we are to document ships on the wiki, I'd much sooner have a script that generates either a Mediawiki XML dump (preferably) or Wikisyntax, rather than processing ship.xml with Mediawiki extensions. Deiz 07:29, 17 December 2011 (CST)

==

Sorry about the long delay. Been quite sick since getting back from Germany. There's already a ship database, although it's a) not finished and b) not publicly-linked.

Doesn't matter. ;) Hope you're cured and fine now!! About the ships' database: Incidentally stumbled upon this about a week ago (though I searched for something like that in Google before). That brought up the question to myself why I wanna have "wiki" pages. In principal there is no argument why this should be the case but those two:


 * Specialized Wiki holds all info with respect to its issue (at the best). So you don't have to switch between several pages.
 * The ships' db is great but I miss a table with values one below the other to directly compare ship stats with each other at a glance (especially ships of same kind but with modifications -> Ancestor/Pirate Ancestor and so on). Currently on the ships' overview page it's kinda "jump your eyes" duty. But this is just my opinion about this. And as you said: It's not finished yet.

Quick update, had a short discussion about this on IRC: http://colabti.org/irclogger/irclogger_log/naev?date=2011-12-15#l30

Thx for the info! I totally agree with your opinion about "directory/one file per item". With such an approach I wouldn't mind about any performance issues during parsing an XML file via Mediawiki extensions.

Because there are optional fields, fields that occur multiple times, and it's a large monolithic file, you'd essentially need to reimplement  Naev's ship parser for use on the wiki.

With the help of the Mediawiki extensions I mentioned before (Variables/Loops etc.) I could imagine it would be possible to take care of optional fields and such that occur multiple times. That shouldn't be that big a problem (if that somehow works as I would expect). The biggest issue is the size of ship.xml. And it won't get smaller with the time... Parsing via extension: That's something that could at least be worth giving a try. Even if (or rather when?) it proofs not being efficient enough the extensions can be of use for future parts of this wiki so it doesn't hurt installing them.

But I'm curious:

you'd essentially need to reimplement Naev's ship parser for use on the wiki.

Please tell me about your ideas behind that and give me some hints where I have to look at. Where to find Naev's ship parser? More in favour of perl scripts or C programs?

greetz --Lucien2078 17:26, 17 December 2011 (CST)

EDIT:

Just a little idea according to split up the ship.xml file into several parts to reduce efforts:

Keeping ship.xml but instead of holding complete info for every ship just create a node with ship's name and an attribute or a node with a link to the file with more detailed information about that ship. Something like