How to merge 2 projects (Tutorial from SQUALE).

0 favourites
  • 8 posts
From the Asset Store
Carousel Animation, make carousel of you image gallery or anything
  • Hello,

    Here is the translation of the Squale tutorial on how to merge two C2 projects.

    French version here

    -------------------------------------

    First, you should make a save copy of your projects to avoid a possible disaster.

    We need to work with the project files, not the simple capx. If you have a simple capx, you can just rename the extension .capx by .zip and unzip it to access all the files.

    It's better to work with 3 folders : First project / Second project / FinalMerged project (which is an empty project).

    Very important : before starting the merge process, be sure to have no duplicate names (layouts / objects / families..Etc)

    Layers can have the same name BUT be careful with Global layers. (prefer to give them a different name in each project or you will have surprises)

    In the Final folder, we will have to rebuilt the entire project :

    (Don't pay attention to .uistate.xml files. They don't need to be copied.)

    Animation folder

    Copy the folders from the two projects (beware of duplicate names)

    Event sheets forlder

    Copy the folders from the two projects (beware of duplicate names)

    Open with a text editor like Notepad++ and make these modifications if needed :

    Give different names

    <name>Event sheet 1</name>

    If the code targets to another layout, check the names

    (But if you already well prepared both projects without duplicate names, you shouldn't have to do this)

    Files folder

    Must contain the entire files of both 'files' folders.

    Textures folder

    Must contain the entire files of both 'Textures' folders. (if you have some)

    Layouts folder

    Copy the folders from the two projects (beware of duplicate names)

    <name>layout name identical to the xml name</name>

    <event-sheet>Related event sheet name</event-sheet>

    Ok, now the hard part.

    File.caproj

    Open the . caproj of each project with a text editor like Notepad++ and make these modifications :

    <used-plugins>

    Copy the 2 projects content into the final one(Be careful to only copy the different plugins! Only one of each type.)

    <used-behaviors>

    Copy the 2 projects content (Be careful to only copy the different behaviors! Only one of each type.)

    <used-effects>

    Copy the 2 projects content (Be careful to only copy the different effects! Only one of each type.)

    <object-folder>

    Add all different objects contained between the two beacons <object-folder></object-folder> of each project, one after the other.

    <families>

    Do the same for the families (if you have some)

    <layout-folder>

    <layout>Layout name.xml</layout>

    <layout>Layout name2.xml</layout>

    Insert all the layout file names contained in Layout.

    <event-folder>

    <event-sheet>Event sheet 1.xml</event-sheet>

    <event-sheet>Event sheet 2.xml</event-sheet>

    Insert all the event sheet file names contained in Event sheets.

    <global-instances> (don't look for you ingame global instances, that's not the same thing. They are contained into the eventsheets.)

    Copy the 2 projects content (Be careful to only copy the different instances! Only one of each type.)

    <sounds-folder>

    Copy the 2 projects content.

    <music-folder>

    Copy the 2 projects content.

    <files-folder>

    Copy the 2 projects content.

    And voilà.

    It should work. But if it doesn't, you will probably get an error message from C2 that indicates the issue line number in the capx. Just go check it and correct it.

    Thanx again to Squale for the help.

  • Hi, thanks for this tutorial, wasn't quite what I needed but it comes close.

    I have several projects with the same menu/ui, so I've put all menu and UI event in seperate sheets. According to this tutorial I can safely copy event sheet XML files from one project to the other. I've been doing it for some time now and haven't noticed anything strange, but you never know.

    The thing I am a little worried about is those

    sid="1369915436515779"[/code:zioofcj8] attributes. Are these used for anything specific and can they cause conflicts of some kind?
  • Hello robbe

    Well I'm not 100% sure but the SID is a 16 generated number ID for the events. So you shouldn't worry about it.

    Getting the same exact SID from two different projects would be very very rare!

    I had no problem with it from now.

  • Can this be reproduced with a .c3p project file? I tried but Construct 3 keeps saying that it can't read the file.

    I have some family variables that I don't want to lose and there is no way to copy/paste Families to a new project.

    Thanks

  • murilowbb Looks like family names are defined in .c3proj file, but the contents of the family and all its variables/behaviors are stored in a separate file in ObjectTypes folder.

    So I think you should be able to move a family by copying that file and making a small edit in the project.c3proj

  • dop2000 I tried to make two simple projects with families and variables and merge them together. It does indeed work perfectly.

    Just have to copy the files (making sure that there is no duplicate names) and edit the ".c3proj" file, adding the new objects, layouts, event sheets, families,etc on the specified lines. It is very important to put "," on every entry before the last one of a section, as it indicates that there is more "content" to be loaded.

    Eg:

    "objectTypes": {

    "items": [ "Circle_Obj", "Square_Obj", "Triangle_Obj" <- Last one ],

    "subfolders": []

    },

    Also, using the new desktop version of C3 helped me to speed up the process, as it allows you to save projects as folders, so you don't have to ".zip" everything an change it to ".c3p" afterwards.

    Now I'm trying to merge that simple project I mentioned with my main one, but no success until now.

    Maybe the subfolder structures I have are making things harder.

    I'll reply once I figure this out...may be helpful for lots of people.

    And thanks a lot!

  • You should be aware that the original post is 4 years old and is talking about Construct 2, which uses a different save file format to Construct 3. This is also in the Construct 2 forum section. If you have questions about Construct 3, this thread doesn't apply, and it's the wrong forum section, so you should probably take this to the Construct 3 forums.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley I will just leave the link to my post here then for whoever is interested

    construct.net/en/forum/construct-3/how-do-i-8/how-do-i-copy-merge-families-t-141336

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