Code Monkey home page Code Monkey logo

aseprite-to-godot-variables's Introduction

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.

Aseprite

A sprite in Aseprite.

Code

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:

πŸ™Œ 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 ❀️.

Become a patron

Suppor me on Ko-Fi

Buy me a coffee

Donate Paypal

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

aseprite-to-godot-variables's People

Contributors

hiulit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.