Windows [Tool] GMS2 Resource Importer

Discussion in 'Game Design, Development And Publishing' started by Mick, Apr 8, 2018.

  1. Mick

    Mick Member

    Joined:
    Jun 30, 2016
    Posts:
    678
    Since there is no easy way of importing resources (sprites, sounds, scripts etc.) from other projects in Gamemaker Studio 2, I decided to create a tool for just that. The tool will let you import multiple resources of different types in one go. You can import resources from normal .yyp projects and .yyz exported project archives.

    EDIT: I have updated this tool with the options to import external sprites and sounds (similar to my sprite loader tool for GMS1.4). This is especially helpful when wanting to replace multiple sprites or sounds in a project. You can import multiple sprites or sounds in one go, sprites or sounds already in the project will be replaced (if you want), settings for existing resources will be saved. Read more about this in the instructions.

    Important: If you test this tool, please take backups of your projects or use projects under version control (the tool is in an early state). I appreciate if you try it out and let me know of any issues, I have successfully tested it with a few of my own projects.

    Notes and limitations
    • Groups are not taken into account when importing resources from another project, so all resources will be imported to the root folders (Sprites, Sounds, ...) of the resource tree. (You can, however, select and move multiple resources at once in the GMS2 resource tree later).
    • If a resource with the same name or id already exists in the destination project (when importing from another project), the resource will not be imported. The id (GUID) should always be unique though*. If a resource is not imported, the log will say so.
    • I have had the destination project open in GMS2 while importing resources and it has worked without problems, you should always save the project before doing an import with my tool.
    • To import resources from a GMS1.4 project you need to first import the project into GMS2 and then use the GMS2 version of the project as source.
    Changelog
    Version 0.6.1 (2018-06-23)
    - The resource lists are now sorted alphabetically.
    Version 0.6.0
    - Resources from a broken project (or resources copied to somewhere else on the hdd) can be imported.
    Version 0.5.0
    - Separate sprite and sound import to add / replace multiple sprites or sounds in one go.
    Version 0.3.0
    - First public version.

    Download

    http://gamephase.net/files/linked/GMS2ResourceImporter.zip

    Instructions
    http://gamephase.net/files/linked/gms2-resource-importer-instructions.pdf

    upload_2018-4-11_17-38-12.png

    *) The chance of GUIDs colliding is very small, almost astronomical.
     
    Last edited: Jun 23, 2018
    matharoo, zbox, Bluetail7 and 20 others like this.
  2. Hyomoto

    Hyomoto Member

    Joined:
    Jul 7, 2016
    Posts:
    1,007
    I don't need it just yet, but this is definitely on a short list of things GM could really use. I know raw data is more valuable than praise, but this is definitely something I'll be back to give you feedback on.
     
    Mick likes this.
  3. Mick

    Mick Member

    Joined:
    Jun 30, 2016
    Posts:
    678
    I fixed a bug regarding running an import with no successful imported resources (triggered when no resources were selected and doing an import or when all resources already existed in the destination project). The download link is still the same.
     
  4. Mick

    Mick Member

    Joined:
    Jun 30, 2016
    Posts:
    678
    You can now also import multiple external sprites and sounds quickly with this tool. Existing sprites and sounds will be replaced (saving the bounding boxes and other settings). This should make it much easier to work with external image editors. Default settings for new sounds and sprites can be edited via the json templates (read the instructions).

    Making the sprite import feature was interesting due to all the GUIDs, it seems to be working fine according to my tests.
     
  5. DukeSoft

    DukeSoft Member

    Joined:
    Jun 20, 2016
    Posts:
    721
    I've been working on that too, but for GMS1 :p Pretty much like Composer works for PHP packages and NPM for Node / JS packages;

     
    Mick likes this.
  6. The-any-Key

    The-any-Key Member

    Joined:
    Feb 2, 2017
    Posts:
    1,454
    *bookmarked
     
  7. Dene

    Dene Member

    Joined:
    Feb 22, 2018
    Posts:
    7
    Wow! Nice. But is there a possibility to import animated sprites? For example, I have multiple .png images each representing one frame of animation.
     
    Last edited: Apr 17, 2018
  8. Mick

    Mick Member

    Joined:
    Jun 30, 2016
    Posts:
    678
    At the moment it supports animated gifs and _strip# animations, it can't load multiple images as one sprite animation. Can I ask you why you have separate .png images for every frame of animation, some limitation with a graphics editor you use or?
     
  9. Dene

    Dene Member

    Joined:
    Feb 22, 2018
    Posts:
    7
    That's because 1. Render from 3d-app (Blender) 2. Specifications of the project we're curently working on.
     
  10. stainedofmind

    stainedofmind Member

    Joined:
    Jun 20, 2016
    Posts:
    672
    Just popping in to say thanks for this tool. I have a master project I keep all my reusable code in and it's a pain to create a private extension just to copy a single system over to a new project. The tool is very simple to use and it worked flawlessly for what I used it for. Until Studio has a better built in method for migrating resources between projects, I foresee myself using your tool rather frequently. Kudos and we'll done.
     
    Mick and Hyomoto like this.
  11. Mick

    Mick Member

    Joined:
    Jun 30, 2016
    Posts:
    678
    I uploaded a new version (same download link). I added a feature to import resources from a broken project or resources that are "disconnected" from any project. To import objects (as an example) you would click the "Import Resources..." button (down left), browse to the "objects" folder of your old project, select all object folders and then click "Select folder".
     
  12. ricardo1996

    ricardo1996 Member

    Joined:
    Oct 2, 2017
    Posts:
    26
    bro i love you. thanks alot. this my first game ive been at it for awhile the code is basically finish just need the art work from a friend. ran into several corruption errors. saying i have a duplicate of a object and sprite but couldnt find it so i cleaned before running everytime but with your tools i saw the dups. i just unchecked one and it worked fine. same with the cant find a room even tho you have rooms errors.
     
    Mick likes this.
  13. The-any-Key

    The-any-Key Member

    Joined:
    Feb 2, 2017
    Posts:
    1,454
    It would be great if we could sort the lists. I am using it to move scripts and objects from one project to another. But the lists are unsorted and become a little hard worked (we are coders, we are lazy). It would be great if we could move a group of script and objects :) :) :) :) :)
     
  14. xDGameStudios

    xDGameStudios Member

    Joined:
    Sep 15, 2016
    Posts:
    562
    this looks GREAT!! Thank you so much for the contribution.

    1) Could you make a compiled version for Mac?

    2) Could you add functionality just for scripts?! sometimes I use Visual Studio Code to make the scripting and save GML files with #define to create many functions on the same file. It would be great if the tool was able to just import *.GML files into (not having it inside a project)
     
  15. Mick

    Mick Member

    Joined:
    Jun 30, 2016
    Posts:
    678
    The tool might work with mono framework on Mac alread, not sure. I will probably not make a separate version for Mac though, if some small changes are needed for it to run under the mono framework, then sure, I could fix that.

    EDIT: Just tried using mono on an Ubuntu machine, it is not working, so won't work on the Mac either I assume.

    It might be possible to import "loose" scripts, but the #define functionality is not there though.
     
    Last edited: Jun 23, 2018
  16. Mick

    Mick Member

    Joined:
    Jun 30, 2016
    Posts:
    678
    The lists are now automatically sorted. You can use the old download link in the original post to get the updated version. The group thing would be nice, but currently I don't have the time to do it I'm afraid.
     
  17. The-any-Key

    The-any-Key Member

    Joined:
    Feb 2, 2017
    Posts:
    1,454
    Thanks. This will help a lot. I can name my resources so I can better copy a specific part from an existing project.

    Some rainy day. We will get an update for GMS2 where you can import and export resources locally.
     
  18. kinfox

    kinfox Member

    Joined:
    Apr 7, 2018
    Posts:
    4
    its so useful!!!thank you very much!
     
    Mick likes this.
  19. GMpeaks

    GMpeaks Member

    Joined:
    Nov 7, 2017
    Posts:
    8
    thanks a lot for this importer!
    Few issues: java exception is raised when a file(like dll) is not found and I need to close and reopen application(importer) after fixing.
    Also in the above case when import fails some files would have got moved and on reattempt to import it says already exits(Java exception) and again I need to close application and there is no way it will not continue to import if some of the files already imported
     
  20. Ax8472

    Ax8472 Member

    Joined:
    Jul 15, 2016
    Posts:
    53
    I just wanna say, this tool was an absolute lifesaver! Thank you!!!!!!!!!!!!!!!
     
    Mick likes this.
  21. Snayff

    Snayff Member

    Joined:
    Jul 18, 2017
    Posts:
    213
    Works well, fantastic work! Thank you.
     
    Mick likes this.
  22. Relic

    Relic Member

    Joined:
    Jun 27, 2017
    Posts:
    356
    Argh! I’m 2 days too late discovering this. What a tedious slog it was to get all my resources into a fresh project.

    Will use next time.
     
  23. RagTagRadical

    RagTagRadical Member

    Joined:
    Feb 8, 2017
    Posts:
    9
    Just started using it. Wanted to say Thanks!
    I had been building prototypes of systems in separate projects in the hopes of merging them later, without thinking about how I'd achieve that.
     
    Mick likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice