[EOS/TOOL] Nyx/Flash to Eos Tease Converter

All about the past, current and future webteases and the art of webteasing in general.
---
fapnip
Explorer At Heart
Explorer At Heart
Posts: 431
Joined: Mon Apr 06, 2020 1:54 pm

[EOS/TOOL] Nyx/Flash to Eos Tease Converter

Post by fapnip »

It's not perfect (there are things this may not emulate properly yet, text filters that need to be added/adjusted, etc.), but here's a preliminary release of my Nyx/Flash to Eos conversion tool:

https://codepen.io/fapnip/full/RwVyNWB

If you have unpublished Nyx teases you want to convert, see here.

If you'd like me to develop it further, give it a try and let me know about teases it's failing on.
Last edited by fapnip on Mon Sep 20, 2021 2:56 am, edited 4 times in total.
RemiHiyama
Explorer At Heart
Explorer At Heart
Posts: 203
Joined: Thu Feb 28, 2019 3:30 pm
I am a: Switch

Re: [EOS/TOOL] Nyx/Flash to Eos Tease Converter (preliminary test)

Post by RemiHiyama »

I don't know if I'd call it "failing", but I tried throwing it at a pretty simple nyx tease (https://milovana.com/webteases/showtease.php?id=26581), and found that text seems to appear significantly larger in the EOS-converted version. I'm not sure why this is, since chrome's inspect function seems to think they should be the same size, but they don't seem to be showing up that way.

I also tried it on the original version of Anal Prostitute (https://milovana.com/webteases/showtease.php?id=37859). Of course, this is broken, so maybe it's not a fair test. But viewing it through that link at least gets to the backroom, which is a part that seems to have been lost in the conversion. And then of course the rest of it breaks because it expects the random action pages to be named page1...page15, and they're actually named 1...15. (And the disable commands... I'm not sure what they expect, actually.) I have been led to believe this is a bug in the site's conversion. And it doesn't look like pages.goto does the "select one of these randomly" behavior, so it tries to go to a page named something like "page+(8|9|10|11|12|13)" that obviously doesn't exist, and fails again. I'm also noticing a distinct tendency for the editor to whitescreen when trying to edit 'say' actions...

Futa Snakes and Ladders 2 Flash (https://milovana.com/webteases/showtease.php?id=31997) behaves oddly on the site (the continue button is in the wrong place). The conversion doesn't show any buttons at all, so progression is impossible.
Auto: Replaces selected instances of the word "not" with the word "definitely".
fapnip
Explorer At Heart
Explorer At Heart
Posts: 431
Joined: Mon Apr 06, 2020 1:54 pm

Re: [EOS/TOOL] Nyx/Flash to Eos Tease Converter (preliminary test)

Post by fapnip »

RemiHiyama wrote: Sat Jul 31, 2021 6:57 am I don't know if I'd call it "failing", but I tried throwing it at a pretty simple nyx tease (https://milovana.com/webteases/showtease.php?id=26581), and found that text seems to appear significantly larger in the EOS-converted version. I'm not sure why this is, since chrome's inspect function seems to think they should be the same size, but they don't seem to be showing up that way.
The pt font size in Eos isn't working well, so for now I've just set the converter to remove any font-size styles from spans it finds, until I come up with a better way to convert the requested font size to something more Eos friendly.

It could also be nice to automatically split up large blocks of text into multiple says with auto delays between them, but that could mess up the flow of the tease, etc. I'd need more input on this.
RemiHiyama wrote: Sat Jul 31, 2021 6:57 am I also tried it on the original version of Anal Prostitute (https://milovana.com/webteases/showtease.php?id=37859). Of course, this is broken, so maybe it's not a fair test. But viewing it through that link at least gets to the backroom, which is a part that seems to have been lost in the conversion. And then of course the rest of it breaks because it expects the random action pages to be named page1...page15, and they're actually named 1...15. (And the disable commands... I'm not sure what they expect, actually.) I have been led to believe this is a bug in the site's conversion. And it doesn't look like pages.goto does the "select one of these randomly" behavior, so it tries to go to a page named something like "page+(8|9|10|11|12|13)" that obviously doesn't exist, and fails again. I'm also noticing a distinct tendency for the editor to whitescreen when trying to edit 'say' actions...
Yeah, unfortunately, the backroom pcm2.range(...) action on that tease is broken. It requests a page prefix of 'page', but it looks like the pages don't have any prefix. If there were a bunch of pages like page8, page9, etc., then pages.goto("page+(8|9|10|11|12|13)") should work (even though the Eos editor doesn't like +(....) notation in goto/enable/disable action targets, it is a valid target.)

Regardless, I've added more complete (but mostly untested) pcm2/Nyx PageTracker emulation to the converter. This broken tease will still fail on backroom however, until the pcm2.range(...) call is manually fixed to set the prefix to '"" instead of "page".

Looks like I missed converting the nyx.page.instruc property, so that's why it couldn't get past the lobby. Should work in v0.1.6+ now.
RemiHiyama wrote: Sat Jul 31, 2021 6:57 am Futa Snakes and Ladders 2 Flash (https://milovana.com/webteases/showtease.php?id=31997) behaves oddly on the site (the continue button is in the wrong place). The conversion doesn't show any buttons at all, so progression is impossible.
Again related to not converting nyx.page.instruc property.

(If a tease has buttons in both instruc and actions, then the buttons in "actions" currently won't show. If anyone runs into a tease with this, let me know. Not exactly sure how to handle that case yet.)

Thanks for testing and reporting!
RemiHiyama
Explorer At Heart
Explorer At Heart
Posts: 203
Joined: Thu Feb 28, 2019 3:30 pm
I am a: Switch

Re: [EOS/TOOL] Nyx/Flash to Eos Tease Converter (preliminary test)

Post by RemiHiyama »

Regardless, I've added more complete (but mostly untested) pcm2/Nyx PageTracker emulation to the converter. This broken tease will still fail on backroom however, until the pcm2.range(...) call is manually fixed to set the prefix to '"" instead of "page".
Yep, seems to fix it. I'm not sure whether or not the unset calls are doing what they're supposed to, partly because I'm not clear on what that is, or why some pages have the page number, some have a "#", and some have "#1".
Auto: Replaces selected instances of the word "not" with the word "definitely".
fapnip
Explorer At Heart
Explorer At Heart
Posts: 431
Joined: Mon Apr 06, 2020 1:54 pm

Re: [EOS/TOOL] Nyx/Flash to Eos Tease Converter (preliminary test)

Post by fapnip »

RemiHiyama wrote: Sat Jul 31, 2021 9:39 pm I'm not sure whether or not the unset calls are doing what they're supposed to, partly because I'm not clear on what that is, or why some pages have the page number, some have a "#", and some have "#1".
Thanks again for testing.

I'm also not positive set/unset and more in pcm2 is doing what it's supposed to, since so few teases seem to use most of it, but I tried to translate the ES6 code from Eos' pcm2 Nyx compatibility module to code that can run in the interpreter as faithfully as I could.

From what I can see, there's no provision for '#' characters in the original code -- so I think those #'s are another bug in that tease.
RemiHiyama
Explorer At Heart
Explorer At Heart
Posts: 203
Joined: Thu Feb 28, 2019 3:30 pm
I am a: Switch

Re: [EOS/TOOL] Nyx/Flash to Eos Tease Converter (preliminary test)

Post by RemiHiyama »

I think I read once that the the page name would be 'set' automatically upon visiting one, and then when randomly selecting a page, ones that were 'set' would be excluded. That 'automatic' part is optional in GuideMe, but I'm not sure it is in Nyx. Looking at the nyx source for those last couple teases doesn't show anything I can see that would change that behavior, and they both have the "unset the number of the current page, then go to a page selected from a range" pattern, it's just that the way the page names/range command were converted gets along with one tease and not the other. (The 'go' commands Anal Prostitute uses look just like the ones in the command reference and in examples elsewhere, I don't know why they don't work.)

I suspect it would be appropriate to treat any range command with the prefix 'page' as though it were empty. For instance, if you compare the EOS and Nyx source for https://milovana.com/webteases/showtease.php?id=2909 (which does work properly, or at least the range commands do), that's exactly what it does - the prefixes in both range commands are empty strings.

This thread might provide some useful examples for set, unset, and it's weirder cousins: viewtopic.php?t=4355

And the example for must() seems to imply that the standard Nyx behavior is to automatically set any page as it's visited. ... Maybe you're already doing that, I'm not entirely clear on what the code is doing. But the fact that my test version of Anal Prostitute with the range prefixes fixed but the unset commands all broken does not run out of pages to go to suggests that this is not taking place.
Auto: Replaces selected instances of the word "not" with the word "definitely".
fapnip
Explorer At Heart
Explorer At Heart
Posts: 431
Joined: Mon Apr 06, 2020 1:54 pm

Re: [EOS/TOOL] Nyx/Flash to Eos Tease Converter (preliminary test)

Post by fapnip »

RemiHiyama wrote: Sun Aug 01, 2021 6:26 am I think I read once that the the page name would be 'set' automatically upon visiting one, and then when randomly selecting a page, ones that were 'set' would be excluded. That 'automatic' part is optional in GuideMe, but I'm not sure it is in Nyx. Looking at the nyx source for those last couple teases doesn't show anything I can see that would change that behavior, and they both have the "unset the number of the current page, then go to a page selected from a range" pattern, it's just that the way the page names/range command were converted gets along with one tease and not the other. (The 'go' commands Anal Prostitute uses look just like the ones in the command reference and in examples elsewhere, I don't know why they don't work.)
On every page visit, a counter for the page is stored in Nyx. In the converted tease, this code (in Init Script if pcm2 use was detected) should do effectively the same thing Nyx is doing.
RemiHiyama wrote: Sun Aug 01, 2021 6:26 am I suspect it would be appropriate to treat any range command with the prefix 'page' as though it were empty.
But if pages were named 'page1', 'page2', etc., instead of 1, 2, 3, then this would fail, wouldn't it?
RemiHiyama wrote: Sun Aug 01, 2021 6:26 am For instance, if you compare the EOS and Nyx source for https://milovana.com/webteases/showtease.php?id=2909 (which does work properly, or at least the range commands do), that's exactly what it does - the prefixes in both range commands are empty strings.
I take the prefixes and use them as is. So if they're empty in the source, the should be empty in the conversion.

(Thanks for that Nyx tease link. Certainly shows some stuff I've not yet supported in conversions. Some of it I won't be able to support fully, but I'll see what I can do.)
RemiHiyama wrote: Sun Aug 01, 2021 6:26 am And the example for must() seems to imply that the standard Nyx behavior is to automatically set any page as it's visited. ... Maybe you're already doing that, I'm not entirely clear on what the code is doing. But the fact that my test version of Anal Prostitute with the range prefixes fixed but the unset commands all broken does not run out of pages to go to suggests that this is not taking place.
Does it behave the same in the original, or are you unable to get to that point to compare?
Last edited by fapnip on Wed Aug 04, 2021 4:12 am, edited 1 time in total.
fapnip
Explorer At Heart
Explorer At Heart
Posts: 431
Joined: Mon Apr 06, 2020 1:54 pm

Re: [EOS/TOOL] Nyx/Flash to Eos Tease Converter (preliminary test)

Post by fapnip »

RemiHiyama wrote: Sun Aug 01, 2021 6:26 am Nyx source for https://milovana.com/webteases/showtease.php?id=2909
v0.2.6 tries to warn about issues it detects that there's no real solution for in teases like this.
RemiHiyama
Explorer At Heart
Explorer At Heart
Posts: 203
Joined: Thu Feb 28, 2019 3:30 pm
I am a: Switch

Re: [EOS/TOOL] Nyx/Flash to Eos Tease Converter (preliminary test)

Post by RemiHiyama »

fapnip wrote: Sun Aug 01, 2021 4:17 pmBut if pages were named 'page1', 'page2', etc., instead of 1, 2, 3, then this would fail, wouldn't it?
Are they ever though? For every tease where I've compared the Nyx source to the EOS script that your program then uses as a base, you've got pages with names like "1#page", "2#page", "tree#page" in Nyx, which then becomes "1", "2", "tree" in EOS. Names like "page1" don't seem to happen... well, maybe "page1#page" would become that, but who does that? I'm pretty convinced at this point that still having the "page" prefix is a glitch in the conversion, since it gets removed in every functional tease I've looked at.
RemiHiyama wrote: Sun Aug 01, 2021 6:26 am And the example for must() seems to imply that the standard Nyx behavior is to automatically set any page as it's visited. ... Maybe you're already doing that, I'm not entirely clear on what the code is doing. But the fact that my test version of Anal Prostitute with the range prefixes fixed but the unset commands all broken does not run out of pages to go to suggests that this is not taking place.
Does it behave the same in the original, or are you unable to get to that point to compare?
Eh... that's a little tricky, because I don't have a browser with flash to play with things in the nyx editor (assuming it still works), and anyway there's ways in which the original tease does appear to be broken.

Taking a Nyx tease whose EOS conversion does work properly, and breaking the unset options to see what happens...

Well, time to put some cards on the table. I'm one of the many people who has looked at making an offline EOS player, and I went the route of "make a local webserver that presents things to the webrowser in the same way the site does, just with the calls rerouted to the local machine". I have something that's got issues and is not ready for release, but does allow me to play edited EOS teases, including Nyx conversions, which you can't do by restoring the JSON in the site's editor.

Using as an example the Futa Sankes and Ladders 2 Flash tease that was linked to before. Page 2 can jump to any page between 3 and 8. If you jump repeatedly to 2 and continue, you'll get the expected behavior of repeats and even streaks being possible.

If I proceed to edit the json so that the unset instructions point to nonexistent pages and repeat the same process, each page will be randomly selected once, and once all have been visited pushing the continue button does nothing.

If I then take my edited json and upload it to your converter, and again repeatedly visit page 2, I get the "repeats and streaks" behavior in my player and through the site. The unset instructions have absolutely no effect on the operation of the tease.

Now, it's not impossible that my offline player is changing the behavior somewhere, but I don't really think so. None of the glitches I've run into in testing have been errors in tease logic, it's all been "I told the browser to look for a file that didn't exist, and it doesn't like that". The only edits made to the javascript are to redirect urls to the local server, not anything that should change the logic of tease commands.
Auto: Replaces selected instances of the word "not" with the word "definitely".
fapnip
Explorer At Heart
Explorer At Heart
Posts: 431
Joined: Mon Apr 06, 2020 1:54 pm

Re: [EOS/TOOL] Nyx/Flash to Eos Tease Converter (preliminary test)

Post by fapnip »

RemiHiyama wrote: Sun Aug 01, 2021 8:15 pm Are they ever though?
I've updated the converter in v0.2.9 to check if any pages start with the given prefix followed by one or more numbers. If such a page doesn't exist, it'll clear the page prefix.
RemiHiyama wrote: Sun Aug 01, 2021 6:26 am Eh... that's a little tricky, because I don't have a browser with flash to play with things in the nyx editor
You can install Pale Moon Browser and Flash Player v32.0.0.371, though I would be careful where you browse with that combination.
RemiHiyama wrote: Sun Aug 01, 2021 6:26 am Using as an example the Futa Sankes and Ladders 2 Flash tease that was linked to before. Page 2 can jump to any page between 3 and 8. If you jump repeatedly to 2 and continue, you'll get the expected behavior of repeats and even streaks being possible.
Is this the way it works on your player, or in the official Nyx compatibility player?

I may be a bit confused here. Are the issues you're describing with my converter alone, or with the "official" Nyx compatibility layer bolted on Eos?
RemiHiyama
Explorer At Heart
Explorer At Heart
Posts: 203
Joined: Thu Feb 28, 2019 3:30 pm
I am a: Switch

Re: [EOS/TOOL] Nyx/Flash to Eos Tease Converter (preliminary test)

Post by RemiHiyama »

fapnip wrote: Sun Aug 01, 2021 10:11 pm
RemiHiyama wrote: Sun Aug 01, 2021 6:26 am Using as an example the Futa Sankes and Ladders 2 Flash tease that was linked to before. Page 2 can jump to any page between 3 and 8. If you jump repeatedly to 2 and continue, you'll get the expected behavior of repeats and even streaks being possible.
Is this the way it works on your player, or in the official Nyx compatibility player?

I may be a bit confused here. Are the issues you're describing with my converter alone, or with the "official" Nyx compatibility layer bolted on Eos?
Based on my understanding of things, if you damage or remove the unset commands, the tease should break. That's what's happening in the official compatibility layer (running on a local server, but still the same code), and it's not happening with your converter. So I don't think your pcm2 emulation is working correctly.

This probably isn't the best example of the behavior...

Okay, here's one that demonstrates the problems without needing to do anything special. Estim Distraction (https://milovana.com/webteases/showtease.php?id=39111) makes heavy use of set/unset commands to make sure that the pain pages for the 'game' part appear in the correct order (and that one type of error moves through the same set in order). But when run through your converter, that part breaks completely. Errors will trigger completely random pages from their set even though they're supposed to always appear in order, and pages that can be 'missed' will appear in the no-game setting even though that's not supposed to happen.

The page setdefault unsets all the pain pages (3001-3020, 4001-4020). Then the page seteasy unsets 3001 and 4001 so that the first message will appear for either type of error. Page 3001 sets 4001 and page 4001 sets 3001, so this demonstrates the automatic set behavior as well - without it, if you just clicked buttons at random, it would gradually pick from a larger set of random pages that would only decrease when you hit the other kind of error, but in the official compatibility that's not the case. Page 3001 has to be automatically setting 3001 to make things work the way they're supposed to.

ETA: Also, while this may not be a soluble problem given the limits of the converter, check out pages 100-109 and 200-203. The unset commands must run every time even though the 0 second timer going to another page comes before them in the list. That happens with the official compatibility layer, but I'm not sure what would happen with the results your converter gives.
Auto: Replaces selected instances of the word "not" with the word "definitely".
fapnip
Explorer At Heart
Explorer At Heart
Posts: 431
Joined: Mon Apr 06, 2020 1:54 pm

Re: [EOS/TOOL] Nyx/Flash to Eos Tease Converter (preliminary test)

Post by fapnip »

RemiHiyama wrote: Mon Aug 02, 2021 12:37 am The unset commands must run every time even though the 0 second timer going to another page comes before them in the list. That happens with the official compatibility layer, but I'm not sure what would happen with the results your converter gives.
I'm not sure. I would think the timer's event would execute last, even if it was defined first, but I've set the pcm2 evals to float to the top in v0.2.10 n case something is allowing the timer event to run before the evals get a chance to be executed. Let me know.
RemiHiyama wrote: Mon Aug 02, 2021 12:37 am The page setdefault unsets all the pain pages (3001-3020, 4001-4020). Then the page seteasy unsets 3001 and 4001 so that the first message will appear for either type of error. Page 3001 sets 4001 and page 4001 sets 3001, so this demonstrates the automatic set behavior as well - without it, if you just clicked buttons at random, it would gradually pick from a larger set of random pages that would only decrease when you hit the other kind of error, but in the official compatibility that's not the case. Page 3001 has to be automatically setting 3001 to make things work the way they're supposed to
It may be that I've had too many Mojitos, but guess I'm still not wrapping my head around how to see the issue. Could you give me exact steps to reproduce the issue in a tease converted with v0.2.10, and how to see the issue working correctly in the original? Like: "jump to page x, click y, you should see z, but instead you're seeing n."
RemiHiyama
Explorer At Heart
Explorer At Heart
Posts: 203
Joined: Thu Feb 28, 2019 3:30 pm
I am a: Switch

Re: [EOS/TOOL] Nyx/Flash to Eos Tease Converter (preliminary test)

Post by RemiHiyama »

fapnip wrote: Mon Aug 02, 2021 2:27 amI'm not sure. I would think the timer's event would execute last, even if it was defined first, but I've set the pcm2 evals to float to the top in v0.2.10 n case something is allowing the timer event to run before the evals get a chance to be executed. Let me know.
I'm going to have to think about how to test this, because I'm not really sure. Though I don't think it should ever break anything to do what you said you're doing.
It may be that I've had too many Mojitos, but guess I'm still not wrapping my head around how to see the issue. Could you give me exact steps to reproduce the issue in a tease converted with v0.2.10, and how to see the issue working correctly in the original? Like: "jump to page x, click y, you should see z, but instead you're seeing n."
-Go to the tease "Estim Distraction" as linked above.
-Click through normally until reaching the difficulty selection.
-Select "Easy" difficulty.
-Click buttons at random on the following pages.
--In the original, the page this takes you to will start with 3001 and increase one at a time with every click until reaching 3020, then it will always go to 3020. (Unless your random clicking gets a page where you're supposed to click and you click the right answer... I think that's something like a 1 in 40 chance, so don't worry about it.)
--In the new conversion... er, this seems to behave differently in different browsers. In Firefox, things appear to work as they should. In Chrome... it's weird. I've had it repeat 3001 multiple times, then 3002, 3003, drop back to 3002, 3005 a couple times in a row, drop to 3004...
--And now firefox is doing the same thing???

Okay, I edited the javascript to log the contents of candidates before going to a range, so it's possible to see what's happening. Things seem to work sometimes - if you choose weak difficulty, 109 seems to get set pretty consistently. (Which disables showing the ones where you're supposed to click a button. That difficulty also makes the tease freeze if you push a button, but that's not the fault of your conversion.) But when you select any other difficulty and click something you're not supposed to, the range done by poolclick gradually gets larger.

What it looks like to me is that the actual set and unset commands are now working (which they weren't on the version I'd tested previously), but you still aren't automatically running set on every page that's visited. So pages that are supposed to no longer be eligible for a visit are staying in the list.

This also breaks the behavior of the pages such as poolbryci, which if visited repeatedly should show each page from 2001 to 2020 once each (in random order), then when each has been seen once go to page 2000, which goes to page resetbryci, which unsets them all and goes back to poolbryci. But with visited pages not automatically being set, that doesn't work... and 2000 is showing up in the pool of candidates to start with, which means the must handling is apparently broken as well.

Adding a call to doSet to the handlePage function fixes most of that, but must still seems to be broken, so the range called from poolbryci will reset before it's supposed to. Not a big deal in this case, but not working as intended.
Auto: Replaces selected instances of the word "not" with the word "definitely".
fapnip
Explorer At Heart
Explorer At Heart
Posts: 431
Joined: Mon Apr 06, 2020 1:54 pm

Re: [EOS/TOOL] Nyx/Flash to Eos Tease Converter (preliminary test)

Post by fapnip »

RemiHiyama wrote: Mon Aug 02, 2021 4:42 am but you still aren't automatically running set on every page that's visited. So pages that are supposed to no longer be eligible for a visit are staying in the list.
Good catch. Missed that line in the transcription. Should be in v0.2.11 now.
RemiHiyama wrote: Mon Aug 02, 2021 4:42 am Adding a call to doSet to the handlePage function fixes most of that, but must still seems to be broken, so the range called from poolbryci will reset before it's supposed to. Not a big deal in this case, but not working as intended.
Certainly possible must isn't doing what it's supposed to, but, sans bugs, like inadvertently dropping doSet from handlePage, I'm pretty sure what I have is functionally equivalent to the original.
Last edited by fapnip on Wed Aug 04, 2021 4:11 am, edited 1 time in total.
fapnip
Explorer At Heart
Explorer At Heart
Posts: 431
Joined: Mon Apr 06, 2020 1:54 pm

Re: [EOS/TOOL] Nyx/Flash to Eos Tease Converter (preliminary test)

Post by fapnip »

v0.2.12 iterates the set/unset/must/mustnot/etc. arrays in a more simplified way to see if that helps clear up any possible bugs.
Last edited by fapnip on Wed Aug 04, 2021 4:11 am, edited 1 time in total.
Post Reply