Recover plugins from export javascript...???

0 favourites
  • 6 posts
  • I have a very big problem..

    Today, I have to upgrade and maintain my games which has been developed 2 years ago. But unfortunately all of my own plugins for my games are missing and I can't open these capx files without these plugins (Just only export javascript files still there)... .Basically, I understand that some or all code in my plugins still there in somewhere in export file but reading and understanding then extract them out form of more than 10K of code lines are terrible and impossible job.

    So could someone help me..there are any method, recipe, tool...etc to help me recover plugins from exported javascript file...???.

    Thank all of you in advance

  • Ashley has deliberately made the export as difficult to reverse engineer as possible in order to prevent just the thing you are asking.

    I doubt anyone (except maybe Ashley) would be able to do what you ask.

    Did you ever release them to the users on here? If so, do you remember the name(s) of the plugins? Maybe some users may still have them.

    If not, then you may be out of luck.

  • You can unzip the capx, and remove all references to the plugs in the xml.

    That won't help you recreate their actions however.

  • Extracting the runtime portion from a minified export is not really doable. I mean at most you could possibly get the minified version of the runtime with a lot of trial and error. Unfortunately all the names would be mangled so it would be a real chore to fix that into a usable form.

    To be able to open a capx that uses one of those plugins you'll either have to remove all references like newt says, or you can recreate the edittime portion from the capx. After you unzip the capx you can get all you need to recreate it.

    The plugin's id can be retrieved from the .caproj file under used plugins or behaviors.

    Next you need to add all ACEs. The event sheet xml stores the id of the action/condition and all you need to recreate it in the edittime is the id and parameters need to be the same. Properties can be done similarly by looking at an instance in a layout xml. just keep the same order and type and you should be ok.

    That at least can let you open it. Hopefully your plugins are in an old c2 install somewhere though.

  • Thank too much for all of advises from you

    zenox98: I don't share these plugins in this forum because it is useless for other (Just override websocket to get command from C# application on server side whereas people in this forum use of NodeJS )

    R0J0hound, luckily, in that time my JavaRuntime broken so I couldn't use minify feature o Constract2 to export. Name, function..ect still there in export file. There are any best recipe to recover them..???

  • Try Construct 3

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

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

    Even better! In that case you can easily recover the runtime portion.

    search for:


    in c2runtime.js, except replace "Sprite" with your plugin's id.

    You should see something like this:

    cr.plugins_.Sprite = function(runtime)
    	this.runtime = runtime;
    (function ()
    That's the start of that plugin.  It continues till the matching "(" in the line "(function ()".
    I used notepad++ to click on that "(" and use the command "Select all between matching brace" to do it, but you could use something else.
    All that's left is to re-create the edittime.js as mentioned before since that's not exported.
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)