How do I import several CAPX for one?

Get help using Construct 2

Post » Wed Aug 05, 2015 8:44 pm

Hello C2 developers!

I developed several casual games in separate CAPX (for obvious reasons) and now I need to integrate them in one CAPX.

I searched tutorials here and just found an old topic in which the only solution was then manually transfer one-on-one objects and events, which certainly must have already been resolved, as this is an affront to the group work and the inherent practicality of C2.

Please someone tell me that there is a practical and fast solution for this. :lol:

Once again, I thank in advance the attention and collaboration of all. ^^
B
39
S
9
G
3
Posts: 259
Reputation: 4,355

Post » Wed Aug 05, 2015 8:55 pm

You could just unpack each of your capx. Copy and paste xml files and folders. Modify the caproj file of the main project (using Notepad, Wordpad, Notepad++, etc.) to include all of the extra layout and event sheets (under the <layout-folder expanded="1"> and <event-folder expanded="1"> tags).

Like:
Code: Select all
<layout-folder expanded="1">
   <layout>New Layout 1.xml</layout>
</layout-folder>
<event-folder expanded="1">
   <event-sheet>New Event sheet 1.xml</event-sheet>
</event-folder>

Then open up the caproj file and save it in Construct as a single file again.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,418
Reputation: 4,830

Post » Wed Aug 05, 2015 9:14 pm

It's a good solution, @gumshoe2029, not practical, but works. Thanks! ^^

How do I unpack an CAPX?

PS.: I thought the current C2 had a native way to do this ... :(
B
39
S
9
G
3
Posts: 259
Reputation: 4,355

Post » Wed Aug 05, 2015 9:30 pm

lukezero wrote:It's a good solution, @gumshoe2029, not practical, but works. Thanks! ^^

How do I unpack an CAPX?

PS.: I thought the current C2 had a native way to do this ... :(


You can use 7-zip: http://www.7-zip.org/download.html

It is reasonably practical, just takes a little time and a lot of care.

Note: Make sure you have backups of everything before you do this.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,418
Reputation: 4,830

Post » Wed Aug 05, 2015 10:41 pm

Thanks for the tips, @gumshoe2029! :D

I'm doing it right now. ;)
B
39
S
9
G
3
Posts: 259
Reputation: 4,355

Post » Wed Aug 05, 2015 11:11 pm

@gumshoe2029 The subfolders of the games need to stay in the same folder of the main project or each game can stay in their proper folder?

Furthermore, the closest I found (what you described) in the XML main project was the following:

<layout-folder>

<event-folder>


That's right?
B
39
S
9
G
3
Posts: 259
Reputation: 4,355

Post » Wed Aug 05, 2015 11:21 pm

For God's sake, @Ashley, implement the projects integration in a new version of Construct 2. :lol:
B
39
S
9
G
3
Posts: 259
Reputation: 4,355

Post » Thu Aug 06, 2015 3:32 pm

They have a lot to worry about for C3, but I am sure that @Ashley will put it on the list of features requested.

Yea, those are the tags. The other bit is just an attribute that defines whether the tab is "open" when C2 is started (I believe).

I believe that they need to remain in the folders exactly as they are in the original project.

Basically, the idea is to replicate the setup of the original project in your base project, so folder structure relative to the root directory ( the unpacked capx) needs to remain the same.

It is possible that I might have missed some bit of XML too, so scour the base project for references to Layouts and Event Sheets in those XML files.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,418
Reputation: 4,830

Post » Thu Aug 06, 2015 7:17 pm

Thanks for the help, @gumshoe2029. :D

I'm sure that the Scirra team is too busy now doing the best in C3, especially because they listen enough developers.

About your suggestion of integration of CAPX, I tried and failed. Unfortunately I had to do manually, which took a big and time-consuming work. :(
B
39
S
9
G
3
Posts: 259
Reputation: 4,355

Post » Sat Aug 08, 2015 5:29 pm

It shouldn't have failed. I probably missed a line that relates to layouts or event sheets that needed to be copied. If you can find all of the lines, it will work.

Alternative B: Make a base capx file and use Pode's iFrame to import the projects independently on the fly. This will separate out the loading times too. It doesn't technically combine the capx, like you wanted, but it will result in a unified project.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,418
Reputation: 4,830

Next

Return to How do I....?

Who is online

Users browsing this forum: Artcadev, brunopalermo, ST314 and 20 guests