Skip to content

Create CreatingFormations.md - #176

Open
chemtrailoperator wants to merge 7 commits into
endless-sky:masterfrom
chemtrailoperator:master
Open

Create CreatingFormations.md#176
chemtrailoperator wants to merge 7 commits into
endless-sky:masterfrom
chemtrailoperator:master

Conversation

@chemtrailoperator

@chemtrailoperator chemtrailoperator commented Oct 20, 2025

Copy link
Copy Markdown

(Choose one heading.)

New feature

(If this PR is to include details on a new feature or a change to a feature, include a link to the PR that makes the corresponding change to Endless Sky.)
endless-sky/endless-sky#4471

Summary

Created a new wiki document called CreatingFormations to cover coding formations into the game. Written by reverse engineering syntax in formations.txt

@TheGiraffe3 TheGiraffe3 added the enhancement Adding documentation about a new feature being PR'd to endless-sky/endless-sky label Oct 21, 2025

@TheGiraffe3 TheGiraffe3 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add links to this page in Home.md and _Sidebar.md?

Comment thread wiki/CreatingFormations.md Outdated
Comment thread wiki/CreatingFormations.md Outdated
Comment thread wiki/CreatingFormations.md Outdated
chemtrailoperator and others added 3 commits October 21, 2025 08:12
typo fix

Co-authored-by: Loymdayddaud <145969603+TheGiraffe3@users.noreply.github.com>
typo fix

Co-authored-by: Loymdayddaud <145969603+TheGiraffe3@users.noreply.github.com>
typo fix

Co-authored-by: Loymdayddaud <145969603+TheGiraffe3@users.noreply.github.com>
@chemtrailoperator

Copy link
Copy Markdown
Author

Could you add links to this page in Home.md and _Sidebar.md?

Done.

@TheGiraffe3

Copy link
Copy Markdown
Member

Ideally that would be done in this PR, since this is where the file is added.

@warp-core

Copy link
Copy Markdown
Contributor

I'm guessing you're using GitHub's web editor to make these changes.
To add additional changes to this PR:

  1. Navigate to the "head" branch. The easiest way to do this is to look near the top of this page, just below the pull request title, and click the link with the text: "chemtrailoperator:master" (the link in this message will also work).
  2. This should take you to the main page for your fork of this repository, on the appropriate branch for this PR.
  3. Navigate to the file you want to edit.
  4. Use the edit button, make your changes, then click the "commit changes" button.
  5. This should add a new commit to the branch for this PR.

Once a file is changed by a PR, making further changes to it is a bit more straightforward, you can find a guide here: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request#making-changes-to-files-in-your-pull-request

If you are using git or GitHub Desktop on your computer, you can alternatively either merge the branches with the other commits into this one, or cherry-pick those commits onto this branch.

@chemtrailoperator

Copy link
Copy Markdown
Author

I'm guessing you're using GitHub's web editor to make these changes. To add additional changes to this PR:

1. Navigate to the "head" branch. The easiest way to do this is to look near the top of this page, just below the pull request title, and click the link with the text: "[chemtrailoperator:master](https://github.com/chemtrailoperator/endless-sky-wiki/tree/master)" (the link in this message will also work).

2. This should take you to the main page for your fork of this repository, on the appropriate branch for this PR.

3. Navigate to the file you want to edit.

4. Use the edit button, make your changes, then click the "commit changes" button.

5. This should add a new commit to the branch for this PR.

Once a file is changed by a PR, making further changes to it is a bit more straightforward, you can find a guide here: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request#making-changes-to-files-in-your-pull-request

If you are using git or GitHub Desktop on your computer, you can alternatively either merge the branches with the other commits into this one, or cherry-pick those commits onto this branch.

Apologies, I am very new at using Github.
I made two new pull requests for the changes to the files. Do those need to be closed?

@TheGiraffe3

Copy link
Copy Markdown
Member

Yes.

@chemtrailoperator

Copy link
Copy Markdown
Author

done

@petervdmeer petervdmeer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for documenting this!

I added some remarks based on the implementation and the early/original RFCs.

Comment thread wiki/CreatingFormations.md Outdated
```
Will render the first position at 0,200 and then 0,400; 0,600; etc.

If no repeat attribute is present, all positions will be filled, and any remaining ships will group at 0,0 underneath the flagship.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description for "remaining ships at 0.0" is correct for the current implementation, but do we want this? We might want to consider such "remaining ships" behavior to be undesirable, and file a feature request to let those ships beyond the end position return to the default "flocking" behavior. What do you think?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally like the way they all cluster to 0,0, since it works with some of the formations in my expansion plugin, but I am open to changing it. Definitely specify in the feature request that there should be a message "Formation is fully populated, remaining ships will not fly in formation." in the messages feed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should change this behavior in the future in that ships that cannot move in the formation fall back to the default flocking behavior. For this text I think it is fine to just specify "If a formation is fully populated, then the remaining ships will not fly in formation."

Comment thread wiki/CreatingFormations.md Outdated
Comment thread wiki/CreatingFormations.md
Comment thread wiki/CreatingFormations.md Outdated
...
```

To make formations scalable to any number of ships, a repeat attribute must be applied to the block. Any attribute that exists in a block can be used as a child attribute in `repeat`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be nice to describe that the attributes in repeat are added on top of the original values, so repeating with a position of 1 will make each repeat iteration one larger than the previous one. While repeating an arc with an non-zero angle in the repeat section will make the repeat sections have larger angles.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reworded it to make it a little more clear, does it work?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it works, although I would probably choose to say that "a repeat attribute can be applied" instead of using the word "must". There is no absolute need to scale a formation to any number of ships, and a repeat section is no guarantee that a formation can scale to any number of ships.

Comment thread wiki/CreatingFormations.md
Changed and added various things to make more clear or fix errors, also added anchor to arcs.

@petervdmeer petervdmeer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have 2 open review comments, but the overall PR/text is fine for me.

...
```

To make formations scalable to any number of ships, a repeat attribute must be applied to the block. Any attribute that exists in a block can be used as a child attribute in `repeat`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it works, although I would probably choose to say that "a repeat attribute can be applied" instead of using the word "must". There is no absolute need to scale a formation to any number of ships, and a repeat section is no guarantee that a formation can scale to any number of ships.

```
Will render the first position at 0,200 and then 0,400; 0,600; etc.

If no repeat attribute is present, all positions will be filled, and any remaining ships will group at 0,0 underneath the flagship.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should change this behavior in the future in that ships that cannot move in the formation fall back to the default flocking behavior. For this text I think it is fine to just specify "If a formation is fully populated, then the remaining ships will not fly in formation."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Adding documentation about a new feature being PR'd to endless-sky/endless-sky

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants