Jump to content

PR Guidelines: Difference between revisions

From Misfits Nuclear Wasteland
C# code , yaml PR, and PR type guidelines
mNo edit summary
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:


 
== Disclaimer!!!! ==
=== Disclaimer!!!! ===
 
====== Use the below link for anything about learning to code, using Github, and general code conventions ======
====== Use the below link for anything about learning to code, using Github, and general code conventions ======
https://docs.spacestation14.com/en/general-development/setup/howdoicode.html
https://docs.spacestation14.com/en/general-development/setup/howdoicode.html


This is a high level guide on how to make quality PRs for our server that will be accepted and merged.
This is a high level guide on how to make PRs for our server that will be accepted and merged.


=== Main Differences From Wizden PR guidelines ===
=== Main Differences From Wizden PR guidelines ===
Line 12: Line 10:


Quick rundown for anyone already familiar with Wizden PRs. More so for more experienced people that just need a quick summary of how our guidelines differ.
Quick rundown for anyone already familiar with Wizden PRs. More so for more experienced people that just need a quick summary of how our guidelines differ.
'''Also do not forget to join our discord:''' https://discord.gg/Rys9TyeaEy
it's so we know you're not a random and so we wont accidentally close your PR thinking you are.
* We are generally more informal in tone for anything non-technical
* We are generally more informal in tone for anything non-technical
* You do not need to make a gameplay design doc for massive gameplay changes
* You do not need to make a gameplay design doc for massive gameplay changes
** This is something that should be shared, discussed over, and iterated on way before you PR'd anything if the PR's scope justifies is
** This is something that should be shared, discussed over, and iterated on way before you PR'd anything if the PR's scope justifies it
* You do not need to submit a video to prove you tested something for small to moderate changes
* You do not need to submit a video to prove you tested something for small to moderate changes
** We of course expect that you tested your PRs but we'll take you on your word.
** We of course expect that you tested your PRs but we'll take you on your word.
** If you're caught obviously lying about this(obvious bugs linked to your PR show up in-game) then you'll be banned from the repo
** If you're caught obviously lying about this then you'll be banned from the repo
* Tests need to be done in debug mode
** Efforts have been made to clean up debug mode
** Report any outdated/deprecated log errors or anything that could lead to finding underlying issues with systems. 
* Changelogs: Small changes under 5 lines do not need to be divided up by Map: Admin: ect...
* Changelogs: Small changes under 5 lines do not need to be divided up by Map: Admin: ect...
** Needs to be in clear, understandable English, but doesn't need to be grammatically correct
** Needs to be in clear, understandable English, but doesn't need to be grammatically correct
** Value conciseness over grammar. If you can write the message in fewer words with less effort, then do that and try not to worry about grammar
** Value conciseness over grammar. If you can write the message in fewer words with less effort, then do that and try not to worry about grammar
** Visual changes should be summarized. Do not go into specifics. ie sprite overhaul of all drink sprites(nukacola, vim ect...) just write "Most cola sprites changed..."
** Visual changes should be summarized. Do not go into specifics. ie sprite overhaul of all drink sprites(nukacola, vim ect...) just write "Most cola sprites changed..."
** DONT FORGET TO CREDIT SPRITERS IN THE CHANGELOG
* DO NOT FORGET TO CREDIT SPRITERS IN THE CHANGELOG AND SUMMARY
 
== Before You PR ==
=== Verify If Your PR is needed or even wanted ===
Before you spend the time on anything, make sure to talk to us and get basic permission. If you haven't already, you should also join the discord. This the main way of talking to us and is pretty useful for knowing the state of development. Chances are you might discover there are already plans or code made on the thing you wanted to contribute.
 
Join the Discord and talk to us before making any PR: https://discord.gg/Rys9TyeaEy
 
'''The majority of brainstorming and figuring out what to PR is expected to be done in the discord!!!!'''
 
'''Everything you contribute is for this community!!!!'''
 
'''So you need to be ok with sharing your ideas and taking criticism from that same community!!!!'''
 
=== PRs are reviewed bi-weekly on Merge/Review Week ===
This of course varies due to holidays and IRL stuff, but we aim to review PRs every 2 weeks. The third week is review/merge week. We spend the whole week reviewing and merging PRs.
 
