GM Code Exporter exports code from objects and scripts in a GameMaker project to a text file.
It is very quickly put together without much polish - but it does the job!
You need to have Node.js installed to use this tool from the CLI.
If you are using it for the first time, you need to install the dependecies using:
npm install
Run the following command:
node index.js --obj --scr --yyp "<yyp_path_here>"
Argument | Description |
---|---|
--yyp <path> | Path to the yyp file |
--obj | Get code from the objects |
--scr | Get code from the scripts |
An output text file will be generated in the ./out/
directory.
You can customize the header and footer of how each file is printed in the output. The classes can be edited from ./src/Types.js
.
Class | Method | Description |
---|---|---|
Object | get_header | Header of code from GM objects |
get_footer | Footer of code from GM objects | |
Script | get_header | Header of code from GM scripts |
get_footer | Footer of code from GM scripts |
All methods have the same argument, fname
, which indicates the gml file name the code is being read from.