-
-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite the Default Examples #4605
Conversation
Co-authored-by: Jake Ben-Tovim <jacobbentovim@gmail.com>
Co-authored-by: Jake Ben-Tovim <jacobbentovim@gmail.com>
Co-authored-by: Jake Ben-Tovim <jacobbentovim@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I think these are very good changes 🙂.
There are a couple things I'm still unsure about but I am going to test in-game before commenting on them. I also noticed that you used backticks in some places (e.g. `test`) but since it won't be highlighted in anyway maybe it would be better to use single quotes or something instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional comments from in-game testing
This PR has a related issue #2252 |
There is a million nitpicking that we could do, but at the end of the day, they're the example scripts. This should get merged soon. We should require example scripts from big additions, like the effect section for spawning entities or what I want to add is an example for my pull requests. When this gets merged I can start adding scripts into the folder. |
I think adding examples as skript grows would be something that's great to do and a great thing to encourage. The biggest issue with skript was how outdated/uninformed features/examples were and newer additions ended up overlooked or never even heard about. Sections especially were overlooked by the community with the fact most people I meet don't realize |
* Replace examples. * Add example for options and aliases. * Update src/main/resources/scripts/-examples/commands.sk Co-authored-by: Jake Ben-Tovim <jacobbentovim@gmail.com> * Update src/main/resources/scripts/-examples/events.sk Co-authored-by: Jake Ben-Tovim <jacobbentovim@gmail.com> * Update src/main/resources/scripts/-examples/chest menus.sk Co-authored-by: Jake Ben-Tovim <jacobbentovim@gmail.com> * Update src/main/resources/scripts/-examples/chest menus.sk * Apply suggestions from code review * Implement some suggested changes * Correct some formatting and add better inventory example. * Add text formatting example (sorbonbon) * Fix small issue with destroy ore command * Fix argument errors Co-authored-by: Jake Ben-Tovim <jacobbentovim@gmail.com> Co-authored-by: APickledWalrus <apickledwalrus@gmail.com> (cherry picked from commit ce0bb43)
Description
This replaces all of the original examples.
Examples are moved to a (disabled) sub-folder
-examples/
to avoid cluttering the main directory.Note: others may wish to add more examples, in which case they are welcome to edit the PR directly. I wouldn't mind having examples for conditions (if/else) and the built-in functions, but didn't feel these were necessary.
Motivation
The original examples were very old and did not cover a lot of Skript's feature-set (e.g. functions, local variables.)
Personally, I felt they were also inappropriate as they encouraged users to simply use the example scripts rather than bothering to write their own.
We also needed examples to cover a range of features to test Skript Grammar and if we ever want to create a Language Tour.
Changes
The new examples are designed with three things in mind:
New users should be able to 'explore' the language with the examples to see what's possible.
I have tried to include a very simple, moderate and intermediate example for each core feature.
New users shouldn't feel overwhelmed, but the examples aren't overly-simple and unhelpful.
I'd rather encourage users to think and experiment rather than just copying and using the examples - I've tried to make them more focused on the idea.
Users should understand how to use the feature, rather than just pasting what's given to them.
The current features with examples are:
Some examples may need adjusting or replacing over time.
Target Minecraft Versions: any
Requirements: none
Related Issues: #2252