User talk:Klexur: Difference between revisions

From The Urban Dead Wiki
Jump to navigationJump to search
Line 104: Line 104:
:[[User:Peralta|-- Johnny Twotoes]] 20:37, 31 July 2012 (BST)
:[[User:Peralta|-- Johnny Twotoes]] 20:37, 31 July 2012 (BST)
::That is basically and If Then statement. If "00" is defined as a variable, then use "00color" as the color, if not use "bgcolor". --{{User:Klexur/Signature}} 20:42, 31 July 2012 (BST)
::That is basically and If Then statement. If "00" is defined as a variable, then use "00color" as the color, if not use "bgcolor". --{{User:Klexur/Signature}} 20:42, 31 July 2012 (BST)
::: I see, making sense again :) Thanks! [[User:Peralta|-- Johnny Twotoes]]

Revision as of 19:44, 31 July 2012

+
Don't forget to close the Subject field with }}.

General

Thanks for the feedback on extensions! I'll see if I can take a look or at least prod the people responsible. (I make no promises. Shifty >_> <_<)

Also, welcome to the wiki! Happy If you need anything, feel free to give me or one of the other active lot a nudge. ᚱᛁᚹᛖᚾ 05:48, 28 April 2012 (BST)

Thanks for the welcome. I've noted some things on the External Links page. Mostly pointing out broken links or updated old ones. --Klexur 20:31, 19 June 2012 (BST)


Someone who does userscripts? I have a feeling I'm gonna like you. :) Aichon 23:02, 22 June 2012 (BST)

Haha, thanks. I'm still fairly new to making userscripts, but why do you not want me looking at your early ones? I might learn something. =P --Klexur 01:58, 23 June 2012 (BST)
About all you'd learn is what not to do. :P I rewrote one or two of them later on, and I was able to reduce the code by as much as 90% while making it both clearer and more efficient. I have no doubt that there are hundreds of examples of shoddy code still in my userscripts, since I was brand new to making them when I started making them for UD. Aichon 05:40, 23 June 2012 (BST)

UD PK Reporter/Private

Nice PK reporting scripts. I noticed that when you use private PK Reporter, your AP, HP and Inventory remain hidden in the game screen after the witness is taken. They come back after a refresh but was just wandering if that is just the way it is or some other way around it. Only down side is that refreshing the map takes IP hits. ~Vsig.png 03:52, 23 June 2012 (UTC)

Nice catch, I actually just wrote that an hour ago. I'll see about replacing the values after submitting to Dumbwit. --Klexur 03:59, 23 June 2012 (BST)
That would be good. It's not thaaaat big of a deal. There is another issue, though. If this script is enabled and you perform a regular dumwit, it will still open a window to report to RG. Nice if that all you intend to use dumwit for but not so nice if you just want to post the wit somewhere else. I'm going to keep the script and just enable it when I want to make an RG report (it really does take a lot of work out of it). If you end up updating the script, though, please let me know. Thanks. ~Vsig.png 04:56, 23 June 2012 (UTC)

What about the players who like to hold onto reports for a few days before submitting them? RG has a two week deadline to submit PK reports. --•▬ ▬••▬ • •••• •▬ ▬•▬• ▬•▬ #nerftemplatedsigs 06:52, 23 June 2012 (BST)

What about them? =P I'll be making another version which will only hide HP, AP, and Inventory then make the Dumbwit report. It won't automatically submit it to RG. --Klexur 16:30, 23 June 2012 (BST)
What about those using Aichon's Barrista, which turns the HP/AP stuff into a bar at the top left of the page? --•▬ ▬••▬ • •••• •▬ ▬•▬• ▬•▬ #nerftemplatedsigs 18:07, 23 June 2012 (BST)
He would have to specifically code it to remove the numbers from Barrista, which shouldn't be too bad with some simple XPath code, given that Barrista's structure for that portion never changes, meaning he wouldn't need to consider any edge cases. Aichon 19:08, 23 June 2012 (BST)

Updated for Aichon's new Barrista. --Klexur 06:48, 29 June 2012 (BST)

UD Map Skinner

