aseprite-to-godot-variables
aseprite-to-godot-variables copied to clipboard
A Lua script to create arrays of colors and indexes of those colors from an Aseprite sprite to be used in Godot.
Aseprite to Godot variables
A Lua script to create arrays of colors and indices of those colors from an Aseprite sprite to be used in Godot.
A sprite in Aseprite.
Output code from the script.
Prerequisites
- Aseprite >=
v1.2.10-beta3
. - The Sprite Color Mode must be set to RGB Color.
π οΈ Installation
- Go to File > Scripts > Open Scrtips Folder.
- Copy
aseprite_to_godot_variables.lua
to that folder.
π Usage
- Go to File > Scripts > aseprite_to_godot_variables.
- When you are asked "Do you want to run the following script?", click Run.
- Then you'll get another dialog saying that the script wants to access to a file. Click Allow Write Access.
- You'll get a final dialog informing you where the ouput file is saved.
By default, the output file is saved to Aseprite's scripts folder (where the script is installed), but you can create a new folder here and use the output_dir_name
variable to save the output file to that folder. See Output directory name.
βοΈ Configurable variables
Output directory name
Name | Type | Description | Default |
---|---|---|---|
output_dir_name |
string |
Add an output directory to organize the output files. | "" |
You can optionally add an output directory (only if you previously created it in Aseprite's scripts folder!) to better organize the output files from this script, so they don't mix with other Aseprite's scripts you might have.
Output file extension
Name | Type | Description | Default |
---|---|---|---|
output_file_ext |
string |
The output file extension. | .txt |
Color indices array name
Name | Type | Description | Default |
---|---|---|---|
color_indices_array_name |
string |
The name of the output variable for the color indices array. | _sprite |
Colors array name
Name | Type | Description | Default |
---|---|---|---|
colors_array_name |
string |
The name of the output variable for the colors array. | _colors |
ποΈ Changelog
See CHANGELOG.
π€ Author
hiulit
π€ Contributing
Feel free to:
- Open an issue if you find a bug.
- Create a pull request if you have a new cool feature to add to the project.
- Start a new discussion about a feature request.
π Supporting this project
If you love this project or find it helpful, please consider supporting it through any size donations to help make it better β€οΈ.
If you can't, consider sharing it with the world...
... or giving it a star βοΈ.
Thank you very much!
π Credits
Thanks to:
- ruccho - For the Generate Normal Map script, which I used to learn how to get the pixels and its colors from a sprite.
- AlΓcia Folgarona Ribot (@pingudroid) - For creating the sprite in the example.
π Licenses
- Source code: MIT License.