So, I got your tease downloaded and spent a couple hours on it. As I expected there were several spots where the downloader broke javascript code when trying to convert it for GuideMe. I've attached a working copy of the xml file. Milovana doesn't allow xml attachements so just remove the ".zip" extension from the end. You may also need to update the MediaDirectory value if you used a different filename for your download.whdmusic wrote: ↑Wed Mar 13, 2024 9:50 pm Despite your excellent answer about GuideMe and javascript description viewtopic.php?p=349324#p349324, I programmed the Teasefight Invitational Cup with EOS as an online Tease instead of offline for GuideMe. I hoped, that I could get both by using your download tool. And with EOS, there's a larger audience to give feedback and further ideas which helps to bring the tease forward.
Unfortunately, this didn't go well. I cannot download my own tease. https://milovana.com/webteases/showtease.php?id=69023
I added notes at the beginning of the file describing what I found and how I fixed it. I'll summarize here, since others may find the information useful also, but there are more details in the attachment.
I can't guarantee that everything is working properly, but what I tested seemed to be working okay.
What I found
- The tease "init" code defined an object called game that included several properties and methods. GuideMe does not handle saving and restoring objects with methods (maybe the current version is better), but it turns out that the object was only used for it's random() function and none of the other properties or methods were referenced anywhere.
I added function getRandom() based on the game.random() function and then replaced all calls to game.random() with calls to getRandom() - The downloader corrupted a couple variable definitions in the init module.
The original lines werebut the downloader screwed them up. I fixed those in this file but don't have time to figure out what happened and fix the downloader right now.Code: Select all
var fighterload = "girlone,girltwo"; var teaseload = "2fighttime,2fightspeed,2fightpattern";
- The downloader also broke several functions.
Several functions accept a "girllist" parameter, like getgirl(girllist) for example.
The downloader added a getVariable() statement to the function that ended up redefining the passed list and broke the code. I commented out the extra statement and that resolved the issue. - You should also check setting of "ForceStartPage". Maybe it should be false so you can close the tease and open it again later and continue from where you left off?
- In function initializeScriptvars() maybe set initialize_on_every_load to false? Probably some stuff should be reset every time, but others maybe should not. I added a couple comments in that function to show how you can manage a mix of stuff that needs to be reset everytime and stuff that does not.
- The init code defines many variables that are never actually used, like starttime, endtime, lengthmin and lengthmax for example. I assume the code was just copied from somewhere else and not cleaned up, so no big deal. There are too many so I didn't check them all, but leaving them won't hurt anything
Feel free to ask questions here or in a PM if you run into further issues, but be patient. I try to check in here regularly, but sometimes I'm more regular than others
Good luck!
PG