User:Contra/Quick Guide to Contributing

From Paradise Station Wiki
Jump to navigation Jump to search

This is a speedrunner's guide to contributing. Check out Guide_to_Contributing for more details!

You Will Need

  • VSCode
  • Git
  • A github account
  • Determination

Links

Getting Started

Once you have a github account, VSCode downloaded, and git downloaded and installed, you will need to download the repository. Whats a repository? Its the giant folder that all our code, icons, sounds, and other stuff is stored online.

Forking

Fork the repo, this can be found in the top right of https://github.com/ParadiseSS13/Paradise by clicking the "Fork" button. This should create your own copy of our code under your github account. In the top left, it should say something like "(your github username)/Paradise, forked from ParadiseSS13/Paradise"

Downloading the Code

Now that we have the code we want to download, open up vscode and click through all the introductory menus and things. Read them if you would like. Now go to the "Source Control" button on the left, it should be the 3rd one down. You can also reach this menu by pressing Ctrl+Shift+G. Now click sign into github and select your forked repo from before. It should begin downloading to your computer.

Changin stuff

We have the code, now what? Well we want to change it of course, that's why we're here. Now, we have a few major types of files in our codebase. .dm files are our code files, .dmi files are our image files, and .dmm files are our map files. .dm files should be edited with VSCode, .dmm files should be edited with StrongDMM (you can find out more about this in our guide to mapping), and dmi files are... something else. For now, use the default dream maker image editor with them until you are more comfortable with coding, then check out using tweakPNG to convert a .dmi to a .png so you can edit it using an external program. Ask people in #coding-chat in the discord if you have any questions about that.

Branch

Before we start making changes, we want to "branch" our "master branch" into another one, this allows us to make changes without permanently affecting our history or other branches. At the bottom of your screen you should have a terminal open, if you don't press Ctrl+J. This should open up a powershell command line. Type in "git branch {your new branch name!} master". This will create a copy of master, but we haven't switched to it yet, so type "git switch {branch-name-from-before}. This will put you in your copy instance and safe to alter code to your wildest dreams!

You can also do this in your "Source Control" tab from earlier, allowing you to swap to your master and back at the click of a button!

Coding

I lied! We have multiple types of languages in our codebase, but not to fear! Most of our code is written in dream maker (or dm for short), this is a fairly easy language to learn. Check our guide to coding (not yet created, please come back and edit this me) or ask our #coding-chat in discord.

Here's also a few guides and info sheets of varying complexity

Contribute

We've made the changes we've wanted to make. Now what?

Committing

First, we gotta move our code online to our online fork. How do we do that? We want to go to our "Source Control" tab from earlier (3rd button down on the left) and find the area showing which files have changed. Now, choose the files you want to upload online by hovering over them and clicking the plus symbol to "stage" them. Staging them tells git this is a file you want to upload. Now to upload it, type in a message in the message above above the blue commit button. This will be your commit message and should be a short of what has changed in the files.

Now that we have our selected files staged and the commit message ready, click the little arrow on the right side of the commit button and select "Commit and Push". It should then prompt you to select a location to send your files. Select "Origin" and this should send it to your forked repository.

Making a Pull Request

Now that we have our files online, go to the github for paradise (https://github.com/ParadiseSS13/Paradise/pulls) and it should have a small yellow box telling you that there are changes and you can pull them to this repository. Go ahead and click that and it should open up a form, it should be something like what your PR does, why its good, some images (if applicable), testing of your PR (you really should make sure it works), and a changelog. Go ahead and fill these out.

Now for the changelog, fix:, add:, etc., are all going to be converted to images. They are for describing what your PR does. You can have multiple lines of them followed by text, but make sure the texts arent too long! Making sure they dont loop over onto the next line is a good rule of thumb.

We did it!

We submitted the PR and other people are able to view your changes now. Nice! Now, we're probably gonna get some feedback on how to improve stuff. No one's code first try is perfect, and other contributors are here to help and make sure your code hits our (admittedly low) standards.

Now, github has an option to commit any suggestions to your code directly from the browser, pretty neat huh! Don't use it. For the love of god, don't use it. It shows to the other contributors that you did not test that change you just made, and the suggestion that the person made by not be actual code (like pseudo code, stuff that describes what should be done, but doesnt actually work as code). It also makes it difficult to update your local code because you will need to download stuff from github to be updated with your branch. Just trust me, don't do it.

Instead, go to your VSCode and make the changes there that are suggested, then press the commit and push button again. This will upload your changes directly to your PR, nice.

PR Merged

If everything goes well, you will or just got your first pull request merged. Congratulations! Your code is now part of repository and will be updated soon to show on the live server, likely the next round.

If you wish to continue, you are welcome to become a contributor and join us on #coding-chat, we're looking forward to seeing you!