6 hours ago
KTrespass VX
by Kyonides
Introduction
Let the player do crazy stuff like slipping into a pond or climbing a mountain (no batteries nor UI included) by just owning a very specific item.
Everything is handled by the very short KTrespass module. Just a custom note in the item's notebox:
Code:
<passable terrain: 0-63>NOTES:
- The VX tileset is composed of very minuscule pieces so you are in need of setting a tile ID range to make the script work properly.
- You will eventually need to create events that include a special script call in order to retrieve a tile ID.
The Script
Code:
# * KTrespass VX * #
# Scripter : Kyonides
# v1.0.1 - 2026-06-27
# Let the player slip into a pond or climb a mountain (no UI included)
# if the party owns a specific item.
# Just leave a note in the item's notebox. Replace TileID with a number.
# You must set ranges because the tileset is composed of very tiny pieces.
# <passable terrain: TileID1-TileID2>
# * Helpful Script Call * #
# - Get the Next Tile IDs (From Bottom to Top) During Playtest:
# x, y, dir = $game_player.x_y_dir
# $game_map.next_tile_id?(x, y, dir)
module KTrespass
NOTE_TAG = /<passable terrain: (.*)>/i
end
module RPG
class BaseItem
def item?
false
end
end
class Item
def item?
true
end
end
end
class Game_Party
alias :kyon_trespass_gm_pty_init :initialize
alias :kyon_trespass_gm_pty_gain_item :gain_item
def initialize
kyon_trespass_gm_pty_init
@terrain_items = {}
end
def gain_item(item, n, include_equip=false)
kyon_trespass_gm_pty_gain_item(item, n, include_equip)
refresh_item_terrain_tags(item) if item.item?
end
def refresh_item_terrain_tags(item)
item_id = item.id
n = @items[item_id] || 0
if n > 0 and !@terrain_items.has_key?(item_id)
item.note[KTrespass::NOTE_TAG]
return unless $1
range = $1.scan(/(\d+)-(\d+)/).flatten
range.map! {|n| n.to_i }
range = Range.new(*range)
@terrain_items[item_id] = range
else
@terrain_items.delete(item_id)
end
end
def terrain_items
@terrain_items ||= {}
end
def item_has_terrain_id?(terrain_id)
@terrain_items.values.flatten.include?(terrain_id)
end
end
class Game_Map
def terrain_tile_id?(x, y)
tile_ids = $game_party.terrain_items.values.flatten
for i in [2, 1, 0]
tile_id = @map.data[x, y, i]
for range in tile_ids
return true if range.include?(tile_id)
end
end
return false
end
def next_tile_id?(x, y, dir)
x += dir == 4 ? -1 : dir == 6 ? 1 : 0
y += dir == 2 ? 1 : dir == 8 ? -1 : 0
tile_ids = []
for i in [2, 1, 0]
tile_ids << @map.data[x, y, i]
end
tile_ids.reverse!
print tile_ids.join("\n")
end
end
class Game_Player
def map_passable?(x, y)
case @vehicle_type
when 0 # Boat
return $game_map.boat_passable?(x, y)
when 1 # Ship
return $game_map.ship_passable?(x, y)
when 2 # Airship
return true
else # Walking
pass = $game_map.passable?(x, y)
pass = $game_map.terrain_tile_id?(x, y) unless pass
return pass
end
end
def x_y_dir
[@x, @y, @direction]
end
endTerms & Conditions
Under MIT License.
That's it!
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
![[Image: SP1-Scripter.png]](https://www.save-point.org/images/userbars/SP1-Scripter.png)
![[Image: SP1-Writer.png]](https://www.save-point.org/images/userbars/SP1-Writer.png)
![[Image: SP1-Poet.png]](https://www.save-point.org/images/userbars/SP1-Poet.png)
![[Image: SP1-PixelArtist.png]](https://www.save-point.org/images/userbars/SP1-PixelArtist.png)
![[Image: SP1-Reporter.png]](https://i.postimg.cc/GmxWbHyL/SP1-Reporter.png)
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
![[Image: SP1-Scripter.png]](https://www.save-point.org/images/userbars/SP1-Scripter.png)
![[Image: SP1-Writer.png]](https://www.save-point.org/images/userbars/SP1-Writer.png)
![[Image: SP1-Poet.png]](https://www.save-point.org/images/userbars/SP1-Poet.png)
![[Image: SP1-Reporter.png]](https://i.postimg.cc/GmxWbHyL/SP1-Reporter.png)
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!

Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE

