Jump to content

Guide to contributing to the server [No longer WIP]


Recommended Posts

Posted (edited)

 

Yay I "finished" it.

 

Hello! So you want to code/map/sprite/etc... for the server!

You've come to the right place.

 

Our codebase is located here: https://github.com/ParadiseSS13/Paradise

 

To get started with coding/mapping/spriting/etc-ing, you will need:

 

  •  

    * A github account, it's free.

    * Github for windows OR regular git, installation for these is gonna be down below.

    * enough free hard drive space to store a >850 MB (and growing!) repo.

 

 

Well, let's get started then.

 

 

Getting a git client, REQUIRED

 

First thing you will need is a version of git, git is the VCS (Version Control System) that github, and thus our repo, uses.

 

To do anything you will need a version of git, here's some options:

 

Github for windows: Github for windows is github's own git client. ABSOLUTE FUCKING SATAN, AVOID!!!

 

Regular git: Regular git is needed for all the clients below.

Some UIs:

 

Smartgit: Really good git client with a really nice UI.

 

Tortoisegit: Quite a strong git client, but the UI is pretty meh.

 

Installing these git clients (I recommend smartgit BTW):

 

Installing & setting up git for windows + tortoise git: http://ss13.pomf.se/wiki/index.php/Guide_to_GitHub/TortoiseGit

(Don't bother with the other stuff in this page, you only need the install instructions.)

 

Installing Github for windows: https://windows.github.com/

 

Installing Smartgit: http://www.syntevo.com/smartgit/

 

 

Using the git client you chose

Now, now that you have that (I hope), you will need to learn how to use it, I know you're getting impatient to learn how to code & stuff, but you can't do anything with code/sprites/map changes if you don't know how to get it to the repo!

 

Note: I'm by FAR not an expert with git, so be sure to criticise this, somebody had to make this guide sometime!

 

On github, you will not be able to directly commit (the act of changing files, in any way) to the main repo (obviously), to do this, you will need to fork the repo:

(No, not stabbing it)

Forking the repo:

 

If you are in the main repo's page, there will be a "Fork" button in the top right: 246MQC0.png.

Press it, super intense forking action will happen, and you will have a fork of the repo.

 

Cloning the repo (github for windows)

At the right of YOUR FORK's github page, there'll be a couple things: LQOjDO1.png

To get a copy of your fork to your PC, you will have to clone it.

 

1. If you are logged in to github, you *should* be able to press the "clone in desktop button". Most likely your internet browser will ask if you want to open this "github-windows://" link with github for windows, press yes.

2. github for windows *should* pop up, and ask you where to clone the repo to, choose a destination and click okay, wait ages as it downloads.

 

NOTE:I've had problems with github for windows when trying to it this way, if it does indeed not work you'll have to open git shell (came with github for windows), cd to the directory you want to clone the repo to, then type "git clone [clone URL]" without the quotation marks or square brackets, the clone URL is the box above the "clone in desktop" button on your repo's page, after that you need to go into the github for windows UI and make it scan for repos in the preferences, it'll find it if it's not in a stupid spot.

 

Cloning the repo (Tortoisegit)

At the right of YOUR FORK's github page, there'll be a couple things: LQOjDO1.png

To get a copy of your fork to your PC, you will have to clone it.

 

Click on "SSH", then copy the clone URL above the "clone in desktop" button, and right click in the folder you want to clone the repo to, you'll see these options in your context menu: asYDjV6.png

Click "Git clone", a new dialogue should pop up:

X8Xfwsp.png

Things you need to set:

 

1. URL: should be the one you copied from your repo.

NOTE: your URL will look a lot different, because I didn't use an SSH but an HTTPS URL at the time of writing, use an SSH one.

2. Directory: Where you want to put the repo on your disk.

3. Putty key: the .ppk file you made whilst following the install tutorial I linked.

 

You also need to check if you have a reference to the main repo, "upstream", and add one if you don't have it:

 

1. Right click your forked repo folder, in the context menu: tortoisegit -> settings, if it gives you a popup about something something hierarchy config something something, click it away.

 

2. Go to git -> remote, if there's 2 entries (origin and upstream), you're good, else upstream will probably be missing, you'll have to add it, with the fields at the right of the window (if a field's not mentioned here leave it blank):

 

