Variable creation in Branching Scenarios.

I think it would be great if I could use the branching scenario with more conditional logic. 

As a fun test I am trying to make a text based game using the branches, it would be great if I could make it so users need to find something before progressing. 

so during a branch, you have the option to see if a variable is set to a certain value. if yes go here, if no go there. 

 If there was a tool on the left side that was under "create content" that your custom variables could be set to int, bool, etc. it would add so much customization! 

Cheers! :)

Aiden C

Branching Scenario Conditional Logic
Content types: 
Supporter votes Members of the Supporter Network can vote for feature requests. When the supporter network has generated sufficient funding for the top voted feature request it will normally be implemented and released. More about the H5P Supporter Network
BV52's picture

Hi Aiden C,

Thank you for contributing your ideas on how to make H5P better! We’re now working on something called the H5P supporter program allowing the H5P community to vote for and fund the top voted H5P features. Also there are developers in the community who every now and then works on a feature they find interesting or useful.


otacke's picture

Hi Aiden!

I have thought about that myself, but it's rather a large feature because there are quite a lot UX related things to think about and that feature would definitely raise complexity of the content type, both in the backend and in the frontend.

Having a settings widget to define variables (boolean and integer) is simple, but having a user friendly way to define when to set a variable to what and in particular the "if this then that" part might be a little challenge. It's probably not a big deal if you stick to one "this" and one "that" (e.g. prevent proceed"), but I can imagine that quickly people would like to have a "if this and this but not this", checks for greater than/smaller than/ranges instead of single integer values, have other actions such as "jump to", "set some other variable". And you should probably have some debugging mode for the authors, too.

I think even if someone from within the community could spare the time to implement this feature, that's definitely something that the H5P core team will have to be involved with - and their time is precious and required for a lot of things.

However, one first step in that direction might be a pull request that I filed in last week.


Excelente idea todo lo que contribuya a la gamificación de los contenidos.

Excelente idea todo lo que contribuya a la gamificación de los contenidos.

Excelente idea todo lo que contribuya a gamificar los contenidos. Gracias.

Excelente idea todo lo que contribuya a gamificar los contenidos. Gracias.

Excelente idea todo lo que contribuya a gamificar los contenidos. Gracias.

Though I appreciate that it would be a lot of work and not likely to be looked at soon, there is the potential for the branching scenario content type to be so much more adaptable, with branching based on more than multiple choice questions, even if it was done in a different way, e.g. through scoring or some other mechanism to prevent users from progressing without completing activities correctly (e.g. the course presentation content type).

otacke's picture

Hi rosepear!

You don't need variables to stop people from progressing. Open the door!



benjaminwhite's picture

I'd like to start using this feature. Can you say when the release will be ready in H5P Hub or can I safely download it from github and place it in /wp-content/uploads/h5p/libraries?

otacke's picture

Hi Benjamin!

There's no ready-to-use branch on github. You'd have to merge some repositories and probably rebase them a couple of times until the "go back" feature and the "need to 'complete' content" feature are officially available. As always: The core team can't give dates - but maybe they will correct me on that.

The "require success" feature that I used Fill-in-the-Blanks for was just for the demo. There's no guarantee that it will be included, but if enough people ask ...