Designate tiles as 'deep sea'

Status
Not open for further replies.

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
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.



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
2,604
Reaction score
1,960
First Language
English
Primarily Uses
RMMV
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,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
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
2,604
Reaction score
1,960
First Language
English
Primarily Uses
RMMV
Can the player pass those tiles too or is it just when you're in the boat?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
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
2,604
Reaction score
1,960
First Language
English
Primarily Uses
RMMV
Yeah, should be pretty easy to edit ship_passable? to check a terrain tag.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
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
31,365
Reaction score
7,676
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,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@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
31,365
Reaction score
7,676
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.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,078
Members
137,580
Latest member
Snavi
Top