=== Relevant Resources ===
Guideline for beginners to help avoid common pitfalls: [https://wiki.misfitsystems.net/index.php?title=Code_Guidelines&veaction=edit Code Guideline]
 
Guideline that goes into more depth on the PR template: [https://wiki.misfitsystems.net/index.php/PR_Template_Guide PR Template Guideline]


== Main PR Guidelines ==
== Main PR Guidelines ==
These are the general PR guidelines for this server. Read this if this is your first PR , if you're new, or you just want more specifics. Also these are just guides. I expect these to cover the majority of PRs that are made, but it can never capture how every PR should be made. In practice that means you need a really good reason not to follow these guides and/or be really experienced and knowledgeable. So basically be an adult.  
These are the general PR guidelines for this server. Read this if this is your first PR , if you're new, or you just want more specifics. Also these are just guides. I expect these to cover the majority of PRs that are made, but it can never capture how every PR should be made. In practice that means you need a really good reason not to follow these guides and/or be really experienced and knowledgeable. So basically be an adult.


=== Basic Guidelines ===
=== Basic Guidelines ===
Line 32: Line 58:
* '''PRs often need to be accepted/discussed first before being PR'd in the first place'''
* '''PRs often need to be accepted/discussed first before being PR'd in the first place'''
** this basically applies for almost every type of PR
** this basically applies for almost every type of PR
** See X about this process WIP!!!!!!!!!! 
** That is done in the discord in relevant dev channels
* Open PRs should not have Linter errors by the time they're reviewed
** We will just close the PR if it has linter errors on review week


* PR titles need to describe the PR's content
* Titles need to describe the PR's content
** no jokes, be clear, and preferably brief
** no jokes, be clear, and preferably brief
* PRs need to be in understandable English
** Do not be misleading
** Doesn't need to be grammatically correct English.
* PR content cannot be misleading
** Summary cannot lie or mislead what is actually coded
* Understandable English
** We prefer clear and concise over grammar
** We prefer clear and concise over grammar
* PRs need to clearly summarize what they change
** Correct grammar is not required
** If the changes are basic and are just a list of simple changes, you can just specify in the summary to read the changelog
* Keep PRs cohesive: PRs should be split up by topic/area of change and be focused
* Keep PRs cohesive: PRs should be split up by topic/area of change and be focused
** Do not have one PR make multiple unrelated changes
** Do not have one PR make multiple unrelated changes
Line 47: Line 76:
* C#, yaml, and otherwise needs to have a basic level of quality and maintainability
* C#, yaml, and otherwise needs to have a basic level of quality and maintainability
** I understand not everyone has the time to volunteer and contribute even basic code, but if you're just adding hard to follow code that we don't think you are going to refactor to be maintainable in the future, then your PR will be denied.
** I understand not everyone has the time to volunteer and contribute even basic code, but if you're just adding hard to follow code that we don't think you are going to refactor to be maintainable in the future, then your PR will be denied.
** Of course this is also on the extreme end of cases where it isn't practical for reviewers to help clean up everything so beginners shouldn't worry about this too much if they do not go overboard and code up 10000 lines of Yendere dev style code.
* Technical part of PRs(if relevant) should demonstrate a level of understanding on the changes made
* Technical part of PRs(if relevant) should demonstrate a level of understanding on the changes made
** if you can't explain your own code or explain why you made the majority of decisions, then I am going to assume AI wrote it.
** if you can't explain your own code or explain why you made the majority of decisions, then I am going to assume AI wrote it.
* Make sure you pay attention to PR reviews. If a reviewer asks for changes then you are expected to do those changes else the PR will be closed
* Pay attention and follow requestes from reviewers!!
** Else your PR will be closed due to inactivity


==== PR Titles ====
=== Basic Policies ===
PR titles need to be descriptive.
We trust these are true by the time the PR is submitted. We are trusting contributors on this. Not following any of these can result in a repo ban. These policies are "Basic" not only to mean that they are simple and so cannot cover every single case, but also basic in the foundational sense. None of them should be broken if you want your PR to be taken seriously, because every PR is expected to follow these policies.


* No jokes, clear English, preferably brief
====== Your PR must be ready to be reviewed when it is uploaded ======
* Good examples)
This INCLUDES NOT HAVING ANY LINTER ERRORS BY REVIEW WEEK!! It might also be randomly closed before review week. Just don't have linter errors by the time a reviewer looks at the code. Of course this also covers your code being able to be built and ran.
* Refactor of NPC systems: 
** PR improves code of various NPC systems. Refactor describes how these are clean-ups and/or general improvement but does not add any new functionality
* Melee Balance Overhaul:
** PR is a mass change of weapon values. Can be to a majority of huge chunk of melee weapons via yaml or/and via C# to the melee related systems.  We have tags that automatically apply if the changes are yaml or C#. Though feel free to specify in the title if you feel the need to, 
* Bad examples)
* PR New:
** Title doesn't describe anything about the PR's content. People do actually make PRs like this.
* Add New Khan Loadout Items:
** The title by itself would be good, but for this example let's say the PR also secretly added the Khans as a faction. The title doesn't make it clear at all that it does such and it should probably be the main thing specified in the title. Doing this makes it come off like you're trying to sneak changes in.  


=== Type of PRs ===
====== DO NOT use AI to write the majority of your code ======
Consider if all you do is prompt AI, then you're not really needed for anything. It is recommended NOT to use AI for design, writing more than a page of code, or giving some analysis(like comments). I, the writer, am personally against any AI use but unfortunately it is something I need to tolerate. I've been told it has uses in areas like creating tests, gathering data, and doing things you could have also done with a script.


* Open: For us this usually means the PR has yet to be reviewed or even looked at(if it lacks tags).
====== DO NOT USE AI TO WRITE THE PR ======
* Closed: For one reason or another the PR was closed. This does not mean the idea or feature was denied(unless stated). People just often forget about their PRs even when a review is made and changes are requested. Everything is just more organized and cleaner if PRs are closed in cases where it just needs more work and review week is over. and
Do not use AI to write the PR template for you. Don't be that lazy.
** it is extremely easy to make a new PR by the way and just continue off from closed PR
* Drafts: For this server, drafts are good for WIP PRs that need to be on the board and have some sorta presence to prevent incompatabilities. Basically it's a big sign to show everyone and us that you're working in some large section of code. Of course this should be agreed on by us prior!!!!!!
** '''Random drafts will be closed'''
** Drafts should be for larger than normal changes that will cause conflicts. Especially if the PR itself is going to take a while to make
** People should pay attention to drafts. If you make a PR that overwrites what a draft is doing your PR will be closed. Ask the writer of the draft if you can modify some section of code that'll affect them. Try collaborating with them even. 
 
=== How PRs are Reviewed ===
This is just an honest high level overview of how PRs are going to be reviewed to help set expectations. Each general process is listed in order. Obviously doesn't cover each and every type of PR like hot fixes or every situation.


# "Sniff Test": We review if the PR passes basic standards. If it doesn't, then it is closed and denied instantly as a low quality PR.
====== DO NOT USE AI FOR ART!! ======
## Examples) Random balance changes made via yaml |  PRs that barely or fail to describe their changes | PRs that seek to port or add features that were unasked for and haven't been discussed about earlier | Bug fixes that fail to describe the bug or the fix | Anything coded with AI
If you do not agree with this, nobody is forcing you to contribute. Trying to push any AI Art will result in a ban from the repo.
## This helps filter out the majority of slop. If we were to treat every PR as honest and examine them seriously then there wouldn't be time to do anything but review PRs. We're a tiny dev team we can't do that.
## If a specific user makes enough of these then they'll be banned from the repo(for like a month I dunno WIP talk to brady)
# PR Scheduled: The PR is scheduled for review and has relevant tags put on it.
## This is usually a 2 week period at most. Do not expect your PR to be accepted until merge week.
## However a dev could still review it if they so happen to feel like it. This may result in the PR being merged, especially if that dev had merge rights or a dev with merge rights is able to verify the review. That is assuming no issues or found or no changes are requested.
## Keep in mind this week is where we take the time make our own PRs and improvements to the server. We need time for that too, so reviewing PRs is not gonna be a top priority.
# Merge Week: Most PRs are reviewed and tested in bulk. The entire week is dedicated to this if needed.
## If a PR is rejected on merge week YOU DO NOT need to wait another 2 weeks. We take the whole week to review and help with your PR. Of course that is dependent on you being active and available for the week.
## Most PRs are processed at this point
# Reviewed PR needs changes/rework but review week is over: PR will need to wait for next review week so repeat from steps 2-3
## We're not robots, so missing the train doesn't mean the PR is forever rejected or missed its chance. We might also make exceptions and may review it even when merge week is over.
## Though at the same time we are not robots. We cannot dedicate all of our time to reviewing PRs. So please respect our time and we'll try to respect yours.
## PRs at most shouldn't last more than 2 weeks of review after constant iteration and changes. In such cases the PR can just be closed either rejected or it just needs way more time in the oven before being PR'd again(it happens. Software is volatile and unpredictable)


=== Template Guide ===
====== CREDIT ANY ARTISTS INCLUDING YOURSELF!!! ======
This is the template most PRs should follow. You will notice that depending on the PR, some sections do not need to be included.  
Credit artists and yourself in the changelog, in the PR summary, and importantly in the json for rsi files.


==== About the PR ====
====== Your PR must have been tested!!! ======
Use this as a simple summary of content changes. Keep this to the point. Also if the change doesn't affect gameplay, it shouldn't be a focus or included here. Think of this like an "elevator pitch".  
If it is obvious that your PRs have not been tested, then that will result in a temporary repo ban.


