Automatic Imp Maps Downloader

Discussion in 'Tutorials & Resources' started by Skylark, Apr 12, 2020.

  1. Skylark

    aa Skylark Raccoons

    Messages:
    115
    Positive Ratings:
    228
    ImpMapsDownloader_2020-04-13_02-52-43.png

    [​IMG]

    My internet isn't very fast so when changing maps during the imp I end up joining a minute later than everyone else, with this automatic imp maps downloader it will download and unzip all of the maps in the queue and keep it up to date so there's no more waiting for it to download when everyone else is trying to download.
    This also solves the issue of being told a map is missing.

    I hope this helps other people, I'm planning on absorbing this into a much larger application later but I needed this now.

    Key features:
    • Automatically download imp maps as they are queued, no more waiting while in the imp.
    • Subscribe to lists of curated maps, by default you will be subscribed to a collection of maps for contests, gamedays, and featured maps. Make your own lists with AIMDGameDayGenerator.exe.
    • Get notified when an imp is going to begin and see if a server is active, servers are customisable and you can add your favourite servers to be told when there are lots of people online. (If you do not want this inside config.json at the bottom there is the key
      "askToJoinImp", set the true to false)

    Github project: https://github.com/teenangst/Imp-Maps-Downloader
    Download here: https://github.com/teenangst/Imp-Maps-Downloader/releases
     
    • Thanks Thanks x 8
    • Like Like x 7
    Last edited: Nov 5, 2020
  2. Skylark

    aa Skylark Raccoons

    Messages:
    115
    Positive Ratings:
    228
  3. Skylark

    aa Skylark Raccoons

    Messages:
    115
    Positive Ratings:
    228
    A3

    - If there is a recommended config change you will be prompted to accept or deny the change.
    Earlier today the location of where maps were stored changed from `https://cdn.tf2maps.net/maps/` to `https://redirect.tf2maps.net/maps/` and you had to know about config.json and also the change to fix this, now you just need to press the y key

    AIMD A3.png
     
  4. Skylark

    aa Skylark Raccoons

    Messages:
    115
    Positive Ratings:
    228
    A4

    AIMD A4.png

    Rewrote and refactored the whole application to add the ability to download a list of maps.
    Any list of maps can be grouped up and shared, give someone a link to the index and they can subscribe to a number of lists; the default index everyone has access to https://pastebin.com/0UZZJkR0 will be updated with contest, gameday, and jam maps - when a new list is available you will be asked if you would like to subscribe or not (if you change your mind go into config.json and change the value of `subscribed`.
    To create a list use the AIMDGameDayGenerator.exe which takes in a path to a file with a list of maps, or a path to a folder of maps; a name; and an expiry date (people can still subscribe after this date but they won't be notified). You will receive a JSON file correctly formatted, this can be uploaded anywhere including Pastebin (allows for editing), and Discord (doesn't allow editing).
    To add a new index go into your config.json and under `gamedayindexendpoint` add a new URL (make sure there is a comma at the end of lines). If the resource caches but you don't want it, add an `*` to the end of the URL (do not do this to resources that don't update, i.e. don't use it for Discord URLs).
    When editing an index you can either regenerate an index from a file or folder, or edit the JSON manually and then passing the path to the JSON into AIMDGameDayGenerator.exe which will recalculate the hash.

    https://github.com/teenangst/Imp-Maps-Downloader/releases/tag/A4b



     
    • Thanks Thanks x 1
    Last edited: May 27, 2020
  5. Skylark

    aa Skylark Raccoons

    Messages:
    115
    Positive Ratings:
    228
  6. Skylark

    aa Skylark Raccoons

    Messages:
    115
    Positive Ratings:
    228
    mapcycle.png

    I have added Startacker's Map Cycle and I want to point out that if you do want to subscribe do this before an imp because it will take a while to download
     
  7. Skylark

    aa Skylark Raccoons

    Messages:
    115
    Positive Ratings:
    228
    A5

    ImpMapsDownloader_2020-06-14_16-05-35.png
    aimd A5.png

    Get notified when imps start and kept up to date if they are still alive through the title which will cycle through active servers.
    You can add other servers to watch, just copy one of the other servers in config.json and edit the ip and name (don't forget the commas between servers)
    To disable this feature set `askToJoinImp` to `false`, you can also disable config changes by setting `checkChanges`to `false`.

    Error 5 shouldn't appear until there's actually a problem this time.

    Do not use an older config.json with A5 as this will cause issues.

    Also this is step 1 towards implementing a queue system to make joining imps a lot fairer, first come first served, no more spamming retry

    Video guide on adding custom servers to get pinged for


    https://github.com/teenangst/Imp-Maps-Downloader/releases/tag/A5
     
    • Like Like x 1
    Last edited: Jun 14, 2020
  8. Skylark

    aa Skylark Raccoons

    Messages:
    115
    Positive Ratings:
    228
  9. x6herbius

    aa x6herbius

    Messages:
    383
    Positive Ratings:
    282
    This looks cool! Also you're the first person I've ever come across who actually programs in F#.
     
    • Like Like x 1
  10. Skylark

    aa Skylark Raccoons

    Messages:
    115
    Positive Ratings:
    228
    It's such a fun language
     
  11. Skylark

    aa Skylark Raccoons

    Messages:
    115
    Positive Ratings:
    228
    A6

    Now that my maplist API is stable I have removed web scraping from this project. I have also made `askToJoinImp` default to `false` because it was probably annoying to most people, enable it in config.json.

    Fixed an issue where AIMDGameDayGenerator was fetching the whole map to check that it existed, it now only requests the header so it will verify maps exist faster.

    Also refactored types so this functional program is more functional.

    `config.json` format has been updated but it is not necessary to generate a new one.

    https://github.com/teenangst/Imp-Maps-Downloader/releases/tag/A6