Deviation Actions

ChibiEdo's avatar

HowTo Expand Shimeji Animation

Tutorial: How to Expand Shimeji Animations.

Huge File warning.. XD
Ok so just a few days ago I decided to work on my own Shimeji.. and because I'll directly started playing with the xml files right at the beginning I thought I'd share my knowledge in expanding Shimeji animations!

I really appreciate feedback on this. I would like to know if it's understandable and if it worked for you.. I hope you are not scared by the huge amount of text.xD

If I get positive feedback I may consider making another one concerning adding fully custom animations.. but that's a bit more complex and involves editing both the actions.xml and the behaviors.xml...

Hope you like it~~ Comments?

EDIT: [link] <---I got the English Shimeji from here^^ sorry that I hadn't mentioned it before.. I forgot many people have the japanese version..

EDIT2: IMPORTANT!! Just a little additional advise:
If you create multiple Shimeji in the img folder of such an xml edited Shimeji you have to make sure all of the pictures specified in the xml file are present or it won't start up because it can't find the pictures... so you also can't just take a Shimeji image folder from someone else and throw it into your img folder.. because it's highly likely that there will be missing files.. Hope I explained it somewhat understandable.. ^_^;
Image details
Image size
800x4206px 1.63 MB
© 2010 - 2021 ChibiEdo
Join the community to add your comment. Already a deviant? Log In
EveryFortressFalls's avatar

Since frames are being used as a unit of measurement for time, do you happen to know or remember what the fps of the program is overall?

Awesome tutorial by the way, thank you very much.

(Wow commenting on a 20 year old post, haha. Hope you're doing well.)

HigashiKaioshin's avatar
imge1608's avatar

Hi! I was going to ask how do you add a new animation such as walk two? I made a new "action" but i couldn't find how to add it as a behavior. How does the behavior work?

yayforstuffs's avatar
thank you so much!!!!!! i've been wanting to make my own shimeji edits for a while and it took me an embarrassingly long time to finally find this guide ^^; suuuper heckin helpful, thank you for explaining the anchors and velocity!!!
midnight27black's avatar

do you know any tutorials on how to add actions and behaviors in the shimeji's? or do you perhaps did those tutorials already?

xanman12321's avatar
the syntax looks like it was made for people to play with it
ChibiEdo's avatar
I think so too XD
huppyleon's avatar
i edit action xml duration, but when i summon the shimeji, animation duration still same with before, please help :'(
ChibiEdo's avatar
ah sorry I don't have time to look into this now and don't have shimeji files anymore since my computer died. Sadly I don't hvae a spontaneous idea what could be wrong. maybe try again with a completely fresh shimeji and do exactly what it says in the tutorial. It should work. Good luck!
Good stuff. Bookmarked. Is the custom animation tutorial in the works? What about Shimeji interacts with other Shimejis, etc? Jumping directly on top of each other to make a ladder of some sort... bumping into each other, and bouncing off each other in different directions, stuff like that.... can these action be done?

Secondly, how do you restrict the number of total Shimeji ... because I thought change the "total" would keep the critters to a minimum:

<Behavior Name="SplitIntoTwo" Frequency="50" Condition="#{mascot.totalCount < 5}" />

I though changing the mascot.totalcount to 5 would keep things at five. At the time being, my shimegi #{mascot.totalCoun< 5} is showing 6 total shimeji's on screen. 
ChibiEdo's avatar
Thank you! No haven't really worked on anything concerning shimeji lately. Not sure if I ever will.
Shimeji interacting with other Shimeji is something that has to be done via changing the code of the core files, that's not something that's easily done.
But what you can do is make bigger sprites and draw 2 shimeji in one picture, that way they can interact.

From looking at the line it does seem like this is the correct spot for changing the max number

The line looks like this though:
<Behavior Name="SplitIntoTwo" Frequency="50" Condition="#{mascot.totalCount ANDltSEMICOLON 50}" /> 
At least for me. Had to write it this way because otherwise dA turns it into a <. Since it does that I don't know if you have a < in your code or a ANDltSEMICOLON. If you have a <, try to write the ANDltSEMICOLON instead (of course with the and symbol and the semicolon not the words). because the < might break the code. If not... no idea.

I'm definitely not a shimeji expert I just analysed what i saw to make this tutorial. I wanted to test it but randomly no shimeji is working for me anymore? (maybe a restart would fix that, but not doing that right now because I always have a lot of stuff open and not doing anything shimeji related at the moment anyway.)
I'd be interested to hear if that works!

Also for custom animation you need to fiddle with the behaviors file. If you want to try use an action that seems simple and copy that part and name it differently. then you also need to add your animation to the actions file naming it the same as in your behaviors file. The behavior.xml sets what kind of actions happen and how frequently, the actions.xml mainly says what they look like. Maybe that information helps you enough to experiment. Good luck with your shimeji!
Appreciate the response. 

When you said "core" file, did you mean the javascript within the .jar executable file? Any suggested program to fiddle with the javascript code?

Custom animation

My next step was to fiddle with the behavior and action.xml files, obviously keeping the original files in a separate folder and simply work with the duplicate files of each. 

If I wanted a shimeji to swing across the top of the screen from a dangling rope (sort of like pitfall back in the atari days), or jump up the side walls (instead of climbing), or throw a rope towards the ceiling and climb the rope, or jumping from the bottom left hand corner of the screen to the top right corner of the right side of the screen, are these the types of behavior that could be changed using the behavior.xml and action.xml files?

Line code 

I actually managed to figure it out and actually created a little tutorial for others to use:
ChibiEdo's avatar
If I remember correctly the actual coding is also in a zip file called (probably short for source code) and I once took a look at that a bit trying to understand how it works, but it's really difficult because there is a lot of code and I have never coded in java though my biggest problem was that I had no idea how to turn those files back into a working exe files to test anything. I think it's called compiling the files. I think back then I might have learned a lot about where in the file which parts are coded but I gave up quickly since I just had no clue how to turn it into the game. I did do some research and I think i also got the files needed to create a working game but I was really confused...
I don't know if core files is the correct word but it's the java code (not javascript). There is no javascript in this (I actually know a bit about javascript... It's a coding language that works pretty differently from Java. I don't want to say too much because I'm not sure if what I say will all be correct hahaha. But the files we already edited are xml files, they are only structure files. the actual java code reads those xml files and interprets what to do with that.
Maybe you can find something when searching for "editing shimeji java code tools" ?? Since the shimeji community is so large I wouldn't be surprised if someone made some kind of tutorial. (By the way in case you find anything interesting I'd be interested to read that too and note down the link for any future attempts.
By the way I like notepad++ for opening any kind of code files. It has a lot of setups for marking different coding languages and you can hide parts that you don't need right now to have a nicer overview (collapsing big loops or if cases etc)

Concerning custom animation. Or rather first concerning behavior and action.xml files.
If I remember correctly, if you create a conf folder inside the name folder of your shimeji... I mean here in this folder:  /img/nameofshimeji you can configue THIS shimeji with its own file while still keeping the main conf folder in the main shimeji folder untouched. Someone in the comments explained it..pretty much one of the beginning comments who had a lot of knowledge about coding shimeji I think. I didn't know this when I wrote the tutorial so I talked about copying the whole shimeji folder but that isn't really necessary.

From the behaviors you described you can do some of them but you have to be creative. XD 
For example your pitfall like swinging... In behaviors.xml there is:
<Behavior Name="ClimbAlongCeiling" Frequency="100" />
(you MIGHT be able to copy this line and put it directly under it and give it a new name, but I can't test anything because no shimeji working right now.XD)
It's enclosed by: 
<Condition Condition="#{mascot.environment.ceiling.isOn(mascot.anchor)}"> <--this looks like there is some kind of variable that says: "Now the shimeji is on the ceiling" and since your swinging is a ceiling action it should probably go there.

Then in actions.xml: 
Just looking at the ClimbAlongCeiling one to learn:

<Action Name="ClimbAlongCeiling" Type="Sequence" Loop="false">
    <ActionReference Name="ClimbCeiling" TargetX="${mascot.environment.workArea.left+64+Math.random()*(mascot.environment.workArea.width-128)}" />

Hmmm... Ok so one thing... I really wonder why the loop = "false" since the shimeji repeats the action when crawling on the ceiling but there is probably some reason, probably the loop happens somewhere else.
The math on the right side looks as if it calculates the range of the shimeji on the ceiling (so it doesn't disappear from view.. I wonder if the Math.random here has something to do with how far it crawls till it drops down?
Asides from this guesswork it references another action named "ClimbCeiling" which looks like this:

   <Action Name="ClimbCeiling" Type="Move" BorderType="Ceiling">
<Pose Image="/shime25.png" ImageAnchor="64,48" Velocity="0,0" Duration="16" />
<Pose Image="/shime25.png" ImageAnchor="64,48" Velocity="-1,0" Duration="4" />
<Pose Image="/shime23.png" ImageAnchor="64,48" Velocity="-1,0" Duration="4" />
<Pose Image="/shime24.png" ImageAnchor="64,48" Velocity="-1,0" Duration="4" />
<Pose Image="/shime24.png" ImageAnchor="64,48" Velocity="0,0" Duration="16" />
<Pose Image="/shime24.png" ImageAnchor="64,48" Velocity="-2,0" Duration="4" />
<Pose Image="/shime23.png" ImageAnchor="64,48" Velocity="-2,0" Duration="4" />
<Pose Image="/shime25.png" ImageAnchor="64,48" Velocity="-2,0" Duration="4" />

Since you read my tutorial you should know what the velocity does. In this case it moves the shimeji to the left on the x axis (horizontally). -1 in a duration of 4 (frames..? I don't know what the measurement is, not seconds that's for sure) is less of a movement than -2 in a duration of 4. 
0,0 is no movement for 16 frames so that's the little pause before it keeps crawling.

So if you enter smart velocity and duration you can make it move in a half circle or a parabola. Figuring this out is pure math. If I'd try this I'd probably try to use half circle calculations but I don't know that from the top of my head...

Found something here:…
I'm not sure if my first idea would be a bit too complicated but I'd write down a bunch of y values calculated with different x values (the whole amount would be depending on how fluid I wanted the motion to look like) and would have coordinates where the shimeji should be... but since the shimeji's coordinates are relative and not absolute you'd need to check the differences compared to the previous coordinate pair for all of them and write those into the velocity (basically velocity is a vector... I don't know how much math you know (or like) so sorry if I get too confusing).

The other problem is the vine where your shimeji should be swinging. It has to be part of your picture so you need to change the size of your shimeji in that action which also forces you to fiddle with the imageanchor.
Actually... I think you might not need the complicated math you can just draw out the full sequence of your swinging in a big size and make velocity 0,0 for the duration of each frame. You would need to put the image anchor at "0,0" (probably x not fully 0 there would have to be some experimenting what looks best since this is the start of your swing. I also think there should be a final frame which is back at normal size with velocity = x,0 (x= whatever the full range of your swing is) to ACTUALLY move your shimeji to the other side because before that it was just an image animation playing... Ughh this is hard to describe, not sure if you get it. There is also a lot of other things that I don't know ... can the animation be stopped in the middle or will it always fully play... would it cause to make the shimeji disappear into the other side by accident? Or if it stops in the middle of it, it probably drops and the jump from the middle of executing the swing to the falling animation which is normal sized again automatically will probably be a weird jump on the screen. (Unless you actually do the math circle way, since there the actual x and y coordinates of the shimeji move...

Ok now my brain hurts, I'll just leave it there for now maybe it'll spark some ideas? Before you try anything more complex try if you can manage a 'new' ceiling action first without breaking anything then you can try the next step. There might be a lot of other places which you have to edit, I don't know how intwined everything is.

As for your other animation ideas: jumping up the wall is probably something a bit similar to the swinging but a bit easier because there is no change in size... 

Something concerning the rope towards the ceiling could be created by kinda fake methods since there is no behavior that makes the shimeji move up to the ceiling.... or well I'm not going to continue thinking about this now, there might be possibilities if i look at the xml again.

Maybe also for the jumping from side to side but my first guess it's not possible.

About the Line Code we talked about:
Ah so there were two places. I actually DID remember there being two but when I looked for you I only found one and thought I remembered wrong. Now I wonder if I actually did try this in the past... The more I think about it the more I think I did...XD
Thanks for the minitutorial.

I might think more about your other animations, I like to think about things like thatXDDD only if I feel like it though.
I hope I could help you a little bit and if you manage to get something feel free to tell me what you did, I'd love to see your progress.
Yes, I read everything three times. Very solid stuff. Even though I don't code, I kind of got the gist of what you're saying. I was actually trying to get a new rainmeter taskbar that is why I didn't get to respond sooner. This is going to be a tough road ahead. Hopefully I don't give up. I'll see what I can mustard, not anytime soon though. Research.
ChibiEdo's avatar
That's good! I start rambling when I'm thinking about figuring something out..XD
What is a rainmeter taskbar?
And good luck with anything you'll try!
Example of a rainmeter taskbar. Or you could simply run a search for rainmeter on deviantart, and you'll get a taste of different taskbars people have created. Rainmeter is basically a customization for your desktop.…
WolfSoul14's avatar
this is old so if you don't want to answer thats alright, but is there any way you could point me towards some tutorials about making new code but on the japanese version? since I have an emulator that allows it to work on mac, but only with the japanese version it's hard for me to figure out how to make new code
ChibiEdo's avatar
sadly I don't know anything about the japanese version so I can't really help you. The code is probably similarly structured so you could first read mine and then browse through the files till you find one that looks like it... and then search for the used images so you might get an idea what kind of action it is? I don't know, sorry.
Riri-Bun's avatar

My character isn't symmetrical so when she walks the other way, her design is flipped. 
Would you, or anyone reading this, happen to know how to add a second walking animation? //v//) it's okay if not, my OCD is just triggered by it lol
ChibiEdo's avatar
Sorry, the only way to have a second set of animations for the character walking in the other direction would be to change the java code of the shimeji itself and that requires a deep coding knowledge. (I don't know much about Java so don't really know how I would go about it either).
TheAngelicMuffin's avatar
(also sorry to comment on an old thread, but I figured this would be useful to anyone else trying the same thing) That is actually not true. I've been trudging through the source code trying to figure out how these things work and how to properly program them, and I've found that you can set multiple animations for a single action using Conditions. A Condition is like an if statement. If the condition is true then it will use that animation.

In particular, here you would add the conditions mascot.isLookRight() and !mascot.isLookRight() to set different different animations depending on which direction the character is facing. mascot is a reference to the shimeji itself, and .isLookRight() is a function that returns true if it is looking right and false if it is looking left. "!" is a (NOT) operator and flips the answer.  Think of it like "if NOT mascot.isLook(ing)Right" that will be true if its looking left.

for example:

<Action Name="Walk" Type="Move" BorderType="Floor">
     <Animation Condition="#{!mascot.isLookRight()}" >  //if the character is not looking right, i.e looking left. the original animation
        <Pose ...

    <Animation Condition="#{mascot.isLookRight()}" > //if the character is looking right, the alternate animation.
        <Pose ... 

HOWEVER take note that the program flips images when the character looks right. So draw your character facing/walking right, then flip the frames before saving them. The program will flip them back when they are being used.

...does that makes sense?... i'm super bad at explaining things, >//,//< I want to make a tutorial for all this stuff i've learned because there is literally no information out there, but I'm so bad at dumbing down technical talk...
mindlessdolly's avatar
Really helpful, thanks! :D
BobbyqUnderpants9945's avatar
I'm new to this program, and I have two questions---

1.How do you put in a new animation thing (ex. shime1, but you can't put in the code for shime2)

2.What do you do when your Shimeji turns to the right, but their transparency background is black? Please help ^^
CrayonGoo's avatar
I finally found this again, I`ve been looking around for this for a while now. o v o
This is really helpfull, I have to thank you for making this. > v < Ive been trying to expand one of the shimeji`s im working on. o 3 o 
Join the community to add your comment. Already a deviant? Log In