This should NOT delve into "technical" detail, especially if it does not directly affect gameplay. If your PR is mostly just "technical" changes(refactoring, performance, ect...) then this is allowed to be very brief. In such cases, a lot of the PR should be focused in the "technical details" section.
====== Your PR must have been tested IN DEBUG MODE!!! ======
For this server you must test your changes in Debug mode. A lot of clean-up has been done and so a lot of debug errors and crashes should not happen anymore and get in the way of testing. Though do let us know of any debug errors that are outdated or are false positives.


==== Why / Balance ====
====== No new errors should have been introduced!!! ======
Summary of why the change is needed. Remember, when contributing anything it should be made considering everybody. Also remember that for especially large and in-depth changes/overhauls, much of the justification should have had been known and had way before the PR (like in the discord with us the developers). In such cases you should link any relevant documentation(ie... google docs) and just have a summary of the greater justification in the PR itself.
Error doesn't just mean bugs. There shouldn't be new errors being logged in the console. Your feature could be fully functional but still give out errors. It is usually an indication that you're using some implementation incorrectly. It may not cause errors right now or even weeks later, but it will over time and when people forgot about what caused it in the first place.


For technical focused PRs this section can be used to better organize the overall PR or just left out if you prefer to organize the technical explanation that way.
KEEP IN MIND! The error could also indicate a deeper issue with existing systems that your code luckily discovered. In that case be sure to report it as a bug and file an Issue in the GitHub. It could also be some deprecated debug code. Still be sure to tell us that so it can be investigated and removed if it is deprecated.


==== Technical Details ====
== Further PR Guidelines ==
My favorite. A rundown of the technical changes made and the process took in doing so if relevant. For most things done in yaml, then this can be very short if not omitted outright. The same applies for anything that just adds/changes sprites and other such visuals.Really you want this filled out when making C# changes.


This should represent your basic understanding of what you did/added/improved. If you cannot figure out what you coded or why you coded it(for the most part), then you probably didn't code something of value or didn't code it yourself. That is unfortunately just a normal thing with this generation using AI.   
=== Policy for each PR Type ===
====== Open: ======


To further explain, you should justify/explain your changes. Usually the "journey" you took in doing can also be relevant(like what research you did, books read, videos watched, examples looked at ect...). If the code was changed just for clean-up, then say that. If the code was changed because it was wrong or inaccurate, say that.  
* For us this usually means the PR has yet to be reviewed or even looked at
* Should have tags by the time review week comes up.


Of course you do not need to explain every bit of code, but try explaining the broad strokes and anything weird that may not come off as self evident. We are all learning, so it is ok to miss things or just to not know why certain things work. If you especially don't know why something works or why some hack is needed, please say so(this is not an invite to code something and not know what 100% of it does). The PR is going to be reviewed and anything that is missed by the technical section will be questioned, but do not think that'll deduct anything if you're an honest PRer.
====== Closed: ======


==== Media ====
* DOESN'T MEAN THE CONTENT OF THE PR IS DENIED
Not a hard requirement for most PRs. I would recommend this for PRs that introduce new mechanics and advanced features. Why? To help guide testing and clear up any misunderstanding. I especially recommend this if it is just too inconvenient to describe a feature in writing. Some features are also best shown visually, like maybe network latency(debug visual enabled), animations, new abilities, ect...
* PRs can be closed for multiple reasons
* PR can just be inactive or it needs a larger rework
* Unless told otherwise, you are free to try again and make a new PR from where we left off
** In-fact this can be normal depending on the complexity of the PR
* Used to tidy up the PR board and organize everything


== PR YAML Guide ==
====== Draft: ======
This is not a full guide on how to write yaml for ss14. Just a guide on making PRs in context of yaml. THIS IS NOT A "CODE" GUIDE EXPLAINING WHAT YAML IS OR TEACHING IT!!


=== Simple Yaml PRs ===
* Used for WIP PRs that need to warn/show that they're actively working on a large portion of the code.
These are one of the most common type of PRs we get. I am describing PRs that modify a small amount of existing yaml or add a small amount of yaml. So think renaming some id, changing the number values of some weapons/armor, adding new components to something ect... Basically simple changes that can be described in a few sentences.
* Done to help prevent conflicts, especially from smaller PRs
* If your PR conflicts with an active draft then it'll be closed
* Contributors that wish to change code under a draft should get in contact with the draft owner
** Collaborating with the drafter is a encouraged. Teamwork and all
* '''Random drafts will be closed'''
* To create a draft you need contact the devs and get permission


