Share .capx after installing plugins

Get help using Construct 2

Post » Mon Dec 16, 2013 8:35 am

I've got a problem in my game I could really use help with, but I've installed the Chrome Console plugin which is preventing my .capx from being easily opened when shared.

I tried deleting all the Chrome Console actions, but the file still can't be opened. I tried removing the plugin from the directory, but now I can't open my file either, which makes sense I guess.

So, is there a way to "clean" the file after using addons so that someone else can open it?
B
8
S
2
Posts: 13
Reputation: 605

Post » Mon Dec 16, 2013 8:48 am

You can try going into the file.caproj file which is an XML file. Look near the begginning for plugins.

However and often a mistake for new devs. Is that removing the actions of a plugin does not remove the the fact that the plugin is still in the project objects list.

Instead of removing the actions. it is best to remove the plugin from the object list and remove the behaviour from objects.

For you. Install the plugin back in as it is still in the Object lists. Then remove the plugin from the objects list.

Personally plugins are great. But I like to temper the use to see if it's really needed.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,038

Post » Mon Dec 16, 2013 10:10 am

Thanks for the quick reply.

So, here's what I did:
1. Renamed the .capx to .zip
2. Unzipped and opened the .caproj in the root dir and found the following:

<used-plugins>
        <plugin author="Scirra" id="Arr" version="1">Array</plugin>
...

3. I deleted the line containing the Chrome Console plugin.
4. Zipped the root dir
5. Renamed .zip to .capx

I tested out opening this file with the plugin uninstalled, but now C2 crashes on startup.

Here's the file in case it's just my install for some reason:
pin-and-collision.capx

So... will C2 ignore any events, etc. from the plugin because it's missing, or could it possibly be crashing due to a Chrome Console log event left on the sheet?
B
8
S
2
Posts: 13
Reputation: 605

Post » Mon Dec 16, 2013 10:17 am

@CrossBread

I downloaded the original .capx from you, and opened the .caproj in a text editor with line numbers.

Delete lines: 25 (reference to plugin), 378/379/380 (object-type reference), 448 (instance reference).

Save and then try to open. It opens fine for me. If yours doesn't. I'll upload to my Dropbox, but this is a useful thing to get your head around (and your hands dirty).
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
87
Posts: 5,490
Reputation: 60,266

Post » Mon Dec 16, 2013 10:25 am

Ok, I think I figured it out. I started from scratch with a copy of my current .capx. Looks like there was a global reference down near the end of the file too.

        <global-instance type="ChromeConsole" uid="19" />

I tested opening again with the plugin uninstalled after removing what you suggested and everything seems clean.

Thanks for the help! Now I can go post a topic about the real issue, lol.
B
8
S
2
Posts: 13
Reputation: 605

Post » Mon Dec 16, 2013 10:32 am

@zenox98

Well, it looks like I spoke too soon. I can open the project fine from the .caproj file when unzipped, but once I bundle it back up, C2 still crashes. (With or without the plugin installed.)

I'm just using 7-zip to zip it. ZipCrypto, not AES method.

Any thoughts? Or is it fine to just post a link to the .zip in my post and let people unzip and open the .caproj? Not really sure what the etiquette around the community.
B
8
S
2
Posts: 13
Reputation: 605

Post » Mon Dec 16, 2013 10:49 am

Why did you zip it back up?

Open the project with the .caproj, then just re-save as a .capx to a different location.

Does this .capx then open OK for you?
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
87
Posts: 5,490
Reputation: 60,266

Post » Mon Dec 16, 2013 12:00 pm

Ok, that seems to work now. Thanks!

I was just reversing the process from before. It didn't occur to me to re-save as a single file. Still not sure why unzipping and re-zipping should break the ability to read the file, but whatever so long as there's a workflow that works.
B
8
S
2
Posts: 13
Reputation: 605

Post » Mon Dec 16, 2013 12:28 pm

Unpacking routines are usually very similar between products, but packing can be drastically different, e.g. Winzip and 7zip will both follow certain guidelines when unpacking a zip file, but when creating one, the algorithm may not be exactly the same.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
87
Posts: 5,490
Reputation: 60,266


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 30 guests