Arcen Games
Other => Website Support => Topic started by: Pumpkin on July 05, 2016, 02:03:20 pm
-
I have a question about the AI War wiki's innards.
All units have their own page with a table containing all their stats. These tables are inserted by using a template of the form:
{{AIWarTableXXX}}
I believe these tables are automatically generated to be up to date, however there is several units without tables (or with tables I can't find). The Zenith Hydra sounds like a good example. Can I (a mundane wiki editor) create these? If yes, how? If no, who?
Thanks in advance.
-
In order to make templates, all you should have to do is be signed in and search for the page named Template:AIWarTableXXX with everything after the Template part being the name of the template. Then create the page. As for doing the actual template creation, you'll want to probably copy and paste a template for your first try to learn how it all works -- it is very complicated.
-
Templates can get super complicated because the syntax has two major "problems"
1) Whitespace is important (you can't do carriage returns and tabbed alignment for readability, because that actually alters the result)
2) Its syntax is subject to Wiki syntax. {x} means something already, so does {{x}} which is why if statements look like this:
{{#if:{{{Input-link|}}}|{{{Input-link}}}|{{{Input}}}}}
Yes, that's actually an if-then-else statement.
Specifically, if the variable "Input-link" is not blank, then write it, else use the variable "Input" as the link destination.
-
Okay, so units' stat tables need to be manually updated when the game change. Ouch.
Well, thanks for the answer. I'll try that soon.
-
In theory, someone could design a bot that updates ship stats for us. Though that might be difficult to say the least. If anyone knows python, they could probably do it though.
-
I hope it will be more easily done with the next AIW's engine. If all ship's definitions are in xml files, a basic script would be able to automatically create the wiki's tables.