For some reason its not displaying cathedral skins. An oversight, or a lack of images from the original incarnation? --Rosslessness 13:57, 23 June 2012 (BST)

UDTool never had skins for cathedrals. I think the Zookeepers' map skins are just a bit better, although it breaks a few of Aichon's scripts... --•▬ ▬••▬ • •••• •▬ ▬•▬• ▬•▬ #nerftemplatedsigs 14:04, 23 June 2012 (BST)
That's correct, there were not images for cathedrals. I could make a version with the Zookeepers' images if you locate them for me. --Klexur 16:30, 23 June 2012 (BST)
It's one of Ray3K's scripts. --•▬ ▬••▬ • •••• •▬ ▬•▬• ▬•▬ #nerftemplatedsigs 18:09, 23 June 2012 (BST)
Ah, right. Is he even still active? --Klexur 19:17, 23 June 2012 (BST)
I really don't know. You'll have to check in with the Zookeepers on that. All I know is his map skins script breaks sone of Aichon's stuff. --•▬ ▬••▬ • •••• •▬ ▬•▬• ▬•▬ #nerftemplatedsigs 21:18, 23 June 2012 (BST)
Which stuff of mine breaks? I might be able to look into making my stuff more robust for some of that. Aichon 21:58, 23 June 2012 (BST)
Honestly? I don't even remember. It's been a while since I had Ray's script installed. But I know it broke something. Just can't remember what. But it was definitely one of your scripts, Aich. --•▬ ▬••▬ • •••• •▬ ▬•▬• ▬•▬ #nerftemplatedsigs 23:04, 23 June 2012 (BST)
Sounds like you're sure but not sure. --Klexur 04:54, 24 June 2012 (BST)

UD Dumbwit Privacy

Okay, for those that would like to have their HP, AP, and Inventory hidden before a Dumbwit report and restored after, try this. If you try it, please give feedback.

Side note for Aichon: If you would give the Barrista items IDs it would have made this infinitely easier! =P --Klexur 05:06, 24 June 2012 (BST)

