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

Move hardcoded sprite and pelt lists into JSON files #3266

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

Treefire33
Copy link
Contributor

About The Pull Request

Moves the hardcoded lists of strings in sprites.py and pelts.py into JSON files located in resources.

Why This Is Good For ClanGen

Makes adding sprites easier and more manageable, along with helping out modders adding more sprites.

Linked Issues

closes #3264

Proof of Testing

2024-12-26.00-28-58.mp4

moving to json files
@j-gynn j-gynn self-requested a review December 26, 2024 13:25
@j-gynn j-gynn self-requested a review January 7, 2025 21:44
Copy link
Collaborator

@j-gynn j-gynn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whilst this is technically exactly what I asked for, I've considered it a little bit more and I think I'd like to see a more mindful implementation. Our current system is kind of tricky to understand, and we'd like the JSON files to be readable and understandable to non-coders. Would it be possible to see an implementation that meets the following criteria:

  1. Obeys the "Don't Repeat Yourself" rule wherever possible. A modder should only have to type their new thing in once or twice if at all possible, and always in very clear ways.
  2. Is readable and logically organized, so that someone who is unfamiliar with coding and JSON as a whole can look at it and understand what they need to do.
  3. Ideally uses files to our advantage for organisational purposes. A modder should be able to look at the files and know where the thing they're doing goes (so, for example, I'd suggest putting accessories and possibly eyes in a separate JSON file to pelt patterns)

As an additional requirement, it'd be great if you could write some documentation on this process for the wiki. Not a huge amount; I'd expect it to live in dev/art/cat-sprites.md. Just something about how to name things correctly, where they should go, etc. Ideally, the process should be as self-documenting as possible - we don't want to use the wiki as a crutch, but it should be available to make things clearer in case of confusion.

Thank you again and I'm sorry for the delay!

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.

[CODE] Move sprite labels to JSON files (out of sprites.py
2 participants