'''THESE ARE NOT ALLOWED IN MOST CASES!!!''' Why? Because yaml is really easy to do(ideally) and so if something obvious and easy needed to be changed but isn't, then that is on purpose and we do not need a random trying to merge simple changes for us.
=== How PRs are Reviewed ===
 
This is just an honest high level overview of how PRs are going to be reviewed to help set expectations. Each general process is listed in order. Obviously doesn't cover each and every type of PR like hot fixes or every situation.
So how do you get something changed in yaml? A lot of things do require "small" yaml changes and we cant be aware of everything.
 
Well you need to first go through the discord and actually suggest the change or point out to a dev what needs to be changed and why. So basically try discussing your PR before PRing it to make sure if we actually need it or want it.
 
BUGFIXES/OBVIOUS MISTAKES, are an exception to this. Still need to go through normal procedures and explain the bug, the fix, what the fix does(if you know the underlying C#), and ect...
 
=== 'ADVANCED' Yaml PRs ===
These include large yaml changes that add new content, restructure/organizes existing yaml, or adds some other feature that requires quite a bit of yaml that might have a fairly advanced syntax(ex construction graphs). These are allowed, especially mass yaml restructuring and organization. Though STILL RECOMMENDED TO TELL DEVS YOU ARE DOING THIS AND TO GET APPROVAL!! OTHER PEOPLE COULD BE DOING THE SAME THING OR ANOTHER CONFLICTING CHANGE IS COMING UP!!!
 
Other than that it is still recommended to document your changes very well, especially for large yaml edits. Give a rundown on how things are supposed to be organized so we and others can follow suite and make corrections when needed. If you make a huge amount of yaml edits and fail to document or explain things then that is a sure fire way to get your PR closed.  
 
== Brief C# Code Guidelines ==


=== See if you can do it in YAML first!!! ===
==== 1. Sniff Test: Review if PR passes basic standards ====
When creating any PR, the first thing you should think is if it can just be done in yaml. You shouldn't create systems/components for a feature if it already exists and is applicable via yaml. The point of having yaml and different in-engine features that "connects" C# to yaml is to make this code easily reusable and just usable in general for other people without having to hard code up a new system every time.


=== Do not reinvent or repeat existing code ===
* This is a simple and fast check meant to filter out the majority of low quality PRs
This relates heavily with the above point. When creating new systems, you may need to make use of existing functionality. This is alright in cases, especially if that functionality is heavily coupled to whatever system it exists for and so it is impractical to reuse it. Though for this codebase at least, there's been a problem of contributors completely ignoring perfectly good systems and engine features to create redundant code. They are essentially copying or roughly replicating functions.
* Not a real review. Failing to pass will result in the PR being closed right away
* If a given user makes enough of these PRs in a row they'll be banned from the repo temporarily
* This basic check should be done for most PRs before review week(but can happen any time)
* This is when tags are added too


SS14 is a game that already does a lot in one place. It doesn't help if there are multiple functions that just exist to do the same thing. The codebase just becomes overly complicated, bloated, and just harder to work with. These sort of additions also cause bugs and instability. Redundant code often won't do the same checks or preform the same measures as the code it copies. This especially gets bad if others use this redundant code, trusting it like it is any other API from the engine. It also makes changing anything magnitudes of times harder since replacing the redundant code with the "correct version" is not simple and often won't be enough. Behavior that players relied on from the old code may not be perfectly replicated. The replaced code may have additional requirements that were neglected before, so an extensive refactor or rewrite might be needed. You actually need to often understand what the redundant code was trying to do in the first place so you know how to remove/replace it.  
==== 2. PR In-Waiting: ====


You may hear about this sort of situation and heard it described as "code debt", and yea it is. Except this version is so easily avoidable in a lot of cases. It is also a sign on AI usage keep in mind. AI commonly isn't able to make use of existing software very well and has to reinvent functions. If you leave your code like that as the AI wrote it, then you're just incredibly lazy and making the code worse in the long term.     
* PR passed the sniff test but it is not review week yet
* At most this is a 2 week period
* It is possible for a reviewer to look at this before merge week, but don't count on it


=== Design with modularity in mind aka ECS-ify ===
==== 3. Merge/Review Week ====
If you do not know what ECS is, then go read the basic wizden guides. ECS is here for a reason. When creating new functionality, you want to make it as modular and context free as possible. The ideal to aim for is that your feature needs to be as "plug and play" as possible where someone can easily use your feature by just adding the component.


To that effect, if you're in the middle of making a system and it does a lot of things at once, consider breaking it up into smaller parts. Maybe you're making a new gamemode that spawns waves of mobs. You're going to have to make some mob spawning functionality. That can easily be rewritten during development(especially early on) to be its own system. This is just good software practice in general, as doing this can reduce complexity and speed up development of other systems. Though this is a big part of ECS, as it easily allows you to reuse that system, making it very modular. You may also just find yourself writing functionality that should honestly be a basic utility that can find good use in other areas of code.     
* This is when most PRs are processed
* The entire week is spent to review/test PRs
** So how fast your PR gets merged can depend on how soon you respond to changes requested by reviewers


Software though is an iterative process. It might not be helpful to start creating with the immediate goal of modularity or ECS, as you may want to focus on creating/figuring out the system first. You can then focus n ECS-fying a system later on. It might even become obvious to you what to ECS-fy.
==== 4. PR reviewed but not accepted ====


Though also keep in mind, ECS-fying is not relevant to do in all cases. This is evident for various features that need multiple inter working systems/comps made just for them. An example of that could be atmospherics. Though still, you would be surprised what one decently coded system and some yaml could do. 
* PR was reviewed but was not merged by the end of review week
** Needed to do a bunch of changes and couldn't quite be accepted yet
** Maybe there's an influx of PRs and the PR was missed
* This doesn't mean you missed your chance forever
** At worse you just wait for 2 weeks
** We MAY accommodate a few extra days to review and get your PR merged
* If this happens enough you will be told to change the scope of the PR
** PR could just be closed if it clearly needs more time in the oven
** PR may actually be turned to a draft


=== Make use of Datafields. Try not to hardcode values ===
== Special Considerations ==
We want systems to be as flexible and usable as possible. The main way you modify how your functions work should be with some datafields via yaml. This is also good for testing, as yaml can be very quickly hot reloaded.
There are certain notable but common cases where PRs can just bypass these guidelines.


=== Do not overuse comments to explain obvious things ===
====== Hotfixes ======
These are fixes meant to very quickly patch some bug that has some critical affect on gameplay or/and the server. These range from things that cause server crashes to extreme in-game exploits and other such issues. These will usually be made by the top developers and merged pretty fast. Though there will be cases where we can't figure out an issue right away and someone else PRs a fix that we will quickly merge. We will of course test the fix and analyze it thoroughly since we usually will want to understand the issue in the first place.


=== Save comments for advanced/hard to understand code ===
====== Typo Fixes/ Obvious Fixes ======
I've been guilty of this. You may see alot of left over comments like //#Misfits add: or just a lot of comments in general. These are not as helpful as you think. A lot of times the code is pretty self-evident and adding a comment can make things worse. Comments can be misinterpreted or just be outdated as the code is changed. Instead comments should be reserved for summarizing code, explaining WHY things were coded in a specific way, and to explain complex sections of code.  
We make mistakes and sometimes that mistake is some typo somewhere in the code. We might have also clearly forgot to change some values in the yaml. It happens and is pretty simple to fix.


So for example, simple functions may just need a basic summary and other details that users should be aware of(like maybe there's a specific case where the function will crash everything that is easily missed in otherwise simple code). Maybe it is so simple it doesn't really need a summary. Code that really would need comments though are things like atmospherics math and functions. If you do something different from the "norm" or just anything unusual code wise that should be explained too in comments. That is especially true if you needed to write something in a specific way to fix/avoid a bug. DO NOT Just comment  "// added this to prevent crash". Expain what exactly causes the crash and how it is fixed/avoided. It'll also help to explain more context, like why the code is needed here in X area but not in Y area. If you have no idea, then be honest about that and explain as much of the context as you can. Keep in mind you can also save such explanations for the PR.
====== Engineer PRs and up ======
At the time of writing, this is the title given to the maintainers of our server. They are trusted members and work on a different pace. Their PRs are just naturally more trusted. Though also keep in mind, certain ranks above Engineers have merge rights and it is common practice in many servers for whoever has merge rights to just self-merge.

Latest revision as of 00:41, 12 November 2026

Disclaimer!!!!

https://docs.spacestation14.com/en/general-development/setup/howdoicode.html

This is a high level guide on how to make PRs for our server that will be accepted and merged.

Main Differences From Wizden PR guidelines

(Going off the PR guidelines page linked earlier. Sorry if some of these are outdated but they're still listed and will confuse people)

Quick rundown for anyone already familiar with Wizden PRs. More so for more experienced people that just need a quick summary of how our guidelines differ.

Also do not forget to join our discord: https://discord.gg/Rys9TyeaEy

it's so we know you're not a random and so we wont accidentally close your PR thinking you are.

  • We are generally more informal in tone for anything non-technical
  • You do not need to make a gameplay design doc for massive gameplay changes
    • This is something that should be shared, discussed over, and iterated on way before you PR'd anything if the PR's scope justifies it
  • You do not need to submit a video to prove you tested something for small to moderate changes
    • We of course expect that you tested your PRs but we'll take you on your word.
    • If you're caught obviously lying about this then you'll be banned from the repo
  • Tests need to be done in debug mode
    • Efforts have been made to clean up debug mode
    • Report any outdated/deprecated log errors or anything that could lead to finding underlying issues with systems.
  • Changelogs: Small changes under 5 lines do not need to be divided up by Map: Admin: ect...
    • Needs to be in clear, understandable English, but doesn't need to be grammatically correct
    • Value conciseness over grammar. If you can write the message in fewer words with less effort, then do that and try not to worry about grammar
    • Visual changes should be summarized. Do not go into specifics. ie sprite overhaul of all drink sprites(nukacola, vim ect...) just write "Most cola sprites changed..."
  • DO NOT FORGET TO CREDIT SPRITERS IN THE CHANGELOG AND SUMMARY

Before You PR

Verify If Your PR is needed or even wanted

Before you spend the time on anything, make sure to talk to us and get basic permission. If you haven't already, you should also join the discord. This the main way of talking to us and is pretty useful for knowing the state of development. Chances are you might discover there are already plans or code made on the thing you wanted to contribute.

Join the Discord and talk to us before making any PR: https://discord.gg/Rys9TyeaEy

The majority of brainstorming and figuring out what to PR is expected to be done in the discord!!!!

Everything you contribute is for this community!!!!

So you need to be ok with sharing your ideas and taking criticism from that same community!!!!

PRs are reviewed bi-weekly on Merge/Review Week

This of course varies due to holidays and IRL stuff, but we aim to review PRs every 2 weeks. The third week is review/merge week. We spend the whole week reviewing and merging PRs.

Relevant Resources

Guideline for beginners to help avoid common pitfalls: Code Guideline

Guideline that goes into more depth on the PR template: PR Template Guideline

Main PR Guidelines

These are the general PR guidelines for this server. Read this if this is your first PR , if you're new, or you just want more specifics. Also these are just guides. I expect these to cover the majority of PRs that are made, but it can never capture how every PR should be made. In practice that means you need a really good reason not to follow these guides and/or be really experienced and knowledgeable. So basically be an adult.

Basic Guidelines

PR needs to follow these basic rules to be accepted.

  • PRs often need to be accepted/discussed first before being PR'd in the first place
    • this basically applies for almost every type of PR
    • That is done in the discord in relevant dev channels
  • Open PRs should not have Linter errors by the time they're reviewed
    • We will just close the PR if it has linter errors on review week
  • Titles need to describe the PR's content
    • no jokes, be clear, and preferably brief
    • Do not be misleading
  • PR content cannot be misleading
    • Summary cannot lie or mislead what is actually coded
  • Understandable English
    • We prefer clear and concise over grammar
    • Correct grammar is not required
  • Keep PRs cohesive: PRs should be split up by topic/area of change and be focused
    • Do not have one PR make multiple unrelated changes
      • ie... PR adding new NPCs should not also have balance changes for player armor and weapons
  • PRs need to follow the template as specified
  • C#, yaml, and otherwise needs to have a basic level of quality and maintainability
    • I understand not everyone has the time to volunteer and contribute even basic code, but if you're just adding hard to follow code that we don't think you are going to refactor to be maintainable in the future, then your PR will be denied.
  • Technical part of PRs(if relevant) should demonstrate a level of understanding on the changes made
    • if you can't explain your own code or explain why you made the majority of decisions, then I am going to assume AI wrote it.
  • Pay attention and follow requestes from reviewers!!
    • Else your PR will be closed due to inactivity

Basic Policies

We trust these are true by the time the PR is submitted. We are trusting contributors on this. Not following any of these can result in a repo ban. These policies are "Basic" not only to mean that they are simple and so cannot cover every single case, but also basic in the foundational sense. None of them should be broken if you want your PR to be taken seriously, because every PR is expected to follow these policies.

Your PR must be ready to be reviewed when it is uploaded

This INCLUDES NOT HAVING ANY LINTER ERRORS BY REVIEW WEEK!! It might also be randomly closed before review week. Just don't have linter errors by the time a reviewer looks at the code. Of course this also covers your code being able to be built and ran.

DO NOT use AI to write the majority of your code

Consider if all you do is prompt AI, then you're not really needed for anything. It is recommended NOT to use AI for design, writing more than a page of code, or giving some analysis(like comments). I, the writer, am personally against any AI use but unfortunately it is something I need to tolerate. I've been told it has uses in areas like creating tests, gathering data, and doing things you could have also done with a script.

DO NOT USE AI TO WRITE THE PR

Do not use AI to write the PR template for you. Don't be that lazy.

DO NOT USE AI FOR ART!!

If you do not agree with this, nobody is forcing you to contribute. Trying to push any AI Art will result in a ban from the repo.

CREDIT ANY ARTISTS INCLUDING YOURSELF!!!

Credit artists and yourself in the changelog, in the PR summary, and importantly in the json for rsi files.

Your PR must have been tested!!!

If it is obvious that your PRs have not been tested, then that will result in a temporary repo ban.

Your PR must have been tested IN DEBUG MODE!!!

For this server you must test your changes in Debug mode. A lot of clean-up has been done and so a lot of debug errors and crashes should not happen anymore and get in the way of testing. Though do let us know of any debug errors that are outdated or are false positives.

No new errors should have been introduced!!!

Error doesn't just mean bugs. There shouldn't be new errors being logged in the console. Your feature could be fully functional but still give out errors. It is usually an indication that you're using some implementation incorrectly. It may not cause errors right now or even weeks later, but it will over time and when people forgot about what caused it in the first place.

KEEP IN MIND! The error could also indicate a deeper issue with existing systems that your code luckily discovered. In that case be sure to report it as a bug and file an Issue in the GitHub. It could also be some deprecated debug code. Still be sure to tell us that so it can be investigated and removed if it is deprecated.

Further PR Guidelines

Policy for each PR Type

Open:
  • For us this usually means the PR has yet to be reviewed or even looked at
  • Should have tags by the time review week comes up.
Closed:
  • DOESN'T MEAN THE CONTENT OF THE PR IS DENIED
  • PRs can be closed for multiple reasons
  • PR can just be inactive or it needs a larger rework
  • Unless told otherwise, you are free to try again and make a new PR from where we left off
    • In-fact this can be normal depending on the complexity of the PR
  • Used to tidy up the PR board and organize everything
Draft:
  • Used for WIP PRs that need to warn/show that they're actively working on a large portion of the code.
  • Done to help prevent conflicts, especially from smaller PRs
  • If your PR conflicts with an active draft then it'll be closed
  • Contributors that wish to change code under a draft should get in contact with the draft owner
    • Collaborating with the drafter is a encouraged. Teamwork and all
  • Random drafts will be closed
  • To create a draft you need contact the devs and get permission

How PRs are Reviewed

This is just an honest high level overview of how PRs are going to be reviewed to help set expectations. Each general process is listed in order. Obviously doesn't cover each and every type of PR like hot fixes or every situation.

1. Sniff Test: Review if PR passes basic standards

  • This is a simple and fast check meant to filter out the majority of low quality PRs
  • Not a real review. Failing to pass will result in the PR being closed right away
  • If a given user makes enough of these PRs in a row they'll be banned from the repo temporarily
  • This basic check should be done for most PRs before review week(but can happen any time)
  • This is when tags are added too

2. PR In-Waiting:

  • PR passed the sniff test but it is not review week yet
  • At most this is a 2 week period
  • It is possible for a reviewer to look at this before merge week, but don't count on it

3. Merge/Review Week

  • This is when most PRs are processed
  • The entire week is spent to review/test PRs
    • So how fast your PR gets merged can depend on how soon you respond to changes requested by reviewers

4. PR reviewed but not accepted

  • PR was reviewed but was not merged by the end of review week
    • Needed to do a bunch of changes and couldn't quite be accepted yet
    • Maybe there's an influx of PRs and the PR was missed
  • This doesn't mean you missed your chance forever
    • At worse you just wait for 2 weeks
    • We MAY accommodate a few extra days to review and get your PR merged
  • If this happens enough you will be told to change the scope of the PR
    • PR could just be closed if it clearly needs more time in the oven
    • PR may actually be turned to a draft

Special Considerations

There are certain notable but common cases where PRs can just bypass these guidelines.

Hotfixes

These are fixes meant to very quickly patch some bug that has some critical affect on gameplay or/and the server. These range from things that cause server crashes to extreme in-game exploits and other such issues. These will usually be made by the top developers and merged pretty fast. Though there will be cases where we can't figure out an issue right away and someone else PRs a fix that we will quickly merge. We will of course test the fix and analyze it thoroughly since we usually will want to understand the issue in the first place.

Typo Fixes/ Obvious Fixes

We make mistakes and sometimes that mistake is some typo somewhere in the code. We might have also clearly forgot to change some values in the yaml. It happens and is pretty simple to fix.

Engineer PRs and up

At the time of writing, this is the title given to the maintainers of our server. They are trusted members and work on a different pace. Their PRs are just naturally more trusted. Though also keep in mind, certain ranks above Engineers have merge rights and it is common practice in many servers for whoever has merge rights to just self-merge.