Wind Mill and Sails animation problems.

Alright. I have been trying to get the Wind Mill as a tileset (because I am NOT great and too rusty with creating overlays or parallax), but it just does not look great for some reason;

upload_2019-5-3_18-42-42.png


In game;

upload_2019-5-3_18-41-4.png


And yes, the Wind Sails's Event is in that position, otherwise it will look like this inside the game;

upload_2019-5-3_18-42-12.png


Does this suppose to happen?

The tile set is like this;

upload_2019-5-3_18-40-36.png


Another way to do this is like this;

upload_2019-5-3_20-39-42.png


I just keep the Wind Mill Sails (!$windmillarms_PandaMaru) like this, right?

https://rpgmaker-mv.de/images/proxy/f9/f9b03fbd75e98194f91c7eb4572a770cebbf0e63.png

The question is; What is the right way to get the wind mill as a tileset and its wind sails working ? My apologies if I am rambling and all.

PS: The credits for the wind mill/Sails goes to PandaMaru. (just in case)
that's due to how the character sprites are offset from the 0,0 to align at the bottom of the grid square.
all event sprites are aligned like that, but since they're all square and fitted to 1 tile, you don't notice it.

one quick fix I can think of, is like this:
on the move route command, add a script call
Code:
self.oy = (self.bitmap.height / 4) / 2

I'm assuming you control the animation by turning?
I am not seeing what the problem is. Your 'in game' image looks fine to me. Perhaps you should explain it with words rather than pictures?

You should not have to add any code.

Use the center image, and use an autonomous move route that makes the event turn down, left, right, up, with a brief wait in between.
I will try to explain;

When you place the event where the sails actually should be (like on any Wind Mills) in the editor, it will appears waaay above the mill in the game for some reason. (see second picture of previous post) Is this normal?

The centre image is this one, ah? (just checking to be sure)

upload_2019-5-4_0-11-54.png


use an autonomous move route that makes the event turn down, left, right, up, with a brief wait in between.

Like this, right?

upload_2019-5-4_0-32-7.png


PS: Sorry if I am a bit rambling like a madman, but I do not feel that well at this moment. Therefore, a bit unsure about things and all. If you know what I mean. My apologies.

Edit: I meant with the question (What is the right way to get the wind mill as a tileset) is that I was not THAT sure which tile of the Tileset of the windmill should be 0 or X or *

Edit1: Just to make sure that I've done the right thing; I got the windmill from PandaMaru (https://rpgmaker-mv.de/forum/thread/72-maru-s-vx-ace-ressourcen/) and then placed it in Tilesets.
No, don't make it a parallel process with the move route in the events. Put the movement into the Autonomous Movement (select the Custom option from the drop-down), remove it from the event commands, and set the trigger back to Action button.

Look at where the center of the sails are in that first image. A sprite that is larger than the tile size will be positioned entirely above where you put the event. It is centered horizontally, but vertically, the bottom of the sprite will be aligned with the bottom of the tile the event is on. So yes, you do have to put the event several tiles down, so the center of the sails aligns with the top of the windmill. The event needs to go where you want the bottom of the sails to go, not the center of the sails.
The event needs to go where you want the bottom of the sails to go, not the center of the sails.

that's what my code tries to fix, for that one event alone.
although, I don't know how well that might work, there might be some flashing (but it can definitely be corrected, either for one event, or the whole set, it all depends on how complex you want the fix to be)
Like this?

upload_2019-5-4_15-46-44.png


About the script: If you put the script self.oy = (self.bitmap.height / 4) / 2 along the (Custom) Move Routes IN the Autonomous Movement this will happen.

93973-5ebeb45e946a835c431f8cdde65ca855.jpg


So, I assume that you meant in "event commands" if you want to insert the Set Move Routes there;

upload_2019-5-4_16-22-41.png


However, you still have to put the event several tiles down (to prevent that the sails hover waaay above the Windmill) and the outcome is glitched as you can see here;

upload_2019-5-4_16-24-33.png


Oh well. Thank you both for helping me. Well, in my eyes the Wind Sails looks good now. Thank you. Too bad you cannot post the whole "in game" animation movement of the Windmill Sails. If you know what I mean.

Strangely enough, if you look too long at it, it will keep on turn left, then right and even worse the top sails will make a movement like a scissor.

I know that there is probably not a tileset of inside a mill...yet, but the door bothers me a bit. First you have to place the "Entrance" and the top half (of the tileset Outside_B ), otherwise when you open the door another door (part of the tileset) will appear. However, it will look like this;

upload_2019-5-4_16-59-0.png


Another option is to use an event with the "entrance" of the Mill door;

upload_2019-5-4_17-14-29.png


But you cannot place another event at the same place that has the door animation and all. If you know what I mean. The same issue is with other tilesets that has an door. Like PandaMaru's Moon Temple, Church, Zepplin (if you want to use that in your game), Long House, etc.

