Template talk:Acquire: Difference between revisions

From A KoL Wiki
imported>JRSiebz
mNo edit summary
imported>SomeStranger
Line 59: Line 59:
{{acquire|2|image=bottle.gif|item=bottle of gin|num=23}}
{{acquire|2|image=bottle.gif|item=bottle of gin|num=23}}
{{acquire|2|image=bottle.gif|item=bottle of gin|num=37}}
{{acquire|2|image=bottle.gif|item=bottle of gin|num=37}}
***Please remove the links. They are really bothersome. (The FNORD thing also throws off the centering)--[[User:SomeStranger|<font color="orange">SomeStranger</font>]] <sup>([[User talk:SomeStranger|<font color="green">t</font>]]|[[Special:Contributions/SomeStranger|<font color="green">c</font>]])</sup> 22:09, 28 June 2006 (CDT)

Revision as of 03:09, 29 June 2006

The more I think about this the less I like it, but we'll see what you people think. I got the idea from the help at the Wikimedia site. There's something about this buggin' me though. I guess it needs space for a range (X-X) on the multiple drops. So far it works as the following:

  • Removed old examples, since template has changed since then

I've only tried it on the Booze Giant page so far. --JRSiebz 15:20, 12 Jul 2005 (Central Daylight Time)

  • Maybe I'll try a num variable
{{acquire|1|image=bottle.gif|item=bottle of gin|num=}}
{{acquire|2|image=bottle.gif|item=bottle of gin|num=(2)}}
{{acquire|2|image=bottle.gif|item=bottle of gin|num=(1-4)}}

...but i don't really like the syntax of that, especially for single items. hmmm. --JRSiebz 15:26, 12 Jul 2005 (Central Daylight Time)

  • Hmm, or Acquire and AcquireMultiple/MultiAquire/Aquire2 could be two separate templates, removing the use of the odd P1...Pn templates. --JRSiebz 15:29, 12 Jul 2005 (Central Daylight Time)
  • I added the num variable, on single drops it is ignored, but must be supplied, else {{{num}}} will be undefined and mess up the template. Here's what it looks like now:
{{acquire|1|image=bottle.gif|item=bottle of gin|num=}}
You acquire bottles of gin
{{acquire|1|image=bottle.gif|item=bottle of gin|num=1}}
You acquire an item: bottle of gin
{{acquire|1|image=bottle.gif|item=bottle of gin|num=anything}}
You acquire anything bottles of gin
{{acquire|2|image=bottle.gif|item=bottle of gin|num=2}}
You acquire 2 bottles of gin
{{acquire|2|image=bottle.gif|item=bottle of gin|num=1-4}}
You acquire 1−4 bottles of gin
Here's what happens when the num variable isn't supplied at during during a single drop:
You acquire an item: bottle of gin

Thoughts anyone? --JRSiebz 20:50, 12 Jul 2005 (Central Daylight Time)

  • Think we could spell it correctly? ACQUIRE. --jin 00:12, 13 Jul 2005 (Central Daylight Time)
  • Oh crap. I told ya something was buggin' me that I couldn't put my finger on. It's always the obvious one. *smacks himself around* Funny thing is, I spelt it right inside the template. --JRSiebz 01:26, 13 Jul 2005 (Central Daylight Time)
  • Aha, so there is a way to do some conditional processing in templates. Is there any way to use that sort of conditional processing to hide the lines in the food and booze templates for the stats you don't gain from a particular food/drink? That is, instead of having it say "You gain 0 Muscularity. You gain 0 Wizardliness. You gain 35 Sarcasm." for, say, a key lime pie, just have it say "You gain 35 Sarcasm." and omit the other two lines? I really hate seeing the zero lines, since they don't appear in the game. -- Old Ned 03:06, 6 Aug 2005 (Central Daylight Time)

done

After various useless edits, i managed to fix the bugginess. Now, what would be an interesting adjustment is allow for the form: You acquire 2 tureens of sleazy fairy gravy --Dehstil 14:56, 28 April 2006 (CDT)

p.s. what was fixed was that the semi colon was putting some weird formating tags making newlines and such instead. After putting some nowiki tags it made cariage return appear between item and the colon, translating to a space after item. putting the colons into the conditional thingy put weird pre tags and such afterwards, but removing the space after it made it go away and that carriage return became the space.--Dehstil 15:12, 28 April 2006 (CDT)

  • The problem was actually in the P1/P2/P3 templates, which had newlines between the template data and the 'noinclude' tags. This caused it to insert an extra space after all uses of said templates (unless there was already a space, in which case you'd never notice). I recall fixing the same thing in the 'substat' template a while ago as well. --Quietust 15:23, 28 April 2006 (CDT)
  • Ah, now I understand why I was putting nowikis after those p template dealies, nifty. Now one question: when, if ever, does kol say "You acquire some items: sleazy fairy gravy (2)" and when does it say "You acquire 2 tureens of sleazy fairy gravy"? Whatever the case, should I sandbox a bit and change and then change the template again? Or no, because that's just messy? --Dehstil 15:35, 28 April 2006 (CDT)
    • "You acquire some items: sleazy fairy gravy (2)" -- it used to. Items didn't get plurals until somewhat recently, Actually it may never do the above anymore, but it's require a homemade extension which would look up an item's plural form beiung integrated into the template and would be required to always be kept up to date with new items and plurals. Is the effort worth it? I remeber talking about it right after plurals were introduced and wer thought how we already (just got) it working was fine, because the wiki was rather new and had bigger fish to fry. ;-)--JRSiebz (|§|) 15:53, 28 April 2006 (CDT)
      • What might be worth consideration (if this is possible) is creating a parsable page which the extension runs off of so that users can update the page according to format in order to keep the plurals going.--SomeStranger (Talk | Contribs) 19:27, 28 April 2006 (CDT)

Odd bug

I experienced an odd bug this morning. The raffle prize box contains several copies of the acquire template. Each one decided to stick a () at the end of the line, even though the num field was blank. It wasn't until I edited the page that the ()s disappeared. Is there some known bug with this template? Am I the only one? Can anyone replicate what I saw? Do you all think I'm crazy? --Ricket 11:58, 20 June 2006 (CDT)

  • That was something I did this morning by accident when I was changing the template so that it used the newly installed parserfunctions. You probably went to the page in the 2 minute period before I corrected my mistake, thereby cacheing the bad version of the page in your browser. It was not until you edited it (which automatically deletes the cache and downloads a new copy) that the ()s disappeared because the correct version of the template had to be redownloaded. In the future, pressing "Control + F5" on your keyboard will hard refresh the page, thereby deleting the cache.--SomeStranger (t|c) 12:07, 20 June 2006 (CDT)

Special Numbers

It uses special numbers as of last night, but I'm not sure of the format...at all, or whether they would actually pop up anywhere on the wiki.--Dehstil (t|c) 19:51, 28 June 2006 (CDT)

  • They don't seem to look right. --JRSiebz (|§|) 20:44, 28 June 2006 (CDT)
    • I added a space befofe "FNORD" and "In a row" and properly styled the "FNORD" span. Them being links jsut seems to visually throw me off. --JRSiebz (|§|) 21:03, 28 June 2006 (CDT)
You acquire 11 bottles of gin
(That's ridiculous. It's not even funny.)
You acquire 23 bottles of gin FNORD
You acquire 37 bottles of gin
(In a row?!)
      • Please remove the links. They are really bothersome. (The FNORD thing also throws off the centering)--SomeStranger (t|c) 22:09, 28 June 2006 (CDT)