TGMC:Guide to contributing
Файл:DMCA Logo.png | This page is a part of the TGMC wiki.
TGMC is a project based on the CM-SS13 codebase. |
You poor poor soul.
Let’s get you on your way to contributing. This isn’t the guide for hardcore coders. This is for the guy who just wants a thing tweaked. If you’re really into making big feature changes, talk in the #Dev-General channel and get the people there to help you.
Since you’re reading this you’re already on the Discord. Head on over to the #coding channel and look at the top for this link.
https://github.com/tgstation/TerraGov-Marine-Corps
This will take you to the Github page. You’ll need to make an account if you don’t have one already.
Signed up or in? Great!
The first thing you need to do is “Fork” this Github. This is the fork button.
(Fork: A fork is a personal copy of another user's repository that lives on your account. Forks allow you to freely make changes to a project without affecting the original. Forks remain attached to the original, allowing you to submit a pull request to the original author to update with your changes. You can also keep your fork up to date by pulling in updates from the original.)
This will take a moment, then it will bring you to your own personal Fork of the TGMC “Repository”
(Repository: A repository is the most basic element of GitHub. They're easiest to imagine as a project's folder. A repository contains all of the project files (including documentation), and stores each file's revision history. Repositories can have multiple collaborators and can be either public or private.)
With this done, we want to take a step back and get two outside programs.
- GitKraken
- This is for advanced users of Github.
- Allows for much greater control of branches.
- As the opening paragraph stated, ask for help with this program.
- Sublime
- Fantastically powerful and highly recommended.
- Can search the entire folder structure and each files contents for words.
With Gitkraken and Sublime installed. We’re almost ready to start making changes.
We need to get our fork of the TGMC repository on our computer.
Since you installed Gitkraken, we’ve got an easy button to use in Gitkraken.
This will download the Forked Repository to your computer all ripe for modifying.
You can decide where it is put on your computer, but the default Documents/Github/ is perfectly fine.
So we are ready to do some changes!
Let’s do something simple. Let’s alter the lobby music.
First we need to find where the lobby music is. And to do that, we should set up Sublime. So open Sublime then open the folder where you downloaded the Repository.
Now Sublime looks a little like this.
We’re gonna use a super nice command called “Find in Files” CTRL+SHIFT+F
This will open up a search bar at the bottom
Typing in the text we want to search for and hitting enter, we get a BIG amount of text with every instance of the word “music” highlighted, along with a small amount of the surrounding text to give it context.
Scrolling down we see that the lobby music is selected in this file.
Time to get our edit on!
Let’s just remove clown.ogg from the available selection. Double clicking the yellow text opens the relevant file.
We find the list of music files.
Remove clown.ogg from the list.
And save our work. CTRL+S
At this point, we can look at Github Desktop, and things have changed!
We can see that we’ve changed one file, and what the specific change was. Red for removal, green for addition.
Oh boy! All done right?
Wrong! These changes have only happened on your computer.
So I should just get this online right away?
Wrong again! We have to TEST our changes to make sure they work.
First. Open Byond as if you were going to play a game. We need to be logged into Byond.
Online? Good.
Second, open this file via double click.
Third, Compile and run the game.
This will take a moment.
Not compiling? Make sure your Byond client is up to date with the Beta Branch. No errors? Thank goodness, this has passed the first check.
There are hundreds of these safety checks. Select yes once with your mouse. Then just hold down the enter key to accept all of them. You’ll have to accept them all every time you run the game.
Oh snap, you’re in game and you’re an admin! Hooray it works! Test your feature/game balance/thing you want.
(in our case, we would keep running and re-running the game to start the lobby music multiple times. Each time checking that the clown.ogg music doesn’t get played.)
No need to keep Byond and dream maker open, back to Github Desktop.
We need to make a “Branch” for our change. We don’t want to change our master if we can help it.
(Branch: A branch is a parallel version of a repository. It is contained within the repository, but does not affect the primary or master branch allowing you to work freely without disrupting the "live" version. When you've made the changes you want to make, you can merge your branch back into the master branch to publish your changes.)
Our changes are good, but first, we need to “Commit” them to the branch.
Give your update a name and a brief description in the bottom left corner.
And hit that “Commit to No-Clown-Musak” button.
Next we need to publish the branch moving our changes online to our fork
It’s now online! Let’s go to our Github fork on the Github website.
We’ve even got a nifty button all ready for us.
Now is the time to give our “Pull Request” a proper name and description.
(Pull Request: Pull requests are proposed changes to a repository submitted by a user and accepted or rejected by a repository's collaborators. Like issues, pull requests each have their own discussion forum.)
The title should be a one sentence summary, at most.
The description should give detail, and ingame examples if possible via screenshots hosted on an image hosting website. I recommend imgur.com
Hit the big green “Create pull request” button and jobs a good one!
Bask in the glow of accomplishing something grand!
See it on Discord in the #github channel!
Realize you’ve made a terrible mistake!
Phew, integrity saved!
And that’s the basics of Contributing to TGMC
Remember, the #dev-general and #coding are the places to be for more in depth questions, moral support,