FANDOM


  • Hi Guy,

    you will surely notice this is a free continuation of part of our previous conversation here... :)

    Me being superlazy on doing something manually & repeatedly, I rather spend several hours or days in order to automate it ;) And this is the result: box-new-data-editor.html (plus my first 2 data contributions :)). What do you think about this minimalistic JavaScript-powered "editor"? Some thoughts you won't find in the linked file (BTW it self-destructs after 100 days if not being downloaded.):

    1. The editor could be possibly amended also for something else than cards from Pro Kit boxes. It seems like these boxes will go away soon (or later?), according to GL's strategy?
    2. Provided that BPs stats would still be useful, name of BP cars for autocompletion could be probably taken from here.
    3. Using an editor like this might be the 1st step for having a clean unified data for easy import into your statistics database.
    4. And of course, I don't claim any special rights on the editor, I coded it rather for the fun of it :)

    A side note: It's kinda stupid one cannot attach a regular file in this Fandom wiki, isn't it? Maybe they are afraid of spreading viruses, or I don't know...

    All for now, cheers! :)

      Loading editor
    • Awwww, that's cool!

      So you'd use it to type in your data without having to write the whole texts, then copy it to the clipboard and insert it in a comment on the Pro Kit Box page. This would certainly make it easier if one wants to contribute a few boxes.

      However, there are a few things to consider:

      1. I'd still have to add all the data from the comments manually. This is fine for a few boxes, but if someone wants to contribute many boxes and on a regular basis, I think the Excel sheet solution causes less work: It's easier for contributors to just type in the numbers in the right columns, and it's easier for me just to import the rows.
      2. Unfortunately, it's not so easy to host JavaScript pages on Asphalt Wiki. Every release has to be checked and permitted manually by Fandom staff. It's understandable as JavaScript can just too easily be used to harm a site, especially if it's further processed by automated wiki software.
      3. JavaScript also has to be hooked somewhere so that the wiki software executes it. I'm working on a JavaScript countdown in the background and have faced many problems I didn't expect.
      4. You can, however, create personal JavaScript here that only afffects your own view; others can't see it unless they copy your code to their own personal JavaScript page. If you want, I can tell you how it works so that you can experiment a bit.

      As for the attachments: I think that's also for copyright reasons. If a file is shared on Fandom, Fandom becomes responsible for it. They would have to hire staff that checks all attachments or face legel consequences in the worst case.

      By the way, I never told you: I always smile when I read your nickname. Did you read "Flatland" by Edwin A. Abbott? If not, look here: https://en.wikipedia.org/wiki/Flatland. I always think of you as a crazy inhabitant of Flatland dreaming about new dimensions to explore. :)

        Loading editor
    • Hi Guy,

      thanks for your feedback. I generally get and agree with your "things to consider". What do you think about the following?

      1. When noting down every single box opening, I think depending on how fast one can type, it might be faster / less cumbersome to have the names autocompleted as opposed to finding the right columns in the Excel table. I think it depends on personal preference.
      2. I was thinking about a simple conversion function (as the 2nd step) that could be written quite easily, at least in JS. It would take the text rows and output for example csv/tsv-like rows for direct copy-paste to the Excel table. The function just needs to know the "card name" -> "column number" mappings.
      3. I see that sharing an HTML page in here is problematic. I would be really glad if you shared the "personal JS" feature with me. Maybe a link to a doc page would be enough, provided there is some though ;)

      Ad attachments - Yes, you are most probably right, the licensing is quite a common problem...

      Ad Flatland - The thing about Flatland is really interesting and funny, I didn't know the book :) And if I remember correctly, my name was generated by the game, I liked it, so I only changed the number to something more meaningful... ;)

        Loading editor
    • Hi CrazyTriangle333,

      I'll come back to your reply later. In the meantime, may you please have a look at this thread? Geceo and me are talking about a way to simply display the effects of upgrades on-site. I pointed out that a8tune.com already does (better: did) this with JavaScript, so it directly touches the topic of our conversation here.

      We would like to know how a8tune calculates the ranks and other values. Do they access a database to get the values or do the simply calculate them on-site with a given formula? If possible, could you have a look at the code of the site, find out and tell us in our thread?

      Oh, I just saw that it is YOUR thread, too. :D

        Loading editor
    • Hi CrazyTriangle333,

      1. It's good to hear someone else's thought's on this. Personally, I chose the table format for myself because it was fast and did not require a real database at the beginning—which backfires now as my Excel sheet has become incredibly slow when filtering nearly 14,000 cards. Also I still think Excel tables are better organised if you keep track of boxes for a longer time and want to send a large amount. Some users send 1,000 cards at once which they have collected over weeks, so one input field does not work here. But for once-in-a-while contributions which are done immediately after the box opening, your code would be a very nice tool.
      2. Yes, of course this is possible, but you'd always have to keep track of changes in my Excel original table. Standard columns don't change very often for now, but they surely will when Pro Kits have gone and there are new boxes for the Kit cards. To sum it up: A real database would be the best solution. You could enter data in table format or with autocomplete, doesn't matter. I think I'll have to ask Fandom staff some day after the great restructuring is done if we can host a database here on Fandom. This would be ideal. We could have input fields that directly feed the database, be it in table format or text format.
      3. Personal JS: It's quite simple, you just have to click one checkbox in your profile. If you want to see what I'm doing in the background: We have already have live countdowns. You can follow the instructions below which I wrote for another user. Then you're a JS beta tester. :) You can write your own functions on your common.js page then. BUT: Are you familiar with JQuery? You have to somehow hook JS functions to a wiki page, otherwise they won't work. I've mostly copied the hooks from the original script; I didn't have the time yet to explore that more thoroughly. Anyway, here's the instructions. If you just want to activate your personal JS without having live countdowns, you just need to activate the checkbox.
      1. Open {{Tile multiplayer global bonus}} and leave the browser tab open.
      2. Go to Special:MyPage/common.js. This page doesn't exist yet. Create it.
      3. Go to User:Guy Bukzi Montag/common.js. Copy the whole code to your common.js file and publish it.
      4. Go to Special:Preferences#mw-prefsection-under-the-hood. In the section Advanced display options, check the box Enable personal JavaScript.
      5. Go back to the browser tab with {{Tile multiplayer global bonus}} and click on the template's Refresh link. The link will disappear. Instead, a countdown until the end of the current MP season is added, and the countdown for the global bonus switches from "days" to an Asphalt format (days and hours, or hours and minutes if days < 0). No more refreshing!


      • All times are given in UTC, but the countdowns should be synchronous with your local time. The MP countdown should by also exactly the same as your in-game display.
      • The Events section of Sixth Anniversary Update should now show a countdown after the MP season as well. Also the Asphalt Wiki main page.

      Maybe some pages are still cached on your computer. In some cases you'll have to press Ctrl + F5 (Firefox) to clear the cache and load the live countdowns.

        Loading editor
    • P. S.:

      You will also see some other times and countdowns on our pages that other users don't see (for example the countdown inside the Daily ads icon on Ad#Daily ads streak). As I'm still testing how they interact (or sometimes collide) with template code, these sections may sometimes look different than you are used to, or display nonsense.

        Loading editor
    • Hi again :),

      thanks for the explanation of the Personal JS feature - I have tested it and it works as expected, on all the linked pages :) I have concluded that I won't use this for the JS editor though - sharing the whole editor page as a copy-paste ready code, by using <code><pre><nowiki> together on any Asphalt page (or at my user blog, for a start), should be the "quick win" for now.

      Ad 1 + 2:

      Agreed, Excel has its limits and a public app with a database would be a great replacement. Regarding "one input field", yes, this has its limitations mainly in readability when compared to a nice table.

      Still, I can imagine combining both approaches until something better comes... :) So, to complete my "JS editor experiment", all I would actually kindly ask from you is the header line of your Excel table - a tabs or comma separated text should be sufficient. With that I will be able to both define all the card names for autocomplete and to convert the input text rows to the Excel table for direct import at anytime - if you change the columns in the future, you can simply just send me the new header line and that's it... :)

        Loading editor
    • Both input methods have their advantages. When I typed in your data for the Compact Split Box with all the blueprints, I thought: Maaan, I have to scroll endlessly through all the blueprint columns, I'm glad bps are gone now and I can collapse the columns again after this. The wider the table, the nicer our method. :-)

      Concerning the header: You don't need the exact header cell names, you just need to know where in the row which cell is, right? Anyway, here's a little explanation how a perfect box row would be:

      Rows:

      • 1 – Names, exept for column A which is variable and adapts to the earliest date if rows are filtered.
      • 2–5 – Pre-calculation stuff and filters
      • 15075 – Data row (one row per box, even if it's a 1-item box)

      Columns:

      • A – Date when the box was opened
      • B – Box name, exactly like in-game
      • C – Leave empty
      • D–K – Active update when the box was opened. Every new update gets a column after K. 1 in column of active update, otherwise empty.
      • D–EF – Numbers of cards in box
      • EG–EH – Leave empty
      • EI – Number of coins if box is a Coin Pack, otherwise empty
      • EJ–EQ – Leave empty
      • ER – Username of contributor. CrazyTriangle333 in your case.
      • >ER – Calculation stuff inserted later by me.
      Table row 1
      Table row 2
      Table row 3
      Table row 4
      Table row 5
        Loading editor
    • If you provide data for Coin Packs, simply "15x3, 6x5, 3x8" is surely the easier way to go.

        Loading editor
    • Hi,

      1. Yes, the wider the table, the more work with finding the column by eyes, that's exactly what I meant...

      2. Thanks a lot for your description of the Excel table / row. Nevertheless, I think you have maybe taken my idea of JS editor too far... ;) My current ambitions are really as simple as this: when having the resulting autocompleted text, enable a user to convert the text to tab-separated numbers which can be directly copy-pasted into your Excel table (while still filling in the missing columns like "box name" manually - automated in a future version, maybe). For this, I do think that I need just the 1st row of your table, starting from the 1st BP car name and ending at the last tech card name. What do you think? Can you copy-paste it here? :)

      3. Regarding contributing Coin Packs data, yes, the autocomplete idea is general enough for being used for this as well, maybe by having a dedicated JS editor instance for this...

        Loading editor
    • 2. But you already have the whole row, together with an example entry (row 15075)? That's why I wrote the description so you know which cells would just need an empty value for your csv list.

      3. As said, I don't thin we need this. A post like "15x3, 6x5, 3x8" is easy for me to add. But hey, I you want to include this, too, go ahead. :-)

        Loading editor
    • Or do you mean something like this (just copied and pasted directly):

      1967 Chevrolet Impala AC 378 GT Z Alfa Romeo 4C Alfa Romeo Giulietta Veloce Arrinera Hussarya GT Aston Martin One-77 Audi R8 e-tron Special Edition Bentley EXP10 Speed 6 BMW M2 BMW S 1000 RR BXR Bailey Blade Cadillac ATS-V Coupe DS 3 Racing Ducati SuperSport S ED Design Torq Ferrari Enzo Ferrari Ferrari F50 GT by Citroen Holden Coupe 60 Honda Civic Type-R Honda Integra Type-R Kawasaki Z800 KTM 1290 Super Duke Lamborghini Aventador SV Lamborghini Egoista Lamborghini Huracán Lucra L148 Marussia B2 Maserati MC12 Mazda 6 McLaren 570S McLaren 720S McLaren F1 XP-5 Mercedes SLK 55 AMG Mercedes SLR McLaren 722 Edition Mosler Super GT Onuk Sazan LM Pagani Huayra BC Peugeot Onyx Peugeot RCZ R Peugeot SR1 Porsche 918 Spyder with Weissach Package Porsche Cayman GT4 Renault Alpine Celebration Sbarro Alcador Sbarro Sparta SIN R1 Suzuki Hayabusa Vencer Sarthe W Motors Fenyr Supersport Yamaha FZ-10 Zenvo ST1 Custom Racing Engine Electric Engine Exceptional Engine F12 Engine F6 Engine Forced-Induction V8 Forced Four-Stroke Four-Stroke Engine High-Grade Engine Hot Wheels Engine Hybrid Engine i3 Engine i4 Engine i5 Engine i6 Engine Legendary Electric Rotary Engine Serial Racing Engine V-Twin Engine V6 Engine V8 Engine V10 Engine V12 Engine V12 MPI Engine V16 Engine W16 Engine Early Tech Initial Tech Mid-Tech Advanced Tech Common Tech Rare Tech Pro Tech Tires - D Suspension - D Drivetrain - D Exhaust -D Bike Tires - D Fork Tubes - D Transmission - D Bike Exhaust - D Tires - C Suspension - C Drivetrain - C Exhaust - C Bike Tires - C Fork Tubes - C Transmission - C Bike Exhaust - C Tires - B Suspension - B Drivetrain - B Exhaust - B Bike Tires - B Fork Tubes - B Transmission - B Bike Exhaust - B Tires - A Suspension - A Drivetrain - A Exhaust - A Bike Tires - A Fork Tubes - A Transmission - A Bike Exhaust - A Tires - S Suspension - S Drivetrain - S Exhaust - S Bike Tires - S Fork Tubes - S Transmission - S Bike Exhaust - S

        Loading editor
    • Again, I don't think you need the names. Names can change. You just need to know where to place your value in the comma list, don't you?

        Loading editor
    • Thanks for the names, that's really all I need. The ordered names tell me exactly which filled-in value belongs to which column (relatively to the 1st data column, of course), as long as there are no other columns in between - which is surely this case. And by using the same names (which is trivial?), the script doesn't have to know column number of every single card. Or do you have even some simpler idea for this?

      Note: When I copy the names, there are just spaces instead of tabs, probably because they are rendered as a plain text with "white-space: normal". I can fill in the separators manually, but don't you want to edit your comment, so that you use <pre>, for example? Or is there a way to display the comment's source code?

        Loading editor
    • Wait, I think it's a user preference setting. I'll test if it's admin only.

        Loading editor
    • Should be in your user preferences | Under the hood | Advanced display options | Checkbox "Enable View source on threads".

        Loading editor
    • "And by using the same names (which is trivial?), the script doesn't have to know column number of every single card. Or do you have even some simpler idea for this?"

      The problem is that I'm sure that I'll forget to send you a notice when I just correct a typo in a column name... But let's try it your way for a start. :-)

        Loading editor
    • I see, so let's try it for now :) Thx for your tip on "view source on threads" - it works, I can see the tabs. So now I've got all the needed data for the 1st useful prototype, I guess :) I will let you know when I prepare the next editor version...

        Loading editor
    • Happy coding! 🙂

        Loading editor
    • Another thing:

      It is possible that you move up some places in the winner list of our prizes for data contributors if we can't get the Player IDs from the players above you. More details at the comment on the 2019 Holiday Update page.

      Your reward is likely to be around

      19641Fusion coins full a8 19,641 and 196A8 tokens full 196, depending on the other players.

      Please go to the comment linked above for details. Could you provide your Gameloft Player ID and platform, just in case? Either here or via Discord.

        Loading editor
    • Wow, thx for letting me know. I did get so high in the table with my little data contribution? :) So for sure and for other cases, I have just created a Discord account... :) I can see there is also a chat within this wiki, have you ever tried it? Me not...

        Loading editor
    • Well, I tried it once, enjoyed the loneliness and quit.

        Loading editor
    • You are in, by the way. :-) Another player has renounced, so your Token reward has increased by →→2A8 tokens full 2←←!!!!!!!!!11111 :D

      As for your script: I saw you made a blog post for this; I think I'll place a link to it from the Adding-data-page.

      I only had a quick glance at the code so far, but as you are importing two external scripts, I see no chance that we can ever get this through review if we wanted to integrate it in our official JS code. :-(

        Loading editor
    • Two more suggestions:

      1. I think many users don't know how to generate an .html file. Could you provide a simple step-by-step guide how to do it? Something like:
        1. Create a new file in your favourite plain text editor (like Notepad)
        2. Copy the code below and paste it into your file
        3. Save it with the file extension .html instead of .txt
      2. I think you should provide a licence, for example CC BY if you want your name to be mentioned, with a link to the licence.
        Loading editor
    • Oh, nice! I'm going to be so rich ;D

      Ad official JS code integration - I see, never mind for now.

      Ad suggestions - good points, I've done as you write, you can check it.

      Thank you and you can test the editor's conversion feature on my recent data contributions now... :)

        Loading editor
    • Oh man, I just now realized that the CSV conversion box is more for me than for data contributors! :D

      But I'll have to wait until all players have contributed their player ID. The winner table is directly connected with the statistics table, and I've frozen the contributions at the day of announcing the rewards.

        Loading editor
    • Ups, really? I've tried to tell you that all the time! :)))

      OK, we will wait, no problemo :)

        Loading editor
    • No no, you can post your cards. The "new data" tag lets me find all your posts and add them afterwards.

      Yes, but I thought that the players had to generate .csv files themselves. Silly me.

        Loading editor
    • I see, ok :)

        Loading editor
    • Yes, they are here: Category:New data contributions.

      And, just in case you need to have a look at an old contribution of yours—your processed contributions are here: Category:Data contributions by CrazyTriangle333 :-)

        Loading editor
    • As the new update is out, we need one more column after "2019 Holiday Update", named "2020 Lunar New Year Update" for the .csv list.

        Loading editor
    • Forget my reply. I just tried the csv converter and realized that you don't care about the columns before the first "real" data cell. So it's fine like it is!

        Loading editor
    • Yeah, it's fine like it is, but surely there is room for improvements, like making the editor generate more complex data, so that the contributions are even more automized. Surely it would take some time (of which I don't have much) and I think practice will show where we can move further. Who knows, maybe someone will grab my code and make some great stuff with it :)

        Loading editor
    • A FANDOM user
        Loading editor
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message
Community content is available under CC-BY-SA unless otherwise noted.