iiYO Community

Full Version: Chaptering
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!

It was mentioned in the RenPy forums that chapters would help prevent unnecessary streaming/downloading of assets. Would this be a feature that's built in or would it be something that we--as creators--would section things out in a new game.xml? Perhaps recycling the reusable assets.

And if it's the latter, and I guess this is a separate question, will you have a tutorial on how the variables and global variables work any time soon?

Guest

Hi lykanthrope!

What was meant with chapters in this case is actually scenes. So, you don't need to do anything to enable it. Having said that, images will be preloaded. Only audio will be downloaded just in time. That means a track will normally only be downloaded when a "play" command is found in your WebStory and only for the currently selected track.

If you want to make sure that assets will only be downloaded once, you should look into HTML5 App Cache. You basically need a manifest file that you put on your server where all resources are listed after one another. I'd like to make the process easier for that, so I will be thinking about that for the next version. For now, you need to do that yourself like described here:
https://developer.mozilla.org/de/docs/HT...tion_cache

As for your second question, there's no tutorial right now, but maybe these pages from the language reference help?
http://webstoryengine.org/language:conditionals
http://webstoryengine.org/language:elements:var
http://webstoryengine.org/language:elements:global
http://webstoryengine.org/language:elements:globalize
http://webstoryengine.org/language:elements:localize

Let me know if you need further assistance with variables!

There will be a tutorial as part of the Definitive Guide in the wiki. But I can't say when that will be yet, sorry.

Guest

I super appreciate your assistance, but I require it once again.

For the conditionals, it says that you can insert it into any action. So would you place the ifvar= into the tag xml attribute? Actually, now that I've looked at it for a few minutes, I'm not quite sure what it should look like in actual code format.

Then the question I originally had in mind was whether or not a choice/option/whatever you had inserted the conditional in shows up.

Do conditionals work with every command, like Choice/Option/Sub/Show?

Thanks again for the assistance and for this amazing engine!

Guest

Hi lykanthrope!

You would write the condition with attributes like this:
<sub ifvar="my_var" ifvalue="some_value" />

From the language reference page about conditionals:
"Any command can have a condition."
Additionally, <option> can have a condition, too. You can even put a condition on a <var> command itself.

Guest

I tried to take a look through the code of your message and could extrapolate that VAR has the capacity to also contain a Condition. However I think the forum software butchered what the attribute itself looks like.

Guest

The forum software lets me write HTML, too, that's why the XML tags I wrote weren't showing up. I edited the post above.

Guest

Thanks so much! That is extremely helpful!