AMUMSS-nms-auto-modbuilder-updater-modscript-system icon indicating copy to clipboard operation
AMUMSS-nms-auto-modbuilder-updater-modscript-system copied to clipboard

Watch for changes in the mods folder and rebuild on each change

Open azilvl opened this issue 5 years ago • 1 comments

While creating mods, sometimes you'd want to rapidly change stuff in your .lua script and test them in-game. for that you'd have to:

  1. save your changes
  2. run BuildMod.bat
  3. answer all the y/n questions
  4. run the game

I've made a watcher that looks for any change in the folder and then builds your mods after each change eliminating steps 2 and 3.

Also, BuildMod.bat accepts arguments now and if provided it doesn't ask any questions.

keep in mind this is just a mvp. there are a lot of things to further improve this and is not tested enough but I wanted to see what you think about the idea and get your input before putting in more effort.

azilvl avatar Jan 22 '20 11:01 azilvl

I changed the options file's extension to .yaml in order to get syntax highlighting in editors and improve readability. we don't really truly parse yaml right now but I think for our use case this will suffice. implementing a full-blown parser on our own will take too much effort. if we truly want to parse yaml files we should switch to powershell and use .net packages like YamlDotNet or if we don't want to use yaml we could use .ini and use ini-parser or anything else. Again this is enough for now IMO. The help comments are just a placeholder and can be improved. My English is not good enough to write the help section.

azilvl avatar Jan 26 '20 15:01 azilvl