The ability to export cases into standalone EXE
Moderator: EN - Forum Moderators
Re: The ability to export cases into standalone EXE
Hi, I just wanted to chime in and say I'm currently trying to create a case downloader like this in Rust, since it seems like an interesting project (and doesn't seem too hard, based on Unas's guidance). I'll need a few more days, maybe even a week, before I have anything usable though, so I'll make another post here when I'm at the point where I have a first working version.
- Enthalpy
- Community Manager
- Posts: 5219
- Joined: Wed Jan 04, 2012 4:40 am
- Gender: Male
- Spoken languages: English, limited Spanish
Re: The ability to export cases into standalone EXE
Great! If you have any technical support questions, feel free to put up a topic in the Dev Corner.
[D]isordered speech is not so much injury to the lips that give it forth, as to the disproportion and incoherence of things in themselves, so negligently expressed. ~ Ben Jonson
Re: The ability to export cases into standalone EXE
I've finished a first version of the downloader now. I'm making another post in here instead of opening a new thread because, while the downloader essentially works, there are still two things I'd like to fix first before a "proper" release:
- Psyche locks won't work correctly, I haven't handled these yet in the script. (As a side question, why is there an "?id=<some_id>" query parameter attached to psyche lock requests? Can I just remove that parameter for the offline version, or will that cause problems?)
- All default sprites are downloaded instead of just the ones that are needed.
- SuperAj3
- Posts: 1357
- Joined: Wed Sep 01, 2010 11:19 am
- Spoken languages: English, 日本語(少しだけ)
- Location: on the Flip Side
Re: The ability to export cases into standalone EXE
This is the coolest thing ever!
Trialing it now to download one of my cases.
Trialing it now to download one of my cases.
Re: The ability to export cases into standalone EXE
I tried it in one of my cases and it worked amazingly. I will probably wait for you to streamline the download process if that's in the plans before I backup my other cases (so that it doesn't need to redownload all the default assets for all of them), but this is a huge load off to think that my work won't be lost if this site ever goes down. Huge thanks for making this.falko17 wrote: ↑Sun Dec 15, 2024 3:32 am I've finished a first version of the downloader now. I'm making another post in here instead of opening a new thread because, while the downloader essentially works, there are still two things I'd like to fix first before a "proper" release:You can see the current version of the tool at https://github.com/falko17/aaoffline, along with instructions on how to use it. I'd really appreciate any feedback, especially if there's anything I've overlooked (e.g., cases where it fails, or features that don't work).
- Psyche locks won't work correctly, I haven't handled these yet in the script. (As a side question, why is there an "?id=<some_id>" query parameter attached to psyche lock requests? Can I just remove that parameter for the offline version, or will that cause problems?)
- All default sprites are downloaded instead of just the ones that are needed.
- Enthalpy
- Community Manager
- Posts: 5219
- Joined: Wed Jan 04, 2012 4:40 am
- Gender: Male
- Spoken languages: English, limited Spanish
Re: The ability to export cases into standalone EXE
Thanks. I'll look over the code later.falko17 wrote: ↑Sun Dec 15, 2024 3:32 am I've finished a first version of the downloader now. I'm making another post in here instead of opening a new thread because, while the downloader essentially works, there are still two things I'd like to fix first before a "proper" release:You can see the current version of the tool at https://github.com/falko17/aaoffline, along with instructions on how to use it. I'd really appreciate any feedback, especially if there's anything I've overlooked (e.g., cases where it fails, or features that don't work).
- Psyche locks won't work correctly, I haven't handled these yet in the script. (As a side question, why is there an "?id=<some_id>" query parameter attached to psyche lock requests? Can I just remove that parameter for the offline version, or will that cause problems?)
- All default sprites are downloaded instead of just the ones that are needed.
What query parameter for psyche lock requests are you talking about? I have a bit of a to-do list.
[D]isordered speech is not so much injury to the lips that give it forth, as to the disproportion and incoherence of things in themselves, so negligently expressed. ~ Ben Jonson
Re: The ability to export cases into standalone EXE
This isn't really a priority, so don't worry about getting around to this later if you have other things to do right now. I need some time to fix the default sprite problem anyway.
(And if you're talking about looking over my code, I'd also like to add some documentation first to make it easier to read.)
As for the query parameters, I mean this part, for example:
Code: Select all
var chain = generateImageElement(cfg.picture_dir + cfg.locks_subdir + 'fg_chains_appear.gif?id=' + locks_to_display[i].id);
Re: The ability to export cases into standalone EXE
This is just a guess, so take this with a grain of salt, but based on what Unas said in the post about GIF timings about having to use workarounds to get them working, that particular query call could simply be to prevent the browser from serving a cached version of the image, possibly as a way of displaying multiple asynchronized versions of the same gif with different timings? So the consequence of removing them (if that’s actually the case, which is a big if) would in that scenario be the psyche lock animations ending up synced up and looking a little wonky (but still playable) as a result.
Re: The ability to export cases into standalone EXE
Hmm, I tried it out now, and it does end up seeming wonky, but playable (comparison in spoiler below). Specifically, locks just seem to break again and again. Still, this seems slightly different from the thing about the timings you described, so I'm guessing the ID is there for another reason (probably something to do with identifying the lock that should break by making the image sources unique, but this is also just a guess). As long as the IDs are always within a certain range (e.g., always below 10, because there'll never be more than 10 psyche-locks at the same time), I could implement a hacky workaround by just copying the psyche lock files and appending a suffix per ID, then I'd just need to modify the JS code to use these "statically ID'ed" files instead of appending the query parameter. (Softlinking may be even better than copying if browsers support using softlinks.)TimeAxis wrote: ↑Mon Dec 16, 2024 8:42 pm This is just a guess, so take this with a grain of salt, but based on what Unas said in the post about GIF timings about having to use workarounds to get them working, that particular query call could simply be to prevent the browser from serving a cached version of the image, possibly as a way of displaying multiple asynchronized versions of the same gif with different timings? So the consequence of removing them (if that’s actually the case, which is a big if) would in that scenario be the psyche lock animations ending up synced up and looking a little wonky (but still playable) as a result.
Spoiler : Psyche Lock Comparison :
Before creating a 1.0 version and opening an own thread for the tool, I'd like to a) fix psyche-locks, possibly using the workaround described above, b) allow multiple cases to be downloaded at once (which helps for mass backups, since the player scripts etc. would only need to be downloaded once), and c) make the code a bit more readable. Of course, if any other issues come up in the meantime, I'd also like to fix these first. Assuming no major difficulties due to something I missed, this shouldn't take longer than a week.
- Enthalpy
- Community Manager
- Posts: 5219
- Joined: Wed Jan 04, 2012 4:40 am
- Gender: Male
- Spoken languages: English, limited Spanish
Re: The ability to export cases into standalone EXE
I can find the commit where the ID was added: here.
My guess is that having two copies of the same gif led to obvious graphical bugs of the kind you're seeing above... Much like TimeAxis said.
I'll be looking forward to this!
My guess is that having two copies of the same gif led to obvious graphical bugs of the kind you're seeing above... Much like TimeAxis said.
I'll be looking forward to this!
[D]isordered speech is not so much injury to the lips that give it forth, as to the disproportion and incoherence of things in themselves, so negligently expressed. ~ Ben Jonson
Re: The ability to export cases into standalone EXE
I've now fixed the psyche-lock bug, implemented the ability to download multiple cases at once, cleaned up the code (somewhat, at least), and added some integration tests to make sure any future changes don't cause problems. Since I'm at the point where I'd consider this a "1.0" version, I've opened a separate thread for this here. Thank you to Enthalpy and TimeAxis for your help here!