I don't understand the problem completely. But I think you mean that the time to travel one sqaure diagonally is the same as one square in a 4dir direction. Yes I can see that.
This mod should work for you. unless you change the movement speed during the game then there will need to be a few more adjustments.
Spoiler: JV Master 8Dir
Ruby:
#==============================================================================
# 8 Dir Move JV Master Script
#------------------------------------------------------------------------------
# Make player move in 8 dir, supports diagonal pattern.
#==============================================================================
module JvScripts
module Dirs8
Switch = 0 # Switch id for toggle 4/8 dir, 0 if always 8 dir
DiagonalSuffix = "_di" # Suffix for 8 dir charsets
# 8 dir charsets include in the first char
# the orthogonal and in the second the diagonal
Diag_Speed = -0.5 # speed reduction for diagonal
Player_Move = 4 # speed for player movement. default 4
end
end
#==============================================================================
# Game CharacterBase
#==============================================================================
class Game_CharacterBase
def move_diagonal(horz, vert)
@move_succeed = diagonal_passable?(x, y, horz, vert)
if @move_succeed
@x = $game_map.round_x_with_direction(@x, horz)
@y = $game_map.round_y_with_direction(@y, vert)
@real_x = $game_map.x_with_direction(@x, reverse_dir(horz))
@real_y = $game_map.y_with_direction(@y, reverse_dir(vert))
increase_steps
end
if diagonal_charset?
set_direction_diagonal(horz, vert)
else
set_direction(horz) if @direction == reverse_dir(horz)
set_direction(vert) if @direction == reverse_dir(vert)
end
end
def set_direction(d)
if !@direction_fix && d != 0
@direction = d
@character_index = 0 if diagonal_charset?
end
@stop_count = 0
end
def set_direction_diagonal(horz, vert)
if !@direction_fix && horz != 0 && vert != 0
if horz == 4 && vert == 2
@direction = 2
elsif horz == 4 && vert == 8
@direction = 4
elsif horz == 6 && vert == 2
@direction = 6
elsif horz == 6 && vert == 8
@direction = 8
end
@character_index = 1
end
@stop_count = 0
end
def diagonal_charset?
true if @character_name.include?(JvScripts::Dirs8::DiagonalSuffix)
end
end
#==============================================================================
# Game Player
#==============================================================================
class Game_Player < Game_Character
def move_by_input
return if !movable? || $game_map.interpreter.running?
if JvScripts::Dirs8::Switch > 0
if $game_switches[JvScripts::Dirs8::Switch] == true
@move_speed = JvScripts::Dirs8::Player_Move + JvScripts::Dirs8::Diag_Speed
case Input.dir8
when 2, 4, 6, 8
@move_speed = JvScripts::Dirs8::Player_Move
move_straight(Input.dir4)
when 1
move_diagonal(4, 2)
when 3
move_diagonal(6, 2)
when 7
move_diagonal(4, 8)
when 9
move_diagonal(6, 8)
end
else
move_straight(Input.dir4) if Input.dir4 > 0
end
else
if Input.dir8 > 0
@move_speed = JvScripts::Dirs8::Player_Move + JvScripts::Dirs8::Diag_Speed
case Input.dir8
when 2, 4, 6, 8
@move_speed = JvScripts::Dirs8::Player_Move
move_straight(Input.dir4)
when 1
move_diagonal(4, 2)
when 3
move_diagonal(6, 2)
when 7
move_diagonal(4, 8)
when 9
move_diagonal(6, 8)
end
end
end
end
end
#==============================================================================
Thank you so so much! It worked 100%. If by changing the speed during the game you mean holding shift, it works perfectly while running too. If what you mean is to change the defalut speed (for example, from 3 to 5), I actually hadn't thought about that. In case I might want to do that in the future, well... I'm no programmer. But you also don't have to do that for me haha. Altough I would be very, very grateful if it doesn't take much of your time. Having the script itself was already super helpful, and having it modified even more. Thank you again :3.
Would you like to try
this link to download my script?
Thank you! Thank link does work. But since Roninator2 modified the other script, I think I'll be using that one for now. Tho I might take a loot at yours to try and understand the logic behind it. I'm just an illustrator and music composer so programming isn't really my thing. That's one of the reasons I'm using RPG maker after all haha. But again, thanks for the reply
🙂.
Well I tried with the script links...
Any way, heres the positions of the tiles I would've used.
The X being a transparant tile, and the ☆ being these 3 furniture tiles for this map.
All events can be removed by doing this, but note the X and ☆ on the same square for two of the tiles.
Edit: those bottom 4 Xs were probably meant to be 1 tile higher, but you get the idea.
Ok, since I don't know if I'm explaining myself correctly, I made a video with different tile combinations.
(Note: I'll be using "
x", "
o" and "
☆" depending on how those tiles show up in the editor to avoid repeating myself too much).
1. The tile with the flowerpot is a tile set as "
x"(layer "A"), with another tile set as
☆ (layer "B"). As you can see, that makes me walk
behind the object,which is not the desired output.
2. The bottom right corner of the bed is an event set to "above characters", which also looks weird (it pretty much works the same as the flowerpot).
3. What I am looking for is something like the top of the chair and table there. For that, there is the "
o" wooden floor(layer "A"), with another couple "
o" tiles on it (layer "B") which contain the upper part of the chair and table, and above that, an event set to "same as characters" and the "trough" box checked (I had a move route set to through before but discovered that option after).
I want to achieve the same visual effect as in the third example but without using events. So that the player cannot walk on them, but when the diagonal walk animation plays, the events go through and avobe the sprite. Just like in this video. Is there a way to do that using only tiles?
Edit: I added a new layer "C" to try what you said (Layer "A" "
x/o", laver "B"
☆ and layer C "
x"), but it has a the same effect as just using an "
x" layer: when the player sprite walks diagonally, the object is
behind the player.
▶ YouTube video