using my 'shovel' tool to dig anywhere there is grass/dirt without events everywhere

mike_your_bro

Veteran
Veteran
Joined
Aug 5, 2012
Messages
105
Reaction score
6
First Language
English
Primarily Uses
hey all, i have another question for the more experienced. in my game i have an item named shovel, now how could i make it to where if im outside(obviously) and there's grass in front of my character, i can use the shovel and kind of break away the map, sort of like the game minecraft in a way, to where the map can be dynamically changed based on where i dig, like i could dig a trench around my house to keep the black knight at bay or something.

i have heard of people using regions for similar things i guess, and i also had an idea to activate a common event whenever you use the shovel item to set 2 variables, x and y of the space the player is facing, and checking that tile's region, but then if i dig a hole, wont the region still be the same, allowing me to dig the same hole again? and also, if could do the same thing but check that locations x,y terrain, but im not sure how that works really, can you use it to check if something is dirt or grass or am i mistaken in thinking that?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I did a script for someone a while ago so they could change their world map just by walking over it, with a certain switch turned on. You could probably do something like that and only let it happen if you have the shovel in inventory AND the tile on the map has a certain tile ID (or series of tile IDs).

I don't think you could do it without resorting to scripts, and unless you saved the map in your save file, the moment you leave then come back, it would be back to the way it originally was.
 

mike_your_bro

Veteran
Veteran
Joined
Aug 5, 2012
Messages
105
Reaction score
6
First Language
English
Primarily Uses
I did a script for someone a while ago so they could change their world map just by walking over it, with a certain switch turned on. You could probably do something like that and only let it happen if you have the shovel in inventory AND the tile on the map has a certain tile ID (or series of tile IDs).

I don't think you could do it without resorting to scripts, and unless you saved the map in your save file, the moment you leave then come back, it would be back to the way it originally was.
hm, i know if you have an event run a common event that if the common event has a 'control self-switch' action then it will flip the self switch on the event that called it, is it possible to use a common event to copy an event to a certain location, and then just flip it's self switch to place the 'hole' graphic there?

i swear i saw someone say something about a 'spawn event' or 'copy event' or something or other, maybe that would be an effective method? of course, i could always just place the event everywhere, but that is time consuming, and would probably lag the game on bigger maps.

edit: not sure about the time difference between here and down under but it's 4:30 am here, i have to pass the ef out, i will be able to respond in a little while though, so thanks a lot for your reply. you seem to be making waves out there!
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
But you don't want events all over the place, do you?

Other things to consider ... what if you dig two tiles next to each other - do you end up with two holes, side by side? Or do they join to form a larger hole? If you dig 5 tiles in a row, do you get 5 holes, or do you get a trench? Would a "hole" autotile be more suitable?
 

mike_your_bro

Veteran
Veteran
Joined
Aug 5, 2012
Messages
105
Reaction score
6
First Language
English
Primarily Uses
But you don't want events all over the place, do you?
no, no i do not.

Shaz said:
Other things to consider ... what if you dig two tiles next to each other - do you end up with two holes, side by side? Or do they join to form a larger hole? If you dig 5 tiles in a row, do you get 5 holes, or do you get a trench?
i would LIKE it to form a trench, but wasn't sure about the autotile working with 'change graphic' so if it HAS to be just a bunch of holes, it will work for this particular situation, however [below] would be much, MUCH better.

Shaz said:
Would a "hole" autotile be more suitable?
yes it would, i have thought about this too, but wasn't even sure if there was a way of doing this.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
And what should happen when you leave the map and return? Should the holes still be there?
 

mike_your_bro

Veteran
Veteran
Joined
Aug 5, 2012
Messages
105
Reaction score
6
First Language
English
Primarily Uses
And what should happen when you leave the map and return? Should the holes still be there?
for this particular case i would like for them to stay.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
This is definitely script territory - you can't accomplish this with events and common events.

I wish I could spend some time working on this, but I'm going away for a few days soon and have a lot to get through before I leave.

I hope an amazing scripter reads this and jumps at the challenge. If nobody has by the time I get back, and I have the time, I might look into it :)
 

mike_your_bro

Veteran
Veteran
Joined
Aug 5, 2012
Messages
105
Reaction score
6
First Language
English
Primarily Uses
sweetness, i appreciate the enthusiasm and am grateful.

in the meantime, since im no good at scripting yet, i will try to set up a system of events, page 1 will be blank,

page 2 will have the hole, and when you use the shovel the common event for the shovel will just take your coordinates and based on your direction set the location for the hole event and switch its' self switch on. this will not make the trench i was hoping for but until i find a way to achieve that it will just have to do. i am not any good at scripting but have found that if i really really want to i can figure out how to do a LOT with just eventing. Have a great trip shaz, and thanks again for the help!

i will post my progress/issues on here and if anything comes of it, that would be fantastic, otherwise i might see if i can find someone who knows a lot more about scripting than i do to figure it out..

peace for now

edit: just thought of it, but it might be an important side note. most of my maps have a black border and i was thinking i could just place my events on the border and name them 'hole 1', 'hole 2', etc and when the shovel moves one of them it will flip a switch, which is ok for me as i have used the database breaker and have 10,000 of them.

when the switch is flipped i will have to have a butt-ton of conditional branches

if switch 'hole 1' is on then set event location 'hole 1' to variable x,y

else if switch 'hole 2 is on then set event location 'hole 2' to variable x,y

else if switch 'hole 3' is on then set event location 'hole 3' to variable x,y

else same but for switch 'hole 4, and so on and so forth

then you can go to the hole if you have a 'dirt bucket' and fill it back in, which would just turn off the self-switch for that event, making it blank again.

this wont make it trench-like but it will allow me to make holes that will stay if im not mistaken.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Yes, if you use switches (or probably more appropriately, self-switches), your holes will stay if you leave and return to the area.
 

mike_your_bro

Veteran
Veteran
Joined
Aug 5, 2012
Messages
105
Reaction score
6
First Language
English
Primarily Uses
Yes, if you use switches (or probably more appropriately, self-switches), your holes will stay if you leave and return to the area.
see i was thinking about that as well, though i am not sure i would be able to fill them back in by using the dirt bucket from the menu, though if i did it with self switches it wouldnt be any trouble at all to add a page on the hole event itself to just check if you have the dirt bucket and then just turn off the self switches

and im sure its probably on the site somewhere but is there a way i could make a hotkey for the shovel? i have the button common event script from yanfly, so i could just change the event it calls to the shovel event, but is there a way i could make it a custom key or do i absolutely have to use the 5 or so default buttons? like, i cant use the 's' key?
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

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
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,570
Latest member
fgfhdfg
Top