Topic: animation_directory not working with addons?
|
kaputtnik Topic Opener |
Posted at:
2022-09-14, 18:44 UTC+2.0
I am trying to make a new add-on with some new immovables and whenever i try to use
The corresponding file looks like this:
Using the old (deprecated) syntax Or am i doing something wrong?
Top
Quote
|
|
Nordfriese |
Posted at:
2022-09-14, 20:56 UTC+2.0
Rename
Top
Quote
|
hessenfarmer
|
Posted at:
2022-09-14, 20:59 UTC+2.0
from the code provided you want to use the PNG "hilltop_01.png" for the animation idle. so you need to specify the basename (basename = "hilltop") in the definition of the idle animation. maybe you need to rename hilltop_01 to hilltop_1 as the code expects images with the suffixes _0.5, _1, _2 and _4.
Top
Quote
|
|
kaputtnik Topic Opener |
Posted at:
2022-09-15, 07:50 UTC+2.0
Oh yeah, thanks, that was the mistake.
Top
Quote
|
|
kaputtnik Topic Opener |
Posted at:
2022-09-15, 08:48 UTC+2.0
Now i can't get an animation to work: There are 4 files called
Error:
Instead of
Top
Quote
|
hessenfarmer
|
Posted at:
2022-09-15, 10:17 UTC+2.0
it seems we still may have a misunderstanding here. I thought you would like to use a still picture aniumation with only 1 file. the suffixes _0.5 to _4 are referring to a scale and not a sequence and we only use file animations for single image anims. However if you want to use them you need to rename again ( I assume your sequence is all at scale 1) to idle_1_00.png to idle_1_03.png. you may look at our test file at file animation test repo to get the full syntax. But as file animations are kind of deprecated I strongly recommend to generate the proper spritesheet animation after you got the addon working. for this you might use the wl_create_spritesheets executable built with our website tools.
Top
Quote
|
|
kaputtnik Topic Opener |
Posted at:
2022-09-15, 18:12 UTC+2.0
No, not a misunderstanding. There are some immovables with only one image and another which is animated.
Ahh
Maybe a wiki article "Addons Immovables" would be better than digging into the source code?
Yes, of course. After finishing the add-on. Thanks again
Top
Quote
|
|
Nordfriese |
Posted at:
2022-09-15, 18:16 UTC+2.0
Documented in detail at https://www.widelands.org/documentation/animations/
Top
Quote
|
hessenfarmer
|
Posted at:
2022-09-15, 18:20 UTC+2.0
see https://www.widelands.org/documentation/animations/#file-animations
Top
Quote
|
|
kaputtnik Topic Opener |
Posted at:
2022-09-15, 18:45 UTC+2.0
I didn't read this because the relevant paragraph is below the deprecated parameter
Top
Quote
|


Thanks a lot, now i got it to work.