v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Editing Dwarf Fortress Wiki talk:Diagram

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.


The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 5: Line 5:
 
The tiles display more evenly, the color system is cleaner, tileset support is really cool, getting away from regex is great, and character codes save needing to use a character table. I really like what I see here. [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 12:13, 24 July 2014 (UTC)
 
The tiles display more evenly, the color system is cleaner, tileset support is really cool, getting away from regex is great, and character codes save needing to use a character table. I really like what I see here. [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 12:13, 24 July 2014 (UTC)
 
==== Problems ====
 
==== Problems ====
Perhaps this is a weird place to put this, but firefox 0.75 with "privacy.resistFingerprinting = true" set (pretends to be firefox 0.68?) can't display diagrams properly. My suspicion is that short-circuits compatibility code somehow. Ended up reinstalling firefox and re-enabling settings one-by-one to figure this one out. -[[User:genkernels|genkernels]] ([[User talk:genkernels|talk]]) 20 Apr 2020
 
 
 
Since the syntax is not backwards compatible (in particular, [#f00] does something different now), the wholesale replacement of {{tl|diagram}} is difficult. If it is not replaced entirely then diagrams will continue to be created using the previous template (since people tend to copy what they see on a page). [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 12:13, 24 July 2014 (UTC)
 
Since the syntax is not backwards compatible (in particular, [#f00] does something different now), the wholesale replacement of {{tl|diagram}} is difficult. If it is not replaced entirely then diagrams will continue to be created using the previous template (since people tend to copy what they see on a page). [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 12:13, 24 July 2014 (UTC)
:I've been planning to add an option to support the old color-code system (once I rewrite the parser so it's not a pain to do this :) ), which will allow {{tl|diagram}} to use &lt;diagram> internally. (Performance is a little slower with &lt;diagram>, from what I've noticed, so I'd also like to hold off on changing everything until I can improve that.) &mdash;[[User:Lethosor|<span style="color:#074">Lethosor</span>]] ([[User talk:Lethosor|<span style="color:#092">talk</span>]]) 02:46, 27 July 2014 (UTC)
 
  
 
It is too complicated. The purpose of {{tl|diagram}} is to have a diagramming system that's so easy anyone can use it without having to read documentation. Proper use should be clear from just seeing it used. The z-levels and variables are neat features, but they compromise this purpose. [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 12:13, 24 July 2014 (UTC)
 
It is too complicated. The purpose of {{tl|diagram}} is to have a diagramming system that's so easy anyone can use it without having to read documentation. Proper use should be clear from just seeing it used. The z-levels and variables are neat features, but they compromise this purpose. [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 12:13, 24 July 2014 (UTC)
:Z-levels and variables are optional - I find them helpful to avoid extra typing (with repeated rows, for example), but the old "one character per tile" method should still work. &mdash;[[User:Lethosor|<span style="color:#074">Lethosor</span>]] ([[User talk:Lethosor|<span style="color:#092">talk</span>]]) 02:46, 27 July 2014 (UTC)
 
::Other editors need to be able to easily understand and edit what was written. We have a lot of opaque things on this wiki that make it difficult for people to contribute (admittedly, some of that is my fault), but they are partitioned off (to an extent). What worries me is that the extra features will become a vector for these "barriers of complexity" to get mixed in with ordinary pages. Diagrams get into all sorts of places (and with these better looking diagrams, likely more so). I think that new editing primitives need to be really important to justify their existence. The lack of variables can be worked around by unpacking them; the unpacked version will be easier for strangers to read and edit. I suggest using [http://www.regexr.com/ regexr] or a similar tool to replace the variables automatically if you're working on something large. [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 03:47, 27 July 2014 (UTC)
 
  
 
It has hotkeys. The only people that are going learn the hotkeys are people who read the documentation. The end product is something that looks like an image, so most visitors will interact with it as if it was an image. So multiple z-level diagrams effectively become systems for tricking editors into thinking they've delivered more information than they actually have. [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 12:13, 24 July 2014 (UTC)
 
It has hotkeys. The only people that are going learn the hotkeys are people who read the documentation. The end product is something that looks like an image, so most visitors will interact with it as if it was an image. So multiple z-level diagrams effectively become systems for tricking editors into thinking they've delivered more information than they actually have. [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 12:13, 24 July 2014 (UTC)
:True. I'll look into adding more controls to make it more obvious. (Keyboard controls are also problematic in mobile browsers, so an alternative method would be nice.) &mdash;[[User:Lethosor|<span style="color:#074">Lethosor</span>]] ([[User talk:Lethosor|<span style="color:#092">talk</span>]]) 02:46, 27 July 2014 (UTC)
 
  
 
Since this is no longer a template, [[Special:WhatLinksHere]] can no longer be used to inspect (and possibly correct) the usage. Since the complexity has increased there is a greater need to be able to do this. [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 12:13, 24 July 2014 (UTC)
 
Since this is no longer a template, [[Special:WhatLinksHere]] can no longer be used to inspect (and possibly correct) the usage. Since the complexity has increased there is a greater need to be able to do this. [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 12:13, 24 July 2014 (UTC)
:If you're looking for a list of all pages using diagrams, automatically categorizing them should be fairly easy (possibly using a hidden category to avoid clutter). &mdash;[[User:Lethosor|<span style="color:#074">Lethosor</span>]] ([[User talk:Lethosor|<span style="color:#092">talk</span>]]) 02:46, 27 July 2014 (UTC)
 
  
 
{{tl|RT}} still exists, and its use is still being encouraged. Nobody should have to go through that. ): [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 12:13, 24 July 2014 (UTC)
 
{{tl|RT}} still exists, and its use is still being encouraged. Nobody should have to go through that. ): [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 12:13, 24 July 2014 (UTC)
:I'm assuming you're referring to [[DF:Community portal]] - I think it works well for single-tile diagrams, but feel free to change that part if you feel it's inaccurate. &mdash;[[User:Lethosor|<span style="color:#074">Lethosor</span>]] ([[User talk:Lethosor|<span style="color:#092">talk</span>]]) 02:46, 27 July 2014 (UTC)
 
::I thought I saw a message that suggests using RT or &lt;diagram&gt; show up during editing, but now I can't remember what triggered it. [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 03:47, 27 July 2014 (UTC)
 
 
It seems your extension runs before the template substitution code. This prevents the use of &lt;diagram&gt; for infobox pictures. (ex: {{{1|a}}} <diagram>{{{1|a}}}</diagram>) [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 19:36, 26 July 2014 (UTC)
 
:This is how all parser extension tags work - you can work around this with <nowiki>{{#tag:diagram| {{{1|a}}} }}</nowiki>. &mdash;[[User:Lethosor|<span style="color:#074">Lethosor</span>]] ([[User talk:Lethosor|<span style="color:#092">talk</span>]]) 02:46, 27 July 2014 (UTC)
 
::In that case, we can replace {{tl|diagram}} with <nowiki>{{#tag:diagram|{{{1}}}}}</nowiki> as soon as the syntax is compatible. If this is what's going to happen, I think we should keep the template call as the suggested way to access it. [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 03:47, 27 July 2014 (UTC)
 
 
 
==== A (slightly ambitious) feature wishlist ====
 
==== A (slightly ambitious) feature wishlist ====
  
Line 33: Line 19:
  
 
* It should render as a single image. This makes it possible for people to download it and use it outside the wiki.
 
* It should render as a single image. This makes it possible for people to download it and use it outside the wiki.
::(It seems it's possible to enable saving a canvas element as a png ([http://www.nihilogic.dk/labs/canvas2image/ example]). This one looks like low hanging fruit [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 23:09, 25 July 2014 (UTC)  )
+
 
:::Oh! It's possible to save them as pngs already, but some sort of text is capturing the right click and preventing it. [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 19:39, 26 July 2014 (UTC)
 
::::Thoughts: currently, the image is being drawn on a canvas, which is javascript reliant. How difficult would it be to instead generate the image in php? Then it won't matter if people have javascript enabled or not. [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 03:57, 27 July 2014 (UTC)
 
:::::It falls back to an HTML table if JavaScript is disabled (similar to the diagram template). I'm planning on adding export options eventually - some browsers might allow saving directly as an image, but it sounds like the textarea used for input detection is preventing this. &mdash;[[User:Lethosor|<span style="color:#074">Lethosor</span>]] ([[User talk:Lethosor|<span style="color:#092">talk</span>]]) 13:29, 27 July 2014 (UTC)
 
 
:* The image should be indistinguishable from a DF screenshot (it looks like you've already got a handle on this part).
 
:* The image should be indistinguishable from a DF screenshot (it looks like you've already got a handle on this part).
  
Line 44: Line 27:
  
 
:* It should be possible to make the choice of tileset persist across the wiki as an account setting, a user script, a cookie, or something else.
 
:* It should be possible to make the choice of tileset persist across the wiki as an account setting, a user script, a cookie, or something else.
::*Planned (there should already be a "Diagrams" tab in your preferences). A setting for individual diagrams would be useful as well. &mdash;[[User:Lethosor|<span style="color:#074">Lethosor</span>]] ([[User talk:Lethosor|<span style="color:#092">talk</span>]]) 13:29, 27 July 2014 (UTC)
+
 
 
::* This setting should also be transferable through URL variables, so that it is possible to link to a specific page displayed with a specific tileset.
 
::* This setting should also be transferable through URL variables, so that it is possible to link to a specific page displayed with a specific tileset.
  
Line 60: Line 43:
  
 
What do you think? [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 12:13, 24 July 2014 (UTC), [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 15:01, 24 July 2014 (UTC)
 
What do you think? [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 12:13, 24 July 2014 (UTC), [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 15:01, 24 July 2014 (UTC)
 
== Basic tileset support ==
 
 
Has this arrived? The only call to Tileset.Font.loadFromURL seems to be [https://github.com/lethosor/DFDiagram/blob/bb5229893ae4ee5de61b356d7bf8fd5743b5efb0/modules/ext.DFDiagram.js here], using <code>../extensions/DFDiagram/resources/8x12.png</code>. [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 22:53, 25 July 2014 (UTC)
 

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Please sign comments with ~~~~

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)

Templates used on this page: