User talk:Aichon: Difference between revisions

From The Urban Dead Wiki
Jump to navigationJump to search
Line 158: Line 158:
:::::So, yes, you can do all those things you said. Sorry about the mixup. {{User:Aichon/Signature}} 19:53, 10 October 2016 (UTC)
:::::So, yes, you can do all those things you said. Sorry about the mixup. {{User:Aichon/Signature}} 19:53, 10 October 2016 (UTC)
::::::Oh! Ha! That does make more sense. What? No wirecutters? :) --[[User:Queen Mum|Queen Mum]] ([[User talk:Queen Mum|talk]]) 20:07, 10 October 2016 (UTC)
::::::Oh! Ha! That does make more sense. What? No wirecutters? :) --[[User:Queen Mum|Queen Mum]] ([[User talk:Queen Mum|talk]]) 20:07, 10 October 2016 (UTC)
:::::::Do they waste clicks? I joined the game after they became unobtainable, so I've never been able to test anything related to them. As I recall, all of the ones I added to that list were ones that had personally annoyed me by wasting my AP at some point along the way while doing absolutely nothing. {{User:Aichon/Signature}} 20:35, 10 October 2016 (UTC)

Revision as of 20:35, 10 October 2016

Aichon:Talk
Aichon
ˈīˌkän :Talk

Announcement: I'm no longer active. My talk page is still your best bet to get in touch. Aichon 04:39, 15 December 2018 (UTC)

Please be aware of the following guidelines before posting here.

  • New conversations should be started at the bottom using a level two header (e.g. ==Header==). Or with the +
  • I like to keep conversations wherever they start, but if a conversation ends up here, I will keep it here.
  • I will format comments for stylistic reasons, delete comments for whatever reason, and generally do anything else within reason.

Thanks. Aichon

NOTICE

Archives: 2018 | 2017 | 2016 | 2015 | 2014 | 2013 | 2012 | 2011 | 2010 | 2009 | To do

Cycler

Stelar and me are having some trouble with this page. It's supposed to call on a East Becktown Defenders/QuoteXX page, with XX defined by the CURRENTHOUR, but it doesn't seem to take any inputs? Any help would be welcome. PB&J 14:33, 8 July 2016 (UTC)

Just tweaked it. See if that works for you. You were missing the | that separated the template's name from the parameter you were passing into it. Aichon 14:39, 8 July 2016 (UTC)
No further progress. The removal of that pipe was a desperate attempt :P PB&J 14:40, 8 July 2016 (UTC)
Oh, so is the problem that it's not actually cycling every hour? If so, the problem is likely that the page is cached by the wiki, which is something you can't really do much about. Previewing it will cause it to update in your preview...but not for everyone else. If you do a "silent save" (i.e. save the page with no edit made), it'll force the wiki's cache to reset, which should force it to update to the latest hour for everyone, but if you just refresh the page normally, it won't do much of anything, I'm afraid. The only other way around it is to load the page with a cache reset parameter in the URL. You can see an example of one in this edit to the BB4 page (look for the "action=purge" stuff), back when I had a countdown posted to the start of the BB4 event and wanted to provide people with a way to refresh the countdown. Aichon 14:46, 8 July 2016 (UTC)
The problem is that it's not taking any input. The text appearing on Template:EBDQuoteCycler is the default text for when there's no input. I know about the caching, I test everything in preview mode, saves the Recent Changes page a bit of work. PB&J 14:49, 8 July 2016 (UTC)
Ooooh. For some reason I thought that WAS the quote you wanted. Yeah...these problems get a bit trickier since trying to grab arguments from other templates causes all sorts of issues with pipes. Two things to try:
  • Replace your pipes in the quote pages with {{!}}. Those will get converted into pipes once they're included, rather than before, which may fix the issue, though I can't recall for sure.
  • Move the layout logic to your quote pages. Basically, model it after a Danger Report, where each page containing data (i.e. each quote) is responsible for formatting itself. If you want to be able to use the quotes in different formats on different pages, just use {{EastBecktownDefQuote}} as their default template, with an argument that allows you to pass in a different template for other uses, just like how the DRs default to using the BuildingStatus template, but can be used in other ways (as was done with the DangerCenter). That way will definitely work, but it'll take a bit more work. Aichon 15:06, 8 July 2016 (UTC)
Thanks. The first idea didn't work. The second one is a level above my paygrade it seems, since I don't understand half of what's in there :)
They'll only be used on one page as far as I know, I'm not even sure at this point why I tried to put a CURRENTHOUR call inside a template call inside a different template call. Made sense at the time, but I'm just going to go ahead and get rid of a couple levels of complexity :P Thanks for the tips! PB&J 15:21, 8 July 2016 (UTC)
Well, if you want to keep it simple, just put a quote template on each quote page, then include a different one each hour. No different than flagboxes, basically. Aichon 15:22, 8 July 2016 (UTC)
I went with the rather large switch table, along with putting the quote template on each quote page. Less elegant than a single line of wiki code powering the whole thing, but if it works it isn't stupid. PB&J 15:47, 8 July 2016 (UTC)
Then again, apparently my quote pages aren't displaying the default messages for empty variables any more, so now I broke something else :P Not a giant problem, more a curiosity. PB&J 15:49, 8 July 2016 (UTC)


Extracting EMR input

Hi,

Me again, with another question about how to potentially break the wiki :)

Stelar and me are looking into extracting the input on EMR reports to use it in a different template. Basicly make it so that if people put info in the EMR's, we can use that info as well without manually inputting it in two places.

What we basicly need is this:

|s=Barrville |z=~0 |i=**- |p=B |d=Jul 1

so without the rest of the template surrounding it.

(example taken from the Barrville EMR)

Ideas?

PB&J 13:31, 14 July 2016 (UTC)

You can use it directly in another template as it is, since the raw data is just defaulting to using the {{EMR}} template, but it can be passed into any template of your choosing already. Take a look at how {{EMR}} is built, then make your own that formats the pieces of data you want, how you want, and use it via something like {{EMRP: Darvall Heights|mytemplate}}. That'll cause the data in the relevant EMR to be formatted according to your template instead of {{EMR}}, which should be what you're looking for, from the sound of things. Aichon 13:51, 14 July 2016 (UTC)
It sounds about right. I'll play around with it and come back to you when I inevitably break things. PB&J 14:43, 14 July 2016 (UTC)
Well, I tried it and it just gives me "Template:EMRP: Darvall Heights" as the output... PB&J 14:52, 14 July 2016 (UTC)
You had the right idea. You need a colon before the EMRP template name because it has a colon in the name, which the wiki interprets as a namespace. You also need to tell it which variable you're filling, for...reasons. Anyway, Demo4 should now be working for you with its second example. Aichon 14:56, 14 July 2016 (UTC)
Yeah, I tried the colon in preview, never would have guessed the template= . Thanks, once again, you've proven to be a bloody wiki genius! PB&J 14:58, 14 July 2016 (UTC)


It Worked!

Thanks for the help Aichon, it helped us build a binary counter with 6 digits! THIS counts how many East Beck hospitals are currently safe. I'm immensely proud of it :) PB&J 16:57, 18 July 2016 (UTC)

It seems I have tickled your curiosity :P Watcha doing? PB&J 17:56, 18 July 2016 (UTC)
...nuthin'. >_>
Well, I was trying to build a quick little recursive counter that would've worked for way more digits and used way less code, but then I remembered that the wiki doesn't support recursion. Shucks. I may try re-implementing it in much the same way that I did with my intToString templates that can take a series of digits and convert them to their text-based equivalent, since I think it'd be possible to do something of that sort, but that's definitely a less clean version of the concept. Even so, it should work and should let me add any sequence of 0s and 1s up to however many digits I program it to take. Aichon 18:17, 18 July 2016 (UTC)
That would be handy, but a lot heavier to load I imagine... I think my current counter is quite clean (although I still have to adjust some small things to make it work on any status). It does what it has to do, and it only calls on the templates of the 6 buildings it counts. I can imagine some greater uses for this, Malton-wide perhaps, but the DC took a great toll on the wiki when we implemented it, and I'm not too eager to make page calls take over a minute again. PB&J 18:29, 18 July 2016 (UTC)


EBD banner issue

We had some feedback about our EBD Stat Party 2016 page saying the banner makes the screen need a horizontal scroll bar when the browser size is reduced (which basically extends to all our pages). I've been trying to figure out how to get it to do it, but haven't managed to. The closest I could get was using something like <div style="max-width=100px">, but that made the banner pop outside the right side border, while everything else reduced as I shrunk the browser. Any ideas on what I should do? stelar (talk) 13:37, 19 July 2016 (UTC)

Unfortunately, aside from hacking the CSS for the entire site (which we're not going to do, I'm afraid :P), I'm not aware of any way to resize an image on UDWiki based on the user's browser window size. The way I've tried to get around this limitation in the past when designing pages (e.g. BB4, SoC) is to have the image use a background color that can blend into the page's background, that way the edges of the image aren't obvious. It makes them feel larger than they actually are. Admittedly, it's not a great solution, but it works. Aichon 19:22, 19 July 2016 (UTC)
Okay no worries. I'll just reduce the size for now I guess! stelar (talk) 07:26, 20 July 2016 (UTC)


Userscript to fix building name problem

I finally got tired of the building names being screwed up in Chrome (i.e. no spaces between the words, causing them to stretch the minimap really wide) and I had a few minutes of downtime today at work while I was waiting on code to compile, so I made a userscript that adds the spaces back in where they should be in the names, then modified my Better Name Colorer script to change the CSS so that the buttons word-wrap on spaces like you'd expect. It seems to fix the issue. The reason I'm mentioning it here instead of just putting the code up for download is two-fold:

  1. I don't have time right now to combine them into a single script, which is what they really should be before I publish them.
  2. I'm worried that if I don't have someone poking me, I'll forget to ever actually finish it and make it available.

I figure that if I post here, you guys will keep me accountable, since I can't possibly be the only one wanting this fix. Aichon 17:58, 26 July 2016 (UTC)

And...I've already lost the code to the new userscript. Turns out that having the line of code that causes it to look for auto-updates is a good idea...so long as you don't point it towards a completely different script that will overwrite your new one that you don't have saved anywhere else yet. >_< Aichon 19:09, 26 July 2016 (UTC)
And...I found some more time while code was compiling, so I'll be adding a fixed up and complete version to my Userscripts page in a sec. Aichon 20:13, 26 July 2016 (UTC)
Let me know when this is up and running, love that you're doing this! PB&J 07:47, 27 July 2016 (UTC)
They're already posted up. Check the dates for the scripts on the Userscripts page to see which ones I updated. As I'm updating scripts, I'm also adding auto-updating to them, which should make future updates simpler if you're using a browser that supports auto-updates. Aichon 13:05, 27 July 2016 (UTC)
Oh and if you get the chance, could you try and get a bigger "search the area"-button in Barrista? It's quite tiny for one of the most used buttons. PB&J 08:57, 27 July 2016 (UTC)
Regarding this: I'm open to suggestions. Barrista could use a better layout, but it's difficult to deal with all of the edge cases that can exist. Aichon 20:58, 27 July 2016 (UTC)
How about putting it in the same format as the "barricade" button? Nice big square button :) PB&J 14:43, 2 September 2016 (UTC)
Not a bad idea. Two thoughts for why I haven't done that already:
  1. How obvious would it be what it is? The barricade button has "cade" in it when it's able to be used, but I wouldn't be able to fit "search" in a button of the same size, and I already consider the barricade button to be pushing things when it comes to the ease of discoverability.
  2. If I'm changing the button from what it is now, I'd like a more comprehensive solution that could also address malls, where you can search multiple things from one place.
I do like the idea of a larger button, but it needs something more than just that, I think. Aichon 14:51, 2 September 2016 (UTC)
First of all: the barricade button is by far easier to locate on my screen than the search button right now, just fyi :)
Second, the Mall search is an interesting situation. Perhaps a dropdown menu with all the options and that reverts to "Search the building." when not in a mall? PB&J 15:19, 2 September 2016 (UTC)
Sorry, I probably should have said something more like "intuitiveness". Basically, answering the question, "is it obvious what it does?", more so than the question of, "is it easy to see?" As for the mall search, a pulldown could work, but I'd want it to be something that the user could click repeatedly without having to select from a pulldown each time, otherwise it'd be less convenient than what they already have. ;) Aichon 16:13, 2 September 2016 (UTC)
UDToolbar used to* use a dropdown and just select whatever search you’d made most recently, since it’s always in the URL parameters and submitted via form. (Actually, the form bit might mean the browser or cgi script handled that part.) Seems the most elegant way to handle it would be to default to doing what the user was doing last — come to think of it, I had an “attack toolbar” idea ages ago that I never got around to fleshing out which worked on this principle.
*Presumably still does, if you’re running an old enough Firefox version. ᚱᛁᚹᛖᚾ You rated this wiki '1'! Great job, go hog wild!|||||||||||||||||||||||||||||||||| 01:52, 6 September 2016 (UTC)


Magic words: time

Hi Aichon,

I'm trying to get this page to display two things: the user's local currenthour and the server's currenthour, but for some reason, it's displaying the servertime twice. Suggestions? :) PB&J 09:42, 2 September 2016 (UTC)

Unfortunately, as far as I can recall, neither of them actually provides the user's time, despite what the Magic Words page says. They both provide wiki time. I ran into this issue a few years back when trying to make a table that would show MOB strike times in the user's local time...didn't have much luck. Sorry. Aichon 14:26, 2 September 2016 (UTC)
Heh. Was trying to do the exact same thing for the Scourge. As usual I went with a 600 case switch :P Thanks anyway mate PB&J 14:35, 2 September 2016 (UTC)


Userscript Idea

Not sure how plausible it is, but it would be nice to have radio broadcasts be more readible. Right now, on frequencies like 27.55, it shows " from here, on 27.55 MHz. (x minutes ago)" after every piece of radio traffic. Maybe group them together a bit so it just says:

27.55 MHz:

  • "bla bla bla" (2 hours ago)
  • "bla die bloe bla" (1 hour ago)
  • "blobedieblabedie" (Just now)

Just an idea... PB&J 12:23, 22 September 2016 (UTC)

It's fairly plausible. Radio broadcasts follow a pattern that is stylistically unique to them (so far as I know) and that can't be duplicated by users in some other way, meaning it should be fairly straightforward to recognize them and identify their channels. But yeah, were something like this to be done, we'd definitely want to group the messages by frequency (so long as they were continuous in the stuff the user sees) and then we'd probably also want to toss in some extra styling for related events, such as radios going down.
  • 27.55 MHz:
    • "bla bla bla" (2 hours ago)
    • "bla die bloe bla" (1 hour ago)
    • *crash* *static* *silence* (5 minutes ago)
    • "blobedieblabedie" (Just now)
