TGMC:Guide to contributing: различия между версиями
imported>Novaepee |
imported>Novaepee |
||
Строка 156: | Строка 156: | ||
[[Image:image21.png.png|center|frame]] | [[Image:image21.png.png|center|frame]] | ||
{{Speech | |||
|name=The New "Coder" | |||
|text=Oh, my god. The thing is not compiling. It's all broken! I've messed up! | |||
|image=[[File:Generic_assistant2.png|64px|right]] | |||
}} | |||
Don't worry, make sure your Byond client is up to date with the Beta Branch. You can find versions of Byond client, should you or others ever need it!, clink on this [http://www.byond.com/download/build/ link] that Byond have given us. | |||
No errors? Thank goodness, this has passed the first check. | No errors? Thank goodness, this has passed the first check. | ||
Версия от 08:57, 4 января 2021
Файл: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.
What you need to get
You will be getting:
- A GitHub account
- GitKraken
- Visual Studio Code
A BLOOD CONTRACT TO SELL YOUR SOUL
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:
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.
- Visual Studio Code
- Very noob friendly. No coding knowledge required to use the basics.
- Fast and can be customized to your heart's desire.
- Can search the entire folder structure and each files contents for words.
- Every plugin you could ever think of.
With Gitkraken and VS 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!
Coding and Making some Change!
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 VS. So open VS then open the folder where you downloaded the Repository.
This is your side panel. The file explorer is currently displayed.
The New "Coder" говорит: "Oh, my God. How am I supposed to find what I need?" |
To search for text within files, either click the magnifying glass or press CTRL+SHIFT+F
.
This will replace your file explorer with a search panel. 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.
- Figure 1
- Number of matching words inside a file.
- Figure 2
- File names. More specifically, this file is where we want to go. Everything indented below a file name are the matches.
- Figure 3
- Our first match inside this file. All of this is where you do the work, the editor. Something something gaze into the abyss.
The list of lobby songs.
Let’s just remove DawsonChristian.ogg from the available selection, even though that is complete heresy of the highest magnitude.
And save our work. CTRL+S
At this point, we can look at Gitkraken, 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.
Test Your Change!
The New "Coder" говорит: "Oh boy! All done right?" |
Wrong! These changes have only happened on your computer.
The New "Coder" говорит: "So I should just get this online right away?" |
Wrong again! We have to TEST our changes to make sure they work.
There are two ways to compile and test your changes. Both requiring you to boot up Byond. Open Byond as if you were going to play a game. We need to be logged into Byond.
Testing Through Dream Maker
First, open this file via double click.
Second, Compile and host the game.
This will take a moment.
The New "Coder" говорит: "Oh, my god. The thing is not compiling. It's all broken! I've messed up!" |
Don't worry, make sure your Byond client is up to date with the Beta Branch. You can find versions of Byond client, should you or others ever need it!, clink on this link that Byond have given us.
No errors? Thank goodness, this has passed the first check.
Now you've got the game ready to host, hit that green button to start your local "server" then the yellow button above it to join!
Testing Through Visual Studio Code
In the Visual Studio Code, you can press F5, then select Byond as your environment.
Again, it will take a while to compile.
Time to Test!
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.)
Making a Branch and a Git
No need to keep Byond and dream maker open, back to Github Desktop.
Making a Branch
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 right corner.
And hit that “Commit to No-Clown-Musak” button.
Making and Managing a Git
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,
A video!
Guess what, Now there is a video of how to make a gun!
If you follow the general steps in this video. you can make your own guns!