Windows [Tool] GMS2 Resource Importer (updated: 2019-05-01)

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

  1. Mick

    Mick Member

    Joined:
    Jun 30, 2016
    Posts:
    725
    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. 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. If you want to support this tool, you can buy my game. :)

    Notes and limitations
    • 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.9.1 (2019-05-26)
    - The tool should now run on Mac OS X and Linux using the Mono runtime.
    Version 0.9.0 (2019-05-01)
    - Added support for Notes.
    - Select all / Deselect all resources.
    - Fixed a bug with folder handling. (Earlier versions of GMS2 have been able to correct this)
    - Fixed a bug with replacing existing resources.(Earlier versions of GMS2 have been able to correct this)
    Version 0.8.0 (2019-01-23)
    - Single tree view instead of separate views for different resource types.
    - Folder support (entire folder structure of source resources are maintained).
    - Option to replace existing resources.
    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 on itch.io

    https://gamephase.itch.io/gms2-resource-importer

    Screenshot 2019-01-24 11.15.22.png
    *) The chance of GUIDs colliding is very small, almost astronomical.
     
    Last edited: May 26, 2019
    chorrus, Yal, Japster and 34 others like this.
  2. Hyomoto

    Hyomoto Member

    Joined:
    Jul 7, 2016
    Posts:
    1,073
    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.
     
    Yal, chirpy and Mick like this.
  3. Mick

    Mick Member

    Joined:
    Jun 30, 2016
    Posts:
    725
    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:
    725
    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:
    776
    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,521
    *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:
    725
    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:
    701
    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.
     
    Yal, Mick and Hyomoto like this.
  11. Mick

    Mick Member

    Joined:
    Jun 30, 2016
    Posts:
    725
    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:
    35
    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,521
    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:
    579
    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:
    725
    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:
    725
    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,521
    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:
    76
    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:
    719
    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.
  24. chirpy

    chirpy Member

    Joined:
    Oct 6, 2016
    Posts:
    121
    Thanks a lot for making this.
     
    Mick likes this.
  25. Hyomoto

    Hyomoto Member

    Joined:
    Jul 7, 2016
    Posts:
    1,073
    Well, I said I'd come back and give feedback eventually! It took a while but, first off, yes: this is quite useful. The major feature that it lacks, and that would make the biggest impact for me (beyond the current functionality) is folder support. I usually break up my project into folders pretty heavily, and being able to just select a folder of objects/scripts/etc... to import would be about the biggest improvement possible. Given the lack of this basic functionality in GM2 right now, thank you very much for your hard work here.
     
    Mick likes this.
  26. Mick

    Mick Member

    Joined:
    Jun 30, 2016
    Posts:
    725
    I totally agree that folder support is the most important missing feature. I had limited time when I made this and folder support would have increased the scope quite a bit, due to how folders in the project files are stored. If I find the time, I will see if I can add folder support.
     
  27. stainedofmind

    stainedofmind Member

    Joined:
    Jun 20, 2016
    Posts:
    701
    I for one would also greatly appreciate folder support. But either way, I'm happy with the tool and try to let as many people as I can know about it!
     
    Mick likes this.
  28. SanguisMalus

    SanguisMalus Member

    Joined:
    Jun 5, 2017
    Posts:
    2
    Great tool! Only missing 2 functions which are:
    1. Already mentioned folders sorting
    2. Possibility to replace already existing resources - example: Have room where I have played with new sprites/objects. However in the end I would like to take whole room with layers and objects inside those layers to already existing project. So I import sprites and object (because they are new -> no problem), but when importing room I face issue because room already exist. (I solved this problem by manually copying rooms folders, but I feel thats quite tricky solution and might bring some troubles in the future)
     
    Mick likes this.
  29. stainedofmind

    stainedofmind Member

    Joined:
    Jun 20, 2016
    Posts:
    701
    To your second point, an option to either keep existing files or overwrite would be the best solution I feel.
     
    Mick likes this.
  30. thaaks

    thaaks Member

    Joined:
    Jun 20, 2016
    Posts:
    43
    Hi Mick,
    just gave your tool a test run and it worked like a charm! Thanks a million and awesome work! Just what I (and GMS:2 as a builtin feature!!!!) needed!

    In fact I only can join the others in asking for adding folder support and replace feature for existing resources when importing from source project to destination project.

    Otherwise your tool is brilliant! It helps me to stay sane when merging my own local assets/scripts/frameworks with my current game projects! What a time saver!
     
    Mick likes this.
  31. Biosyn

    Biosyn Member

    Joined:
    Oct 17, 2017
    Posts:
    39
    Excellent tool. Very much needed.

    Hope you can implement the suggestions made above.

    Thanks again!
     
    Mick likes this.
  32. Lonewolff

    Lonewolff Member

    Joined:
    Jan 8, 2018
    Posts:
    1,207
    This looks Gold!!
     
    Mick likes this.
  33. Mick

    Mick Member

    Joined:
    Jun 30, 2016
    Posts:
    725
    I have been working on folder support, it's almost ready (with the reservation for some bugs). It required quite a lot of work due to the over-complex system for views/folders in GMS2 projects. Instead of separate windows for all resource types, I changed to a single tree view. I might be looking into an option to replace already existing resources later, but until then, you will need to delete the existing resources from the destination project and then import them with the tool.
     
    thaaks and stainedofmind like this.
  34. Mick

    Mick Member

    Joined:
    Jun 30, 2016
    Posts:
    725
  35. Hyomoto

    Hyomoto Member

    Joined:
    Jul 7, 2016
    Posts:
    1,073
    This is going to be the most weirdly, and somewhat unintentionally, condescending thing I say all week: your game doesn't look awful and I'm happy to show my support for the work you've done here. When I'll get around to playing it, I have no idea. You really do deserve the compliments and praise for this tool. I can't speak for Yoyo, I have no idea what their plans are, but this is living proof that letting the community fill in the holes in GM functionality is worthwhile and I hope it helps them see that. I know that untangling the project format GM2 uses is no simple task, so it's more remarkable you've been able to do this.
     
    atmobeat and IndianaBones like this.
  36. zbox

    zbox Member GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    793
    I don't know if I mentioned this (I intended to a while ago but I must have never posted it) but I use this all the time. It's an essential tool for me now. Just realised it has an update too which is even better.

    Thanks heaps!
     
    Mick likes this.
  37. kagiol94

    kagiol94 Member

    Joined:
    Feb 3, 2019
    Posts:
    6
    Thanks a lot for making this.
     
    Mick likes this.
  38. JayR

    JayR Member

    Joined:
    Nov 22, 2016
    Posts:
    111
    I'm encountering an error whenever I select my destination folder.
    [​IMG]
    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
    Parameter name: index
    at System.Windows.Forms.TreeNodeCollection.get_Item(Int32 index)
    at GMS2ResourceImporter.frmMain.LoadSourceProject(String fileName)
    at GMS2ResourceImporter.frmMain.btnImportFrom_Click(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at MetroFramework.Controls.MetroButton.OnMouseUp(MouseEventArgs e)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3260.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
    ----------------------------------------
    GMS2ResourceImporter
    Assembly Version: 0.8.0.0
    Win32 Version: 0.8.0.0
    CodeBase: file:///D:/Downloads/Anim/GMS2ResourceImporter080/GMS2ResourceImporter/GMS2ResourceImporter.exe
    ----------------------------------------
    System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3314.0 built by: NET472REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    MetroFramework
    Assembly Version: 1.4.0.0
    Win32 Version: 1.4.0.0
    CodeBase: file:///D:/Downloads/Anim/GMS2ResourceImporter080/GMS2ResourceImporter/MetroFramework.DLL
    ----------------------------------------
    System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2558.0 built by: NET471REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
    ----------------------------------------
    System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    Microsoft.GeneratedCode
    Assembly Version: 1.0.0.0
    Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    Newtonsoft.Json
    Assembly Version: 11.0.0.0
    Win32 Version: 11.0.2.21924
    CodeBase: file:///D:/Downloads/Anim/GMS2ResourceImporter080/GMS2ResourceImporter/Newtonsoft.Json.DLL
    ----------------------------------------
    System.IO.Compression.FileSystem
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2558.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.IO.Compression.FileSystem/v4.0_4.0.0.0__b77a5c561934e089/System.IO.Compression.FileSystem.dll
    ----------------------------------------
    System.Numerics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2558.0 built by: NET471REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
    <system.windows.forms jitDebugging="true" />
    </configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.
     
  39. Mick

    Mick Member

    Joined:
    Jun 30, 2016
    Posts:
    725
    According to the error message the problem is with selecting the source project. I don't get that error message myself so at this time I don't know what the problem might be.
     
    JayR likes this.
  40. JayR

    JayR Member

    Joined:
    Nov 22, 2016
    Posts:
    111
    Ahh... Silly me, I overlooked selecting the source project. Sorry!
     
    Mick likes this.
  41. thaaks

    thaaks Member

    Joined:
    Jun 20, 2016
    Posts:
    43
    Hey Mick, just wanted to let you know that the folder stuff is working fine for me. Will try replacing/updating existing resources in the next few days. Thanks again for your awesome tool!
    And I just bought your game ;-) Didn't want to buy it while it was on sale...
     
    Mick likes this.
  42. Adam Pippin

    Adam Pippin Member

    Joined:
    Jun 5, 2017
    Posts:
    1
    Thank you so much for this tool! It is such a timesaver!
     
    Mick likes this.
  43. timartinelli

    timartinelli Member

    Joined:
    Feb 25, 2019
    Posts:
    26
    Perfect.
     
    Mick likes this.
  44. Mick

    Mick Member

    Joined:
    Jun 30, 2016
    Posts:
    725
    I have updated the tool once more. I fixed bugs with folder handling and replacing resources. Earlier GMS2 versions has been able to correct for these bugs, so it's important that you get the new version. Get it here: http://gamephase.net/files/linked/GMS2ResourceImporter090.zip

    Version 0.9.0 (2019-05-01)
    - Added support for Notes.
    - Select all / Deselect all resources.
    - Fixed a bug with folder handling. (Earlier versions of GMS2 have been able to correct this)
    - Fixed a bug with replacing existing resources.(Earlier versions of GMS2 have been able to correct this)
     
  45. Japster

    Japster Member

    Joined:
    Aug 5, 2017
    Posts:
    51
    Legend, thank you! :D
     
    Mick likes this.
  46. Mick

    Mick Member

    Joined:
    Jun 30, 2016
    Posts:
    725
    I just uploaded a new version that should work on Mac OS X using the Mono runtime. The tool can now be downloaded from itch.io
     
    thaaks likes this.
  47. Pizuar

    Pizuar Member

    Joined:
    Jan 11, 2019
    Posts:
    2
    I can't count how many times I've been using this tool over the past year, thank you so much for creating this.
     
    Mick likes this.
  48. Evandro Aguiar

    Evandro Aguiar Member

    Joined:
    Jun 23, 2016
    Posts:
    25
    What a great tool! Thank you for releasing this for free.
     
    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