Construct 3 plugin SDK v1

For discussion and help with the Construct 3 Plugin SDK

Post » Tue Apr 04, 2017 5:48 pm

Make sure the language file is filled out properly. [???] is what you get when a string was looked up in the language file but it was missing.
Scirra Founder
B
397
S
236
G
88
Posts: 24,423
Reputation: 194,560

Post » Tue Apr 04, 2017 6:03 pm

Can't it print out which one it's looking for? I'm struggling to find which one is missing.

Edit: sorry, forgot to check console log. There are 7 errors, so something fundamental went wrong. I'll need to investigate.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Tue Apr 04, 2017 6:57 pm

Still have the following, but I think this is a forced-case issue.
[LANG] Failed to find 'en-US' string plugins.bht_smart_random.aceCategories.custom'

I have:
SDK.Lang.PushContext("plugins.BHT_Smart_Random");

If I switch to:
SDK.Lang.PushContext("plugins.bht_smart_random");
then the 'custom' error goes away, but all my other strings fail.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Tue Apr 04, 2017 7:43 pm

That means you defined a category ID "custom" in aces.json, but didn't create a language string for it.
Scirra Founder
B
397
S
236
G
88
Posts: 24,423
Reputation: 194,560

Post » Tue Apr 04, 2017 7:48 pm

But I did, it was in the template:
"aceCategories": {
"custom": "Smart Random"
},

Edit: full file:

{
"languageTag": "en-US",
"fileDescription": "Strings for BHT_Smart_Random.",
"text": {
"plugins": {
"BHT_Smart_Random": {
"name": "BHT Smart Random",
"description": "Generates non-repeating integers in a range with a guaranteed non-repeat threshold.",
"help-url": "http://blackhornettechnologies.com/construct2/plugins/BHTSmartRandom.aspx",
"properties": {
"start":{
"name":"Start",
"desc":""
},
"end":{
"name":"End",
"desc":""
},
"threshold":{
"name":"Repeat threshold",
"desc":""
}
},
"aceCategories": {
"custom": "Smart Random"
},
"conditions": {
},
"actions": {
"randomize": {
"list-name": "Randomize",
"display-text": "Randomize the data.",
"description": "Given the start and end settings, start the randomization."
},
"new": {
"list-name": "New",
"display-text": "Generate unique random numbers in the range {{0}-{1}} (inclusive), that will not repeat for {2} value(s).",
"description": "Generate with new settings.",
"params":{
"start": { "name":"Start", "desc":"The initial value to start with."},
"end": { "name":"End", "desc":"The final value to end on."},
"threshold": { "name":"Threshold", "desc":"The number of values that must be enforced to be unique when the cycle repeats."}
}
}
},
"expressions": {
"next": {
"description": "Return the next random value within the range specified.",
"translated-name": "Next"
},
"start": {
"description": "Return the start of range value.",
"translated-name": "Start"
},
"end": {
"description": "Return the end of range value.",
"translated-name": "End"
},
"threshold": {
"description": "Return the threshold value.",
"translated-name": "Threshold"
},
"peek": {
"description": "Return the next value but don't remove it.",
"translated-name": "Peek"
}
}
}
}
}
}
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Tue Apr 04, 2017 10:38 pm

Hey there, just a short question regarding effects in Construct 3.
Could you guys provide us a page on how to port over C2 effects into C3?

I assume C3 is still using the same backend for effects so a page with steps on how to create a "C3effectaddon" file would be great.
Thanks for the SDK by the way, should make a lot of things easier for our JS Dev's.
ImageImageImage
B
63
S
23
G
78
Posts: 661
Reputation: 44,935

Post » Wed Apr 05, 2017 7:11 am

Porting Construct 2 Plugins to Construct 3

https://www.scirra.com/doc/c3sdk/portin ... ugins.html
B
87
S
44
G
16
Posts: 1,005
Reputation: 17,938

Post » Wed Apr 05, 2017 7:12 am

@Ashley - Is it possible to copy a plugin into a local folder, so that when C3 loads it finds it and adds it to the addon manager, similar to how it works in C2? Perhaps a chrome local storage folder somewhere?



thx
B
87
S
44
G
16
Posts: 1,005
Reputation: 17,938

Post » Wed Apr 05, 2017 10:33 am

@blackhornet - you need to lowercase the plugin ID in the language file:

"mypluginid" should be the lowercase plugin ID. Note if your plugin ID contains any uppercase characters, they should be lowercased for this key in the language file.
Scirra Founder
B
397
S
236
G
88
Posts: 24,423
Reputation: 194,560

Post » Wed Apr 05, 2017 2:54 pm

I fixed the case issue, now I get this, and there's no more details in the log.


Error report information
Type: unhandled rejection
Reason: TypeError: expected finite number
Construct 3 version: r15
URL: https://editor.construct.net/
Date: Wed Apr 05 2017 08:52:49 GMT-0700 (Pacific Daylight Time)
Uptime: 2.5 s

Platform information
Browser: Chrome
Browser version: 57.0.2987.133
Browser engine: Blink
Browser architecture: 32-bit
Context: browser
Operating system: Windows
Operating system version: 10
Operating system architecture: 64-bit
Device type: desktop
Device pixel ratio: 1
Logical CPU cores: 6
User agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36

WebGL information
Version string: WebGL 2.0 (OpenGL ES 3.0 Chromium)
Numeric version: 2
Supports NPOT textures: yes
Vendor: Google Inc.
Renderer: ANGLE (AMD Radeon HD 6570 Direct3D11 vs_5_0 ps_5_0)
Major performance caveat: no
Maximum texture size: 16384
Point size range: 1 to 1024
Extensions: EXT_color_buffer_float, EXT_disjoint_timer_query_webgl2, EXT_texture_filter_anisotropic, OES_texture_float_linear, WEBGL_compressed_texture_s3tc, WEBGL_debug_renderer_info, WEBGL_debug_shaders, WEBGL_lose_context
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

PreviousNext

Return to Plugin SDK

Who is online

Users browsing this forum: No registered users and 0 guests