The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX => VX Scripts Database => Topic started by: Dark_falcao on April 15, 2010, 01:07:37 AM

Title: [Script] Shovel 1.0 dig to find treasures!
Post by: Dark_falcao on April 15, 2010, 01:07:37 AM
Greeting

This script allow you dig on fertile ground if you have a shovel equiped

Features

- You can dig only on fertile ground fertilized by the script
- You can choose between 3 different types of treasures, Items, Weapons and armor or all of them at the same time
- Dig if you have a Shovel


Instructions

Please download demo for details


Credits

By Falcao


Demo

http://www.4shared.com/file/maVwE64J/Pala_10_VX_Eng.html


Screens

Tiles where the player can DIG

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi627.photobucket.com%2Falbums%2Ftt357%2Ffalcao99%2FTILES.png&hash=3c53423902e2d9e425fc6a5351b5677d06b0aedf)


Action

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi627.photobucket.com%2Falbums%2Ftt357%2Ffalcao99%2FPalaVX.png&hash=0a8eaa831b86b49138826fd81b9420f4086e094a)
Title: Re: [Script] Shovel 1.0 dig to find treasures!
Post by: Xzygon on April 15, 2010, 01:39:24 AM
Seems pretty cool, testing it out now.

But is there any way to change the tile where the player can Dig?
And if so, what line(s)?
Title: Re: [Script] Shovel 1.0 dig to find treasures!
Post by: Dark_falcao on April 15, 2010, 05:12:10 PM
Seems pretty cool, testing it out now.

But is there any way to change the tile where the player can Dig?
And if so, what line(s)?

Yes, you can change the tiles where the player can dig but you have to know how the autotiles system work.

If you wanna try find a method in Game_Player class called 'cavable_area?' there you can see how the fertile autotile is defined.

I can change the autotile for you just let me know the autotile you want
Title: Re: [Script] Shovel 1.0 dig to find treasures!
Post by: Deity on April 15, 2010, 07:08:57 PM
Wow nice work!
It remembers me at my HarvestMoon-Scripts. ^^

If I may give you a "improvement proposal" use Areas of the Maps. It helps a lot and you don't have to restrict on the tilesets.

Deity
Title: Re: [Script] Shovel 1.0 dig to find treasures!
Post by: phantomaang on August 19, 2011, 10:04:01 PM
I know you said find this:
def cavable_area?
tag_x = self.x + front_tile[0]
tag_y = self.y + front_tile[1]
for i in 3344..3390
return true if i == $game_map.data[tag_x, tag_y, 0]
end
return false
end

in the script if you wanted to change the fertile tiles, but you give absolutely no instruction on HOW to do that. Could you please explain? And if this identifies the fertile ground, is there a way to make more than three tiles fertile ground?
Title: Re: [Script] Shovel 1.0 dig to find treasures!
Post by: Mitsarugi on August 29, 2011, 12:11:59 AM
I know you said find this:
def cavable_area?
tag_x = self.x + front_tile[0]
tag_y = self.y + front_tile[1]
for i in 3344..3390
return true if i == $game_map.data[tag_x, tag_y, 0]
end
return false
end

in the script if you wanted to change the fertile tiles, but you give absolutely no instruction on HOW to do that. Could you please explain? And if this identifies the fertile ground, is there a way to make more than three tiles fertile ground?

i believe this line handles it : for i in 3344..3390
3344..3390 means, from 3344 to 3390, which are the tile IDs if i'm not mistaken ^^

maybe this will work (i'm a scripting noob so might not work :p)
def cavable_area?
tag_x = self.x + front_tile[0]
tag_y = self.y + front_tile[1]
for i in 3344..3390
return true if i == $game_map.data[tag_x, tag_y, 0]
end
for i in 3344..3390   --------------------------------------------------------> put your IDs here ^^
return true if i == $game_map.data[tag_x, tag_y, 0]
end
return false
end