What is the right way? My apologies if someone else already asked this.
About the script: If you put the script self.oy = (self.bitmap.height / 4) / 2 along the (Custom) Move Routes IN the Autonomous Movement this will happen.

So, I assume that you meant in "event commands" if you want to insert the Set Move Routes there;

no, I meant in the move route
it doesn't matter really, I was just fishing for the error, because I didn't remember if the move route was at event level or at interpreter level (it's at event level, so it wouldn't work there)
the fix has to be made at interpreter level, but that would require accounting for the map events and the player which is also a character.

try putting this block right below "Materials"

Code:
class Sprite_Character < Sprite_Base
 alias set_character_bitmap_orig set_character_bitmap
 def set_character_bitmap
  fx = nil
  set_character_bitmap_orig
  fx = @character_name[/'_PandaMaru'/i]
  if fx != nil
   self.oy = @ch / 2
  end
 end
end

and use the move route normally, from the move route section, not the event page.
this should only fix that one sprite.
Okay. I've put the script under Materials (giving the script the name of "Windmill Sails"), the "Move route" in "Autonomous Movement" is already done;

index.php


Interesting. You still have put the event several tiles down, otherwise the Sails keeps on floating above the mill. Is this the right way?
1- does it render above all tiles?
2- does it flicker up and down?
3- does anything change if you change the refresh speed?
1. You mean floating above the mill? (I have put the event several tiles down) or glitched as you have seen in one of the previous post's picture? No. It is pretty good. Is that what you meant? (Just to make sure if I did not make any mistakes)

ONLY if you put the Set Move Route in the "event commands" THEN it will look glitched.

2. No.

3. No. It normally goes slower, normal, fast and faster without any hitches. However it gives the feeling if it goes any faster it may fly away. 😉

It will look like this;

upload_2019-5-5_0-57-57.png
I mean, half sandwiched in between layered tiles.
if it draws on top of all, it's fine.

does it center on the event if you put the event where it's supposed to go, with that script, with a custom move route and no event commands?
if it flickers or jumps out of position, then something must be refreshing events on top of that code.
it should spawn centered to it's event, or maybe offset and then immediately re-center itself, but it shouldn't flicker.
Just double-checking if I have done it correctly;

1) The script (under Materials);

94072-05c041843dd847d877c31a7cfdd13ddf.jpg


2) The custom move route and using the Wind Sails graphic/animation called !$windmillarms_PandaMaru. (without the event commands);

index.php


3) The event where it supposed to be;

94071-119748276dd8db342559501184b62180.jpg


It will look like this;

upload_2019-5-5_15-41-47.png


This is what I supposed to do now, right? Or have I forgot something? It does not go flickering or jump out of place.

PS: IF I place the event where the Wind Sails supposed to be like any other Windmills, it will still hovering the Wind Sails above the Wind mill.
that's correct, but it should center itself on the event.
try removing the quotes from the '_pandamaru' string, and leave it plain in between the bars.
if it doesn't work with that, then I'm at a loss.
Okay. I have removed the quotes from the script;

upload_2019-5-5_17-51-28.png


placed the event where the Wind Sails supposed to be;

upload_2019-5-5_17-50-36.png


and........it works!

94091-21d4035e382150ea50b304842bde906b.jpg


Thank you!

Another question; Has anyone succeeded to get a working door for the Mill or another other tilesets that has an door. Like PandaMaru's Moon Temple, Church, Zepplin (if you want to use that in your game), Long House, etc.
What I did was this:
I had the windmill itself on a tile sheet and just tiled it on, rather than try and do it as an event.
Then I just used an ordinary door in the correct place. It looks like this in the editor.

upload_2019-5-5_17-42-11.png
Okay.

1) Opened the windmill.png with Paint.net.

2) I copied the "entrance"
upload_2019-5-5_19-49-44.png
from !Door_mill and used Paint.Net's paste into a New Layer;

94108-e74ca78126f2376be7737e7113f522a2.jpg


3) Then placed the image here (if you know what I mean);

upload_2019-5-5_19-40-57.png


4) Saved it as png (it will flatten though) and the tileset will look like this in the Editor;

upload_2019-5-5_19-52-31.png


4) Now I created an event with a door of the wind mill;

upload_2019-5-5_19-55-36.png


In the game it will look like this;

upload_2019-5-5_19-47-2.png


And when the door opens;

upload_2019-5-5_19-56-45.png


It works!!! Thank you for pointing me in the right direction.
if you have further problems with other tiles not centering correctly, edit that snippet like this:
Code:
array = ["_PandaMaru", "name2", "name3", "nameN"]
fx = array.any?{|name| @character_name[/#{name.to_s.downcase}/i]}

and name your sprites something identifiable like "_FX", "_2", "-name-something_tag_something" or whatever you want.
then put that identification string in that array, and the program should adjust for those cases.
(in fact, go and change it to that arrangement to prove the concept, and leave the array with just "pandamaru", and it should work the same)

Original thread: https://forums.rpgmakerweb.com/threads/wind-mill-and-sails-animation-problems.108639/