Coding

From Space Station 13 Wiki
Revision as of 18:16, 12 November 2019 by Adhara In Space (talk | contribs) (expands a bit more on using git for stuff, more to come in a bit)
Jump to navigation Jump to search

So you want to wicky wangy diddly dangy learn how to code SS13?

Well you've come to the right place. This page is dedicated to helping you learn the ins and outs of writing SS13 code. I'll assume you have an above average knowledge of computers. If you ever need help with any of this, feel free to visit the #imcoder channel in the goonstation discord! There's a bunch of helpful people in there who would love to help you learn or help you with any errors you're getting <3


The first thing you're gonna want to do, is get the Goonstation 2016 code and set up a branch.

  1. You're going to need git, so download and install it from here
  2. Once you've installed that, open command prompt (win+r, type 'cmd', enter)
  3. In that terminal type <syntaxhighlight line='none' enclose='none'>cd %UserProfile%\Desktop</syntaxhighlight> to move to your desktop (then enter)
  4. Then in that terminal type <syntaxhighlight line='none' enclose='none'>git clone https://github.com/goonstation/goonstation-2016</syntaxhighlight> and press enter
  5. The code should begin to download, and you should see a new folder on your desktop called "goonstation-2016"
  6. Now you'll want to get the terminal open in that folder (either by right clicking inside of the folder and clicking the "open terminal here" option, or using the cd command in the terminal to navigate to that directory).
  7. Let me quick explain a few things about using git. So, there's four possible (afaik) file statuses. There's added, unadded, unmodified, and untracked. Currently (if you haven't touched any files since cloning) every single file in the goonstation directory is unmodified. As soon as you modify a file in any way, that file will become unadded and lose its unmodified status. If you type <syntaxhighlight line='none' enclose='none'>git status</syntaxhighlight> (git status will show you all added, unadded and untracked files in the branch you're working in, and the name f the branch you're working in), you'll see that file in an unadded files category with the file path in red text. Now, if you type <syntaxhighlight line='none' enclose='none'>git add your/file/path/yourfilename</syntaxhighlight>, your file will become added, and it'll be added to the list of files that will be committed. I'll talk about committing a bit later. If you (or byond) creates a new file in your goonstation directory, it'll be added as an untracked file. Both untracked and unadded files will persist between branches and commits. This is useful for some things, like editing config/admins.txt to include yourself as a host for testing purposes and then never adding the file so you'll always have an admin rank anytime you test, but it can also be problematic so make sure you're not leaving anything untracked or unadded that should either be committed or reverted.

Next, the Dream Maker

Now I'm going to show you how to edit, compile, and run code, using DreamMaker.

To open DreamMaker, open byond. Then navigate to the setting menu and click Open DreamMaker

Opendm.png

Supplementary Video