1.1.10 • Published 3 years ago
mgcb-generator v1.1.10
npm install mgcb-generator -g
where is one of:
init, gen
mgcbg help quick help
mgcbg init init mgcb-gen-config.json file for generate .mgcb file content
mgcbg gen genearte .mgcb file content
foo@bar:~$ ls root/your/awesome/MonogameProject
bin
Game1.cs
obj
Program.cs
Now we need to go to our project folder and generate a configuration file for the generator:
foo@bar:~$ cd root/your/awesome/MonogameProject
# Here you need to add the directories with your files.
# For example, goblin/goblin.png and goblin/goblin.json
foo@bar:/root/your/awesome/MonogameProject/$ mkdir content
foo@bar:/root/your/awesome/MonogameProject/$ mgcbg init
foo@bar:/root/your/awesome/MonogameProject/$ ls
bin
Game1.cs
obj
Program.cs
mgcb-gen-config.json # added new file
Now check the file to see if the necessary configurations are set there. The tool will try to find the paths to the required packages by itself. If it doesn't find it, please set it yourself. Initially, the configuration file should look something like this:
{
"content": "./content",
"debug": false,
"asepriteLib": "/path/to/your/MonoGame.Aseprite.dll",
"asepritePipeline": "path/to/your/MonoGame.Aseprite.ContentPipeline.dll",
"extendedContentPipeline": "path/to/your/MonoGame.Extended.Content.Pipeline.dll",
"editor": "/path/to/your/mgcb.exe"
}
Now we generate our final content.mgcb
# Generate our content.mgcb
foo@bar:/root/your/awesome/MonogameProject/$ mgcbg gen
foo@bar:/root/your/awesome/MonogameProject/$ cd content
foo@bar:/root/your/awesome/MonogameProject/content/$ ls
goblin
content.mgcb
Now we can build a resource using mgcb-editor.