Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
"orientations" : [
{
"dualImage" : "automatoseed.png:<color>.<stage>.<alt>",
"imagePosition" : [0, 0],
"frames" : 1,
"animationCycle" : 0.5,
"spaces" : [ [1, 0], [0, 0], [1, 1], [0, 1], [1, 2], [0, 2], [1, 3], [0, 3] ],
"requireTilledAnchors" : false,
"anchors" : [ "bottom" ]
}
]
Change the number of frames to your desired frame count, but each stage will have that many frames in the animation. Then you will need to add <frame> into the dualImage somewhere like this....
"dualImage" : "automatoseed.png:<color>.<stage>.<alt>.<frame>",
Then you need to make sure your frame file is set accordingly to allow for the frames. If its animated, you probably dont care about alts, so wouldnt need "alts" in your stages.
I did have to adjust the frames in the frames file to "default.1.0.1" from "default.1.1". So I guess this means we have a .(number) in the frames file frames for each <> after "dualimage" in the object file? (sorry if this is obvious, I'm not a skilled programmer, and what little I do know is pretty much from modding/reverse engineering what I can figure out.)
What this gets me wondering is, given the order of the numbers, the "0" in "default.1.0.1" appears to be in the spot where the "alt" would be represented, so as long as I have a separate set of frames for each alt, I should still be able to use them, right? Though you're right in that the most important objects I've been trying to make probably don't need them. I've got my test object's alts set to "1" instead of the default "5" and it's working fine, so I'll probably leave them in in csae i want to use the object as a template for ones I do want alts on (already getting ideas on how I can use that...)
At any rate, thanks again- I can't believe how simple this was after trying for so long. Now I should finally be able to make my animated aquaponics fishtank!
If I were to apply this to the mothtrap, which has it's own custom animation file, would I just go into the animation file and wherever it says "image" : "<partImage>" I'd change it to "image" : "<partImage>.<frame>" and then add "frames" and "animationcycle" to each "part"?
As far as the moth trap, Id take a look at a vanilla object that animates. I pulled up the human generator located at \objects\generators\humangenerator
In the object file it has
"image" : "humangenerator.png:<color>.<frame>",
"frames" : 1,
"animationCycle" : 1.0,
So you will need to add .<frame> in the moth trap object file after its image. And add a frames number for how many frames, and an animation cycle for how long it takes to cycle through. You will have to increase the size of the frame grid and add new rows/columns, do you understand frame files enough to increase the grid?
In the animation file you will need to add .<frame> to the end of the post's image
"post" : {
"properties" : {
"centered" : false,
"image" : "<partImage>:<stage>" <--- add .<frame>
},
Since you will have <stage>.<frame> you will also need to update the frame names from 1, 2, 3, 4. Let's say you have 3 frames in your animation, stage 1 frames would be 1.0,1.1,1.2,1.3 and the next stage would be 2.0,2.1,2.2,2.3
If you have any issues let me know and I'll mess around more with it. It's hard to explain it than it is to just do it and let you see an example.
Once again, I really appreciate your help. Thanks again!
Whew! Well, it took some doing, but thanks to your direction/hints/instruction I finally managed to do two thing that'v I've wanted to for a long time:
---Animated farmables, including the mothtrap-type objects (the crop-type objects were much simpler 'cause they didn't have their own animation file. The mothtrap took a lot of fiddling, but I finally got it to animate through it stages while in the "on" state).
---Animated objects in "off" state. I can now have switch-type objects have seperate animations for both the "on" state and "off" state! I initially tried it with the mothtrap, but it was only a partial success- something about the farmables lua caused it to be unable to update stages properly or something. I might go back to it and try again later, 'cause I think it may be useful to be able to do. But for now, I'm pretty excited with what I've got working.
Just thought I'd give you an update. Thanks again!
I'd like to release a mod at some point, but it'll probably be awhile before I can get around to finishing and polishing all the stuff I keep adding in. >_<