[EOS Text Interpreter] Write teases as text

All about the past, current and future webteases and the art of webteasing in general.
---
Post Reply

Would you use this

I'm writing teases and I would use this
2
40%
I'm writing teases and I would NOT use this
1
20%
I'm NOT writing teases and I would write teases if this was available
2
40%
I'm NOT writing teases and I don't care
0
No votes
 
Total votes: 5

Domi-nation
Explorer
Explorer
Posts: 38
Joined: Fri Sep 29, 2017 8:35 am

[EOS Text Interpreter] Write teases as text

Post by Domi-nation »

Hey guys!

To make my tease creation process faster I'm creating a text parser and an interpreter to be able to write teases as text that would then be interpreted and rendered in eos.

It still relies on eos and thus is limited by the features eos offers (no access to the DOM, not being able to create notifications in javascript). But new features can be added with workarounds (for example: persistent notifications, loops, ...)

I'm in the early stages and quickly created a first version of both parser and interpreter. There are still bugs and non implemented feature.

I wanted to get an early idea if some of you would be interested and would use it if I made it publicly available. In that case we could discuss together what other interesting features could be added and how to improve the pseudocode.

Also this interpreter can be used for only parts of the tease (ex: 1 or 2 pages) while still having the rest of the tease written as usual.

Here are some advantages / disadvantages:

Advantages:
  • Quicker to write
  • Quickly change the default settings that get applied to the whole tease / page (ex: allowSkip, timerDuration, etc)
  • Possibility let the user change the default settings
  • Persistent notifications
  • Easy to create different routes
  • Easy to use random texts and alternative texts
  • In the future: Loops
Disadvantages:
  • Text disappears after each line
  • Need to add notifications manually and give them a unique Id
  • Need to learn the pseudocode
  • Boilerplate things to add (give images and id) => this might be automated in the future
This is what it looks like for now:
A text written like this:
Spoiler: show
[random-dialogs]
edge: Edge for me/Edge!/Would you edge for me?

[default]
allowSkip: true
persistantNotification: persistant
timerDuration: 10
timerMode: secret

[step]
image: caprice_1
text: Hey <name>!
eval: var edgeNumber = 5

[step]<mod:long-dialog>
I will explain to you how this would work
Each step would be a loop to the same page and the desired content would be rendered
Here in the long dialog you could write well ...
Long dialogs
Each line would be a say action in the tease
You could also add default settings for each page at the beginning
For example here the users can skip
And there is a persistant notification with the id "persistant" on the right

[step]
text: Notifications would be added manually to the tease and would be rendered by a unique id
notification: edge

[step]
image: caprice_2
text: <tease.getRandomDialog('edge')>

[step]
image: caprice_3
text: Text could be _styled_ in **Markdown**
text-alt-1: Alternative texts are chosen randomly

[step]
image: caprice_4
text: Choices would also need to be added manually to the tease and would be rendered by a unique id
choice: choice_1

[step-alt-1]<mod:if (edgeNumber > 10)>
image: caprice_5
text: Alternative routes could be added depending on conditions
choice: choice_1

[step-alt-1]
text: Once in the route it would follow its course

[step-alt-1]
text: Before going back to the main route on the next step

[step-alt-1]<mod:if (edgeNumber > 5)>
text: It would be also possible to add as many alternative routes as you want

[step-alt-1]
text: If checks with the same alt route id are treated as else if

[step-alt-1]<mod:else>
text: The conditions are evaluated in order and the first route that meets the conditions is selected

[step]
text: Timers could be added with the duration
timer: 5

[step]
text: If timer is set to true the default duration is selected
timer: true
timerMode: visible

[step]
text: You could use evals as usual
eval: edgeNumber++

[step]
text: And when this part is over you can change page
goToPage: EndDemo
[end-file]
Is parsed to this:
Spoiler: show

Code: Select all

var pageSettings = {
	defaultSettings: {
		allowSkip: true,
		persistantNotification: 'persistant',
		timerDuration: 10,
		timerMode: 'secret',
	},
	randomDialogs: { edge: ['Edge for me', 'Edge!', 'Would you edge for me?'] },
	steps: [
		{ image: 'caprice_1', text: 'Hey <name>!', eval: 'var edgeNumber = 5' },
		{ text: 'I will explain to you how this would work' },
		{
			text: 'Each step would be a loop to the same page and the desired content would be rendered',
		},
		{ text: 'Here in the long dialog you could write well ...' },
		{ text: 'Long dialogs' },
		{ text: 'Each line would be a say action in the tease' },
		{
			text: 'You could also add default settings for each page at the beginning',
		},
		{ text: 'For example here the users can skip' },
		{
			text: 'And there is a persistant notification with the id "persistant" on the right',
		},
		{
			text: 'Notifications would be added manually to the tease and would be rendered by a unique id',
			notification: 'edge',
		},
		{ image: 'caprice_2', text: "<tease.getRandomDialog('edge')>" },
		{
			image: 'caprice_3',
			text: [
				'Text could be _styled_ in **Markdown**',
				'Alternative texts are chosen randomly',
			],
		},
		{
			image: 'caprice_4',
			text: 'Choices would also need to be added manually to the tease and would be rendered by a unique id',
			choice: 'choice_1',
		},
		[
			{
				condition: 'edgeNumber > 10',
				steps: [
					{
						image: 'caprice_5',
						text: 'Alternative routes could be added depending on conditions',
						choice: 'choice_1',
					},
					{ text: 'Once in the route it would follow its course' },
					{
						text: 'Before going back to the main route on the next step',
					},
				],
			},
			{
				condition: 'edgeNumber > 5',
				steps: [
					{
						text: 'It would be also possible to add as many alternative routes as you want',
					},
					{
						text: 'If checks with the same alt route id are treated as else if',
					},
					{
						text: 'The conditions are evaluated in order and the first route that meets the conditions is selected',
					},
				],
			},
		],
		{ text: 'Timers could be added with the duration', timer: 5 },
		{
			text: 'If timer is set to true the default duration is selected',
			timer: true,
			timerMode: 'visible',
		},
		{ text: 'You could use evals as usual', eval: 'edgeNumber++' },
		{
			text: 'And when this part is over you can change page',
			goToPage: 'EndDemo',
		},
	],
}

And then the interpreted would render this: Eos Tease to the user for now
JupyterKing
Curious Newbie
Curious Newbie
Posts: 1
Joined: Wed Aug 11, 2021 8:48 am

Re: [EOS Text Interpreter] Write teases as text

Post by JupyterKing »

This is a great job! I personally think, this will save a lot time for a tease creator!
mrtres
Curious Newbie
Curious Newbie
Posts: 4
Joined: Mon Dec 23, 2013 6:28 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch
Sub/Slave(s): Done and enjoyed:

Jia, need a banana (and to be home alone):
https://milovana.com/webteases/showtease.php?id=47999

Teasefight invitational
https://milovana.com/webteases/showtease.php?id=39332

Re: [EOS Text Interpreter] Write teases as text

Post by mrtres »

Cool! I was considering working in the JSON-export, as a kind of short cut - but I'm sure that would be rather error prone.
Post Reply