Plugin converter

2 favourites
From the Asset Store
HSV RGB Color Picker and Converter for Construct 3
  • > justifun

    >

    > Just converted in lightspeed ... means 80 times restart C3.. clear cache, rename zip file to .c3addon ... errors somewhere and restart again ... + 3 beers ..

    > A Nightmare to converting something for C3.

    > So try this if it's same as the original ;

    > http://gigatron3k.free.fr/html5/C3/FX/atreshold.c3addon

    >

    > Regards

    > ...

    >

    >

    Gigatron

    Any general tips / guidance on converting over effects? What do you typically have to change in the *.fx file (I'm looking at the effect SDK and comparing some *.fx before and after, but would be interested if you have general tips. I agree with your comments on the other files, right now they are a bit of a pain to deal with.

    I'm trying to convert over NormalMapExtended

    Mikal

    Here is the variables used by C3 shaders but i my declaration is bit different...

    C3 ..
    uniform lowp sampler2D samplerFront;
    uniform mediump vec2 srcStart;  <-- new
    uniform mediump vec2 srcEnd;    <-- new
    uniform mediump vec2 srcOriginStart; <--- new
    uniform mediump vec2 srcOriginEnd;  <-- new
    uniform mediump vec2 layoutStart; <-- new
    uniform mediump vec2 layoutEnd;  <-- new
    uniform lowp sampler2D samplerBackground;
    uniform mediump vec2 destStart;
    uniform mediump vec2 destEnd;
    uniform mediump float seconds;
    uniform mediump vec2 pixelSize;    <-- new 
    uniform mediump float layerScale;
    uniform mediump float layerAngle;
    
    C3 gigatron shader header;
    
    #ifdef GL_ES
    precision mediump float; // or lowp or highp ... all variables are the same precision now !
    #endif
    
    uniform  sampler2D samplerFront;
    uniform vec2 srcStart;
    uniform vec2 srcEnd;
    uniform vec2 srcOriginStart;
    uniform vec2 srcOriginEnd;
    uniform vec2 layoutStart;
    uniform vec2 layoutEnd;
    uniform sampler2D samplerBackground;
    uniform vec2 destStart;
    uniform vec2 destEnd;
    uniform  float seconds;
    uniform vec2 pixelSize;
    uniform float layerScale;
    uniform  float layerAngle;
    vec3 color = vec3(1.,0.,0.); <---- new in C3
    
    void main(){
    
      -- no need precision declaration again in the main loop ;
      -- except gpu overload then we can adjust precision  
      -- like this -uniform  sampler2D samplerFront-  to uniform  lowp sampler2D samplerFront;
       //vec2 uv= vTex;
      
       gl_FragColor = vec4(color,1.0);
    
    }
    
    [/code:35ssi4oj]
    
    Finally no really change on fx file ... in case op special fx we must use some new variables.//
    Regards
  • Got some feedback from Ashley on an issue with c2ids and transferring over a C2 *.capx with a new effect (though maybe this applies to other plugins. This at least applies to parameters in effects files (I found the issue when porting over Extended Normal Map.)

    blackhornet, it would be great if you could update the converter with the below in mind:

    Ashley:

    [quote:u9zfv2db]Well, it turns out it's actually C2 itself that strips non-alphanumeric characters when saving to the project, so the C2 XML file ends up with an ID like "ambient-green". C3 will import based on this ID. It's easy to fix, because it tells you the ID it's looking for ("ambient-green") so all you need to do is change the "c2id" to "ambient-green" and it will look up correctly.

    We can't fix how C2 saves projects at this point, so closing as won't fix - just filter those characters out from your c2ids as well.

    My original comment on this:

    [quote:u9zfv2db]When I copied over the original example *.capx, C3 'compat' complained in the Chrome console that certain parameters could not be set. Interestingly enough (and this is probably a clue Ashley , the parameters that were not set contained non-alpha characters in their IDs, for example: "Light2 Ambient (Green)". After I corrected the parameters that were not copied and ran C2 and C3 side by side, the effect looks the same in each. Obviously experimental, but feel free to try it.

  • Mikal

    I believe I caught this late. Was updated in 1.0.0.13.

  • Mikal

    I believe I caught this late. Was updated in 1.0.0.13.

    Thanks for the reply. I just downloaded the latest again (1.0.0.13) and tried again, same results, there are still non-alpha characters in the c2id, which need to be removed.

    Snip from addon.json (see '(' and ')' still included in some of the c2id.

                   {
                            "id": "light-zposition",
                            "c2id": "light-zposition",
                            "type": "float",
                            "initial-value": 0.02,
                            "uniform": "posZ"
                    },
                    {
                            "id": "color-(red)",
                            "c2id": "color-(red)",
                            "type": "float",
                            "initial-value": 1,
                            "uniform": "colorR"
                    },
    [/code:d6ukyrcw]
  • Mikal

    Updated in 1.0.0.14.

  • Mikal

    Updated in 1.0.0.14.

    Great, tested, worked, thanks. Updating NormalMapExt.c3addon

  • A quick tip for converting C2 -> C3 plugins that use project files. This is from another comment, which I can't find right now, but it helped to convert the flodjs plugin.

    Replace requested file in C2 code with this.runtime.getLocalFileUrl(<target>)

    Example:

    Original

            if(typeof(AudioContext) != 'undefined'){
                            var fetch = new XMLHttpRequest();
                            fetch.open('GET', zic);
    
    [/code:10uz1jse]
    New:
    [code:10uz1jse]
            var urlToRequest = this.runtime.getLocalFileUrl(zic);
            if(typeof(AudioContext) != 'undefined'){
                            var fetch = new XMLHttpRequest();
                            fetch.open('GET', urlToRequest);[/code:10uz1jse]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Any hints on this warning given on converting over Sweet Alert II?

    C2C3AddonConverter 1.0.0.14
    Processing: D:\Projects\NormalExtended\_Sweet Alert II
    Category forced to 'other'. Was: 'Addon'
    Missing placeholder forced:  {1} in 'Open with inputs'
    Missing placeholder forced:  {2} in 'Open with inputs'
    Missing placeholder forced:  {3} in 'Open with inputs'
    Missing placeholder forced:  {4} in 'Open with inputs'
    Missing placeholder forced:  {5} in 'Open with inputs'
    Missing placeholder forced:  {6} in 'Open with inputs'
    Missing placeholder forced:  {7} in 'Open with inputs'
    Missing placeholder forced:  {8} in 'Open with inputs'
    Missing placeholder forced:  {...} in 'Open with inputs'
    Missing placeholder forced:  {1} in 'Open with radios'
    Missing placeholder forced:  {2} in 'Open with radios'
    Missing placeholder forced:  {3} in 'Open with radios'
    Missing placeholder forced:  {4} in 'Open with radios'
    Missing placeholder forced:  {5} in 'Open with radios'
    Missing placeholder forced:  {6} in 'Open with radios'
    Missing placeholder forced:  {7} in 'Open with radios'
    Missing placeholder forced:  {8} in 'Open with radios'
    Missing placeholder forced:  {...} in 'Open with radios'[/code:d7yael9f]
  • C3 insists that every input be documented in the display-text, but C2 did not enforce that (or much of anything). The converter then must force the issue by adding in the parameter placeholders.

  • Feature suggestion:

    ept_color format unknown

    "Color" had supported already. ( reference )

  • In the edittime.js file: My plugin description has a comma "description" : "blabla, bla"

    the converter split it.

  • OK, I'll add it to the list. Just remove it for now.

  • Hey i tried converting your BHT SMART RANDOM plugin and zipped it . but when i try installing in construct 3 it fails.

    Can you please have a look at it, here's a link to the converted bht smart random

    mediafire.com/file/824ncy28rcer83i/bht.c3addon

  • cityguy401

    It actually had been done, just buried. Added to original post:

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