Skip to content
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

[Tools] slicers wrapper #2249

Merged
merged 6 commits into from Dec 26, 2023
Merged

Conversation

vetall812
Copy link
Contributor

@vetall812 vetall812 commented Dec 18, 2023

Summary

This script allow artists to speedup slicing multitiles process.
It detects tile name, size of resulting tile, and various source files:

  • simple multitile
  • transparent multitile
  • variants for single tile
  • seasonal variants (as well as seasonal transparent variant)

Just drag and drop source folder over script shortcut.

Content of the change

  1. to slice multitiles python script slice_multitile.py requires NumPy module. This module can be used with Python >= 3.7 and < 3.11 So I change updtset.cmd so it will install Python 3.10 instead of 3.12 (latest at this moment).
  2. updtset.cmd will also install NumPy module at first run.
  3. to keep repository clean from multitiles there is a new line in .gitignore
  4. added slicemt.py script.

Testing

  1. Create a shortcut to the script on your desktop (for example)
    Screenshot 2023-12-19 181936

  2. Put the source files into the folder and drop it in repository
    Screenshot 2023-12-19 182134

  3. Drag and drop 'source' folder over the shortcut
    Screenshot 2023-12-19 182228
    Script informs you about files taken into account as well as resulting names and sprite numbers. Script will ignore existing json files, so they can be changed without fear.

  4. After displaying results script will run 'updtset.cmd' so just press 'Enter' and wait a bit
    Screenshot 2023-12-19 182256

Now you can update tileset in game and see how it works.

Additional information

You may notice shortcut to 'updtset.cmd' on my desktop - it is here just for simple sprites that do not need to slice something. Or if I change json files without touching images.

- fixed Python version to be compatible with NumPy
- added Update PIP if necessary
- added Install NumPy module for slicing
- Add Ignore source folder for multitiles
slicer wrapper
@vetall812 vetall812 marked this pull request as draft December 18, 2023 21:01
Rewritten on Python and this time it automatically updates tileset.
@vetall812 vetall812 marked this pull request as ready for review December 19, 2023 15:35
@gkarfakis19
Copy link
Contributor

Looks good!

@Fris0uman
Copy link
Collaborator

Can you add documentation for this to our doc?

@vetall812
Copy link
Contributor Author

Can you add documentation for this to our doc?

Done in #2255

@Fris0uman Fris0uman merged commit fa36fbe into I-am-Erk:master Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants