Here are EOS tutorials

All about the past, current and future webteases and the art of webteasing in general.
---
Post Reply
undeniable_denial
Explorer
Explorer
Posts: 96
Joined: Sat Aug 24, 2019 11:42 am
Gender: Male
Location: Germany

Re: Here are EOS tutorials

Post by undeniable_denial »

Shattered wrote: Mon Oct 24, 2022 6:27 am 1. temp1, temp2, temp3, temp4 will be different numbers.
2. lets call four more variables userAlisascore, userMilascore, userKatoscore, userBrookescore
3. The user will complete inputs to generate temp1,2,3,4.
4. If temp1 has the most points, then userAlisascore gets 3 points. the same works for 2 and userMilascore, 3 and userKatoscore, 4 and userBrookescore.
5. Then the second highest temp variable gives the score gives 2 points in the same way, the third gives 1 point.
Ok, sooooooo.... here:

Code: Select all

var userAlisascore=0;
var userMilascore=0;
var userKatoscore=0;
var userBrookescore=0;

var temp1=5;
var temp2=1;
var temp3=9;
var temp4=8;

var ranking=["temp1","temp2","temp3","temp4"];

ranking.sort(function(a,b){
  return window[a]-window[b];
});

for(var i=0;i<4;i++){
  window[ranking[i]]=i;
}

userAlisascore = userAlisascore + temp1;
userMilascore = userMilascore + temp2;
userKatoscore = userKatoscore + temp3;
userBrookescore = userBrookescore + temp4;
What I'm doing here: I put the names of the four temp variables in a list, so I can order them around. Then I sort them based on their value. In that example the new order would be: temp2,temp1,temp4,temp3.
Then I override the four temp variables in that order with 0,1,2,3.

At last I add them to their target score (no matter wether they are 0,1,2 or 3).
User avatar
Shattered
Experimentor
Experimentor
Posts: 1242
Joined: Fri Jan 11, 2013 6:41 pm
I am a: Switch
Location: United Kingdom

Re: Here are EOS tutorials

Post by Shattered »

Bright_Sprinkler wrote: Mon Oct 24, 2022 9:36 am Aight, I guess something like that could work (just some pseudo code):

Code: Select all

// save values in two arrays !their index must be matching!
// index 0 in temps is temp1 and index 0 in scores is alisa, etc.
// I'd recommend using an enum for index access or to at least leave a comment somewhere that states which index correlates to which value
// note: instead of using two arrays we could also use just one with custom objects inside, basically something like a dictionary
temps = [temp1, temp2, temp3, temp4]
scores = [alisa, mila, kato, brooke]
lowestScore // (can either be name, enum or array index)

// we'll need some functions to find the values we need
// I guess examples for these can be found online e.g. https://stackoverflow.com/questions/14017794/how-to-find-the-second-highest-number-in-javascript
// these will search for the required value and return the index of the array
function findMax(array) -> index
function findSecondMax(array) -> index
function findThridMax(array) -> index
function findMin(array) -> index

// we'll create a dedicated function that can be called from the pages
function increaseScores() {
	// loop three times, cause we need first, second and third highest value
	loop i = 0 to 3 {
		let index = -1;	
		// depending on our loop index we will search for the needed value
		switch (i)
			-> 0
			index = findMax(temps)
			-> 1
			index = findSecondMax(temps)
			-> 2
			index = findThridMax(temps)
	
	// now that we have the index of e.g. the highest value, we can just change the score in the scores array, since the index of both arrays are matching
	// the score amount to increase can be calculated using the loop index
	// i->0 = 3 | i->1 = 2 | i->2 = 1
	scores[index] += (3 - i) 
	}
}

// to set the lowest score we can do something like this
function setLowestScore() {
	lowestScore = findMin(scores)
}
undeniable_denial wrote: Wed Oct 26, 2022 9:36 pm
Shattered wrote: Mon Oct 24, 2022 6:27 am 1. temp1, temp2, temp3, temp4 will be different numbers.
2. lets call four more variables userAlisascore, userMilascore, userKatoscore, userBrookescore
3. The user will complete inputs to generate temp1,2,3,4.
4. If temp1 has the most points, then userAlisascore gets 3 points. the same works for 2 and userMilascore, 3 and userKatoscore, 4 and userBrookescore.
5. Then the second highest temp variable gives the score gives 2 points in the same way, the third gives 1 point.
Ok, sooooooo.... here:

