Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

azilvl
Copy link

@azilvl azilvl commented Jan 22, 2020

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.

Copy link
Collaborator

@HolterPhylo HolterPhylo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the MapFileTrees folder content should be ignored, not just one file...

Well, that seems to be taken care now.

Copy link
Collaborator

@HolterPhylo HolterPhylo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MODBUILDER/MBINCompilerDownloader/temp.txt: This is not necessary. This file is auto-generated by MBINCompilerDownloader.bat

Copy link
Collaborator

@HolterPhylo HolterPhylo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe MBINCompiler.exe should be excluded and not in this repo, except for older stable version if we feel like it.

w.ps1 Outdated Show resolved Hide resolved
@azilvl
Copy link
Author

azilvl commented Jan 26, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants