Skull132 Posted May 20, 2017 Posted May 20, 2017 (edited) I figured I'd roll this guide out of the Development subforum and into public view, because it can only really help. So, What is this about. Quite simply put, DreamMaker (DM from now on) is not really the best editor for large, spanning projects. Like SS13! It lacks things like proper, full project search (it sorta has this now, but it doesn't have a good readout of all results. Instead, it just jumps you from file to file.), Git integration, and the ability to interact with non-DM file types that still reside in the project folder. So basically, if you're touching SS13 for long enough, you will eventually have to do something that requires you quickly use another editor (like Notepad++). And it can get a bit annoying to have do that. There also exist very well maintained and fleshed out general editors, which allow you to integrate any toolchain into them. Prime examples being Sublime, Atom.io, Visual Studio Code. In the dev staff, we started using Atom back in 2015 (if memory serves). And lately, a few of us, notably me and Lohikar, have swapped to VSCode. Which you prefer is up to you. In short, VSCode is more limited in terms of how much you can customize it, but it has a lot more MicroSoft supported toolchains, which are better than what Atom can provide. Atom, on the other hand, is way more customizeable and can potentially pull off more niche shit. Since I have the resources to explain the setup of both, we'll just go through them both! One thing to note before proceeding! There exist some downsides to not using DreamMaker. Specifically, you cannot map edit without it, you cannot icon edit without it or some other tools, and you have to edit the .dme file manually if you want to add/remove files! In practice, though, as a coder, I've still found the other editors to be worth their salt. Visual Studio Code To set up VSCode, just download it from here and install it. Press ctrl-P and paste this into the prompt: ext install byond-dm-language-support It'll open the extensions menu and give you the ability to download the BYOND DM Language Support extension. It's pretty good, and handles syntax highlighting for us. After that's done, open the project directory with ctrl-K ctrl-O. Make a new folder in the root called .vscode (the . is important!) and in there, create tasks.json. Paste the following into tasks.json: { "version": "2.0.0", "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "shared", "showReuseMessage": true, "clear": true }, "tasks": [ { "label": "Build Release", "type": "process", "group": "build", "command": "C:/Program Files (x86)/BYOND/bin/dm.exe", "args": [ "${workspaceRoot}/aurorastation.dme" ], "problemMatcher": { "owner": "dm", "fileLocation": [ "relative", "${workspaceRoot}" ], "pattern": { "regexp": "^(.+):(\\d+):(warning|error): (.*)$", "file": 1, "line": 2, "severity": 3, "message": 4 } } }, { "label": "Run Server", "type": "process", "group": "test", "command": "C:/Program Files (x86)/BYOND/bin/dreamdaemon.exe", "args": [ "${workspaceRoot}/aurorastation.dmb", "-trusted", "-invisible", "-close" ] } ] } Save it, close it. You're now set! Every time you want to compile the code, just press ctrl-shift-B. Or ctrl-P, type in "task", press spacebar, and select "Build Release". You can also host the server by attaching VSCode to DreamDaemon via "Run Server". The server process will autoclose once the world is destroyed. And there's also a changelog generation command here, for my comfort, really. The compilation will automatically highlight errors as it encounters them. That's it for VSCode. Atom.io The process is similar to Atom.io. Note that this guide may be a little out of date, but I did check to see if all of the dependencies are still being actively worked on. (They are!) So hopefully it's still relevant. Download and install Atom.io Download and install the "Build" package by navigating to File->Settings->Install, and typing "Build" into the search there and pressing enter. The package is by "noseglid", for better identification. Download and install the language-DM pack from the same menu (author is "stuicey"), or use my own, more custom version that can be grabbed from here. If you're using the custom version, then shove the contents of the zip into C:Users\Yournamehere\.atom\packages\language-dm. Copy the code below this list and place it into a file called .atom-build.json in your Aurora folder (the same folder where your baystation12.dme is located). Make sure to change the two paths there! Now, navigate to your Aurora folder, right click, open with Atom. It'll open the project and should also say that 1 build target is parsed! This is success! .atom-build.json contents: { "cmd": "C:/path/to/BYOND/bin/dm.exe", "args": [ "C:/path/to/git/and/fork/baystation12.dme" ], "sh": false, "errorMatch": [ "\n(?<file>[\\\\\/0-9a-zA-Z\\._ -]+)?<line>\\d+):error: (?<message>.*)" ], "warningMatch": [ "\n(?<file>[\\\\\/0-9a-zA-Z\\._ -]+)?<line>\\d+):warning: (?<message>.*)" ] } Useful Tips: Ctrl-F searches the opened file, Ctrl-Shift-F will search all the files in the opened project (starting from the one you have active). Regex is supported! Ctrl-Alt-B to start compiling the code. Note that with the correct .atom-build/tasks.json setup, it will automatically parse build errors and warnings into usable links, just like with DM! Ctrl-Alt-V to look at the last compile results. (Only applies to Atom.io.) This thing links to your Git files, and showcases git differences, enabling you to find your edits and so on. Any questions, feel free to post. Edited October 23, 2020 by Arrow768 Updated tasks.json
Lohikar Posted May 28, 2018 Posted May 28, 2018 For the lazy, here's a (more minimal) pre-filled tasks.json that will work out-of-box if your OS is 64-bit Windows (most computers made in last 20 years). { "version": "0.1.0", "command": "C:/Program Files (x86)/BYOND/bin/dm.exe", "isShellCommand": false, "args": ["./aurorastation.dme"], "showOutput": "always", "echoCommand": false, "problemMatcher": { "owner": "dm", "fileLocation": ["relative", "${workspaceRoot}"], "pattern": { "regexp": "^([\\\\\/0-9a-zA-Z\\._ -]+)\\d+):(warning|error): (.*)", "file": 1, "line": 2, "severity": 3, "message": 4 } } }
Recommended Posts