Main Menu
  • Welcome to The RPG Maker Resource Kit.

[Script] Shovel 1.0 dig to find treasures!

Started by Dark_falcao, April 15, 2010, 01:07:37 AM

0 Members and 1 Guest are viewing this topic.

Dark_falcao

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




Action


Xzygon

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)?

Dark_falcao

Quote from: 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)?

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

Deity

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
Greetings
DigiDeity


├Work┤
├Contact┤


phantomaang

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?

Mitsarugi

Quote from: 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?

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