Skip to content

functions

These function(s) have more or less non-present usage but can still be useful. These function(s) are for advanced users.

fantasy_cmd

Description

Calls a fantasy.cmd command.

Parameters

  • string - The element or additional data.
  • string - The command.

Remarks

  • Commands are bound to get added or removed per update. This function actually mirrors a lot of the functions. For example, these are the same thing.
<script>
    fantasy_cmd( "I'm sick. I got the chickenpox!", "constelia" )

    // or

    constellation.constelia.say( "I'm sick. I got the chickenpox!" )
</script>
  • When you modify a configuration option, it is done like so:
<input onchange="fantasy_cmd(this, 'set')" type="checkbox" name="esp_sound">
  • The set command directly sets a configuration variable inside of Constellation. These are known as FantasyVars. However, they are undocumented due to irrelevance for developers (in exception to configuration management).

  • There are other commands such as save and load that set different elements on the web page. This is how menu.html works.


get_fantasy_vars

Description

This loads your configuration and all FantasyVars, and then sets the value of elements on the page depending on the value of the FantasyVar. This is how menu.html is able to set all checkboxes and inputs upon page load.

Example

  • Do not apply this example in reality because fantasy.constellation.js already has this inside its code.
$( document ).ready(function() {
    get_fantasy_vars( )
});

start_constellation

Description

This will start Constellation and make it look for a game to calibrate with. This will also fetch all your Pure Mode settings and then reload the page if needed. This function is useless except in menu.html or any place that has the correct Pure Mode elements on its page.