Custom Importer API now available

  • First off, thanks for getting all the requests added and bugs fixed so quickly. Everything is working beautifully. The custom import now exceeds the functionality and ease of use it had for C2.

    For new SDK features, please collect a complete list of everything you need then post an issue to GitHub listing them all.

    Was this just for this initial run of trying to get the basics working, or would you generally like for SDK or importer related feature requests to be submitted in this way? (as opposed to through construct3.ideas.aha.io).

    I'll list the features here in case that makes a difference, and so I have easy access to copy paste them to the appropriate place.

    Make first party plugin ACEs and IDs public

    This would be mainly for plugin developers to be able to easily create and create events for built-in object types.

    The needed items would be:

    • The plugin id (for creating an instance)
    • The id for each ACE entry
    • The parameter list for each ACE entry (the id, the type, and the id's for combo items)

    This would allow a ton of flexibility and power to the SDK. The listed items are all that I believe would be necessary, but if it's more feasible to just publish the entire aces.json that would still serve the same function.

    Methods for retrieving instances of a type within a project or scene

    If it's the only possible one, being able to retrieve the instance of a single-global object like the Audio plugin would be immediately useful. For instance, I was going to make the import process automatically setup audio events if the Spriter project contained sound files, but aside from not being able to figure out the combo id's for the Play (by name) action, I have no way of checking if an Audio object already exists in a scene to use that.

    I would imagine that GetFirstInstance or GetInstances for non-single-global object types would be useful down the line, but I don't have any immediate use for that.

  • Good ideas, it's a fair point - there are some APIs that can take a wide range of IDs and there's no way for third-party developers to find them. Filed a todo issue here.

    Right now we're aiming for a stable release soon and we don't normally make code changes for them if possible, so this would probably come at the next beta release after that.

  • Ashley - excellent. thanks.

  • Ashley Is there any way to set an IAnimation's Speed?

  • If there aren't documented APIs for it, then no - as before if you can collect up all requests and file an issue then it should be straightforward to expose extra APIs like that.

  • Got it. Will do.

  • Hi Lucid, I suppose you will tell us here when spriter plug in will be fixed for C3 runtime?

    have good day

    Berty, SpriterFondOf

  • Bertconstanty I don't want to hijack this thread for Spriter plugin (any more than I already have), but I will say it in this thread.

    And I will also upload it to the Construct 3 Addons repository.

  • OK thank you for your answer. Waiting for it. Good day.

  • Ashley - Is there an extra step I need to do after importing a sound through the importer API? I get this:

    BossHit_1 I imported manually through C3 and as you can see it creates the main sound with the .wav and .webm subentries.

    The rest I added with

    const soundBlob = await zipFile.ReadBlob(entry); project.AddOrReplaceProjectFile(soundBlob, fileName, "sound");

    When added this way, there are no subentries for different formats. I can preview them in the project panel with the play button, but when I actually run the layout, only the manually imported sound can be played through actions.

  • The API only copies files directly in to the project. When you import a sound file in Construct, it uses an audio import dialog to help you transcode any audio files to WebM Opus before copying the files in to the project. I guess you want your audio files to go through that dialog so they get transcoded?

    If you have the same filename with different extensions, C3 groups them together as children of a parent item, but if it's only in one format then it shows it normally.

  • I guess you want your audio files to go through that dialog so they get transcoded?

    Yes, please. Should I submit a new issue? I'm not seeing the previous request compilation so I'm guessing it was closed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, please file a new issue or comment on an existing one if it's open.

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