Grunt-init mod templates

Discussion in 'Mod Discussions' started by wondible, February 25, 2014.

  1. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Another server template

    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, and patch some recent json changes.
  2. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Added linting and schema to grunt package.
    proeleert likes this.
  3. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
  4. liquius

    liquius Well-Known Member

    Messages:
    731
    Likes Received:
    482
    So I have been playing around trying to get this to work. I thought I used the task 'patch_67998' and it seemed to work fine. However it didn't edit any of the anim_trees paths.

    I imagine the problem is with me. Could you give me an example of what you would type if you wanted to update a server mod with the recent json changes?
  5. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Well, I was mostly in an instance and copying back to the template, but a quick test shows it working.

    Code:
    mkdir testnew
    cd testnew
    grunt-init pa_smod_balance_grunt
    npm install
    grunt copy:unitFiles
    mvim (to look at assult_bot.json and verify old animtree)
    grunt patch_67998
    
    If you're updating an old mod, replace the copy:unitFiles with a manual copy of the mod files. You can use the task in a throwaway mod to check what paths it's expecting.
  6. liquius

    liquius Well-Known Member

    Messages:
    731
    Likes Received:
    482
    It took me longer then I would like to admit, but I got it working. Thanks for the help.
  7. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Update to server grunt to address excessive uploads.

    PA will upload all files in the mod directory, including `node_modules` and maybe even `.git` - you probably don't want to use the generated project in `server_mods` directly, unless you really like waiting. The template is set up run to run as a project within a peer directory of `server_mods` - I use `server_mods_dev/mod_name`. The task `grunt copy:mod` will copy the mod files to `../../server_mods/identifier`, you can change the `modPath` in the Gruntfile if you want to run it from somewhere else.
  8. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Updated the server grunt template with the transform oriented workflow I've been using. That is, copy-and-modify in one step ('proc'), rather than the edit-in-place workflow it originally suggested (now 'modify')
  9. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Found I was always removing the in-place editing stuff from my mods. Backed out the programmatic stuff from pa_smod_balance_grunt and made a new template based on how I'm doing most of my vanilla-riff server mods.

    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
  10. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Updated the server templates to not prompt for forum, prompt for category, and provide default build number.

Share This Page