Cutting Trees (Efficient use of Switches)

Dream3r

90% Dreamer, 100% Dedicated
Veteran
Joined
Jun 13, 2013
Messages
530
Reaction score
376
First Language
English
Primarily Uses
I'd like to go with the first one since it's simpler but if saving the game and closing will reset it then I'll have to go with #2 and figure that out.  I'll also talk to Vlue who helps me figure out alternatives at times or at least how things can be simpler.  Thank you for going into detail it will help a lot.  Even if it takes me a few days to understand how it all works.
 

Zeriab

Huggins!
Veteran
Joined
Mar 20, 2012
Messages
1,268
Reaction score
1,422
First Language
English
Primarily Uses
RMXP
Seems like what you really need is to change the event system so the positions are persistent. I.e. if an event has been moved it will stay there even if you go to another map and back again.

Scripting is naturally required for this, and the changes are probably rather complex. Even so I recommend getting it done so having persistent events except where you opt out. Whether only movement is fine or more general persitance is preferable in your case I cannot really tell. (Stuff like move routes, current graphics settings, etc.)

*hugs*
 

Dream3r

90% Dreamer, 100% Dedicated
Veteran
Joined
Jun 13, 2013
Messages
530
Reaction score
376
First Language
English
Primarily Uses
Thanks @Zeriab  I'll see what Vlue can do for me when he has some extra time.  I'm grateful there are such kind scripters out there.  That work is over my head.  (I try to learn what I can to make better games but there's a point where you have to decide what to learn, and pay a specialist to do their job better than you ever could)
 

Dream3r

90% Dreamer, 100% Dedicated
Veteran
Joined
Jun 13, 2013
Messages
530
Reaction score
376
First Language
English
Primarily Uses
Alright so I started working with the yanfly script for spawning events and the results are well...weird

As you can see here there is a blackberry bush

and here there is not, but there is a tree

See one is a screenshot before using the script call to spawn the tree and the other one is after.  For some reason using the script call makes the bush go away, and not just the bush but any event made after adding the script to the game.  I don't understand how this is even possible...

Here's the events listed below so you can see where if at all, I made a mistake...





 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
About the keeping events where they are...I think Shaz has a script for that already? Maybe that can help you. No idea about the event spawn script, never used it I'm afraid, but maybe this can help with a different issue.
 

seita

Donn_M
Veteran
Joined
Feb 6, 2013
Messages
2,254
Reaction score
611
First Language
English
Primarily Uses
@Zeriab Will that type of script keep a spawned event (e.g. an event that isn't originally there upon map creation) in place? That'd be really useful *_*

@Dream3r Looking over the spawn script instructions, it requires you to put in an event ID at the end, so the only thing I can think of is that the newly spawned items are overwriting existing events with the same ID. Could you try setting the spawn script to an ID higher than whatever you have there? Say 1000+

In your screenshot, you're spawning it at ID 1, not Map ID 1.
 

Dream3r

90% Dreamer, 100% Dedicated
Veteran
Joined
Jun 13, 2013
Messages
530
Reaction score
376
First Language
English
Primarily Uses
@seita I tried 1,000 plus now and it makes nothing happen.  I tested it further and the event ID at the end is what you are having spawn.  (When I switched to ID 71 like a blackberry bush was, it became a blackberry bush)
 
Last edited by a moderator:

seita

Donn_M
Veteran
Joined
Feb 6, 2013
Messages
2,254
Reaction score
611
First Language
English
Primarily Uses
Oh... Oooooooooohhh... No wonder. The Event ID is the event it's copying, and the Map Id is what the event is coming from, so there's actually no way to specify the ID of the event you're spawning. I read the instructions wrong~ So knowing that, it still doesn't seem to work?
 

Dream3r

90% Dreamer, 100% Dedicated
Veteran
Joined
Jun 13, 2013
Messages
530
Reaction score
376
First Language
English
Primarily Uses
Yeah, and it's really weird.  I've never seen a script call make other events not show that had nothing to do with it.  I wanted to start with the basic setup and then move onto region mapping the event but until I find out what's causing this there isn't a good reason to make things more complex. 
 

seita

Donn_M
Veteran
Joined
Feb 6, 2013
Messages
2,254
Reaction score
611
First Language
English
Primarily Uses
Well that's strange. I just installed it into my project and another empty project, it doesn't really behave the way I thought it would. It seems to only spawn one of any specific event from the spawn map in my main project. On the other hand, in the blank project it seems to overwrite the event with the highest event ID.

Edit: It does the same in my main project, overwrites the very last event.

Truthfully I haven't been using a script to spawn events, I've been using a script call like such:

map = load_data("Data/Map001.rvdata2") ##the spawn mapnew_id = $game_variables[6] ##the new event IDnew_event = map.events[$game_variables[203][@map_id][$game_variables[8]]] ##the event ID from the spawn mapnew_event.id = new_id$game_map.events[new_id] = Game_Event.new($game_map.map_id, new_event)$game_map.events[new_id].moveto($game_player.x + 1, $game_player.y + 1) ##where the event will spawn$game_map.need_refresh = trueEdit 2:

I've modified the script to make it so you can spawn the event with its own ID. I can't fix it but I can modify it ;x

Line 66, replace def spawn_event(dx, dy, event_id, map_id)  with  def spawn_event(dx, dy, event_id, map_id, key_id)

Line 73, replace key_id = @events.keys.max || -1 + 1 with key_id = (@events.keys.max || -1 + 1) if key_id == 0

Line 127 replace def spawn_event_location(dx, dy, event_id, map_id = 0) with def spawn_event_location(dx, dy, event_id, map_id = 0, key_id = 0)

Line 129 replace $game_map.spawn_event(dx, dy, event_id, map_id, key_id) with $game_map.spawn_event(dx, dy, event_id, map_id, key_id)

Now you can do this:

spawn_event_location(x, y, event_id, map_id, key_id)

the last value will be the new ID of the spawned event. If you exclude it, it will do what it normally does.
 
Last edited by a moderator:

Dream3r

90% Dreamer, 100% Dedicated
Veteran
Joined
Jun 13, 2013
Messages
530
Reaction score
376
First Language
English
Primarily Uses
Just clarifying for everyone who helped...

Seita and I pm'd quite a few times back and forth and made a system that works for the most part.  (Or Seita made a system, I played the role of the monkey and copied it and edited as needed)

We'll see if it works for when you leave the map and come back, or save and exit, but as for the main cutting the tree and spawning other parts it worked great.

Thanks everyone!
 

VicWhite

Star rover
Veteran
Joined
Sep 22, 2014
Messages
261
Reaction score
186
First Language
Spanish
Primarily Uses
N/A
Could be possible to run an animation of the main character cutting? I think it's an important part of the feature.
 

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,860
Messages
1,017,038
Members
137,568
Latest member
invidious
Top