I don't know if this qualifies for [REL] - it's a dev tool only. I've experimenting with using Grunt-init to stamp out mod templates. I'm deferring to the grunt-init documentation for installation and setup. Client I started out with a very basic skeleton to get a handle on the template system, and then added all the stuff I did in Gross Economy to get RequireJS and Grunt working. The READMEs have some more specific information. Let me know what your stumbling blocks are and I'll flesh out what I can. https://github.com/JustinLove/pa_mod_basic https://github.com/JustinLove/pa_mod_amdclean https://github.com/JustinLove/pa_mod_hotfix (similar to basic, but yells at you when build changes) Server Balance Basic - https://github.com/JustinLove/pa_smod_balance_basic Copy and pretty-print the JSON files (and the build hotkey file). Has a stub to run a transformation on the JSON while it's copying. This is a one-shot to set up manual editing. Balance Grunt - https://github.com/JustinLove/pa_smod_balance_grunt Doesn't copy any game files, but sets up a gruntfile that can copy all or a subset of unit files, run transformations. CAUTION: the game will upload node_modules and who knows what else from a mod directory. You should work in a separate directory and use the copy:mod task to make files visible, see README. Available Tasks - copy:unitFiles - copy json files into the mod, with optional filename regexp - copy:build - copy build.js into the mod - copy:mod - copy the mod files into server_mods - modify:health - process unit files; set up for double health as an example. Expectation is that several modify:X tasks will me made. - jsonlint - lint all the mod json files - json_schema - partial validation of mod json files format using schema by exterminans https://forums.uberent.com/threads/wip-units-ammo-and-tools-json-validation-schema.60451/ - default: json_schema, jsonlint Transform - https://github.com/JustinLove/pa_smod_transform Doesn't copy any game files, but sets up a gruntfile that will copy files from PA and write programmatically modified versions into the mod. CAUTION: the game will upload node_modules and who knows what else from a mod directory. You should work in a separate directory and use the copy:mod task to make files visible, see README. Available Tasks - copy:mod - copy the mod files into server_mods - proc:adv_comfab - Proc: read one or more files from PA and munge into one in the mod. Example is a reduced cost adv. fabrication bot - proc:antinuke - restore the builtin first antinuke. - default: proc, copy:mod
Cool, I don't use any fancy tools other than Notepad++ and SourceTree for my mods but I'll add these links in case anyone finds them helpful: All my mods are also on github if anyone wants examples or just to browse through the code: https://github.com/pamods/LavaSnake-s-Mods My Stargate name bug fix mod is also a very simple example of file shadowing mods: https://github.com/pamods/LavaSnake-s-Mods/tree/master/LavaSnakes_StargateBugFix
Okay I'm getting what grunt does now. I've installed it using npm install -g grunt-cli Code: ss_economy_dev>grunt grunt-cli: The grunt command line interface. (v0.1.13) Fatal error: Unable to find local grunt. If you're seeing this message, either a Gruntfile wasn't found or grunt hasn't been installed locally to your project. For more information about installing and configuring grunt, please see the Getting Started guide: http://gruntjs.com/getting-started Tried to run it in gross_economy_dev but it says bad things ? If I understand right if I just need to run grunt in that folder no ? It should then pick up your gruntfile.js and move the folder to gross_economy_test right ? Any Ideas ?
Okay, something I need to add to readme. I use (Mac)Vim. I haven't thought about looking for Grunt plugins for it.
I just updated the amdclean template to use the scenes key as primary and copy things up during build. It also process each scene, though I'm still cheating and only checking the first item in the array.
Guess somebody must start When I have more time I'll take a look at the templates, will have some questions for sure.
Another one, inspired by today's lobby shenanigans. Displays the mod name prominently on the affected scene, and yells at you when the build changes. https://github.com/JustinLove/pa_mod_hotfix
Man just setting up grunt for hotbuild2 This thing is awesome jshint check minify css / js remove console.logs / debuggers make less errors in changing date in modinfo.json oh @wondible you have some missing ;'s in your gruntfile
Yeah, my projects aren't as large so I haven't set up the extras yet. And I've been leaning towards no-; style lately.
Possibly should. 1: compile step (though RequireJS has a filter) 2: debugging (should check on the state of source maps) 3: code sharing
I don't think we need/want that kind of thing. With the exception of PA Stats (even for PA Stats the required bandwidth is not an issue) all mods are loaded directly from local files. A few kbyte don't matter in that kind of scenario and having readable code at all times is a big +. Adding this will only make it harder, especially on newbie modders.
Added a server mod template. Balance Basic - https://github.com/JustinLove/pa_smod_balance_basic Copy and pretty-print the JSON files (and the build hotkey file). Has a stub to run a transformation on the JSON while it's copying. This is a one-shot to set up manual editing. I'll likely do one that adds some common grunt tasks for linting and transforming later.