Leaderboard


Popular Content

Showing most liked content on 06/16/18 in Posts

  1. 1 like
    Everything starts with the basic requirements, so does scripting. In this tutorial we will go over the basics you'll need to start scripting. Picking an Editor Unless you're nuts and want to use Notepad, you'll need a good editor which doesn't make your eyes bleed after using it for 15 minutes. My personal pick for the best editor goes out to Visual Studio Code. It has a built-in extension and theming system with a database of several thousand extensions and hundreds of themes to pick from that can all be installed from within your editor. There are of course alternatives. The king of speed is still Sublime Text 3, Atom is insanely modular and even good old Notepad++ isn't completely terrible (I hate you if you actually use this for any sort of programming work). You can use whatever suits your needs. None of these editors were purpose built for GSC though (if anyone knows any that are, link me so I can chuckle), so we'll have to rely on extensions/plugins/whatever your editor calls it to support our lovely little language. This tutorial does assume you'll be using Visual Studio Code throughout and any extensions linked are only compatible with this specific editor. Installing Extensions I'm not going to spend my time explaining this when there's plenty of useful resources that have already done so much better than I possibly could, so I'll just link you this article from Microsoft: https://code.visualstudio.com/docs/editor/extension-gallery Syntax Highlighting Let's get the big one out of the way first. Syntax highlighting is a MUST if you're going to be staring at code all day (unless you really like white, for some reason). The best available syntax highlighting for GSC available for VSCode right now is https://marketplace.visualstudio.com/items?itemName=atrX.vscode-codscript, so go ahead and install it. It should automatically start associating any .gsc file opened in VS Code with the GSC syntax provided by the extension. I'll update this tutorial if I ever get off my lazy ass and make my own fork of this extension with proper function name casing and other improvements. Themes If you are like me, you might want to change the way VS Code looks by installing a theme. You can find many great themes by browsing the VS Code Marketplace or by Googling for a top-X list. My current favourite is one I actually made myself: Zephyr. It was originally purpose made for Web Development (HTML, CSS, JavaScript being the main focus languages) but it works quite well with GSC as well. Some other great themes include One Dark Pro, Material Theme, Darcula, Monokai (there's like a billion different versions so if you want that go find one you like). Additionally, you can also install an icon pack like Material Icon Theme. Extensions I've also installed a bunch of additional extensions (though, most weren't for CoD) which help me work faster and more efficiently. Here's the ones I'd recommend if you're going to be using this solely for CoD: Rainbow CSV: Because editing CSV files is a pain in the ass. TODO Highlight: Highlights TODOs and FIXMEs in your comments. Todo Tree: View a list of all your TODOs and FIXMEs spread across your project. EditorConfig for VS Code: If you're going to be working with a team and want consistency in the way you format code.