Construct 3 plugin SDK v1

  • lucid - behaviors were added recently, but drawing related stuff is still not implemented yet. (forum post here: behaviors-now-supported-in-sdk_t191739)

    martdsam - Here is a big list of addons for C2 : c2-plugins-and-behaviors-list_t65170

    If i remember reading correctly somewhere, I believe there's a plan to keep a better repository within addon manager for C3 down the road, integrated directly in it.

    but for now i've been hosting a constrct 3 compatible addon list here: c2-plugins-and-behaviors-list_t65170

    with the ability to submit new links here: https://docs.google.com/forms/d/e/1FAIp ... g/viewform

    Cool, it has lots of plugins. But I still think that a plugin-only page would be cooler, so we would have filters, categories, notes, and other things that would make it easier.

    Thanks for the reply. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • Hey guys

    Just to make sure I get the current status quo. I have this custom FX shader for construct 2, which is basically a mashed up Brightness, Grayness, and Tint into one single FX, that I use in my project. I really want to move to C3 but I can't find a way to convert this FX that I use heavily. Can anyone tell me how to go about doing this, and if its even possible at all for the moment?

    Thanks in advance.

    Cheers

  • Effect addons are not yet supported. They're on the todo list.

  • Thanks for the clarification.

    I'll be tracking this closely.

    Cheers!

  • Hello

    I'm actually trying to create a C3 Addon

    I'm probably doing something wrong because I can't even install it in Construct 3 : "failed to install the addon" error.

    No error in the chrome console, just nothing except this message.

    I zipped the files and not the folder itself.

    What should I start searching for ?

  • I think there must some kind of problem today to install plugins, as there is only "failed to install addon" message and on the console just

    0f5c4ba5-6920-46d1-b904-69a5042d1d21 Failed to load resource: the server responded with a status of 404 (Not Found)
    [/code:1zqqloig]
    
    By the way, if I may ask: I need to create a javascript plugin to implement a cross game scoring system, so I want to embed some ajax calls by using this plugin. Is it correct to do it in construct3 instead of 2? And is it the correct approach at all?
    
    I need basically to hook some javascript events, like gameStarted(), gameUpdatedScore(), gameEndedWithScore() and so on. Inside these events there are ajax calls.
    
    Thank you for your help
  • Looks like everyone, including me starts out trying to build C3 addons in the same sequence in which the manual reads. This is definitely NOT the way to start C3 addon development. The C3 SDK manual is upside-down. You MUST first setup a local plugin server, go through the process of getting that working. Then you MUST develop your plugins in "developer mode" per the manual. After you get your plugin loading and working in developer mode, you can say "it's working" and then do the normal .zip/.c3addon import into C3. DO NOT keep trying to import any custom plugin with even one single bug! In addition to no debugging info in the console, you will also lock up C3 editor addon mamanger and object import dialogs. Sometimes you will lock the main addon loading screen.

    Get your local plugin dev server working FIRST and dev that way.

    Here is my working C3 plugin server. If you don't know Node/Express, Google and you'll find a million articles and tutorials. Very easy to install. Below is a link to the zip of the c3-plugin-server app folder. Make sure you run your command window as admin. Unzip the app. Then run npm install to update/install all the packages you need. There are helpful comments in server.js. nodemon server.js will start the plugin server. Node provides good error messages on install. If you see any you should be able to fix.

    https://drive.google.com/file/d/0B2LbtzyJ6MqNWHZnVDhfR2o1SFk/view?usp=sharing

    const https = require('https');
    const fs = require('fs');
    const path = require('path');
    const express = require('express');
    const cors = require('cors');
    
    const corsOptions = {
    	origin: 'https://editor.construct.net'
    };
    
    // You will need to use openssl or some Windows app
    // to generate your own self-signed cert files. C3 
    // developer mode plugin loading will NOT work in Http 
    // mode. Plugin server must be Https
    const serverOptions = {
    	key: fs.readFileSync('./key-20171101-071835.pem'),
    	cert: fs.readFileSync('./cert-20171101-071835.crt'),
    	requestCert: false,
    	rejectUnauthorized: true
    };
    
    const app = express();
    app.use(cors(corsOptions));
    // Put testing and non-plugin static content in this folder
    app.use('/static', express.static(path.join(__dirname, 'static')));
    
    // Put all plugin related code and static content in this folder
    // Put each plugin in its own folder like: /plugin/mytestplugin1/
    // In C3 addon manager, in developer mode, load plugin like... 
    // 	  

    localhost/plugin/mytestplugin1/addon.json[/p] app.use('/plugin', express.static(path.join(__dirname, 'plugin')));[/p] [/p] const port = process.env.PORT || 49200;[/p] https.createServer(serverOptions, app).listen(port, function () {[/p] console.log('Construct 3 plugin server running. Listening on port: ' + port);[/p] });[/p] [/code:1e9e5l0a]

  • Just thought you might be interested:

    Some time ago I made a Construct Addon Assistant tool which soon after have been contributed by armaldio 's features.

    With one command it generates both c2addon and c3addon.

    It basically uses the c2 addon files as a base and then upon "updating" it converts it to c3 addon with blackhornet 's converter.

    Makes plugin dev life much more comfortable.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, that's very interesting. I'll definitely check that out. Thanks for posting!

  • I will need some plugin developers to test an IDE I'm creating for C3 plugins. Technically, it removes all the hassle to write your plugin in json format and does the work for you. It is not ready but getting there. I'll take 2 or 3 people to get the app for free against testing and reporting.

    If interested, please PM me. Again, it's not ready but should become stable within a few weeks

  • Looks like everyone, including me starts out trying to build C3 addons in the same sequence in which the manual reads. This is definitely NOT the way to start C3 addon development. The C3 SDK manual is upside-down. You MUST first setup a local plugin server, go through the process of getting that working. Then you MUST develop your plugins in "developer mode" per the manual. After you get your plugin loading and working in developer mode, you can say "it's working" and then do the normal .zip/.c3addon import into C3. DO NOT keep trying to import any custom plugin with even one single bug! In addition to no debugging info in the console, you will also lock up C3 editor addon mamanger and object import dialogs. Sometimes you will lock the main addon loading screen.

    Get your local plugin dev server working FIRST and dev that way.

    Here is my working C3 plugin server. If you don't know Node/Express, Google and you'll find a million articles and tutorials. Very easy to install. Below is a link to the zip of the c3-plugin-server app folder. Make sure you run your command window as admin. Unzip the app. Then run npm install to update/install all the packages you need. There are helpful comments in server.js. nodemon server.js will start the plugin server. Node provides good error messages on install. If you see any you should be able to fix.

    https://drive.google.com/file/d/0B2LbtzyJ6MqNWHZnVDhfR2o1SFk/view?usp=sharing

    const https = require('https');
    const fs = require('fs');
    const path = require('path');
    const express = require('express');
    const cors = require('cors');
    
    const corsOptions = {
    	origin: 'https://editor.construct.net'
    };
    
    // You will need to use openssl or some Windows app
    // to generate your own self-signed cert files. C3 
    // developer mode plugin loading will NOT work in Http 
    // mode. Plugin server must be Https
    const serverOptions = {
    	key: fs.readFileSync('./key-20171101-071835.pem'),
    	cert: fs.readFileSync('./cert-20171101-071835.crt'),
    	requestCert: false,
    	rejectUnauthorized: true
    };
    
    const app = express();
    app.use(cors(corsOptions));
    // Put testing and non-plugin static content in this folder
    app.use('/static', express.static(path.join(__dirname, 'static')));
    
    // Put all plugin related code and static content in this folder
    // Put each plugin in its own folder like: /plugin/mytestplugin1/
    // In C3 addon manager, in developer mode, load plugin like... 
    // 	  

    localhost/plugin/mytestplugin1/addon.json[/p] app.use('/plugin', express.static(path.join(__dirname, 'plugin')));[/p] [/p] const port = process.env.PORT || 49200;[/p] https.createServer(serverOptions, app).listen(port, function () {[/p] console.log('Construct 3 plugin server running. Listening on port: ' + port);[/p] });[/p] [/code:298jj1yn][/p]

    locohost

    Thanks for this, I'm trying it out with nodemon server.js, but I am getting errors when trying to load the addon. It looks like the server is running (I can get the addon.json file via a general chrome browser request via: https://localhost:49200/plugin/example/addon.json ). I installed self-signed cert/key and updated server.js (otherwise the previous would not work.)

    C3 reports the generic, 'unable to load, go check server, etc.'. Checking the chrome console, this is the error:

    r69-2/main.js:154 Error loading addon JSON:  TypeError: Assignment to constant variable.
        at d.ǃvcY (r69-2/main.js:73)
        at <anonymous>
    ǃG.ǃEA.then.then.catch  r69-2/main.js:154
    [/code:298jj1yn]
    
    If I put in another bad filename, I see a different error message on console, so I think the file is being server to C3. but then something seems to fail on parsing (I also tried the C3 EffectSDK example and get the same error.)
    
    Any hints?
  • Looks like this bug, should be fixed in r70.

  • Any hints?

    Mikal

    No not really. It's a bug in your plugin (or the actual SDK code maybe?) code in main.js on line 73. Some const var is getting (attempting to be) set to a new value.

    I'd recommend using the sample addon provided in C3 docs and get that fully working locally. Then you know you're setup 100% and ready to work

  • Thanks locohost and I'll wait for r70.

  • Thanks locohost and I'll wait for r70.

    Sorry I wasn't more helpful

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