Contributor Guide - Cromha-Plugins/Cromha-Expansion-plugin GitHub Wiki

Menu:

Request feature & Report bugs

Please, every time before reporting a bug or requesting a feature, check if there is not a duplicated issue(someone that had the same idea or bug than you).

Reporting bugs

You can report bugs by opening an issue here. Then select the "bug report" option. It will automatically create a pattern to help you making the report clearer. I will try my best to answer you the fastest possible and solve the bug.

It will look like something like this: image

Select Bug Report and fill in the form that should look like this: image

Requesting Features

You can also request features threw the issues menu on the github repository that you can find here. Open an issue and select the "Feature Request" option. It will automatically create a pattern to help you improve your request and make it clearer to us.

It will look like something like this: image

Select Feature Request and fill in the form that should look like this: image

Adding your own code

First thing first, to contribute to the plugin you have three options: either coding your own idea and create a pull request, either create a feature request but not code it or last, helping on opened bug reports or feature requests.

To check if you can help coding anything, go to the project and check for issues with the "help wanted" label. You can propose your help here. Even if there is no "help wanted" label, you can still propose your help, all contribution is welcome!

If you need help or just want feedback and what you're working on is kind of a big project, feel free to create a new discussion in the Discussion Tab.

Coding Features & Add-ons

To code features in the base plugin, you can check the endless sky github wiki to learn how to code things in the endless sky data format.

The best way to contribute is creating a fork of the main branch and code in this forked repository. Note that you can create your own codespace and work on it if you prefer.

You will find useful links to help you coding faster and better on the discord server

Coding Tips

Here are some tips to code addons or create your own plugin:

  • Always check the "errors.txt" file in your endless sky directory to find possible coding errors made by you or other contributors.

  • Be sure to always code stuff that fits good in the base plugin (in the same "theme" as the base plugin).

  • Keep your code organized in multiple files.

  • For editing the data files, make sure you have a text editor that:

    • Saves files with Unix-style line endings. (That is, don't use Notepad.)

    • Does not convert straight quotes "..." into curly quotes “...”

    • Inserts a tab character, rather than some number of spaces, when you press the TAB key.

    • Some text editors support an EditorConfig file, and will read settings from the file provided in this repository. This can help ensure your contributions match the format of existing data files.

  • Add some more details to your add-ons, to make it more interesting.

  • Check the differents projects in the github repositories to know for what we need help or to find some projects that interest you.

  • Use the plugin wiki as well as the official plugin creation wiki if there is something you're not sure about.

  • If you're adding ships or outfits, make sure that if you made your own model, to add it to the sources/ sub-module. Make sure to use the following pattern for creating files & folders:

  sources/
  |-- outfit/
  |   |-- <outfit code name>/
  |       |-- 3D/ (the 3D models)
  |       |   |-- <outfit code name>.blend
  |       |       ...
  |       |-- GIMP/ (optional, only if you added metal texture to your render)
  |       |   |-- <outfit code name>.xcf
  |       |       ...
  |       |-- rendering/ (the blender renders in PNG format)
  |       |   |-- raw/ (the render of your blender model without any re-scaling and GIMP modifications)
  |       |   |   |-- <outfit code name>.png
  |       |   |       ...
  |       |   |-- final/ (the render of your blender model with GIMP modifications)
  |       |   |   |-- <outfit code name>.png
  |       |   |       ...
  |       |   |-- sprites/ (the render of your blender model with GIMP modifications and re-scaling for the game)
  |       |       |-- <outfit code name>.png
  |       |           ...
  |       |-- templates/ (optional, only if you use other parts of blender models that are not already in the sources/ directory)
  |           ...
  |
  |-- ships/
      |-- <ship code name>/
          |-- 3D/ (the 3D models)
          |   |-- <ship code name>.blend
          |       ...
          |-- GIMP/ (optional, only if you added metal texture to your render)
          |   |-- <ship code name>.xcf
          |   |-- <ship code name>-thumb.xcf
          |       ...
          |-- rendering/ (the blender renders in PNG format)
          |   |-- raw/ (the render of your blender model without any re-scaling and GIMP modifications)
          |   |   |-- <ship code name>.png
          |   |   |-- <ship code name>-thumb.png
          |   |       ...
          |   |-- final/ (the render of your blender model with GIMP modifications)
          |   |   |-- <ship code name>.png
          |   |   |-- <ship code name>-thumb.png
          |   |       ...
          |   |-- sprites/ (the render of your blender model with GIMP modifications and re-scaling for the game)
          |   |   |-- <ship code name>.png
          |   |   |-- <ship code name>-thumb.png
          |   |       ...
          |-- templates/ (optional, only if you use other parts of blender models that are not already in the sources/ directory)
              ...

Where is your ship model name without any caps and is your outfit model name without any caps.

Commit Name Convention

When contributing to this project, you need to apply the commit name convention that you can find here: /.github/COMMIT NAME CONVENTION.md

Apply your code to the base plugin

You can simply create a new pull request that merge the branch where you created your work (a forked or a local repository of you) to the 'main' branch. If you've done everything right, I or @lumbar527 should review the pull request and maybe add your very own code to the plugin.