Help Needed on Completion Gage/Variables

Webteases are great, but what if you're in the mood for a slightly more immersive experience? Chat about Tease AI and other offline tease software.

Moderator: 1885

Post Reply
User avatar
indyc
Explorer At Heart
Explorer At Heart
Posts: 431
Joined: Sun Mar 28, 2021 10:03 pm
Contact:

Help Needed on Completion Gage/Variables

Post by indyc »

Hello everyone,

In my tease there is a lot of areas to visit and I have been trying to brainstorm ways to add a tracker to what scenes have been seen and not.
https://milovana.com/webteases/showtease.php?id=53235

Fapnip was super kind enough to help me make the save state code and I was hoping that once made, the % completion variable would not reset unless specifically asked to be reset. This means if you selected the "No, start over" would not reset the %. I am guessing you can set it to reset certain variables and not others but my zero coding experience makes this difficult to tinker with.

Also, the only thing that came to mind for actually making the completion stat was to have about 100 variables to track each scene that is found for example aba=1, abb=1 etc and summing them all together. I would normally do a "completion=completion+1" to avoid 100 variables but this would double count a scene on repeat plays. Is there a way to disable that addition code after it is run once? The only disable function that I know of disables pages and not an eval line. If someone knows how to disable an eval line it opens up a lot more I can do with my tease as well.

Thank for any of your help. Hopefully this request makes enough sense but I am happy to expand on it.
spaisin
Explorer At Heart
Explorer At Heart
Posts: 135
Joined: Wed Sep 23, 2015 6:24 pm

Re: Help Needed on Completion Gage/Variables

Post by spaisin »

I don't know much about EOS, but from general perspective;

If you're tracking 100 separate events, you're going to need a 100 separate variables.

The "default" solution would be a table (array):
eventStatus[0] = false;

Another "easier" option is a hashmap, which could freely store values indexed by a key. Your case sounds like a good fit for a normal table though.

Couple options:

- Straight up track each completion as a bool in the table, then iterate through it when you need the total. Easily done with an array, separate variables would require maintenance by hand (you could just have aba+abb+abc.. but... just don't :-) )

- Keep a sumTotal of the completions up to date by checking "at every completion event" if you _change_ from non-complete to complete and only add to the total then.

- You could also keep track of the completion "backwards", 1 means non-complete, 0 is complete; then you can just

Code: Select all

sumTotal = sumTotal + eventStatus[eventNumber]
eventStatus[eventNumber] = 0
That way, once you've added the point from the completion table, it is removed, thus the second time around you'll just add a zero. This would remove the need to "disable" any lines.
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests