FANDOM

A FANDOM user
  Loading editor
  • Hello there, I'm wondering if you could help me with something if you can/want?

    I was trying to edit Arashio's seasonal quotes, more precisely the one from Late Fall 2017 (as I did with her other 2017 quotes). However, when I edit the section, the table doesn't add the quote, it's as if the "Late Fall" season didn't exist or something. Is there something I can do about this?

    Thanks in advance, and I apologize for any inconvenience. 

      Loading editor
  • Content...

    Tab content 1

    Tab content 2

    Tab content 3

    Tab content 4

    Tab content 5

    Tab content 6

    Tab content 7

    Tab content 8

    Tab content 9

    Tab content 10

      Loading editor
    • A FANDOM user
        Loading editor
  • OK, I started trying this on my loli waifu like this...

    http://kancolle.wikia.com/wiki/Harusame

    What do you think? Also as I say before...we need a tabber css for the rail to delete the lines of that tabber.

    If its ok, I'll continue using the -ShipGraphicKai- for the Gallery/Tabber

      Loading editor
    • View all 8 replies
    • This seems to work

      var buttons = $('.ship-page-gallery-tab .tabbernav a')
      buttons.each(function (i) {
        var x = $(this)
        x.mousedown(function () {
          buttons.each(function (j) {
            var y = $(this)
            if (i !== j && (x.text() === 'Normal' && y.text() === 'Normal' || x.text() === 'Damaged' && y.text() === 'Damaged')) {
              y.click()
            }
          })
        })
      })
      

      I will test it more later.

      Also, previous code is live, so it should be on the side bar now (Ctrl+F5 if not).

        Loading editor
    • Here is one big page Sandbox/Gallery Test that can be used for testing. Seems like performance isn't a problem, so it's still order and naming for tabs, switching subtabs simultaneously, sizing for tall images, fixing for nonexistent and dup CGs.

        Loading editor
    • A FANDOM user
        Loading editor
  • Hello, I wanted to convert the Shipquote template in Hibiki's page (and others, if I'm procrastinating hard enough) to the newer ShipQuote template but I noticed /Kai Ni doesn't work for Hibiki. I assumed it's because the audio file is named as either Верный or Verniy and, after referring to Taiyou's page, seems to be something that can only be done by modifying the Module:Quotes. Hence, I'm here to request for the addition of Верный/Verniy to the module.

    And, while I'm at it, is it safe to remove all ShipMetaKai and ShipInfoKai and replace them with ShipPageHeader? Same goes for ShipCategoriesKai; I noticed most of the newer ships don't have it and so I'm not sure if it's required.

      Loading editor
    • View all 9 replies
    • I notice that the script will remove all 改, regardless of whether it's in () or not. So if a JP sentence has, say, the word 改良 in it, then it'll end up being 良 after parsing. I got kinda lazy so I didn't play all audio to check each Kanji unless it's a ship page with 2 quote tables :v.

      Imo the only (kinda) urgent fixing that need to be done is the Chitose-class since all their Carrier lines are offline at the moment. The other missing audio is only 1~2 in each page so it's not that big a deal.

      The ship hourly is still functional albeit they're using non-standard naming scheme.

      The possible dups are kinda annoying but it's still functional. I kept the dups in the table to highlight rogue audios that can be removed from wikia. Having only legit audio makes it easier to check if any line is missed out of a ship table by running /Kai or /Kai Ni check on each line.

        Loading editor
    • "改良".replace(/\s*(改)/, "") is still "改良" (those are Japanese non ASCII ( and )), so not sure why you had this behavior. It was removing Kai without brackets though. I guess a quick way to fix this is to download old and current pages and count 改 and Kai.

        Loading editor
    • A FANDOM user
        Loading editor
  • Hi, sorry to bother you, I've uploaded the animated version of the event banner if you'd like to add it to the event page. I don't have the user rights to modify the event wiki pages. Filename is:

    Spring_2017_Event_Banner.gif

      Loading editor
  • Hello. I've been working with Ar-cen-ciel for a long time at the FKG Wiki. We've suffered from problems of wrong information popping up in pages due to copy-pasting of data here and there. Currently, a bunch of scripts Ar-cen-ciel uses would generate a big Template call for character pages, then editors/translators would put changes on top of that. (Example: Curcuma's character page). Pages involving data based on those characters, like a List of Shared Abilities, would be done via copy-paste.

    I wanted to alleviate those problems by having a database of some sort for all of the game's characters. The solution I had thought of was to store it all in a couple Lua tables similar to the work in progress that is Module:Character. Before jumping into too much stuff, I thought I'd look at how this Wikia handles its character info. There's some questions I have regarding all this. Some of the questions may have overlapping answers.

    1. Does KanColle's Wikia store its character statistics in Lua tables?

    2. I tried following a character's page to see how the infoboxes were made (Specifically Inazuma). The flow that I could gather was...

    (Inazuma's page)
    {{ShipInfoKai|Inazuma/|los=auto|los_max=auto|evasion=auto|evasion_max=auto|asw=auto|asw_max=auto}}
    
    ...
    (Template:ShipInfoKai)
    {{ {{{subst|safesubst:}}}#invoke:ShipInfo|Infobox}}
    
    ...
    (Module:ShipInfo)
    function ShipInfo.Infobox(frame)
    	local args = getArgs{frame = frame:getParent()}
    	_prepareShipInfoKai()
    	return ShipInfoKai:Infobox(args)
    end
    

    I believe I understand _prepareShipInfoKai(), but not the two lines surrounding it. I'm guessing frame:getParent() jumps up from ShipInfoKaika to Inazuma's page, so it gets the stuff sent to ShipInfoKai, but how does ShipInfoKai:Infobox(args) work? Specifically, I was curious how it would know Inazuma's parameters for the infobox.

    3. A big concern of Ar-cen-ciel and mine is that Lua tables don't seem as user-friendly for editors to update as the Template we use now. Is there a solution or workaround to that? There's some user-inputted data we can get away with only showing on Character pages and nowhere else (like skill name translations), but some information shows up on multiple pages (like English translations of the flower knight's name; there can be multiple).

    4. Are these Templates that safe-substitute a Module invocation what you call a proxy module? What is the purpose of that? Also, if you change any of the Modules, wouldn't that leave the Template-calling page unchanged because of the substitution?

      Loading editor
    • View all 13 replies
    • I don't know if Ar-cen-ciel missed my original point or is just using the wrong terminology, but the thing I was talking about with him was the potential performance difference between a single require versus countless requires. The plan was already to have just a single invoke on each of the pages we wanted to automatize.

      Normally I would avoice file I/O (including things such as includes/requires) as much as possible becasuse disk access is the slowest type of memory and the most whimsical in time consumption, but I think that's because I was taught by programmers from an era where that was a big issue and it rubbed off on me.

        Loading editor
    • I mentioned many invokes because that is how you can hit the limits really, otherwise it's kinda hard to reach them, so in comparison it looks good. There are pros to using multiple modules (can load only one table when only one is needed, can have small files instead of few 10-20K LoC files), while cons are not manifested right now (as long as everything works and edit/purge doesn't feel slow, can say that there is no practical dimension for slowness).

        Loading editor
    • A FANDOM user
        Loading editor
  • Just asking, but is there any particular reason why you don't convert the seasonal quotes into Lua modules? Is it due to technical limitations or usage difficulty?

      Loading editor
    • I do convert them, or rather it is still in progress (the only ship page that pulls from proxy modules is Taigei, as an early test). Basically, I see seasonal pages as the main storage for seasonal lines (so that people can edit those pages, not Lua tables), then you can do inclusions like {{SeasonalQuotesInclude|White Day 2015|Destroyers}} on Seasonal/White Day 2017 and {{ShipSeasonalQuotes}} on ship pages. I use proxy modules (something autogenerated from seasonal pages) here because I can't pull directly from wiki pages (there is DPL for this, but I'm not sure if it will perform well on wikia).

        Loading editor
    • Gee, that's news to me. How did you auto-generate the proxy modules though?

        Loading editor
    • For now, same idea as Template:SeasonalTOC, you paste some JS (not really finished and may require some manual tweaking for output) in console when on page and have the result printed/copied. Converter from old tables to new templates is only used once, so I will just throw it away eventually, converter to proxy modules probably should be reworked with nodejs, to batch process all the pages periodically.

        Loading editor
    • This reply has been removed
    • A FANDOM user
        Loading editor
  • I've been working on converting a script to download a zlib compressed file, decompress it and write them into the local file. Problem is I couldn't store the remote Javascript object as a buffer, much less decompress it.

    I'm aware of the requests library but I'd rather avoid using external modules if possible for portability.

    Original Python file
    #!/usr/bin/python3
    import os, sys, zlib, hashlib, urllib.request
    
    #specifiy the download links as integers
    IDList = [140823,140824,129601,129602,157601,157602,131805,131806]
    #IDName = ["LadySorrel_shinshun","FalseDaphne","Ivy_shinshun","Olive","Rhodante"]
    
    Link  = "http://dugrqaqinbtcq.cloudfront.net/product/images/character/"
    Link += "i/"
    pre   = "icon_l_"
    #Link += "s/"
    #pre   = "stand_s_"
    i = 0
    
    for z in IDList:
    	unit = pre + str(z)
    	hash = hashlib.md5(unit.encode('utf-8')).hexdigest()
    	f = urllib.request.urlopen(Link + hash + ".bin")
    	data = zlib.decompress(f.read())
    	f.close()
    	f = open(unit + '.png', 'wb')	#Save as a file
    	#f = open(IDName[i] + '_icon01' + '.png', 'wb')	#Save as a file
    	f.write(data)
    	f.close()
    	i += 1
    
    NodeJS file
    //Define the required NodeJS modules
    const fs = require("fs");
    const crypto = require('crypto');
    const http = require('http');
    const zlib = require("zlib");
    
    let Link  = "http://dugrqaqinbtcq.cloudfront.net/product/images/character/";
    const KnightID = [112603];
    
    Link += "i/"; var pre = "icon_l_";
    //Link += "s/"; var pre = "stand_s_";
    
    for (i = 0; i < KnightID.length; i++) {
    	let unit = pre + String(KnightID[i]);
    	let hash = crypto.createHash('md5').update(unit).digest('hex');
    	let request = http.get(Link + hash + ".bin");
    }
      Loading editor
    • You can use a callback with http.get, it gives a response stream, so you can pipe it to unzip and then pipe it to a file, like so (parallel downloading)

      for (const id of ids) {
          const hash = crypto.createHash("md5").update(pre + id).digest("hex");
          http.get(`${link}/i/${hash}.bin`, res =>
              res.pipe(zlib.createUnzip()).pipe(fs.createWriteStream(`${hash}.png`))
          );
      }
      
        Loading editor
    • Works like a charm for me after I've edited it.

      NodeJS file
      //Define the required NodeJS modules
      const fs = require("fs");
      const crypto = require('crypto');
      const http = require('http');
      const zlib = require("zlib");
      
      //Define the variables
      let link  = "http://dugrqaqinbtcq.cloudfront.net/product/images/character/";
      const KnightID = [112603];
      
      //Additional variable (move the comment slashes between icon/sprites)
        link += "i/"; var pre = "icon_l_";
      //link += "s/"; var pre = "stand_s_";
      
      for (const unit of KnightID) {
      	const name = pre + unit
          const hash = crypto.createHash("md5").update(name).digest("hex");
          http.get(`${link}${hash}.bin`, res =>
              res.pipe(zlib.createUnzip()).pipe(fs.createWriteStream(`${name}.png`))
          );
      }

      I knew about the lambda expressions, but what are those ${ } symbols for?

        Loading editor
    • That is string interpolation, also a part of ES6, so you can write `string1${expression1}string2${expression2}...` instead of "string1" + expression1 + "string2" + expression2 + ...

        Loading editor
    • A FANDOM user
        Loading editor
  • Excuse me がか, Can you tell me how to add CG to ShipGraphicKai template?

    (I saw you working on it already ,but I want to know just in case.) XD

      Loading editor
  • Hello がか、

    I'm (still) unsure as to how to add images in the furniture page, do you think you or one of the admins could?

    I've made a (casual) gif of the new window with the radio:

    Luxury Artisan Radio Window

    If I shouldn't have please say so.

    Have a nice day!

      Loading editor
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message