State Loader [behavior] - devlog, ideas, etc

  • This State Loader behavior allows you to paste-in json strings of a saved object to override the object's initial parameters at layout start time. It works with Sprites, Particles, TiledBackgrounds and Tilemaps. Unfortunately I don't believe it is possible (yet?) for the layout editor properties to be changed at edit time, so there is no update of object position etc in the editor.

    Additional feature. As I tinkered with tilemap I thought it would be useful to add support for a Tiled tilemap json save. Any compression option is acceptable, and (as above) the tilemap will be updated at the start of the layout.

    Properties:

    State Json: the object save as.json string.

    Set world state: choose whether the world info parameters should be loaded (position, angle, etc).

    Set runtime state: choose if the runtime parameters should be loaded (frame, particles, etc).

    Tilemap tiles json. Load the tilesJSON from a save of tile status.

    Tiled json. Load a Tiled output json (multi-layers compatible).

    Tiled layer name. The name of the layer to load into the tilemap object.

    I've also added an action so that Tiled json strings and/or alternative layer names can be set during runtime. Final bug testing is ongoing and this should be ready very soon.

  • Same here:

    construct.net/en/forum/construct-3/general-discussion-7/discussion-possible-feature-148280

    Question is can we load behavior preferences as well?

    Im fine with it not adding anything to the object if they aren't setup for it already.

  • newt - Editor hooks would be amazing but I don't see any progress in that direction by the team, so I expect it will be a long way off, if it ever happens.

    This loader plugin will support the standard behaviors, so now I've done a basic save for the main objects I now have to experiment with each one to learn its specifics... This'll take me a few days and I'll post a progress report when I'm done.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • newt - Which behaviors would you be interested in directly loading this way? The game-save jsons only contain obscure numerical editor references to the object's behaviors (editor id number) - so the only way to identify a particular behavior in this plugin would be by checking the names of the saved keys. I don't think I have it in me to figure them out for all of the possible behaviors due to a mild lack of interest, but if there are one or two that are worth supporting then I'll give them a look.

  • Id say Los, Physics, Pathfinding, Bullet, Platform. There's probably more.

    One thought as an alternative is the system save slots. Rather than do each object, save the entire layout with No Save behaviors on the ones you don't want.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)