Skip to content

SLD File Documentation 100%? #1772

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

Open
UnluckyForSome opened this issue Apr 22, 2025 · 2 comments
Open

SLD File Documentation 100%? #1772

UnluckyForSome opened this issue Apr 22, 2025 · 2 comments
Labels
area: assets Involved with assets (images, sounds, ...) lang: python Done in Python code question A question or clarification request about quite anything

Comments

@UnluckyForSome
Copy link

I was looking through the openage SLD documentation here

https://github.com/SFTtech/openage/blob/master/doc/media/sld-files.md

and the SLD Extractor which seems to follow it here:

https://sld.aoe2.se/

I think the implementation with duplicated blocks from the previous frame is slightly incorrect, and this could mean the documentation might be slightly wrong? Although I can't work out exactly how.

On some of the sprites (ones with portions which are static for several frames) the algorithm also incorrectly copies blocks elsewhere - see the war wagon death animation:

Image

It seems a lot of the blocks from the collapsed wagon are correctly copied from the previous frame (because they're not moving) but then also blocks by the horse's head are also being incorrectly copied.

If any of the openage community could help me in understanding why this could be the case, i'd be able to update the SLD Extraction JS code and fix it so it's perfect. I'm sure there is a rule that might not be documented or something...

Many thanks!

@heinezen heinezen added question A question or clarification request about quite anything lang: python Done in Python code area: assets Involved with assets (images, sounds, ...) labels Apr 22, 2025
@github-project-automation github-project-automation bot moved this to 📋 Backlog in openage converter Apr 22, 2025
@heinezen
Copy link
Member

There absolutely is a chance that the docs are wrong here (or incomplete). Back when I reversed this, there was a lot of guess work involved and I am not sure if we got everything right. Maybe there is a flag or something else that cancels out the copying...

I'd have to revisit the documentation with your specific example to be sure. I'll try to investigate to see what's wrong. Might take a while :D

@UnluckyForSome
Copy link
Author

UnluckyForSome commented Apr 22, 2025

There absolutely is a chance that the docs are wrong here (or incomplete). Back when I reversed this, there was a lot of guess work involved and I am not sure if we got everything right. Maybe there is a flag or something else that cancels out the copying...

I'd have to revisit the documentation with your specific example to be sure. I'll try to investigate to see what's wrong. Might take a while :D

I’ve just discovered that a tool authored by the same person (WAIFor’s Java ‘SMX Workshop’):

https://aok.heavengames.com/blacksmith/showfile.php?fileid=13410

actually doesn’t suffer from those duplicated blocks when extracting SLD’s - so maybe it’s just a problem with the Javascript tool! I’ve reached out to him on some obscure Chinese forum he seems to be active in.

In other words, your documentation is probably right! 😀

P.S if you wanted to compare notes, this might have value after translation:

https://www.hawkaoe.net/bbs/thread-148633-1-1.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: assets Involved with assets (images, sounds, ...) lang: python Done in Python code question A question or clarification request about quite anything
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants