[EOS] Create content on the fly?

Post all technical issues and questions here. We'll gladly help you wherever we can.
Post Reply
oneiromantica
Explorer
Explorer
Posts: 6
Joined: Thu Feb 22, 2024 7:16 am
Sexual Orientation: Pansexual
I am a: Switch

[EOS] Create content on the fly?

Post by oneiromantica »

As a more tech-savy user I'd like to have the option to create e.g. a Notification, a page, or just a line in a page on the fly. Is there any API functionality exposed to do so, or any way to modify the pages/notifications objects from inside a game script?
HerpDerp42
Explorer
Explorer
Posts: 65
Joined: Mon Sep 01, 2014 10:30 am
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Location: Germany

Re: [EOS] Create content on the fly?

Post by HerpDerp42 »

oneiromantica wrote: Fri Mar 08, 2024 9:12 am As a more tech-savy user I'd like to have the option to create e.g. a Notification, a page, or just a line in a page on the fly. Is there any API functionality exposed to do so, or any way to modify the pages/notifications objects from inside a game script?
I can't really help you directly but in the Eos editor, under help is a list with API references. I suspect there is nothing you envisioned though. (You might have to do create things manually to get the behaviour you want.)
80%-ish dominant, straight, German, 30
PMs are always welcome.
oneiromantica
Explorer
Explorer
Posts: 6
Joined: Thu Feb 22, 2024 7:16 am
Sexual Orientation: Pansexual
I am a: Switch

Re: [EOS] Create content on the fly?

Post by oneiromantica »

HerpDerp42 wrote: Fri Mar 08, 2024 11:21 am I can't really help you directly but in the Eos editor, under help is a list with API references. I suspect there is nothing you envisioned though. (You might have to do create things manually to get the behaviour you want.)
Yeah, I read the API and it does not provide anything I'd need. I was hoping someone had hacked around a little and stumbled about some discoveries. Really sad, as with a kind of pseudo-procedural content creation we could possibly work around size limitations.
kerkersklave
Explorer At Heart
Explorer At Heart
Posts: 552
Joined: Sun Jul 06, 2014 2:11 pm
Gender: Male
Sexual Orientation: Open to new ideas!
I am a: Slave

Re: [EOS] Create content on the fly?

Post by kerkersklave »

You cannot generate pages. What you can do is make a single page containing all the images and other elements you need and then controlling them via Javascript. There will be a bit of a delay loading that page for the first time as EOS will load all the images, but that's it.
oneiromantica
Explorer
Explorer
Posts: 6
Joined: Thu Feb 22, 2024 7:16 am
Sexual Orientation: Pansexual
I am a: Switch

Re: [EOS] Create content on the fly?

Post by oneiromantica »

kerkersklave wrote: Fri Mar 08, 2024 9:53 pm You cannot generate pages. What you can do is make a single page containing all the images and other elements you need and then controlling them via Javascript. There will be a bit of a delay loading that page for the first time as EOS will load all the images, but that's it.
Hm, that sounds interesting, too. I don't see how I could control the page progress with scripts, though - only `page.goto(identifier)`, which will jump to the beginning of the corresponding page. Could you explain what you mean?
kerkersklave
Explorer At Heart
Explorer At Heart
Posts: 552
Joined: Sun Jul 06, 2014 2:11 pm
Gender: Male
Sexual Orientation: Open to new ideas!
I am a: Slave

Re: [EOS] Create content on the fly?

Post by kerkersklave »

oneiromantica wrote: Thu Mar 14, 2024 2:04 pm Hm, that sounds interesting, too. I don't see how I could control the page progress with scripts, though - only `page.goto(identifier)`, which will jump to the beginning of the corresponding page. Could you explain what you mean?
Your tease basically has only one page, so every button goes back to the same page. Instead of using pages for progress, you modify javascript variables. The page then has to contain logic to show certain elements depending on javascript variables.

You cannot change the overall structure of a page, but you can use if-blocks to show or hide certain parts, say-actions can contain variables, choice-actions can have conditions for which actions are actually shown etc. So you can basically merge the structure of everything you need into one or a couple of pages and activate the elements you need. For certain things like notifications there is an API though to create and remove them.

I would not merge a hole tease into just one page, that might be hard to maintain, but for parts that have complex logic it can be useful. Many of the RPG-like teases use techniques like that.
oneiromantica
Explorer
Explorer
Posts: 6
Joined: Thu Feb 22, 2024 7:16 am
Sexual Orientation: Pansexual
I am a: Switch

Re: [EOS] Create content on the fly?

Post by oneiromantica »

Ah ok, now I understand what you suggest. I'd basically enclose all scenes in a `if currentScene === ...` and fall through the rest. Sadly I don't think much could be gained from moving all pages into a single page as this would not decrease the number of - whatever the single steps inside a page are called - or nesting depth or whatever.

Of course you're right, it would be madness to manage a tease in any such way. My idea was to preprocess the JSON of a tease and move as much as possible into JS code, which I'd then compress before uploading and re-inflate at runtime (packaging a inflating-lib is as cheap as 3kb), as I can't do that with JSON-structure itself. This is about overcoming the size limits of the "publish" functionality - when teases grow in size/number of pages, trying to publish will lead to HTTP500 without any useful debugging information.
Post Reply

Who is online

Users browsing this forum: No registered users and 56 guests