Forums › English Language Forums › General › Wiki Editors

Buscar

DRYing up the wiki

8 respuestas [Último envío]
Dom, 08/03/2014 - 06:13
Imagen de Sir-Pandabear
Sir-Pandabear

DRY (Don't Repeat Yourself) is a principle of reusing repeated things in a manner where, if we some day decide to change an aspect, we could change this in just a single place and have the change reflected everywhere it's needed.

Consider the pages for Combuster and Glacius.

Everything under == Damage == under one page is 100% verbatim from the other. If an adjustment was made to change the damage of all brandishes equally, one would have to edit three different pages (if we only consider the 5* weapons) in order to update the relevant info.

Luckily, the SK wiki system has a solution to this, woefully underused.

The process

First you create a page under
http://wiki.spiralknights.com/Templates:Damage_Disclaimer
(chances are I've already done this by the time you're reading.) It contains this text:

"The following damage values represent the weapon at its completed level, without any UV or bonus from other equipment, and listed as a range found from the first to last floor of each stratum."

Now the damage disclaimed can be simply replaced with:
{{Damage_Disclaimer}}

and followed by

{{Damage/Brandish/5/Elemental}}

and it will use the template I've made at
http://wiki.spiralknights.com/Templates:Damage/Brandish/5/Elemental

This also simplifies things like putting status damage tables on weapon pages. All 4* weapons dealing minor fire can simply use http://wiki.spiralknights.com/Template:Damage/Fire/3/Minor like so:
{{Damage/Fire/3/Minor}}

I'll be going over some weapons sharing damage values with this process. Let me know if this will be a problem.

Dom, 08/03/2014 - 06:20
#1
Imagen de Bopp
Bopp
great

Great. And there are plenty more efficiencies like this to be exploited. For an example pulled from another current thread. Instead of simply listing that a recipe can be found at Basil, we could say which depth of Basil, based on the star level of the recipe. This would preempt some unnecessary forum threads.

Dom, 08/03/2014 - 09:35
#2
Imagen de Sir-Pandabear
Sir-Pandabear

Incidentally, do you know how to put logic like that into templates? For instance, I would like to be able to supply 'Elemental' to a damage tables page and have it fetch things like 'vs Construct and Undead'. I'm convinced the possibility is there, but I dont know how and I don't know where to look it up.

Edit: It's okay guise, I figured it out.

Dom, 08/03/2014 - 10:26
#3
Imagen de Glacies
Glacies

This is actually a really cool thing you've got going on and I do agree that having a single page would be easier than say multiple pages. (it's the same reason I brought up about the alchemy paths on their standard pages since it's much easier to edit one page than a dozen of them)

Also, Bopp, you mean something like this: http://wiki.spiralknights.com/Basil ?

Dom, 08/03/2014 - 11:06
#4
Imagen de Bopp
Bopp
yes, but

Glacies, I mean that on the Avenger page it currently just says "Basil". That produces forum threads like "How do I find an Avenger recipe? Which Basil do I go to?" Yes, I know that readers can just click on the "Basil" link and learn more. But they don't. And actually I don't think that they should have to.

My idea is that the wiki markup would be something like "{{Basil|4}}", and the wiki page would display something like "Basil (depths 13 and 23)".

And actually this was just an example, off the top of my head, of how we might use templates to add a lot of extra detail to the wiki without maintainability issues.

Dom, 08/03/2014 - 13:12
#5
Imagen de Skepticraven
Skepticraven
↓

The endgame to the weapon damage/armor research I'm working on is to auto-populate the entire table based on 1 number.

Then even have additional tables to be generated based for the heating curve and damage bonus.

I know the wiki can do all these calculations based on the one one raw damage number - as I have shown here where the 27 is generated from the equation (input 20 raw damage, +5 armor bonus, +10% firestorm frenzy).

This of course is a long ways from being done since there is still quite a few more things unknown to the precision required... but would further reduce damage tables down to 1 input (and allow for expansion of tables for additional information such as including damage bonuses).

Dom, 08/03/2014 - 15:15
#6
Imagen de Sir-Pandabear
Sir-Pandabear

I didn't even think about all the reskins when I started doing this. Anyways, I've gotten starteed on templates for fire damage.

http://wiki.spiralknights.com/Template:Damage/Fire/3/Minor
http://wiki.spiralknights.com/Template:Damage/Fire/3/Moderate
http://wiki.spiralknights.com/Template:Damage/Fire/3/Strong
http://wiki.spiralknights.com/Template:Damage/Fire/Firebolt
http://wiki.spiralknights.com/Template:Damage/Fire/Flame_Barrier
http://wiki.spiralknights.com/Template:Damage/Fire/Firestorm

Only confirmed values have been filled in. (Drakon abilities not seperated by Tier since they all start with Tier 3 strength.)

Dom, 08/10/2014 - 07:42
#7
Imagen de Sir-Turtlebear
Sir-Turtlebear

I've spent the day gathering a lot of damage numbers for fire at the most easily accessible depths. (
1, 4, 9, 14, 19 and 24).

Unfortunately, I wasn't able to get all of them, but I did get some values from other depths as well. The fruits of my labours can be seen in all the templates linked in the previous post, that now gather their damage values from the the central fire damage table.

There's also a central table for total damage that I'm so far just calculating manually. This is strictly something that one should be able to calculate using the information from the first table, but I couldn't get the template working as I wanted it to.

Skepticraven, you're better with at template stuff than me, maybe you'd like to give it a shot?

Other pages edited today as aftereffects include:
http://wiki.spiralknights.com/Shivermist_Buster
http://wiki.spiralknights.com/Ash_of_Agni
http://wiki.spiralknights.com/Glacius
http://wiki.spiralknights.com/Combuster
http://wiki.spiralknights.com/Voltedge
http://wiki.spiralknights.com/Magma_Driver
http://wiki.spiralknights.com/Storm_Driver
http://wiki.spiralknights.com/Cryo_Driver

Lun, 08/11/2014 - 04:42
#8
Imagen de Riftlocker
Riftlocker
<--- Skepticraven

I can give it a look in a week, because I'm a bit busy this week. However, I have not yet figured out to develop a table from an already constructed table (but that doesn't mean it cant be done).

However, the method I was using on my testing page is have a temple that spits back a single number from which a full table could be generated once I get the armor and depth increase values (which would take a ton of reorganization for your tables currently). That template of mine pretty much only has an #expr: function with the current working equation.

Also, thank you for adding some documentation for your templates. It is greatly appreciated.

Sitio elaborado con Drupal, un sistema de gestión de contenido de código abierto