Hierarchical Script Modules



  • Hello,

    I'm quite new at this game, but I already met the problem, that my list of different script modules gets longer and longer, and with that more and more messy and difficult to overview.

    In my opinion a hierarchical view of script modules would be an awesome feature. On local file site it can be represented as JS files within folders (like Java files and packages).It's not an absolutely must have feature, tho, just an ease of work which would affect the UX of playing.

     

    ☝


  • Having tons of script files isn't very good for performance anyway, requires costs CPU.

    I'd recommend looking into working locally instead of the web client or steam client, and using Grunt (with grunt-screeps) to deploy your scripts to the server. This way, you can use Grunt to help you with organizing files, by making your own folder structure and then having grunt combine multiple script files into one before deployment. That way you can use whatever folder structure you like, and will still only have few files on the live system for performance.

    That being said, folders would be an awesome feature to add.



  • Does anyone have finished solution for grunt to compile scripts in folders into single js file?


  • Culture

    Here's a grunt file that handles folders-

    https://gist.github.com/tedivm/53063e46b58ef80e9df1