"remote" : "upstream" (can be anything, but stay organised, I'll be using upstream as name in this guide)

"URL" : "[email protected]:ParadiseSS13/Paradise.git"

"Putty key" :Select the .ppk you made.

Click "Add new/save".

 

 

Now you'll be set to code & upload changes, if you know how:

 

Git, in a dirty nutshell:

 

 

Repo: your repo, this stores all you do

 

Commit: Basically, when you modify files, and then save them in git, you commit them, (it basically saves only what changes you made), because of this you can easily do history checking, reverting, and other stuff.

 

Committing (Tortoise):

1. Commit to [bRANCH NAME] in the context menu, UI after that is self explanatory.

 

Committing (Github for windows):

1.Open the application.

2.Select your repo.

3."Uncommitted changes" with an arrow button next to it should appear, click it.

4.UI is self explanatory (I hope).

 

Branch: think of it like a tree (a weird one), if you have a few commits in 1 branch (master, for example), and you branch of off that branch, you will keep any commits that were already on the branch you are branching of off, but any future commits on 1 branch will not exist on the other branch, and vice versa. (get the tree anology? good.) Now when I said it's a weird tree, it's because at some point you're intending to merge those branches together, you can see your forked repo as a gigantic branch of off the main repo, with smaller branches leading of off it! branches are important, because getting commits out of branches is impossible, you can delete the branch, but with obvious consequences.

 

Switching/creating branches (tortoise):

1.Right click repo.

2.switch/checkout command.

3.UI is self explanatory.

 

Switching/creating branches (Github for windows):

1.Open github for windows (okay this is actually pretty self explanatory, why am I even bothering to say this).

2.Click on the little branch name with a blue arrow pointing down next to it QITq7kf.png.

3.UI is self explanatory.

 

Merging:Merging 2 branches, this basically goes like: copy X branch's unique commits to the branch I'm currently on.

 

Merging (tortoise):

1.Merge in the tortoise context menu.

2.UI is self explanatory, you're always merging TO the current branch, BTW.

 

Merging (Github for windows):

1.Open branch menu -> "manage".

2.Drag & drop branches down to the bottom there, no idea how that works, never tried it.

 

Pulling:Basically merging, but you're merging from the repos on github directly, this is usefull, as you can directly pull new commits from the main repo to yours (to then get those unique commits you pulled from the fork on github you need to push(explained later))!

 

Pulling (tortoise):

1."Git sync..." in the context menu.

2.Set options for pulling at the top of the UI;

"Local branch": Keep this as the current branch, can't pull to a branch you're not currently on.

"Remote branch": The branch you're pulling from.

"Remote URL": The Github repo you're pulling from, "origin" is your fork on github, "upstream" is the main repo.

3.Click "Pull..."

 

Pulling (Github for windows):

Kind of a special one:

If you're pulling from your main repo:

"Sync" button at the top right of your UI

If you are trying to pull from another branch:

"Sync" on that branch, then merge the branches.

If you're trying to pull from the main repo (this is why github for windows sucks):

1. Open git shell.

2. Type "Git fetch upstream"

3. Type "Git merge upstream/[branch you're pulling from]"

This effect the current branch BTW.

 

pushing: the opposite of pulling; you're copying your unique commits to the repos on github, you can't push to the main repo (not directly, you need a PR, more on that later), but you can to your fork, which is needed for PRs.

 

Pushing (tortoise):

1.Go read pulling.

2.Press the push button instead.

 

Pushing (Git for windows):

1.Go read pulling.

2.Reallise you can't push & pull seperately on github for windows.

 

Pull request: This (I believe) is actually not a git feature but a feature added by github, I think tortoise can do it but I recommend using your browser anyways, you can make requests to pull (get the name?) unique commits from your forks branches to the main repos branches (not that our main repo makes good use out of branches, but make sure you DO use branches yourself).

 

Making a PR:

1.Make a new branch.

2.Commit changes.

3.Push changes.

4.Go to either the main repo's or your fork's github page.

5.Realise there's a message about you having pushed a branch.

6.Click it, UI is self explanatory.

 

Updating a PR:

1.Push extra commits to the PR's branch.

 

 

Actually coding:

 

Did you really think I was gonna teach you how to code?

Resources: #vgstation & #coderbus on irc.rizon.net and #codershuttle on irc.sorcery.net for /vg/'s, /tg/'s and bay's coder IRC, respectively.

 

http://www.byond.com/docs/guide/

http://www.byond.com/docs/ref/index.html

 

 

Spriting:

 

The .dmis DM uses for sprites are just .pngs with a different extension and a couple comments to define some stuff, nothing special.

No, I'm not gonna teach you how to sprite, I suck at it myself.

 

 

Mapping:

1.Go to tools\mapmerge.

2.Run 1prepare_map.bat.

3.Make map edits, BYOND's mapper can't be hard to figure out.

4.Run 2clean_map.bat.

5.Make a PR or something.

 

 

Edited by Guest
  • 3 months later...
Posted

 

This is beautiful, I SALUTE YOU SIR. I SALUTE YOU FOREVER. SOMEONE GIVE THIS MAN MONEY.

 

No but seriously in all my years of working on Mods, not once have I ever seen someone have the guts to make a guide on how to create content for the server.

 

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use