But before I'd even consider doing something like this, I'd need to have a representative sample of dumbwits (not screenshots, since I can't test my scripts on screenshots), simply because it's impossible for me to test radio broadcasts in the game by myself. And they'd need to be showing things like single-line broadcasts, multi-line broadcasts, multi-line broadcasts that get intermingled with other actions at the player's location (e.g. someone talking during a broadcast), multi-line broadcasts that get interrupted by outside actions (e.g. a different broadcast, a flare, a bellow), what it looks like when the broadcast is happening at the user's location vs. happening elsewhere, how it looks when you're the one doing the broadcasting, what the messages look like when tuning into a frequency that has 0 vs. 1+ transmitters with a radio vs. with a transmitter, what it looks like when a transmitter goes down (and the last transmitter too, if the message is different), and so on. More or less, when it comes to text parsing, I want as many examples as possible before I even get started, and I want to know that I have the ability to test as much as is needed, otherwise I'll regret any assumptions I make about how the code should work when I later on discover that there's a major edge case that turns those assumptions on their head.
Also worth saying: this isn't an itch I feel compelled to scratch for myself just yet, which is typically what gets me to work on userscripts, but if you guys actually keep up with the Radio Malton broadcasts on my group's frequency, I may think differently in a few more days. :P Aichon 15:03, 22 September 2016 (UTC)
We knew that frequency would get your attention :D When it comes to testing, I think no one in Malton is as qualified as we currently are to deliver any and all necessary examples, since we spend a considerable amount of our time spamming the airwaves anyway. It'll take a while, but we'll try and keep up the transmissions on 27.55 MHz and 26.43 MHz and gather what we can in the meantime.
Respectfully yours, PB&J 15:24, 22 September 2016 (UTC)


Umm

Hey, why did you revert all my recent edits to my sandbox? I copied all the old material elsewhere. Was it an error? Bob Moncrief EBDW! 11:26, 29 September 2016 (UTC)

Mis-click? I vaguely remember accidentally tapping the rollback link on a line that had text-wrapped in my watchlist when viewed on my iPad, before quickly tapping the correct link. I didn't think it had gone through, but clearly I was incorrect. Feel free to undo. Aichon 13:15, 29 September 2016 (UTC)
No worries. Didn't want to undo in case there was an issue. Bob Moncrief EBDW! 13:28, 29 September 2016 (UTC)
Thankfully nothing. Sorry for the hassle. Aichon 14:19, 29 September 2016 (UTC)


chrome stuff

thinking of playing again but I stopped using firefox.. got any chrome plug ins to make the game view better.? please let me know on my talk. thx--User:Sexualharrison16:49, 6 October 2016

Responded on your talk. Aichon 16:58, 6 October 2016 (UTC)


Your organizer for Chrome

Thanks again for pointing it out! I did notice, though, that spray cans don't seem to show up in inventory now. I can drop them. I can find them. But they don't get listed in the items. --Queen Mum (talk) 19:06, 10 October 2016 (UTC)

No problem, and yeah, that was a personal preference on my part. I rigged it up to hide buttons that don't actually have any functionality, partially to declutter and partially because some of them cost you AP if you click them, even though they don't do anything. I've been toying with the idea of restoring them as inert labels that can't be clicked, that way people have an indication of how many they have, but I haven't had the time/motivation to get around to it yet. Aichon 19:34, 10 October 2016 (UTC)
Gotcha. For me, personally, I like having a count, at least, of such things so that I know when I've picked up 6 spray cans when I only needed 2 and fuel, for instance. But hey, not going to look a gift script in the mouth... so to speak. So I know, what other items don't show up? --Queen Mum (talk) 19:40, 10 October 2016 (UTC)
I believe this should be the full list from the code for the userscript:
var otherList = [
	'binoculars',
	'book',
	'crucifix',
	'flak jacket',
	'fuel can',
	'GPS unit',
	'mobile phone',
	'newspaper',
	'pair of wirecutters', 
	'poetry book', 
	'portable generator',
	'radio',
	'radio transmitter',
	'spray can',
	'toolbox',
	'stale candy',
];
As you, I want a count (particularly with spray cans), so I do plan to add the feature at some point, but I've just been super busy these last few months, and when I've had the time to spare, I haven't remembered to do it. Aichon 19:42, 10 October 2016 (UTC)
Ah! So no tuning portable radios, giving candy or using binoculars? Like I say, I'm not especially fussed, but it's good to know. Thanks! Hope things get more mellow for you, if that's what you want. If it's "good" busy, then enjoy :) --Queen Mum (talk) 19:48, 10 October 2016 (UTC)
Oh, wait, that's not right. I grabbed the wrong list. That's just the stuff that shows up in the "Other" section. This is the correct list:
var wastedClicks = [
	'fire axe',
	'flak jacket',
	'spray can',
	'toolbox',
];
So, yes, you can do all those things you said. Sorry about the mixup. Aichon 19:53, 10 October 2016 (UTC)
Oh! Ha! That does make more sense. What? No wirecutters? :) --Queen Mum (talk) 20:07, 10 October 2016 (UTC)
Do they waste clicks? I joined the game after they became unobtainable, so I've never been able to test anything related to them. As I recall, all of the ones I added to that list were ones that had personally annoyed me by wasting my AP at some point along the way while doing absolutely nothing. Aichon 20:35, 10 October 2016 (UTC)