FANDOM

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 5 replies
    • Look, you didn't converted supply kai line properly! xD

        Loading editor
    • The single br got me :v.

      On a side note, there's also other audio issues aside from the ones I listed above that I plan to put here when I got around to going through the entire ship list ~-~.

        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
  • http://blog.livedoor.jp/kancollenja/archives/64929687.html


    This page seem to suggest S ranking C, D, H, and I nodes results in a weaker boss formation

      Loading editor
    • A FANDOM user
        Loading editor
  • Hi がか,

    Don't know if you are busy with the Event page revamp or something but I'll be quick. I was taking a look at veterans' pages for a new template for a ship roster and stumbled upon yours.

    I liked your coding style so I copied it, but it's my first time outright copying so much from somebody without changing it so I felt the need to tell you.

    Didn't know what the protocol was in these cases so I added a link to your page. Hope you don't mind.

    Well, that's it. Have a nice day. o7

      Loading editor
    • Sure, you can use it, without any attribution if you want :)

      I was basing it on http://kancolle-calc.net/kanmusu_list.html (example), there you have all ships listed (I will add all ships to mine eventually) and use black for ships you don't have and that other color for married ships. So I added more colors and used level cells for general comments also. The order with three columns can be strange, so using four columns and level/comment cells under ship cards is something you can try.

      For colors I'm using 50/100 from https://material.google.com/style/color.html#color-color-palette. So in your list, for example, it's hard to distinguish (for me, at least) between 81-90 and 100+ (Roma and Mutsu). Also, 99 color somehow stands out as more important (for me it's more "annoying", so I used orange).

        Loading editor
    • The colors are tentative in fact. I'm still trying different tones to see how much they clash with one another. The level range thing saves me the pain to recheck all the levels every month or so, so I think I'll keep the three columns for a while, even if they look better in the edit history, with the whole page, but it's alright. Thank you for the suggestion and for the links.

        Loading editor
    • A FANDOM user
        Loading editor
  • Hey がか

    I saw you changed back my edit of B70 from S rank to at least A rank. Afaik, I've checked out multiple sources (kancolle.wiki, jp kc wiki) and they all state that the requirement is S-rank.

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