Terrain Tag/Region Passage Block via Switch

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
184
First Language
Meowish
Primarily Uses
Made for a request here.

There are 2 scripts. 1 for terrain tag, 1 for region. So the users can choose to use either one or both.

Features:

[1] A way to block paths using Region IDs/Terrain Tags

[2] Able to add more than one region/terrain tag for blocking.

[3] On/Off controllable by Switch.

How to Use:

[1] Put either or both scripts under Material and above Main.

[2] Set up the Region IDs/Terrain Tags you wish to block in the script as well as the Switch number.

[3] Turn on the switch in the game to start blocking.

Compatibility:

Shouldn't be a problem with most custom scripts because both scripts are using alias method.

If you have scripts that overwrites passable checks, simply put these scripts below that script will do.

Terms of Use:

Free for both Commercial and Non-commercial use.

Scripts:

Region ID Version:

#==============================================================================# Meow Face's Passage Block with Switch (Region Version)#==============================================================================module MEOWCHECK#==============================================================================# Settings Area#==============================================================================  REGION = [1,2,3] #Change this to region id numbers you want to block  RSWITCH = 1 #Switch number to turn the block on/off#==============================================================================# End of Setting Area#==============================================================================endclass Game_CharacterBase  alias meowrpass? passable?  def passable?(x, y, d)    meow = MEOWCHECK::REGION    x2 = $game_map.round_x_with_direction(x, d)    y2 = $game_map.round_y_with_direction(y, d)    if $game_switches[MEOWCHECK::RSWITCH]      meow.each do |m|        return false if $game_map.region_id(x2, y2) == m      end    end    meowrpass?(x, y, d)  endend
Terrain Tag Version:

Code:
#==============================================================================# Meow Face's Passage Block with Switch (Terrain Version)#==============================================================================module MEOWCHECK#==============================================================================# Settings Area#==============================================================================  TERRAIN = [1,2,3] #Change this to terrain tag numbers you want to block  TSWITCH = 1 #Switch number to turn the block on/off#==============================================================================# End of Setting Area#==============================================================================endclass Game_CharacterBase  alias meowtpass? passable?  def passable?(x, y, d)    meow = MEOWCHECK::TERRAIN    x2 = $game_map.round_x_with_direction(x, d)    y2 = $game_map.round_y_with_direction(y, d)    if $game_switches[MEOWCHECK::TSWITCH]      meow.each do |m|        return false if $game_map.terrain_tag(x2, y2) == m      end    end    meowtpass?(x, y, d)  endend
 
Last edited by a moderator:

FodasticoMan

Veteran
Veteran
Joined
Oct 11, 2015
Messages
41
Reaction score
3
First Language
Portuguese
I posted in the wrong place. sorry
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
[Off Topic]


Thanks again to all. You can close the topic
Please go not off-topic in a topic that is intended to dislay a script for all to use.


And especially don't ask for topics to be closed that don't belong to you and won't be closed ever, because others will have questions how to use this script in the future


By the way, your idea of automatic screen size adjustment would destroy a lot of games - 2D operates differently than 3D, that's why that cannot be done unless the developer puts a lot of work into it - read the other topics about this or start a new one if you don't understand why.
 

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
184
First Language
Meowish
Primarily Uses
Both posts are wrong topic? :p

okay since you edited it before i can read it, found your repeated post in your tileset request tread.

http://forums.rpgmakerweb.com/index.php?/topic/45822-tilesets/#entry460529

Like i said in your tread, you can turn the block on/off with a switch.

If you want that to work with certain leader in game, you can pair that with a parallel process (common event) and flip the switch when certain actor is the "leader" of the party.

As for your question about resolution. RMVX Ace has a limit on 640 x 480 max. You can't go over that without editing the DLL, which is against the TOS. If you only want an automated stretch of the screen size without changing the resolution, you can try this script:

http://forums.rpgmakerweb.com/index.php?/topic/45297-force-full-screen-with-no-black-border/

From what i see in your "suggestion" you are not looking forward to make games in JRPG format, nor do you want to use the RTP contents RM is proud of. Without that 2 features, it's a big waste making games in RM. 1st of all, RM do not support GPU like what you suggest in your picture. so using a lot of large sprites will lag the game even in modern machines. RM is never meant to support games with large sprites.

RM main RTP idea is to share games with the minimum size download for doujin makers. The user download the RTP, and later download other RM games with the smallest size possible because every game shares the same RTP resources. Making a win win situation for both developers and players.
 
Last edited by a moderator:

tale

Volunteer
Veteran
Joined
Dec 16, 2016
Messages
726
Reaction score
1,226
First Language
English
Primarily Uses
N/A
Fixed script format, credit Meow Face.

Region ID Version:
Code:
#==============================================================================
# Meow Face's Passage Block with Switch (Region Version)
#==============================================================================
module MEOWCHECK
#==============================================================================
# Settings Area
#==============================================================================
  REGION = [1,2,3] #Change this to region id numbers you want to block 
  RSWITCH = 1 #Switch number to turn the block on/off
#==============================================================================
# End of Setting Area
#==============================================================================
end
class Game_CharacterBase 
alias meowrpass? passable? 
def passable?(x, y, d)   
meow = MEOWCHECK::REGION   
x2 = $game_map.round_x_with_direction(x, d)   
y2 = $game_map.round_y_with_direction(y, d)   
if $game_switches[MEOWCHECK::RSWITCH]     
meow.each do |m|       
return false if
$game_map.region_id(x2, y2) == m     
end     
end   
meowrpass?(x, y, d) 
end
end

Terrain Tag Version:
Code:
#==============================================================================
# Meow Face's Passage Block with Switch (Terrain Version)
#==============================================================================
module MEOWCHECK
#==============================================================================
# Settings Area
#==============================================================================
  TERRAIN = [1,2,3] #Change this to terrain tag numbers you want to block 
  TSWITCH = 1 #Switch number to turn the block on/off
#==============================================================================
# End of Setting Area
#==============================================================================
end
class Game_CharacterBase
alias meowtpass? passable?
def passable?(x, y, d)
meow = MEOWCHECK::TERRAIN
x2 = $game_map.round_x_with_direction(x, d)
y2 = $game_map.round_y_with_direction(y, d)
if $game_switches[MEOWCHECK::TSWITCH]
meow.each do |m|
return false if
$game_map.terrain_tag(x2, y2) == m
end
end
meowtpass?(x, y, d)
end
end
 

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,551
Members
137,837
Latest member
Dabi
Top