Wiki Downtime / Change Your Passwords!
This notice may be cached—the current version can be found here.

User talk:Lethosor/archive2

From Dwarf Fortress Wiki
Jump to: navigation, search
Archive This is an archive of old discussions. Please do not edit this page – instead, add new comments to the current talk page.

Contents

[edit] Raw ripping

Several questions about things I'd like to implement (check my userpage for current progress):

  • Don't those fancy scripts increase traffic cost and such?
  • Bulk upload images for workshops, doable?
  • I'm currently working on images-from-raws script. Is it possible to use actual graphic tiles?
  • In perspective, script should take every possible information from raws. For workshops it would be: keybind, components, profession, size, reactions, maybe even input and output. Which as well opens the way for such a glorious implementations as: workshop of profession list, output/input to workshop list, workhop|keybind|components table etc. With less possible tedious editing required. Any thoughts on the matter? --Asva (talk) 12:45, 7 September 2013 (UTC)
> Don't those fancy scripts increase traffic cost and such?
They do increase the time it takes to generate pages, especially if they pull a lot of raws from the server. Fortunately, they're usually cached once they're generated, so it doesn't have too much of an impact on the server. However, you should avoid including extremely large raws - Masterwork:Golem is an example of this.
> Bulk upload images for workshops, doable?
It would be hard. There are some file upload extensions on MediaWiki, but nearly all of them are unstable. There's a PHP script that can accomplish this, if you have access to the server (which I don't). Also, there's the possibility that images might change, which would require re-uploading some of them.
> I'm currently working on images-from-raws script. Is it possible to use actual graphic tiles?
Tilesets are much easier than graphics sets, since graphics sets require looking up information about each image. I've managed to make an extension that can display images with tilesets in-browser (with JavaScript), so that's definitely possible. Using the MDF tilesets would take more effort, since they use transparency, but it shouldn't be too hard (assuming I can figure out the composition algorithms).
> In perspective, script should take every possible information from raws. For workshops it would be: keybind, components, profession, size, reactions, maybe even input and output. Which as well opens the way for such a glorious implementations as: workshop of profession list, output/input to workshop list, workhop|keybind|components table etc. With less possible tedious editing required. Any thoughts on the matter?
This sounds like it would be really useful, but I haven't figured out a way to do it yet (wiki syntax is challenging, especially once you start nesting 20+ templates). It should be possible, though, as long as all of the information is in the raws somewhere (it's easiest if it's all in the same file, since DFRawFunctions only works with one file at a time).
Actually, maybe something like this could be used to generate images for workshops, instead of uploading pictures of every one. It would be really nice to reduce the amount of template editing needed to supply basic information about workshops (and other types of pages, like iron.)
So, in summary, extracting more information from the raws is possible. It would be hard, especially once you try formatting it, but it's definitely possible.
--Lethosor (talk) 14:27, 7 September 2013 (UTC)

> you should avoid including extremely large raws
Hm, that may be troublematic. In worst case it's possible to make shorter versions of raws.
> used to generate images for workshops
Currently working on that :P. Included Template:Tile and such in script to avoid long long nesty template chains. Function takes workshop TILE values, transforms them into UTF-8 code, and presents neatly. Shall add coloring in nearest future.--Asva (talk) 14:48, 7 September 2013 (UTC)

  • BTW, how do you make mediawiki show &#x263A -like unicode symbols?
