Difference between revisions of "User:Tvol"

From UFOpaedia
Jump to navigation Jump to search
 
(21 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
I'm hanging-out on the [https://discordapp.com/invite/0kl6nyAsBOjaIBdU XCOM discord server] if you want to chat directly or over voice (dependent on availability and what I'm doing at the time).
 
I'm hanging-out on the [https://discordapp.com/invite/0kl6nyAsBOjaIBdU XCOM discord server] if you want to chat directly or over voice (dependent on availability and what I'm doing at the time).
  
 
+
I have stopped working on the wiki for the time being until I get an answer back from the admins about whether or not they are going to let me change the site's CSS. Half of my editing time now consists of trying to manage the insane number of style tags required to get things to work; it's very pre-1995 stuff to be doing, and frankly, I don't have the time.
  
 
== Useful Things ==
 
== Useful Things ==
Line 11: Line 11:
  
 
[[User:Tvol/Colours|Colours guide]] (for my own personal sanity and possibly yours; this should be formalized in CSS and not on a random page).
 
[[User:Tvol/Colours|Colours guide]] (for my own personal sanity and possibly yours; this should be formalized in CSS and not on a random page).
 +
 +
[https://cdn.discordapp.com/attachments/271743187461210123/277681108391559168/Ability_Mockup.png Mockup from @Mavoc via Discord for the Ability template.]
 +
 +
== Subpages ==
 +
 +
[[User:Tvol/Panel]]
 +
 +
 +
[[User:Tvol/Colours]]<br />
 +
[[User:Tvol/Guides]]<br />
 +
[[User:Tvol/Sandbox]]<br />
 +
[[User:Tvol/Sandbox/cssTranscludeTest.css]]<br />
 +
[[User:Tvol/Sandbox/Template]]<br />
 +
[[User:Tvol/Sandbox/Transclusion]]
  
 
== TODO ==
 
== TODO ==
 +
 +
=== Bot Jobs ===
 +
 +
* Systematically check for all HTML tags that have been depreciated in HTML 5 and update or remove them. Make sure they are well-formed.
 +
:* Since these depreciations are largely intended to be replaced by CSS, doing this without access to site-wide CSS is pointless.
 +
* Assign correct copyright for images (requires template).
 +
* Append a notice to all editors on all ability templates:
 +
<pre><!-- NOTICE TO EDITORS: For the sake of future maintainability, please do not remove parameters nor rearrange them. This will make it easier in future to update this template using a bot and regular expressions if necessary. --></pre>
  
 
=== Templates ===
 
=== Templates ===
Line 20: Line 42:
  
 
==== To Create ====
 
==== To Create ====
* '''CSS Strongly Recommended''' {{tl|Style}} : Style templates for XCOM table and XCOMPsi table. Do so for rows as well. Do so for anything I touch in future. This is the entirely '''''wrong''''' way to do this. It should be handled by CSS classes, but since I don't have access to the CSS here will have to make do. These tables will not be portable between skins because of this (though no less so than the current versions). This could be handled by one switch function.
+
* {{tl|Infobox}}
 +
:* {{tl|Ability infobox (LW2)}}
 +
:* {{tl|Equipment infobox (LW2)}}
 +
::* Subtypes may not be required but included for completeness.
 +
::* {{tl|Armor infobox (LW2)}}
 +
::* {{tl|Grenade infobox (LW2)}}
 +
::* {{tl|PCS infobox (LW2)}}
 +
::* {{tl|Weapon infobox (LW2)}}
 +
* Inline/table display, see problems below
 +
:* {{tl|Equipment (LW2)}}
 +
::* {{tl|Armor (LW2)}}
 +
::* {{tl|Grenade (LW2)}}
 +
::* {{tl|PCS (LW2)}}
 +
::* {{tl|Weapon (LW2)}}
 
* {{tl|Disambiguation}} : Disambiguation page.
 
* {{tl|Disambiguation}} : Disambiguation page.
 
* {{tl|Stub}} : Article stubs.
 
* {{tl|Stub}} : Article stubs.
 
* {{tl|Sandbox}} : Mark sandboxes as such.
 
* {{tl|Sandbox}} : Mark sandboxes as such.
 
* {{tl|Candidate for deletion}} and {{tl|Delete}} : Mark pages for deletion.
 
* {{tl|Candidate for deletion}} and {{tl|Delete}} : Mark pages for deletion.
* {{tl|Subpage Handler}} : Check for various subpages and display links if they exist, e.g. /Info , /Sandbox. Also allow for manual addition of at least three subpages. (A line of inline-blocks in a div should work well.)
+
* {{tl|Constants}} : Mark that the template uses constants/defaults and provide links to each constant's subpage, up to say, 12? This could be folded into {{tl|documentation}}
* Templates that can be used to dynamically construct weapons with their appropriate mods. (That'll be a joy I'm sure. Overlaying one image on another is hard enough. It may not even be possible to do via HTML. Composited images and a stupid-huge switch function may be required. This is very low priority.)
+
* {{tl|Subpage handler}} : Check for various subpages and display links if they exist, e.g. /Info , /Sandbox. Also allow for manual addition of at least three subpages. (A line of inline-blocks in a div should work well, or flex-box now that a skin update is coming.)
 +
*Status effects
 +
:* {{tl|Status effect (LW2)}}
 +
::* Armor
 +
::* Berserk
 +
::* Bound
 +
::* Burning
 +
::* Concealed
 +
::* Confused
 +
::* Default
 +
::* Disoriented
 +
::* Haywire
 +
::* Mind Controlled
 +
::* Overwatch
 +
::* Panic
 +
::* Poison
 +
::* Revealed
 +
::* Stunned
 +
::* Unconscious
 +
*Class icons
 +
:* {{tl|Class (LW2)}}
 +
::* Assault
 +
::* Grenadier
 +
::* Gunner
 +
::* Ranger
 +
::* Sharpshooter
 +
::* Shinobi
 +
::* Specialist
 +
::* Technical
 +
::* Psi Operative
 +
::* SPARK
 +
*Stat bonuses
 +
:* {{tl|Stat bonus (LW2)}}
 +
::* Aim
 +
::* Dodge
 +
::* Hack
 +
::* Health
 +
::* Mobility
 +
::* Psi
 +
::* Will
 +
 
 +
===== Problems =====
 +
 
 +
Inline/table display templates must be implemented very differently, but use the same data. This is a problem because it would result in duplication of information in different places, making it harder for editors to maintain in future. Template branching may be the best solution here, such that the default is inline display, with one "master" template for each subject/item. Gods I wish we had type checking and enums. Wishful thinking.
 +
 
 +
See [https://meta.wikimedia.org/wiki/Help:Advanced_templates#Variable_templates Variable Templates] for ideas. (After some thought, copying the selection logic into each implementation template makes the most sense. This would only need to be done once and will be less complicated than passing every parameter through a handler, which would get messy, fast.)
  
 
==== To Edit ====
 
==== To Edit ====
  
 
* {{tl|documentation}} : Add link to /Sandbox .
 
* {{tl|documentation}} : Add link to /Sandbox .
* {{tl|TopBox}} : Make improvements.
+
* {{tl|TopBox}} : Make improvements. Set display to inline-block, and expose <code>clear</code> so that they can be along-side each other but also take-up the whole width if important. Will need min-widths, blah blah. Also consider flex.
 
* {{tl|Construction Notice}} : Make improvements.
 
* {{tl|Construction Notice}} : Make improvements.
 
* {{tl|No Direct Call}} : Make improvements.
 
* {{tl|No Direct Call}} : Make improvements.
 +
:* Generalize template as a "do not transclude" template. Allow other reasons, e.g. a template being just so subpages are accessible.
 +
 +
* Upon finalizing default values, all templates should be converted from using a Constants subpage and switch function, to using a subpage for each parameter.
  
 
===== Stat Progression (LW2) =====
 
===== Stat Progression (LW2) =====
Line 41: Line 124:
 
===== Ability (LW2) =====
 
===== Ability (LW2) =====
 
* {{tl|Ability_(LW2)}}
 
* {{tl|Ability_(LW2)}}
* Support inline use by inserting the name in front.
+
* Support inline use by inserting the name in front of icon.
 
* '''CSS Required''' : Display div with info text and invert colour of info icon when info icon is hovered over.
 
* '''CSS Required''' : Display div with info text and invert colour of info icon when info icon is hovered over.
  
Line 52: Line 135:
 
=== Images ===
 
=== Images ===
  
* Upload Folders: Alerts, Corpses, DarkEvents, Equipment, Events, Facilities, Icons, POIs, Schematics, Research, Weapons.
+
* Upload Folders: <s>Alerts, Corpses, DarkEvents, Equipment, Events, Facilities, Icons, POIs, Schematics, Research,</s> Weapons. (Update: I think I got all these aside from weapons. Check if I did that.)
 
* Compose Todo and Shortcut icons and upload.
 
* Compose Todo and Shortcut icons and upload.
  
Line 60: Line 143:
  
 
* Fix {{tl|related}} link colours.
 
* Fix {{tl|related}} link colours.
 +
* {{tl|Ability (LW2)}} : Display div with info text and invert colour of info icon when info icon is hovered over.
 +
* {{tl|Weapon composite image}}
 +
:* Overlay weapon images inside a div to reconstruct a weapon + mods (could be useful for guides). Provide scaling ability. '''Definitely do not try without site CSS access. This will be dicey even with it. Classes are necessary to make this manageable, otherwise code duplication in style tags will be insane.'''
  
 
==== Classes to Create ====
 
==== Classes to Create ====
  
 +
* '''CSS Strongly Recommended''' {{tl|Style}} : Style templates for XCOM table and XCOMPsi table. Do so for rows as well. Do so for anything I touch in future. This is the entirely '''''wrong''''' way to do this. It should be handled by CSS classes, but since I don't have access to the CSS here will have to make do. These tables will not be portable between skins because of this (though no less so than the current versions). This could be handled by one switch function. And it's still a '''very''' bad idea because it '''will''' start to significantly effect server load if called constantly (which it will be because table styles have to be set for every cell when CSS is unavailable). To say nothing of the fact that doing so absolutely ruins specificity and makes it nigh impossible use CSS later. (Did I mention this is a bad idea? Style tags for everything is a bad idea.)
 
* xcom2table : like wikitable but formatted with reasonable defaults for XCOM 2.
 
* xcom2table : like wikitable but formatted with reasonable defaults for XCOM 2.
 
* All classes in {{tl|Ability (LW2)}}.
 
* All classes in {{tl|Ability (LW2)}}.
* Classes for {{tl|TopBox}} and all it's children.
+
* Classes for {{tl|TopBox}} and all its children. (Link colours especially need to be fixed.)
 
+
* Classes for {{tl|Infobox}} and all its children.
==Scratch Pad==
 
 
 
[[File:UIPerk_runandgun.png|link=Assault_(LW2)]]
 
 
 
===Abilities Template===
 
 
 
{{Aggression (LW2)/Sandbox | b_info = 1 | b_name = 1}}
 
 
 
 
 
{{Ability_(LW2)/Sandbox
 
  | s_image = LW_AbilityAggression.png
 
  | s_caption = Aggression
 
  | s_name = Aggression
 
  | s_descr = Gain +5 critical chance for each enemy you can see, up to a maximum of 30. Does not include enemies in Squadsight range.
 
  | s_templateName = Template:Aggression (LW2)
 
  | s_id = aggression_LW
 
  {{ #if: 1 | {{!}} b_name = 1 |}}
 
  {{ #if:  | {{!}} b_descr = {{{b_descr}}} |}}
 
  {{ #if: 1 | {{!}} b_info = 1 |}}
 
  {{ #if:  | {{!}} b_table = {{{b_table}}} |}}
 
}}
 
 
 
 
 
inline{{Ability_(LW2)/Sandbox
 
| s_image = UIPerk_runandgun.png
 
| s_name = Run and Gun
 
| s_caption = Run and Gun
 
| s_link = Assault_(LW2)
 
| s_descr = Take an action after dashing. Three-turn cooldown.
 
| s_pageName =  Bacon!?!
 
}} text
 
 
 
 
 
 
 
{{Ability_(LW2)/Sandbox
 
  | s_image = LW_AbilityAggression.png
 
  | s_caption = Aggression
 
  | s_name = Aggression
 
  | s_descr = Gain +5 critical chance for each enemy you can see, up to a maximum of 30. Does not include enemies in Squadsight range.
 
  | s_pageName = Template:Aggression (LW2)
 
}}
 
 
 
===Active Tree===
 
 
 
{{Class Tree (LW2)/Sandbox
 
|Squaddie1=
 
|Squaddie2={{Run and Gun (LW2) | b_name = 1 | b_descr = 1 | b_info = 1 | b_table = 1 }}
 
|Squaddie3={{Stun (LW2) | b_name = 1 | b_descr = 1 | b_info = 1 | b_table = 1 }}
 
|Subclass1=Raider
 
|Subclass2=Breacher
 
|LCorporal1={{Slug Shot (LW2) | b_name = 1 | b_descr = 1 | b_info = 1 | b_table = 1 }}
 
|LCorporal2={{Electroshock (LW2) | b_name = 1 | b_descr = 1 | b_info = 1 | b_table = 1 }}
 
|LCorporal3={{Lightning Reflexes (LW2) | b_name = 1 | b_descr = 1 | b_info = 0 | b_table = 1 }}
 
|Corporal1={{Trench Gun (LW2) | b_name = 1 | b_descr = 1 | b_info = 0 | b_table = 1 }}
 
|Corporal2={{Arc Pulser (LW2) | b_name = 1 | b_descr = 1 | b_info = 0 | b_table = 1 }}
 
|Corporal3={{Close and Personal (LW2) | b_name = 1 | b_descr = 1 | b_info = 1 | b_table = 1 }}
 
|Sergeant1={{Killer Instinct (LW2) | b_name = 1 | b_descr = 1 | b_info = 0 | b_table = 1 }}
 
|Sergeant2={{Stun Gunner (LW2) | b_name = 1 | b_descr = 1 | b_info = 0 | b_table = 1 }}
 
|Sergeant3={{Fortify (LW2) | b_name = 1 | b_descr = 1 | b_info = 1 | b_table = 1 }}
 
|StaffSgt1={{Extra Conditioning (LW2) | b_name = 1 | b_descr = 1 | b_info = 0 | b_table = 1 }}
 
|StaffSgt2={{Aggression (LW2) | b_name = 1 | b_descr = 1 | b_info = 1 | b_table = 1 }}
 
|StaffSgt3={{Formidable (LW2) | b_name = 1 | b_descr = 1 | b_info = 1 | b_table = 1 }}
 
|TechSgt1={{Hit and Run (LW2) | b_name = 1 | b_descr = 1 | b_info = 0 | b_table = 1 }}
 
|TechSgt2={{Rapid Fire (LW2) | b_name = 1 | b_descr = 1 | b_info = 1 | b_table = 1 }}
 
|TechSgt3={{Close Encounters (LW2) | b_name = 1 | b_descr = 1 | b_info = 0 | b_table = 1 }}
 
|GunSgt1={{Bring 'Em On (LW2) | b_name = 1 | b_descr = 1 | b_info = 1 | b_table = 1 }}
 
|GunSgt2={{Close Combat Specialist (LW2) | b_name = 1 | b_descr = 1 | b_info = 0 | b_table = 1 }}
 
|GunSgt3={{Untouchable (LW2) | b_name = 1 | b_descr = 1 | b_info = 0 | b_table = 1 }}
 
|MSgt1={{Street Sweeper (LW2) | b_name = 1 | b_descr = 1 | b_info = 0 | b_table = 1 }}
 
|MSgt2={{Chain Lightning (LW2) | b_name = 1 | b_descr = 1 | b_info = 0 | b_table = 1 }}
 
|MSgt3={{Lethal (LW2) | b_name = 1 | b_descr = 1 | b_info = 0 | b_table = 1 }}
 
}}
 
 
 
 
 
=== Table Finagling ===
 
 
 
{| class="wikitable" style="margin: 1em 0 1em 0; background-color: #17181a; border: 1px #83c0ce solid; border-collapse: collapse; text-align: center; color:#83c0ce; width: 100%; empty-cells: hide;"
 
| style="width: 10%;" | Col1
 
| style="width: 90%;" colspan="12" | Col12
 
|-
 
|- style="vertical-align:middle; font-size:130%;"
 
| | '''Rank'''
 
| style="border-color:#83c0ce; width: 90%;" colspan="12" | '''Ability'''
 
|-
 
| A rank
 
|width="22.5%" colspan="3"| Col3
 
|width="22.5%" colspan="3"| Col3
 
|width="22.5%" colspan="3"| Col3
 
|width="22.5%" colspan="3"| Col3
 
|- vertical-align="middle"
 
| style="border-width: 0 2px 0 0; border-color:#83c0ce;" |
 
| style="border:none; background-color:black; width: 30%;" colspan="4" | '''''{{{Subclass1}}}'''''
 
| style="border:none; background-color:black; width: 30%;" colspan="4" |
 
| style="border:none; background-color:black; width: 30%;" colspan="4" | '''''{{{Subclass2}}}'''''
 
|-
 
| Another rank
 
|width="30%" colspan="4"| Col4
 
|width="30%" colspan="4"| Col4
 
|width="30%" colspan="4"| Col4
 
|-
 
| style="width: 10%; border: none;"  |
 
| style="width: 7.5%; border: none;"  |
 
| style="width: 7.5%; border: none;"  |
 
| style="width: 7.5%; border: none;"  |
 
| style="width: 7.5%; border: none;"  |
 
| style="width: 7.5%; border: none;"  |
 
| style="width: 7.5%; border: none;"  |
 
| style="width: 7.5%; border: none;"  |
 
| style="width: 7.5%; border: none;"  |
 
| style="width: 7.5%; border: none;"  |
 
| style="width: 7.5%; border: none;"  |
 
| style="width: 7.5%; border: none;"  |
 
| style="width: 7.5%; border: none;"  |
 
|}
 

Latest revision as of 12:39, 15 February 2017

Contacting Me

I'm hanging-out on the XCOM discord server if you want to chat directly or over voice (dependent on availability and what I'm doing at the time).

I have stopped working on the wiki for the time being until I get an answer back from the admins about whether or not they are going to let me change the site's CSS. Half of my editing time now consists of trying to manage the insane number of style tags required to get things to work; it's very pre-1995 stuff to be doing, and frankly, I don't have the time.

Useful Things

Regex pair to convert line breaks to HTML comments: \n(\s*)(.) >> <!--\n$1-->$2 And back: <!--\n(\s*)--> >> \n$1

Colours guide (for my own personal sanity and possibly yours; this should be formalized in CSS and not on a random page).

Mockup from @Mavoc via Discord for the Ability template.

Subpages

User:Tvol/Panel


User:Tvol/Colours
User:Tvol/Guides
User:Tvol/Sandbox
User:Tvol/Sandbox/cssTranscludeTest.css
User:Tvol/Sandbox/Template
User:Tvol/Sandbox/Transclusion

TODO

Bot Jobs

  • Systematically check for all HTML tags that have been depreciated in HTML 5 and update or remove them. Make sure they are well-formed.
  • Since these depreciations are largely intended to be replaced by CSS, doing this without access to site-wide CSS is pointless.
  • Assign correct copyright for images (requires template).
  • Append a notice to all editors on all ability templates:
<!-- NOTICE TO EDITORS: For the sake of future maintainability, please do not remove parameters nor rearrange them. This will make it easier in future to update this template using a bot and regular expressions if necessary. -->

Templates

This is my todo list for templates. If you want to help me by doing any of this below, go for it. I won't mind. Really. Really I won't.

Roughly in order of priority.

To Create

  • Inline/table display, see problems below
  • {{Disambiguation}} : Disambiguation page.
  • {{Stub}} : Article stubs.
  • {{Sandbox}} : Mark sandboxes as such.
  • {{Candidate for deletion}} and {{Delete}} : Mark pages for deletion.
  • {{Constants}} : Mark that the template uses constants/defaults and provide links to each constant's subpage, up to say, 12? This could be folded into {{documentation}}
  • {{Subpage handler}} : Check for various subpages and display links if they exist, e.g. /Info , /Sandbox. Also allow for manual addition of at least three subpages. (A line of inline-blocks in a div should work well, or flex-box now that a skin update is coming.)
  • Status effects
  • Armor
  • Berserk
  • Bound
  • Burning
  • Concealed
  • Confused
  • Default
  • Disoriented
  • Haywire
  • Mind Controlled
  • Overwatch
  • Panic
  • Poison
  • Revealed
  • Stunned
  • Unconscious
  • Class icons
  • Assault
  • Grenadier
  • Gunner
  • Ranger
  • Sharpshooter
  • Shinobi
  • Specialist
  • Technical
  • Psi Operative
  • SPARK
  • Stat bonuses
  • Aim
  • Dodge
  • Hack
  • Health
  • Mobility
  • Psi
  • Will
Problems

Inline/table display templates must be implemented very differently, but use the same data. This is a problem because it would result in duplication of information in different places, making it harder for editors to maintain in future. Template branching may be the best solution here, such that the default is inline display, with one "master" template for each subject/item. Gods I wish we had type checking and enums. Wishful thinking.

See Variable Templates for ideas. (After some thought, copying the selection logic into each implementation template makes the most sense. This would only need to be done once and will be less complicated than passing every parameter through a handler, which would get messy, fast.)

To Edit

  • {{documentation}} : Add link to /Sandbox .
  • {{TopBox}} : Make improvements. Set display to inline-block, and expose clear so that they can be along-side each other but also take-up the whole width if important. Will need min-widths, blah blah. Also consider flex.
  • {{Construction Notice}} : Make improvements.
  • {{No Direct Call}} : Make improvements.
  • Generalize template as a "do not transclude" template. Allow other reasons, e.g. a template being just so subpages are accessible.
  • Upon finalizing default values, all templates should be converted from using a Constants subpage and switch function, to using a subpage for each parameter.
Stat Progression (LW2)
Ability (LW2)
  • {{Ability_(LW2)}}
  • Support inline use by inserting the name in front of icon.
  • CSS Required : Display div with info text and invert colour of info icon when info icon is hovered over.
Documentation

Create documentation for:

Images

  • Upload Folders: Alerts, Corpses, DarkEvents, Equipment, Events, Facilities, Icons, POIs, Schematics, Research, Weapons. (Update: I think I got all these aside from weapons. Check if I did that.)
  • Compose Todo and Shortcut icons and upload.

CSS

Anything here will require access to the site's CSS to do.

  • Overlay weapon images inside a div to reconstruct a weapon + mods (could be useful for guides). Provide scaling ability. Definitely do not try without site CSS access. This will be dicey even with it. Classes are necessary to make this manageable, otherwise code duplication in style tags will be insane.

Classes to Create

  • CSS Strongly Recommended {{Style}} : Style templates for XCOM table and XCOMPsi table. Do so for rows as well. Do so for anything I touch in future. This is the entirely wrong way to do this. It should be handled by CSS classes, but since I don't have access to the CSS here will have to make do. These tables will not be portable between skins because of this (though no less so than the current versions). This could be handled by one switch function. And it's still a very bad idea because it will start to significantly effect server load if called constantly (which it will be because table styles have to be set for every cell when CSS is unavailable). To say nothing of the fact that doing so absolutely ruins specificity and makes it nigh impossible use CSS later. (Did I mention this is a bad idea? Style tags for everything is a bad idea.)
  • xcom2table : like wikitable but formatted with reasonable defaults for XCOM 2.
  • All classes in {{Ability (LW2)}}.
  • Classes for {{TopBox}} and all its children. (Link colours especially need to be fixed.)
  • Classes for {{Infobox}} and all its children.