Status
Not open for further replies.

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,716
Reaction score
12,267
First Language
English
Primarily Uses
RMMZ
I have some animated water around cliff tiles which have thrown up an unforeseen problem - at least, unforeseen by me.

Here is a screenshot of what I have.

Cliff%20passability_zps47ljpifb.png


Because these are rounded cliffs, I have 3 separate auto tiles for the left curve, the straight tile and the right curve.  I then have another 3 auto tiles for the cliff parts under water.  (Yes, I know, 6 auto tiles, but that's what's needed for round cliffs.)  What happens is that the boat goes not just over the cliffs underwater (that's not a problem) but also on to the tile with the cliff face above water.  This is because the bottom part of that tile has the place where the water laps up and down, and therefore it must be an auto tile.  

I have it set to X, but that makes no difference.  The only way I can think of to stop the boat going there is to designate those 3 tiles as 'deep sea' which the boat cannot go on to.  But I have no idea how to do that.  Can anyone help?

Thanks.

EDIT

The boat is a bit larger than usual so that I can fit the (very small) sprite in.  I don't think that should make any difference, but I mention it just in case it does.
 
Last edited by a moderator:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,981
Reaction score
4,594
First Language
English
Primarily Uses
RMMZ
As stated in the VX Ace tips and tricks topic by Archeia, by default star passability ignores arrow passability. There's a script fix for it by NeonBlack:

class Game_Map

def check_passage(x, y, bit)
all_tiles(x, y).each do |tile_id|
flag = tileset.flags[tile_id]
if flag & 0x10 != 0 # [☆]: No effect on passage
next if flag & bit == 0 # [○] : Passable but star
return false if flag & bit == bit # [×] : Impassable
else
return true if flag & bit == 0 # [○] : Passable
return false if flag & bit == bit # [×] : Impassable
end
end
return false # Impassable
end
end

If you paste this as a new script, it will override the default script and that should hopefully solve your problem.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,716
Reaction score
12,267
First Language
English
Primarily Uses
RMMZ
I have this script already in place, but I'm not sure how it applies, as nothing here is set to star.  Water and cliffs are set to X.

Unfortunately I have to leave my desk for an hour or so, so if you reply, please don't think I'm ignoring you.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,981
Reaction score
4,594
First Language
English
Primarily Uses
RMMZ
Can the player pass those tiles too or is it just when you're in the boat?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,746
Reaction score
15,885
First Language
English
Primarily Uses
RMMV
Vehicles ignore all X, O and star passage settings. The boat can only go on certain A1 tiles. The ship can only go on certain A1 tiles. Their passage setting is irrelevant. It is based on something that's set in the tileset and we don't have the ability to change in the editor. What you are seeing is based on where in the tileset your autotiles are positioned.


It's all in the help file under Resource Standards:

Block A (Sea in World tileset)


Auto tiles used for oceans. They can be animated by placing the three tiles that comprise the basic auto tile structure side by side.


Block B (Deep Sea)


Auto tiles used for deep oceans. Only tiles in this block can create borderlines for ocean tiles when they are adjacent to group 1 tiles. The transparent color portion of this block is automatically complemented by block A tiles. As with block A, they can be animated by placing the three tiles that comprise the basic auto tile structure side by side.


Note that tiles in this block are impassable by boats.


Block C (Rock Shoal & Icebergs


Auto tiles for embellishing block A ocean tiles. The transparent color portion of this block is automatically complemented by block A tiles.


Note that tiles in this block are impassable by boats and ships.


Block D (Poison Swamp, Lava, Pond, Frozen Sea, Land's End and Cloud Land's End)


Auto tiles used for water. They can be animated by placing the three tiles that comprise the basic auto tile structure side by side.


Block E (Dead Trees, Bubbles, Boulder, Whirlpool, Endless Waterfall & Cloud)


Tiles used for waterfalls. Two tiles side by side form a pattern, and they can be animated by placing three vertically.


Note that tiles in this block are impassable by boats and ships.
If you don't want to use the default settings for the boat, I suggest you either use region tags or terrain tags, along with a script to override the default behaviour of the boat (and maybe ship) vehicles.
 
Last edited by a moderator:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,981
Reaction score
4,594
First Language
English
Primarily Uses
RMMZ
Yeah, should be pretty easy to edit ship_passable? to check a terrain tag.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,716
Reaction score
12,267
First Language
English
Primarily Uses
RMMZ
Because of the need to have 6 sets of auto tiles, I have to use positions (blocks) which do allow for passage by boat.  I think, then, that it will have to be some sort of script to override the default behaviour of the boat.

Me being me, I have no idea how to edit ship_passable? to check a terrain tag, so detailed help would be needed for that.  Alternatively, if there is an existing script/snippet that does this, could you point me in the direction of it?

thanks.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
36,332
Reaction score
9,717
First Language
German
Primarily Uses
RMMV
Because of the need to have 6 sets of auto tiles, I have to use positions (blocks) which do allow for passage by boat.

Vehicles ignore all X, O and star passage settings.
Unfortunately, in the case of the boat Shaz is wrong - the boat is the only vehicle that DOES check the passability, but inverse: The boat can only move on shallow water tiles that are set to be impasable to the player. As soon as one of those water tiles is set to be passable by the player, that tile becomes impassable by boat.

Depending on your tilesets and your map design, you might be able to use this inverse passability to solve the problem without changing the scripts. See the tip #8 in my starting point topic about that.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,716
Reaction score
12,267
First Language
English
Primarily Uses
RMMZ
@Andar

Nice suggestion, but as the player can walk on the land above the cliffs, they would be falling into the water all the time.  

EDIT

Ah, but wait - setting the tile which creates the underwater section of the cliff to O works.  That stops the boat reaching the cliff face, and as the cliff face is still X, the player can't go there.

Problem solved.  Thank you so much.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
36,332
Reaction score
9,717
First Language
German
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

Why the heck do I keep comparing my games to ones made by huge companies? I'd love them to have that level of polish but I'm simply not good enough.
Hell of a day at the London Games Market! :D

1656892272017.png

Check out my haul!

Forum statistics

Threads
123,293
Messages
1,155,579
Members
161,712
Latest member
Norfaiz03
Top