☺ (☺) works for me. Are you using a template? Some templates, like {{diagram}}, process individual characters (&, #, ... ;) before the browser can process them as entities (&#...;). --Lethosor (talk) 15:11, 7 September 2013 (UTC)
  • Padding issue. With no way to insert line breaks from template, I get either this or that. Any way around you possibly know?
Nevermind, did it by xHTML. Script is fully operational and ready for testing.
Personally, I prefer using actual HTML tags (<table>, <td>, etc.) over MediaWiki tables for this reason, since they don't need newlines, but it looks like you got it working. Nice work! --Lethosor (talk) 15:15, 8 September 2013 (UTC)
  • Here is another problem. Table works fine in most cases. But when borders are missing (check incomplete building), the alignment messes up true location of tiles. Any helpful ideas, by chance? Here is the table config I use: <table cellpadding="0" cellspacing="0" style="font-size:150%; font-family: 'Courier New', 'Quicktype Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', 'Lucida Sans Typewriter', monospace; font-weight:bold">
The source code (wikitext) would make it easier for me to test it on my own. From my experiences with {{Diagram}}, though, it looks like each <td> element requires some CSS as well. --Lethosor (talk) 23:36, 13 September 2013 (UTC)
    
    
ò 
   
 
ò 
The source code is nothing but html... But oh, well.
I managed to fix those empty spaces. What I did is just exchanged tile "32" from conversion table with no-break space (&#160;).
Though, I still can't fiqure the way to get rid of borders at top and bottom of tiles.
  • On a different matter. Played a bit with tilesets. Seems, no javascript is required:

Arrow:

Phoebus 16x16.png

Bush:

Phoebus 16x16.png

Something:

Phoebus 16x16.png

2,3,1:

Phoebus 16x16.png

Phoebus 16x16.png
Phoebus 16x16.png

Though the padding is a bit weird. Somewhy for "arrow" and "2" it is not dividable by 16. --Asva (talk) 11:06, 14 September 2013 (UTC)

  • I'm almost done. Here's the result. And that's how it looks after I save the page =.=. Same syntax as before. --Asva (talk) 14:28, 14 September 2013 (UTC)

Wow, nice work. A few things I've noticed about the tiles, though - they don't seem to support non-square tilesets or different foreground colors. :( Personally, I'd prefer to use JavaScript for this (assuming I can get transparency to work) but the CSS works a lot better than I expected.

(And by the way, the "Close" button at the bottom of the pull request is probably what you're looking for.) --Lethosor (talk) 17:44, 14 September 2013 (UTC)

> support non-square tilesets
Probably fixaeble. Non square big tiles can be squarified. That will make messy code even messier...
Foreground colors? You mean, for monochrome tilesets? I don't think supporting these would be of any merit. For workshop articles, ascii and graphic tiles are plenty. Only implementation - would be tricky option, allowing any user to chose his favorite tileset from list.
Surely, clean javascript would suit much better.
PS Thanks for github editing and supportive information. --Asva (talk) 18:41, 14 September 2013 (UTC)
I was referring to the text color - for example, the background color of the numbers above (2,3,1) can easily be changed to red, green, and blue, but the colors of the numbers themselves are still white (I'm not even sure if it's possible to do this in CSS, although it could be). You're probably right about workshops not needing them, though.
> allowing any user to chose his favorite tileset from list
Definitely possible with an extension (could be added in Special:Preferences somewhere, for example), although it would require at least some JS to modify the CSS appropriately. --Lethosor (talk) 19:05, 14 September 2013 (UTC)
I'm talking about graphics sets. You can't possibly change color without turning them into monochrome+alpha. Which is weird and probably bothersome.
While for tilesets the idea is valid.
  • While working on items I encountered tags like FIRE_BUILD_SAFE, NEEDS_MAGMA, WORTHLESS_STONE_ONLY. Don't you have an idea, how those can be put in workshop or item template without taking too much space?
  • About huge tables (f.e. workshop | buildmat | tiled image | build profession). Is it possible to make them editable only by your bot? Like, simply update once new version arrives? Otherwise large tables may hurt server costs.


Hi. I remade the previous script a bit. Now it uses global array of objects. Which means, to get any output you'll have to (pseudocode warning):

  • {{load files}}
  • {{process files}}
  • {{output files}}

Beforehead, I passed all data for every function just to avoid excessive file loading. Was hectic, hard to debug, hard to process. As for now, stuff seems much brighter. For instance, I can make {{show me errors}} wiki template without much ado.

So, back to globals, is it a good idea (safety-wise)? Won't it break something?

BTW, I decided on quietust's functionality. I'll left it intact. Won't touch a thing. I'll use only one parser template, which is {{#df:}}. Approved, sir?--Asva (talk) 19:18, 17 October 2013 (UTC)

[edit] ArticleVersion bug?

The updated ArticleVersion template seems to believe Dwarf Fortress Italia is in the 40d namespace. --Loci (talk) 19:48, 21 October 2013 (UTC)

That's because there was a redirect created when I moved 40d:Dwarf Fortress Italia to the main namespace. I don't know of any way to resolve redirects from a template, so I just removed {{av}} from the article altogether. --Lethosor (talk) 20:21, 21 October 2013 (UTC)

[edit] New Push Page

Hey man I wanted to create a page about the default "push" attack creatures have, as its not always clear what that attack is. I thought I'd put some concrete into about it and a list of creatures that use it by default. I made the page and added content, but I really have no idea what I'm doing such as how to add that version box for what version of DF its for how to add it to the df2012 namespace...whatever namespace is. And how to see a list of categories. Internal links to creatures also will not work. I thought creating a page would be easy, apparently not.

Also is it ok to link to things like my Amazon Writing profile on my talk page? I just wanted to put something about me there and what I do.

Thanks. Hope you're liking my edits.

http://dwarffortresswiki.org/index.php/Push

I took care of the namespace and link problems - you just add "DF2012:" to the beginning of the title to create a page in the DF2012 namespace. The link issue was a result of capitalization - MediaWiki treats the entire article title as case-sensitive except for the first letter.
Anyway, putting up links to your other profiles on your user page is fine with me (as long as they're not super-promotional or inappropriate), and some other users have done things like that too. --Lethosor (talk) 20:14, 28 October 2013 (UTC)

Great, thanks for fixing it. I didn't realize it was that easy. and i didn't know about the case sensitive thing either I'll keep that in mind.

And thank you I will then. I've done plenty of writing :) Proudnerd (talk) 00:11, 29 October 2013 (UTC)

[edit] Rating script bug

It appears the new rating script is stripping returns when it rearranges ArticleVersion templates (example). This can lead to page layout problems. Can you revise the rating script to retain the returns?--Loci (talk) 19:53, 30 October 2013 (UTC)

I did manage to fix the second example you listed in the script with a recent update, which was caused by accidentally retaining spaces (see this edit), but I'll try to make it work with the source code better. Thanks for pointing out the first example, too – I hadn't thought of that as a possibility. --Lethosor (talk) 20:04, 30 October 2013 (UTC)
Just to point out, your test didn't have any spaces after the {{av}} template. But, beyond spaces, a number of special characters (such as ":") could probably still cause problems if they end up attached to the beginning of a paragraph. You could probably just add an extra return after the av template line to prevent most problems.--Loci (talk) 20:17, 30 October 2013 (UTC)
The rating script is apparently still stripping newlines: Native aluminum Bismuthinite. --Loci (talk) 15:27, 9 November 2013 (UTC)
This should be fixed now. (I actually fixed this about an hour ago, but I didn't save the fix to the branch used on this wiki -_-) This wiki automatically fetches updates for the rating script, so it should probably be updated in an hour or less (the new version that should appear on Special:Version is 1.0.2). --Lethosor (talk) 18:13, 9 November 2013 (UTC)
Thanks! ...But now the script is inserting an extra newline each time the page is rated [1]. This may lead to content creeping down the page until the newlines are manually removed. Is it possible to only add newlines when rearranging the page templates? --Loci (talk) 20:53, 14 November 2013 (UTC)
Wow, thanks for noticing that! Right now the {{quality}} replacement is using a single regex, and I fixed the last problem by changing \s to a space. Apparently I forgot that this was the reason it included newlines in the first place. I'll fix this when I can (hopefully in the next couple of days). --Lethosor (talk) 21:14, 14 November 2013 (UTC)

I've also noticed that the rating script tab appears at the top of pages that it shouldn't, such as Special:RecentChanges. That's a pretty minor bug, but if you're changing it anyway and it's easy to fix... --Loci (talk) 18:28, 16 November 2013 (UTC)

I can definitely get that done. The only reason I hadn't was because I didn't want to create future issues with new namespaces, but that's no longer an issue since I made the script into an extension. I'm probably going to implement this as a system message (and maybe a preferences option as well). Hopefully I can get to these things today or tomorrow. --Lethosor (talk) 18:39, 16 November 2013 (UTC)
This part is done (v1.0.3): see Mediawiki:rater-enable-ns and Mediawiki:rater-disable-ns (which specify a list of namespaces to enable/disable rating). Other namespaces still allow the rating to be viewed, but not saved (which is really only useful for testing purposes). --Lethosor (talk) 22:26, 20 November 2013 (UTC)
And I've fixed the issues with whitespace, as far as I can tell. The only one that wasn't resolvable was
{{av}} {{quality...}} content
which is changed to:
{{quality...}}
{{av}}content
(this doesn't cause any layout problems, and the source doesn't appear any worse than it was before). The recent edits I made to DF2012:Native aluminum were using an older version of the script – the current version works fine. (I've also added a debug mode, so I can test the script on the Sandbox in the future instead of messing with content pages.) --Lethosor (talk) 01:28, 22 November 2013 (UTC)

[edit] Creature template problem

Creature pages for untamable egg-laying creatures (like raven men) currently show them producing food products. Untamed egg-laying creatures don't actually produce eggs in this version (and probably wouldn't willingly hand them over to a hungry dwarf even if they did). The template probably needs to check that the creature has [PET] or [PET_EXOTIC]. --Loci (talk) 20:22, 20 November 2013 (UTC)

Fixed (it now checks for [PET] and [PET_EXOTIC]). --Lethosor (talk) 22:20, 20 November 2013 (UTC)

[edit] Bot tests

Testing on Python 3.4.0b1 --LethosorBot (talk | Lethosor | talk) 19:08, 8 December 2013 (UTC)

Testing on Python 2.7.5 --LethosorBot (talk | Lethosor | talk) 19:11, 8 December 2013 (UTC)


Testing on Python 3.4.0b3 --LethosorBot (Lethosor | talk) 19:54, 27 January 2014 (UTC)

[edit] Spammer

Anon 125.39.106.149 was vandalizing this page. Undone, just saying so you can go on blocking xD
Latias1290Talk10:01January 12, 2014

[edit] D for Dwarf

Lethosor, as you have seen recently, I have been doing some D for Dwarf parts of pages. Well, I would like to know somethings about what I can and can't do, it would help me. unsigned comment by Sbcc

Personally, I don't really care too much about the content of D for Dwarf sections as long as they're appropriate. The section Quietust removed on sponge man seemed appropriate enough to me – I suspect he may have removed it because someone else had recently removed another Spongebob reference, deeming it "unneeded" [2]. In this case, you should probably discuss it on the talk page and/or ask Quietust why he reverted your edits.
About what you "can and can't do" - we don't really have specific rules about that, as long as it's reasonably related to the article's topic (and appropriate). If you're interested in finding examples, this category lists all pages using {{D for Dwarf}}, which may be useful. —Lethosor (talk) 20:10, 30 January 2014 (UTC)

Thank you, it helped alot, ya I will ask him, thank you so much also you do alot of great stuff here, so that's why I asked you.

[edit] A page for amount of food, and how long it will keep a fortress alive

Im wondering if you can make a page for food amount and how long a fortress will be able to run on say food amount. It would be helpful, and I would make it if I knew how to make templates. Anyways, could you please help, if there is such a page that would really help to knpw where it is. Thank You ~ sincerely, Sbcc.

It was on the Farming FAQ. The page is called How large a farm do i need. Not really a template per se but it gets the job done.--Doktoro Reichard (talk) 05:55, 1 February 2014 (UTC)

Thank you, ive been looking for one soni can refrence things.

[edit] Raw adamantine wikipedia page

I do not understand the stonelookup template or the way infoboxes work on this wiki in the slightiest, so would you mind removing the wikipedia link that appears on the infoboxes on the Raw adamantine page? Latias1290Talk17:53February 10, 2014

Done. (Most "lookup" templates like {{stonelookup}} use "|wiki=no" to turn off the Wikipedia link). —Lethosor (talk) 19:49, 10 February 2014 (UTC)
I redirected it to the appropriate wikipedia page.--Loci (talk) 20:37, 10 February 2014 (UTC)

[edit] On bots

Have you thought about changing captcha to this one http://www.mediawiki.org/wiki/Extension:ConfirmEdit#QuestyCaptcha or Asirra? Recent changes looks ugly with these bots. --Njals (talk) 10:41, 13 February 2014 (UTC)

Yeah, I know the recent changes list is really cluttered. QuestyCaptcha has proved to be way too easy for the spammers to figure out, but ReCaptcha currently stops most of them (we actually get thousands of attempts a day, and only 15-30 get through). I have made a new, experimental captcha that will hopefully stop the remaining spammers from getting through the registration form – Briess hasn't been able to deploy it for a while, but it should be up when he gets a chance. —Lethosor (talk) 20:46, 13 February 2014 (UTC)

I am having trouble with the account creation. I am attempting to create an account under the username Danthebur. I keep getting the enter a token error even though i copied the token and my username the message directed my to post on this page. if this is not the right place please forgive me and direct me to the right place.

[edit] Batch-deleting unneeded redirects

Your batch-deletion seems to have included a number of presumably-useful redirects to old versions like Underground river, Torture, Video tutorials, etc.; a number of not-equivalently-named FAQ redirects like What should I build first, What's the easiest way to check dwarves happiness, etc.; and a number of improperly-capitalized redirects like Weapon Trap, Wood Furnace, etc.--Loci (talk) 19:12, 21 April 2014 (UTC)

I wasn't aware that any pages actually linked to the mainspace pages that got deleted, which is why I let them pass (none of the ones I checked were linked to). From the ones you listed, What's the easiest way to check dwarves happiness redirected to cv:What's the easiest way to check dwarves happiness, which is why it got deleted (I just fixed that one). I was doing a case-insensitive check to handle CV/cv correctly, which is why the capitalized pages got deleted - Weapon Trap doesn't have any links to it (except this page), but a couple of the others do. If you have a list of them, I can send a bot around to recreate them (I don't know of an easy way to generate a list of them with a bot); otherwise, I can make a list myself when I get a chance. —Lethosor (talk) 19:29, 21 April 2014 (UTC)
Actually, I could probably make the extension case-insensitive, making the capitalized redirects obsolete. That might be easier to handle than sending a bot around. I can also make it check older namespaces (e.g. checking cv, then v0.31, then 40d, etc.). Thoughts? —Lethosor (talk) 19:32, 21 April 2014 (UTC)
Well, that's the idea behind Special:WantedPages; unfortunately it's currently full of non-existant Masterwork pages, making it less than useful. Even if a main-space redirect wasn't linked, it supported the intelligent search function. A search for underground river used to bring up the 40d page automatically; now it just returns the search results.--Loci (talk) 19:50, 22 April 2014 (UTC)
Fixed. All of the above links work now, and I can't find any in the deletion log that don't work either. —Lethosor (talk) 23:45, 22 April 2014 (UTC)
More links than I expected seem to have been affected - Masons guild, for example, now redirects to 40d:guild despite it existing and redirecting to the more appropriate 23a page. I'm pretty sure I know what's causing it, and I hope to deploy a fix for it as soon as I can. —Lethosor (talk) 10:57, 23 April 2014 (UTC)
Fixed. —Lethosor (talk) 18:35, 23 April 2014 (UTC)
Most of the redirects appear to work now, but the FAQ page still includes a number of red links which were previously redirected to the correct articles. Some pages also include links to other FAQ-like pages that appear to be broken, but unfortunately they're not conveniently available on a single page.--Loci (talk) 19:01, 23 April 2014 (UTC)
I don't see any broken links on FAQ except for How much protection does wood armor provide?, which I can't find in any namespace. How do I assign tasks specifically to dwarves doesn't have any, as far as I can tell. It could be that the broken links are still cached–try purging the cache and see if that changes anything. —Lethosor (talk) 20:32, 23 April 2014 (UTC)
Hmmm... must've just been cached; a null-edit got rid of the red links.--Loci (talk) 23:52, 23 April 2014 (UTC)

[edit] Redirects, again

"still need to delete redirects explicitly pointing to versioned/older namespaces"

Please don't. I know you've updated your plugin to automatically redirect to older versions, but it doesn't mesh well with all the older versions. For instance, cave river was a feature in 23a only, and the mainspace redirect correctly links to this version. 40d also has a page "cave river", which is a redirect to "underground river", the replacement feature in the 3D version. 23a "underground river", meanwhile, is a redirect to "cave river". These pages were created to make the version template link backwards and forwards to related features in each version. If you delete the mainspace redirect for "cave river", it will automatically link to "underground river" unless you go through and delete the helper redirects too. I'm pretty sure this isn't the only case where an automatic redirect would end up at the wrong version/page. A few mainspace redirects to older versions are not a problem, and I'd rather not see things broken in an attempt to "fix" them.--Loci (talk) 19:06, 28 April 2014 (UTC)

Yeah, I forgot about those. Guess I'll leave them alone.
Regarding File:DF-Diagrams.png: This is because Mediawiki insists on loading extension CSS with Javascript, so disabling Javascript means that the corresponding CSS doesn't get loaded either. I'll see if I can find a way to force it to load the CSS anyway (I might end up just using inline CSS like {{diagram}}). —Lethosor (talk) 19:15, 28 April 2014 (UTC)
Found a fix (I think): [3]Lethosor (talk) 19:20, 28 April 2014 (UTC)

[edit] New Diagrams

Your new diagrams don't appear correctly on my computer:

DF-Diagrams.png

new diagram vs. old diagram at DF2012:Quickstart_guide#Mining_safety


DFW-Diagram.png

example from Dwarf_Fortress_Wiki:Diagram


Can we get a fall-back to the old way if javascript is unsupported or disabled?--Loci (talk) 19:16, 28 April 2014 (UTC)

This should be fixed now. Can you let me know if it works for you? (You might need to clear your browser's cache first). —Lethosor (talk) 19:31, 28 April 2014 (UTC)
Much better. Thanks! --Loci (talk) 19:35, 28 April 2014 (UTC)
Okay, apparently that broke ResourceLoader (user JS doesn't work now). I have no idea why, but I'm currently looking for a way to fix it (this server doesn't display any warning/log messages any more, so debugging is a lot of fun). —Lethosor (talk) 19:39, 28 April 2014 (UTC)
Er... that may have been because I disabled Javascript to test the extension. Never mind. —Lethosor (talk) 19:45, 28 April 2014 (UTC)

[edit] Can't create an account

Hi. I'm triying to create an account in the wiki but it seems impossible to me. I'm filling all the form fields, recacpcha and generating my username token in the page given but it does not work :( What am i doing wrong? Are the create accounts open? Thanks :)

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox
Advertisement