That was actually the VERY first thing I checked when Axe mentioned it, since I did give some of them classes so that they could be manipulated using some of the CSS-altering userscripts out there. Unfortunately, I didn't give any of them IDs. Keep poking me about this if I don't post an updated version of it in the next few days. Aichon 05:13, 24 June 2012 (BST)
Poke =P --Klexur 19:00, 26 June 2012 (BST)
You may need to keep poking me. I'm busy with a few random things after work this week, which may continue to distract me, though there's more than enough time to fix it if I actually remember to do so. Aichon 19:13, 26 June 2012 (BST)
hop too it. i would like this to work with barrista.--User:Sexualharrison22:19, 26 June 2012
I haven't returned home yet for the day, so I can't exactly hop to it. :P As a note to Klexur, I'll give the four objects you're grabbing the IDs "barristahptext", "barristaaptext", "barristahpbar", and "barristaapbar". That should let you code it in advance of whenever I get around to fixing things on my end, which will save your users the hassle of updating two userscripts later. Aichon 22:44, 26 June 2012 (BST)
You know, Aichon, you really wouldn't need to add the IDs. I know I'm late in saying that but my script works perfectly fine without them. I just had some trouble getting the XPaths right (I'm new to them) when I was coding it. =S --Klexur 18:51, 28 June 2012 (BST)
Of this I am aware, but there are a few good reasons to do so anyway:
  1. It allows others to script for them too
  2. Future changes to Barrista won't break your script
  3. Future changes to the game won't break your script
  4. You need to change your code anyway (more on that in next edit)
Mainly I'm concerned with #2 and #3. While your current XPath does work, the fact that it's so explicit while using very generic elements means that it's very likely to break at the slightest tweak either to the game or Barrista. Aichon 20:26, 28 June 2012 (BST)

In glancing at your code, I noticed that it has the potential for a few issues. I don't think they're actually causing any problems, but I thought I'd point them out in case you're interested:

  1. When you're checking to see if Barrista exists, using .snapshotitem(0) at the end of the line will throw exceptions when no snapshotitems are returned (as would be the case when Barrista exists). Admittedly, it's a bad practice still found in some of my userscripts, but the better way to handle it is to not use .snapshotitem(0) until you know that an item exists, and instead use .snapshotLength > 0 in your if statement to check for them. That issue is in a few places.
  2. If you want to check for Barrista, it'd be better if you checked for it, rather than checking for the lack of something it removes, since other userscripts may remove the gt div as well. I'll add a "barrista" id for the outermost barrista div when I make my changes, that way it's easier to check for.
  3. When you try to grab HP from Barrista, you have "//" in the XPath code, which means that the div does not need to be an immediate child of body. As a result, other divs may be grabbed in addition to the correct one. By itself that isn't a problem, but because you're using UNORDERED_NODE, we can't say for sure which one will be .snapshotitem(0) vs. .snapshotitem(1) and so on, but you're always using .snapshotitem(0). That means you may end up using the wrong div in some cases. Switching it to ORDERED_NODE or just a "/" should fix the issue, I think (ideally the latter, since ORDERED_NODE is slower than UNORDERED_NODE).

Anyway, keep using XPath, since all of the major browser vendors have done heavy optimization around it, meaning that it's very fast compared to things like GetElementById. Aichon 20:44, 28 June 2012 (BST)

That has got to be the most detailed and informative glance I've heard of in my life. THANK YOU! I'll try to have this updated in the next few days. Please feel free to continue glancing. --Klexur 21:14, 28 June 2012 (BST)
Lol, well, I just looked at the code related to Barrista to see if there were any other IDs that could help, and that's when I saw loads of divs, which got me looking a bit more closely, though I still only looked at the stuff related to Barrista. :P Aichon 01:03, 29 June 2012 (BST)
Well it's a good thing you did because it made me look back over the rest. I must have been real tired when I "finished" it because I also found unused code and some redundancy. -_- I cleaned it up and will upload the id version once you finish yours so that they will match. --Klexur 01:23, 29 June 2012 (BST)
Updated Barrista, finally. Let me know if I did something stupid like misspell an ID. :P Aichon 01:48, 29 June 2012 (BST)
Uploaded mine as well. --Klexur 06:48, 29 June 2012 (BST)

I have but a quick question for those that use this: Who would like the encumbrance percentage hidden as well? --Klexur 20:45, 30 July 2012 (BST)

Special Dumbwit Reports

If anybody is watching, I would greatly appreciate it if I could get some Dumbwit reports of special locations in Malton. Places like map edges and corners especially. Reason being is that I use Dumbwit reports to test most of my scripts to reduce IP hits. --Klexur 20:31, 11 July 2012 (BST)

The only help I can offer is this. The other four corners had no relevant results. Aichon 21:38, 11 July 2012 (BST)
Yeah, that was the only corner I found too. =/ I was hoping some wiki people might know or made others. --Klexur 21:42, 11 July 2012 (BST)
Unfortunately, all of my testing was done in-game at those locations, which is also part of the reason why I ended up going ahead and donating for all of them. I was certainly hitting his server enough to justify paying, and it gives each of them their own IP hit count to deplete, rather than sharing a single pool. Aichon 21:57, 11 July 2012 (BST)
That works too, but means you need to have a character at the desired location. I like instant gratification when it comes to testing. =P I have a growing list of Dumbwit reported locations that I'd be glad to share if there is an interest. --Klexur 02:02, 18 July 2012 (BST)
If I have a need, I'll definitely hit you up. As it is, I haven't had to do heavy testing in at least a year, and my Survivor Aggregator and A-GPS were the only two that I recall really needing testing of odd locations (the Aggregator in particular, since it had quite a few edge cases for multi-block structures and the like). Aichon 03:50, 18 July 2012 (BST)

Content outside the page boundary

Careful that your content doesn't exceed the designated areas and block stuff that should be visible, such as the difference between revisions in that link. I don't think anyone will really mind if it's just your userpage and most of the navigation is still intact, but you should try to avoid it if possible, since there is a policy against covering up stuff. Aichon 00:22, 21 July 2012 (BST)

Is it okay how it is now though? I've since changed the included templates so the linked page looks way wrong. --Klexur 00:26, 21 July 2012 (BST)
Sorry for not getting back to you quickly on this. Anyway, I think it's okay. The only thing you're blocking is the "User:Klexur" at the top, and it's generally understood that that's fine, so long as it's done in good faith for good reason (the policy saying content outside of the boundaries is not allowed makes an exception for custom titles on pages in some circumstances). My user page does the same thing, for instance. Aichon 21:21, 30 July 2012 (BST)
Also, this dark background is making me think I should put the invisible-unless-on-dark-background glow that I used to have back in my sig. Aichon 21:26, 30 July 2012 (BST)
Unless you plan on visiting my talk page a lot, you might not see the lack of shadow on your sig. =P By the way, how would you do that? I'm guessing with a light color that would just blend with light backgrounds. I'm still playing with the colors of my pages. Originally they were based on a website design a made a while back but I found they are a tad dark on a wiki with so much white. --Klexur 22:00, 30 July 2012 (BST)
It's not the lack of shadow that bothers me. It's the lack of contrast on the "Aich" portion, which a glow might help to solve. Unfortunately, my earlier tests showed that the legibility didn't improve much with a simple glow, but if I used multiple text-shadows (CSS supports multiple text-shadows simultaneously) to produce multiple glows, the result isn't actually that bad, and it would result in the glow appearing on dark backgrounds, while the shadow appears on light backgrounds. That's how I've configured it now. Aichon 23:30, 30 July 2012 (BST)

borrowed code

Hi, I saw your map tracking your own movements, and I tried applying the code for a tour I'm putting together. The result is extremely basic and can be found here.

I've copied the original template code as well, trying to make sense out of it and changing it to fit my needs, but if you have some advices, that would be great.

If you'd prefer me not using the code, just say the word. I know this wiki says that everything you post on it is public domain, but I'd start looking for something else if you didn't want me using it :) -- Johnny Twotoes 18:23, 31 July 2012 (BST)

Just to quibble, it doesn't actually say that everything is public domain. It merely requires that everything we post either be public domain or have permission from the copyright holder, but that doesn't mean that the copyright holder has necessarily ceded their rights to it (in fact, UDWiki:Copyrights specifies that the copyright stays with the person who created the content). Since everyone has an automatic copyright on the things they write as soon as they're written, they could, in theory, choose to not allow anyone else to use their code.
That said, looking at his code, I'm willing to bet that his map was inspired from either an old sandbox project of mine or my own visited suburbs template, both of which have been around for years and which I'd be happy to let anyone else use. That said, as is typical of Klexur, his work is very clear, clean, and easy to use, whereas mine is rather unwieldy since I had some other things in mind for it.
Also, I just saw you in-game about an hour ago. You might want to move, since you're getting eaten by a zombie, I think. Aichon 20:00, 31 July 2012 (BST)
I was just about to post this when I got the notification of your response, Aichon. =P --Klexur 20:10, 31 July 2012 (BST)
Thanks for the heads up about everything, I'll keep it in mind :) -- Johnny Twotoes 20:19, 31 July 2012 (BST)
I don't mind you using the code but from what I can see, you are simply calling the map from my page. I'd prefer you make your own template page for the code and call it from there since I had plans to change it. This way it looks different -- different colors and whatnot -- and when I make changes it is not reflected on your page as well. I should also note that I got most of the code from Aichon and changed it to suit my needs and design. Other than that, feel free to use what you like. --Klexur 20:10, 31 July 2012 (BST)
As I said, I just copied the code and fooled around a bit, but I haven't gotten around to creating own templates yet, since I have to figure out what I need first and I'm kind of at work now ;) Thanks ! -- Johnny Twotoes 20:19, 31 July 2012 (BST)
Probably a stupid question, but what does this call upon?
   {{User:Klexur/{{{00|bg}}}color}}
-- Johnny Twotoes 20:37, 31 July 2012 (BST)
That is basically and If Then statement. If "00" is defined as a variable, then use "00color" as the color, if not use "bgcolor". --Klexur 20:42, 31 July 2012 (BST)
I see, making sense again :) Thanks! -- Johnny Twotoes