Code: Select all

var userAlisascore=0;
var userMilascore=0;
var userKatoscore=0;
var userBrookescore=0;

var temp1=5;
var temp2=1;
var temp3=9;
var temp4=8;

var ranking=["temp1","temp2","temp3","temp4"];

ranking.sort(function(a,b){
  return window[a]-window[b];
});

for(var i=0;i<4;i++){
  window[ranking[i]]=i;
}

userAlisascore = userAlisascore + temp1;
userMilascore = userMilascore + temp2;
userKatoscore = userKatoscore + temp3;
userBrookescore = userBrookescore + temp4;
What I'm doing here: I put the names of the four temp variables in a list, so I can order them around. Then I sort them based on their value. In that example the new order would be: temp2,temp1,temp4,temp3.
Then I override the four temp variables in that order with 0,1,2,3.

At last I add them to their target score (no matter wether they are 0,1,2 or 3).

Thanks for the help y'all! For the first part, I went with undeniable's solution - don't understand how either of these works but that gave the results I wanted!

For the finding the lowest score part, I've tried to interpret what I can from this and tried a few different things but couldn't get it to work. As far as I understood from the above, I added

Code: Select all

var lowestScore = "Nobody"
var scores = [userAlisascore, userMilascore, userKatoscore, userBrookescore]
 
to my init script, then when the time came to process ran an eval for

Code: Select all

function setLowestScore() {
	lowestScore = findMin(scores)
And ran it when I wanted.

userAlisascore was 4
userMilascore was 3
userKatoscore was 2
userBrookescore was 1

But it still fed back nobody.

What did I miss :lol:

EDIT:

I adjusted Denial's code to sort-of get what I wanted. I made 4 new vars and adjusted to create this

Code: Select all

tempAlisa = userKatoscore
tempMila = userMilascore
tempKato = userKatoscore
tempBrooke = userBrookescore

var rankingscore=["userAlisascore","userMilascore","userKatoscore","userBrookescore"];

rankingscore.sort(function(a,b){
  return window[a]-window[b];
});

for(var i=0;i<4;i++){
  window[rankingscore[i]]=i;
}
Then I used 4 if statments to find the one that's zero, then set what I wanted accordingly... Think that works?

Then set the 4 values of the temps back to the original scores once i've got my if's done.

P.S. What does this code do if two scores are tied - it looks like it randomly chooses a winner? Maybe too complicated to say if they are the same, it triggers a tiebreaker round or something? :blush:
undeniable_denial
Explorer
Explorer
Posts: 96
Joined: Sat Aug 24, 2019 11:42 am
Gender: Male
Location: Germany

Re: Here are EOS tutorials

Post by undeniable_denial »

Shattered wrote: Tue Nov 01, 2022 5:30 pm don't understand how either of these works but that gave the results I wanted!
Yeah, I know, but I didn't want to write walls of text. It was also pretty late when I wrote that.
Here are a few pointers, in case you want to learn more about it:

What I called "lists": The technical term is "array". But... They're lists... and one of the things they can do, is sort themselves. Usually just alphabetically:

Code: Select all

myArray.sort();
boom- done, but if that's not what you want, you can provide a different criterion (using a sort compare function)

You've probably been wondering about "window". That's a special variable that - among loads of other things - contains all global variables as a property. This means, the following three instructions do (pretty much) the same:

Code: Select all

var test = 4;
window.test=4;
window["test"]=4;
The interesting one is the last one, because with that you can access variables that you don't know the name of at coding-time. All you need is a string containing the name of the variable, which can be determined at runtime.

The last one is a classic "for-loop". Definitely should check that out if you haven't yet. It's as common as a screwdriver.

Code: Select all

window[stringContainingMyUnknownVariableName]
This is what allows the variable-names-list-sorting-magic.
Shattered wrote: Tue Nov 01, 2022 5:30 pm
For the finding the lowest score part, I've tried to interpret what I can from this and tried a few different things but couldn't get it to work. As far as I understood from the above, I added
...

Then I used 4 if statments to find the one that's zero, then set what I wanted accordingly... Think that works?

Then set the 4 values of the temps back to the original scores once i've got my if's done.
Sorry, I didn't see the second part. Sure that works. After sorting the final scores, you know that the first one in the list is the name of the lowest variable. You can read out that name using:

Code: Select all

lowestScore = rankingscore[0];
"0" as in zero, because the first element has the index 0, the second has the index 1 and so on...
So, you don't need the for-loop in this case, I think.
Shattered wrote: Tue Nov 01, 2022 5:30 pm P.S. What does this code do if two scores are tied - it looks like it randomly chooses a winner? Maybe too complicated to say if they are the same, it triggers a tiebreaker round or something? :blush:
I would assume that they are secondarily "sorted" by their original order. In any case it shouldn't cause "problems".

A tiebreaker you say? You could use a for-loop to check how many of the first three elements are equal to the last element:

Code: Select all

var userAlisascore=5;
var userMilascore=90;
var userKatoscore=90;
var userBrookescore=90;

var ranking=["userAlisascore","userMilascore","userKatoscore","userBrookescore"];

ranking.sort(function(a,b){
  return window[a]-window[b];
});

var sameCount = 1;
for(i=0; i<3; i=i+1){
  if (window[ranking[i]] == window[ranking[3]]) {
    sameCount++;
  }
}
Then, "sameCount" contains how many scores are the same (and highest). Could be more than 2. Naturally, if it's sameCount>1, you could branch to a tiebreaker page.

Edit: right some wrongs
Frank_Castle
Curious Newbie
Curious Newbie
Posts: 1
Joined: Mon Dec 12, 2022 6:17 pm

Re: Here are EOS tutorials

Post by Frank_Castle »

Hi there,

nice Editor. Works real fine an it' pretty easy to use.

But I got a serious problem.
I cna' upload any Images.

Ist there a specific Size needed?

I tried it with different Jpg, but I can not see it in my gallery, or use it for my Tease.

What am I doing wrong?
mangoman
Explorer At Heart
Explorer At Heart
Posts: 347
Joined: Tue Apr 27, 2010 9:12 pm
Gender: Male
Sexual Orientation: Straight
I am a: Slave
Location: Krakosia
Contact:

Re: Here are EOS tutorials

Post by mangoman »

Frank_Castle wrote: Mon Jan 09, 2023 4:03 pm Hi there,

nice Editor. Works real fine an it' pretty easy to use.

But I got a serious problem.
I cna' upload any Images.

Ist there a specific Size needed?

I tried it with different Jpg, but I can not see it in my gallery, or use it for my Tease.

What am I doing wrong?
I cant upload images either. Whys that?
User avatar
indyc
Explorer At Heart
Explorer At Heart
Posts: 431
Joined: Sun Mar 28, 2021 10:03 pm
Contact:

Re: Here are EOS tutorials

Post by indyc »

mangoman wrote: Mon Feb 27, 2023 7:03 pm
Frank_Castle wrote: Mon Jan 09, 2023 4:03 pm Hi there,

nice Editor. Works real fine an it' pretty easy to use.

But I got a serious problem.
I cna' upload any Images.

Ist there a specific Size needed?

I tried it with different Jpg, but I can not see it in my gallery, or use it for my Tease.

What am I doing wrong?
I cant upload images either. Whys that?
There is currently a technical website issue preventing it that started a few days ago. If you want to still proceed you can check this thread which has a partial solution:

viewtopic.php?p=343537#p343537
imtoosexy
Explorer At Heart
Explorer At Heart
Posts: 116
Joined: Mon Jun 01, 2015 7:44 pm
Gender: Female
Sexual Orientation: Straight
I am a: Domme (Female)

Re: Here are EOS tutorials

Post by imtoosexy »

I would like to edit a tease and release it as a new tease

Is it possible to download teases and import them to the EOS editor?

I want to download simple tease setups and import them into EOS editor, but so far it has brought me errors.

I have tried using Milovana downloader 0.96 and checking the box 'cache local copy of scripts' in the options tab and uploading the local copy of the script into EOS editor

Can I download teases as a code to upload the code into the Eos editor ?

I am thinking a rookie editor to have basic templates in order to get started without needing too much Java knowledge
User avatar
indyc
Explorer At Heart
Explorer At Heart
Posts: 431
Joined: Sun Mar 28, 2021 10:03 pm
Contact:

Re: Here are EOS tutorials

Post by indyc »

imtoosexy wrote: Wed Apr 19, 2023 3:12 pm I would like to edit a tease and release it as a new tease

Is it possible to download teases and import them to the EOS editor?

I want to download simple tease setups and import them into EOS editor, but so far it has brought me errors.

I have tried using Milovana downloader 0.96 and checking the box 'cache local copy of scripts' in the options tab and uploading the local copy of the script into EOS editor

Can I download teases as a code to upload the code into the Eos editor ?

I am thinking a rookie editor to have basic templates in order to get started without needing too much Java knowledge
You may be able to do with that with classic teases but I do not know the way. You can download EOS teases and upload them in EOS. If you open anyone's tease and change the url section that has showtease and change it to geteosscript it will give you their json raw text which you can right click on and save. You then load that json file in the eos editor and can edit it from there.

However, I don't suggest making your tease based off of someone else's setup - especially for something simple. I think people overestimate how difficult EOS is to work with. Jump in and play with it for a while to see for yourself. I would expect it to be far more confusing trying to reverse engineer someone else's unless you already have lots of experience with it. Send me a PM if you have specific questions or something you want to pull off and I can walk you through how to make it happen.
imtoosexy
Explorer At Heart
Explorer At Heart
Posts: 116
Joined: Mon Jun 01, 2015 7:44 pm
Gender: Female
Sexual Orientation: Straight
I am a: Domme (Female)

Re: Here are EOS tutorials

Post by imtoosexy »

With your help I was able to upload a tease into EOS editor and look at how someone else made it as an example.

Cheers!
mangoman
Explorer At Heart
Explorer At Heart
Posts: 347
Joined: Tue Apr 27, 2010 9:12 pm
Gender: Male
Sexual Orientation: Straight
I am a: Slave
Location: Krakosia
Contact:

Re: Here are EOS tutorials

Post by mangoman »

Image

I get this kind of error when I want to upload a backup I've made in Eos. No idea what it means. I already went through the pages to look if anything seems off, but I can't find it. Can you help me?
User avatar
indyc
Explorer At Heart
Explorer At Heart
Posts: 431
Joined: Sun Mar 28, 2021 10:03 pm
Contact:

Re: Here are EOS tutorials

Post by indyc »

mangoman wrote: Mon Apr 24, 2023 6:58 pm Image

I get this kind of error when I want to upload a backup I've made in Eos. No idea what it means. I already went through the pages to look if anything seems off, but I can't find it. Can you help me?
If my following suggestions don't fix it, PM me and I have some error fixing tools that I can share with you that I don't think I have permission to make public. You could also PM me the tease link and I should be able to fix these things for you.

For page 12 line 16 or 17 (for some reason it tells me things off by one line and I can never remember in which direction) try to set a new timer type (normal(most common), secret, or hidden).

Then go to page 16 on like 52 or 53. This timer probably has something like .5s instead of 0.5s and change the timer duration to have all the digits and to make sure that it has a unit like s, ms, or m. (seconds, milliseconds, or minutes)

Hopefully this helps! Excited to see what you made.
mangoman
Explorer At Heart
Explorer At Heart
Posts: 347
Joined: Tue Apr 27, 2010 9:12 pm
Gender: Male
Sexual Orientation: Straight
I am a: Slave
Location: Krakosia
Contact:

Re: Here are EOS tutorials

Post by mangoman »

Thanks for your help, I got it!
grelgen
Explorer
Explorer
Posts: 84
Joined: Sat Dec 18, 2021 12:50 am

Re: Here are EOS tutorials

Post by grelgen »

ok, looking through EOSHOST.js, I found:

document.body.addEventListener('keydown', this.handleGlobalKeydown.bind(this))

handleGlobalKeydown = (event) => {
if (event.which === 32) {
this.emit('continue')
}
}

which as far as I can tell, takes only space characters and progresses the tease script. Would It be possible to extend this eventhandler to the EOS level so that people can type without needing to click on a prompt?
Tapopip
Explorer
Explorer
Posts: 23
Joined: Sun Nov 20, 2011 5:24 pm

Re: Here are EOS tutorials

Post by Tapopip »

Hi,
Can we request changes on the EOS editor? Or is it possible to make it a github project so we could propose pull requests?

What I'd like is:
- the hability to select multiple images and add them all to a page (I'm so bored to add them one by one)
- the hability to copy/paste a bundle of actions, not only one

Thanks!
Sheena van Sully
Curious Newbie
Curious Newbie
Posts: 4
Joined: Wed Jun 22, 2022 2:11 pm

Re: Here are EOS tutorials

Post by Sheena van Sully »

Hi

Is there a way to incorporate an embedded video or gif to a tease w/ the EOS?

Best
Sheena
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests