EMI INDO's Forum Posts

  • What should I fix? You didn't provide the error log details.

    open Developer Tools.

  • Note

    construct.net/en/forum/construct-3/plugin-sdk-10/porting-list-addon-sdk-v2-185208

  • > brobiggame

    >

    > The automatic tool will not work for the add-on you requested, as this add-on has API SDK v1 logic that must be rewritten to API SDK v2.

    Does this mean that this behavior will remain in the past ?😥

    Although I can make improvements to the logic of the new API, I don't have the time right now, so it would be better to contact the developer.

  • brobiggame

    The automatic tool will not work for the add-on you requested, as this add-on has API SDK v1 logic that must be rewritten to API SDK v2.

  • Challenges and a Suggestion for the Future

    As a suggestion for an initial step, it would be very helpful if a future version of Construct 3 added a direct export option for Capacitor. At a minimum, this option could generate a basic capacitor.config.json file. For the rest of the process, such as building the app, users could then proceed locally/manually.

  • I'd like to share a bit of my experience: I have been building projects with Construct 3 using Capacitor and Framework7 since 2023. If anyone is interested in experimenting with this setup, I plan to create some brief documentation.

    Compatibility and Configuration

    All Cordova plugins are fully functional in Capacitor. However, it's important to note that Capacitor does not support variables in plugin.xml. You can manipulate these Cordova variables using hooks/scripts instead.

    Capacitor also replaces config.xml with capacitor.config.json. My workflow is as follows:

    1. Export the project from Construct 3 as a Cordova project.
    2. Use a hook/script to port the package.json configuration into capacitor.config.json.

    For example, the script would take this data from your Cordova project and automatically generate a capacitor.config.json file like the one below:

    {
     "appId": "io.cordova.hellocordova",
     "appName": "HelloCordova",
     "webDir": "www",
     "bundledWebRuntime": false,
     "plugins": {
     "AdMob": {
     "APP_ID_ANDROID": "ca-app-pub-3940256099942544~3347511713",
     "APP_ID_IOS": "ca-app-pub-3940256099942544~1458002511"
     }
     }
    }
    

    Additionally, the icon URI paths are different in Cordova and Capacitor, so the hook/script must be designed to handle this automatically.

    Differences in Plugin Installation

    The way you install plugins is also different. For example:

    • Cordova: cordova plugin add plugin-name
    • Capacitor: npm i plugin-name

    For simple projects, the difference between Cordova and Capacitor might not be very noticeable. However, on larger projects, the difference is quite significant. I personally prefer Capacitor because its code is based on JavaScript modules, which feels more modern and structured. It took me over a month to get used to the Capacitor workflow, but the results have been well worth it.

  • Update AdMob-Plus-PRO_v3.0.2.9

    construct.net/en/game-assets/addons/admob-plus-pro-768

  • Update AdMob-Plus-PRO_v3.0.1.9

    Update idfa-aaid_v1.0.0.2

    1. adding two new conditions
    2. Is native load
    3. Is banner ad load
    4. and several bug fixes

    construct.net/en/game-assets/addons/admob-plus-pro-768

  • The Firebase Sparsha plugin at least has the Web client ID option in Google Cloud Console (OAuth 2.0 → Credentials).

    usually forms com.googleusercontent.apps.XXXXXXXXXX....

    if there is no OAuth 2.0 option like the Firebase Sparsha plugin only returns the token ID (idToken) for Firebase authentication, not the serverAuthCode that PlayFab needs for Google OAuth validation on the PlayFab server.

  • you must lock your project in SDK v1 with the end url rxxx

    example: editor.construct.net/r440-2

    If there are new features either from the SDK or from the editor above the rxxxx you locked, you cannot use them.

  • Yes, now you can test it, is it working?

    const testProperty = properties[0]; // index 0
    // group 
    const appName = properties[2]; // index 2
    const appVersion = properties[3]; // index 3
    const appDescription = properties[4]; // index 4
    const permissions = properties[5]; // index 5
    
    console.log("testProperty: ", testProperty);
    console.log("appName: ", appName);
    console.log("appVersion: ", appVersion);
    console.log("appDescription: ", appDescription);
    console.log("permissions: ", permissions);
    
  • {
    
    
    	"languageTag": "en-US",
    	"fileDescription": "Strings for DOMMessaging.",
    	"text": {
    		"plugins": {
    			"mycompany_dommessaging": {
    				"name": "MyDOMPlugin",
    				"description": "An example third-party plugin using DOM messaging.",
    				"help-url": "https://www.construct.net",
    				"properties": {
    					"test-property": {
    						"name": "Test property",
    						"desc": "A test number property."
    					},
    					"app-config": {
    						"name": "app-config",
    						"desc": "app-config."
    					},
    					"app-name": {
    						"name": "app-name",
    						"desc": "app-name."
    					},
    					"app-version": {
    						"name": "app-version",
    						"desc": "app-version"
    					},
    					"app-description": {
    						"name": "app-description",
    						"desc": "app-description"
    					},
    					"permissions": {
    						"name": "permissions",
    						"desc": "permissions"
    					},
    					"layout-config": {
    						"name": "layout-config",
    						"desc": "layout-config"
    					},
    					"popup-layout": {
    						"name": "popup-layout",
    						"desc": "popup-layout"
    					},
    					"options-layout": {
    						"name": "options-layout",
    						"desc": "options-layout"
    					},
    					"background-layout": {
    						"name": "background-layout",
    						"desc": "background-layout"
    					}
    				},
    				"aceCategories": {
    					"custom": "Custom"
    				},
    				"conditions": {
    				},
    				"actions": {
    					"set-document-title": {
    						"list-name": "Set document title",
    						"display-text": "Set document title to [b]{0}[/b]",
    						"description": "Set the document title to a string.",
    						"params": {
    							"title": {
    								"name": "Title",
    								"desc": "The document title to set."
    							}
    						}
    					}
    				},
    				"expressions": {
    					"get-document-title": {
    						"description": "Get the current document title.",
    						"translated-name": "DocumentTitle"
    					}
    				}
    			}
    		}
    	}
    }
    
    
    
    const SDK = globalThis.SDK;
    
    ////////////////////////////////////////////
    // The plugin ID is how Construct identifies different kinds of plugins.
    // *** NEVER CHANGE THE PLUGIN ID! ***
    // If you change the plugin ID after releasing the plugin, Construct will think it is an entirely different
    // plugin and assume it is incompatible with the old one, and YOU WILL BREAK ALL EXISTING PROJECTS USING THE PLUGIN.
    // Only the plugin name is displayed in the editor, so to rename your plugin change the name but NOT the ID.
    // If you want to completely replace a plugin, make it deprecated (it will be hidden but old projects keep working),
    // and create an entirely new plugin with a different plugin ID.
    const PLUGIN_ID = "MyCompany_DOMMessaging";
    ////////////////////////////////////////////
    
    const PLUGIN_CATEGORY = "general";
    
    const PLUGIN_CLASS = SDK.Plugins.MyCompany_DOMMessaging = class MyCustomPlugin extends SDK.IPluginBase
    {
    	constructor()
    	{
    		super(PLUGIN_ID);
    		
    		SDK.Lang.PushContext("plugins." + PLUGIN_ID.toLowerCase());
    		
    		this._info.SetName(globalThis.lang(".name"));
    		this._info.SetDescription(globalThis.lang(".description"));
    		this._info.SetCategory(PLUGIN_CATEGORY);
    		this._info.SetAuthor("Scirra");
    		this._info.SetHelpUrl(globalThis.lang(".help-url"));
    		this._info.SetIsSingleGlobal(true);
    		this._info.SetRuntimeModuleMainScript("c3runtime/main.js");
    
    		// Set the domSide.js script to run in the context of the DOM
    		this._info.SetDOMSideScripts(["c3runtime/domSide.js"]);
    		
    		SDK.Lang.PushContext(".properties");
    		
    		this._info.SetProperties([
    			new SDK.PluginProperty("integer", "test-property", 0),
    			new SDK.PluginProperty("group", "app-config"), // [???] - Should show "Application Configuration"
     new SDK.PluginProperty("text", "app-name", "My Application"), // [???] - Should show "Application Name"
     new SDK.PluginProperty("text", "app-version", "1.0.0"), // [???] - Should show "Application Version"
     new SDK.PluginProperty("longtext", "app-description", "A web application built with Construct 3"), // [???]
     new SDK.PluginProperty("text", "permissions", "storage,activeTab"), // [???] - Should show "Permissions"
    
     new SDK.PluginProperty("group", "layout-config"), // [???] - Should show "Layout Configuration"
     new SDK.PluginProperty("text", "popup-layout", ""), // [???] - Should show "Popup Layout"
     new SDK.PluginProperty("text", "options-layout", ""), // [???] - Should show "Options Layout"
     new SDK.PluginProperty("text", "background-layout", "") // [???] - Should show "Background Layout"
    		]);
    		
    		SDK.Lang.PopContext();		// .properties
    		
    		SDK.Lang.PopContext();
    	}
    };
    
    PLUGIN_CLASS.Register(PLUGIN_ID, PLUGIN_CLASS);
    
    
    
    
    
  • I tested your code no problem, try to remove the addon from addon manager, and add it back.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For example

    github.com/Scirra/Construct-Addon-SDK/blob/main/plugin-sdk/v2/domMessagingPlugin/lang/en-US.json

    "properties": {
    					"test-property": {
    						"name": "Test property",
    						"desc": "A test number property."
    					}
    				},
    
    
    this._info.SetProperties([
    			new SDK.PluginProperty("integer", "test-property", 0)
    		]);
    
  • construct.net/en/make-games/addons/1452/document-file

    1. New action: Base64 src element id
    2. New expression: File extension
    3. New Select file - show -save.c3p

    NOTE c3p

    • Select file image/* > sprite load string base64]
    • Select file audio/* > html elm id load string base64
    • Select file video/* > html elm id load string base64
    • Download blob to SAF
    • Handle large files, so that applications do not crash, run out of memory