Contribution Docs
This passage describes the expectations for those interested in submitting helper functions to this repository.
Organization
Section titled “Organization”In this repository, .lua files are grouped based on general purpose and author. If a set of .lua files fulfill distinct purposes or are written by different authors, they receive separate folders. With that said, additions that are functionally similar to preexisting .lua files will typically not be accepted to avoid bloat. As long as your functions serve a distinct purpose from the functions that already exist, they are a welcome addition.
What counts as “functionally similar” is up to the discretion of repository managers.
Each folder is organized like so: first, your folder should have some title that connects and summarizes the behavior of the contained functions. For consistency, the folder’s name should be written with kebab-case. Then, within each folder, each function should be separated into its own lua file. Each file’s name should match the name of its function. Lastly, you should include an all.lua file which compiles all of the functions from the individual files inside of them.
Directorysrc/assets/code
Directorycheck-table/
- …
Directorypulse Your folder name
- all.lua Contains all functions below
- pulse.lua
- pulseBoth.lua
- pulseLeft.lua
- pulseRight.lua
Directorysplit-alpha/
- …
Formatting & Documentation
Section titled “Formatting & Documentation”Each of your script files should consist of a function, a comment with function documentation, and at least one example of its use. If your function requires constant variable definitions to work, you should include those too. Since Lua doesn’t have a standardized style guide, feel free to format your function as you choose. Conventional casing is preferred, however.
As for your documentation, you should use either Lua Language Server annotations or the following custom comment format:
-- TEMPLATE DOCUMENTATION FORMAT ----[[functionName(paramName, paramName, ...)Description of what the function does
Implementation:Additional functions, variables, or considerations necessary for adding this function to modfiles
Parameters:- paramName: description / type of the parameter - Additional parameter info- ...
Returns:- Return value / type and case of the return value (if it exists)- ...]]Although the custom comment format is more readable in some instances, LLS documentation is popular and is therefore a valid alternative.
As for your use examples, simply call the function with all the necessary parameters. If your function returns a value, you may want to include multiple use instances that all return different things. Adding explanatory variables or comments may also be useful, but try to keep it concise.
Creating Your all.lua File
Section titled “Creating Your all.lua File”Once you add your individual function files to the folder, you can now create an all.lua file containing all functions. Here’s a quick run-through of the assembly process:
-
Create your
all.luafile in the folder. -
Add your name and function tags to the top of the file. A list of valid tags can be found here.
--Author: [AUTHOR NAME]--Tags: [TAGS] -
Add a comment with a free-use license such as the MIT License, filling your name into the proper fields.
--[[MIT LicenseCopyright (c) 2026 [AUTHOR NAME]Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.]] -
Add the constants, functions, and function documentation from each file into the
all.luafile. Be mindful of yourImplementationlimitations as you combine the functions into one script.- Please do not transfer the examples.
Website Content
Section titled “Website Content”Once you’ve added your functions to the repository, you can then update helper-functions.mdx with your code and some additional information. This information includes a summative title for your helper functions, your author name, formatted tags, and a brief description of your code’s functionality and potential use cases.
### [TITLE]
***Author:* [AUTHOR NAME]** <Badge text="[BADGE NAME]" variant="note" /><Badge text="[...]" variant="note" />
[FUNCTION DESCRIPTION]
import [SCRIPT VAR] from '../../../assets/code/[FOLDER NAME]/[SCRIPT NAME].lua?raw'
<Tabs> <TabItem label="[SCRIPT NAME]"> <Code code={[SCRIPT VAR]} lang="lua" title = {"[SCRIPT NAME]"}/> </TabItem> *Copy the TabItem and add another import statement to have multiple scripts under the same Tab object.* </Tabs>Author: Author Name
Badge Name...Function description…
Script content...Valid Tags
Section titled “Valid Tags”Tags are used to help charters look through the Helper Function Heap page. The following tags are all valid for your helper function set.
| Tag | Description |
|---|---|
| Events | Any helper functions that use events (ie. call xdrv.RunEvent). |
| Chart Mods | Any helper functions that primarily use chart mods (ie. call xdrv.Set or xdrv.Ease w/o an Id param). |
| Note Mods | Any helper functions that primarily use note mods (ie. call xdrv.Set or xdrv.Ease w/ a Id param). |
| Alpha | Any helper functions that interact with the alpha values of backgrounds. |
| Bloom | Any helper functions that interact with the bloom of backgrounds. |
| Data | Any helper functions that process Lua data. |
Thank you for expressing interest in adding helper functions to this charting guide! If you need any help, feel free to reach out to me via Discord (theblockiest).