Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[XP] Auto Populate Maps

Very nice Charlie Lee.  ^_^

A friend of mine actually was looking for something like this and I made him something through eventing but this is much more effective. (Haven't tried it out yet though but it looks correct.)

Edit:  You could have made it a bit more user-friendly though, with comments or whatnot.  I don't need it but it may apply to others.

Edit3: Scratch out edit2.  I "assumed" this was VX, not XP.
 
Well, this actually requires only one event with a single call script. The rest (the enemy event) would be necessary anyway if you wanted on-map encounters. I'm already using this for animals, vegetation, enemies... it saves a lot of time.
Soon a version to specify an area instead of the whole map.
 
This is also really neat if you have a really big city and don't necessarily need too much physical difference in its random faceless inhabitants. Another use is for the trees of a forest that automatically repopulates itself every time you enter the map (haunted, or whatever).

Err.. Any chance of making this for VX? =D
 
Thanks for the screen, very useful. There was a little snippet of code which i have in my project and was not copied in the script here. Fixed. Now you should be ok.
 
Thats awesome.

Just one question: Is the original thing, the source of the thing being copied, removed after the area is populated, or will there ~Always~ be the original, as well as the copies?

Or, to put it another way and use your example, if I make a clone of Cockatrix with a command like "populate (37, 1)", will there now be two Cockatrixes (1 populated one and the original) or one Cockatrix (just the populate one)?

See, if the original is deleted, you don't have to even use this for clones of things; you can also somewhat enhance the realism of a town or whatever by randomising the locations of people (basically, by making a list a populate commands that basically make 1 copy of something...)
 
The original event will be in the map as well.

Now that i think about it, this raises an unforeseen issue. Because when a local switch is turned on in the original event, it will be turned on in all the copies, when the player enters again in the map. If you have this problem, i suggest to
1) put original events in unseen/unreachable positions, or if you can't do it
2) use the same populate event in parallel process in order to move the original events in some unreachable position and delete their graphics after creating the "clones". Only the original events will be affected and not the copies.
 
Then again, if you don't have any truly unreachable areas, as an issue with using method 2), if you're using monsters whom can move around and attack on event touch (EDIT: Or have Through switched on, as flying creatures probably would), the chance exists that they'll find their way in front of the player anyway, and they'll start a battle with the invisible creature (since it'll still be running on the same event page, with the combat, even though they're invisible.)

Unless you're suggesting to put the events in a place they can't move at all, I guess, like telefragging them inside a large boulder or something.

IDEA: One other workaround, if I want to use my randomised townsfolk, would be making one copy, as before, then changing the originals graphic to a random civilian (some Random Number generation is in order!). This way there would always be a copy of say Johnny wandering around somewhere, and there'd also be a Bob or a Julia or a Yasmine in the same place every time. This sort of helps change the compliment of a town and adds the realism; though there would still be some folk whom have the same text. But hey, that happens in JRPGs, so its all good.
 
This is pretty good. I like the fact that you can make multiple copies of the same event and only having to make one in the actual mapping editor.

I have a question: is there any way that this can be edited to allow the 'copies' of the event to appear in a certain position, and only when a switch is turned on? For example, you go up to an event and press enter, and a copy of an event appears in the space the other event is. I know I haven't explained that very well, but could it be done?
 
@eharper256: I'm gonna introduce an option to delete the original event, thanks for pointing out the "issue" and your ideas.

@fox5: i don't really know if this is what you're saying, but you can trigger the populate event with the player instead of putting it in parallel process.
 
Charlie Lee":3d4vp95s said:
@eharper256: I'm gonna introduce an option to delete the original event, thanks for pointing out the "issue" and your ideas.

Cool, if you put in the delete feature I'll definately use it. It already has considerable utility, but that would make it an essential pick up in my eyes. I already use your mini-characters for worldmap script.

fox5":3d4vp95s said:
I have a question: is there any way that this can be edited to allow the 'copies' of the event to appear in a certain position, and only when a switch is turned on? For example, you go up to an event and press enter, and a copy of an event appears in the space the other event is. I know I haven't explained that very well, but could it be done?

Yeah, as Charlie Lee says, you don't have to use a parallel process for the event. Put it on Action Button, then use this populate:
$game_system.map_interpreter.populate_area(event_id, max_events, x1,y1,x2,y2)
If its a certain location to spawn in, then just put the same value for both x's and both y's, like
$game_system.map_interpreter.populate_area(23, 1, 26,11,26,11)
That would put 1 copy of event 23 on exactly square 26, 11. At least I assume. I haven't tried that. And if its tied to a sprite of a switch or something with Action button trigger, it would generate one each time you pulled it. However, I don't know what would happen if you ran this command when something was already in the only occupiable space. Possibly something bad; unless the events had 'Through' switched on.

Thinking about it, if this worked, doing something like that would allow you to have regenerating puzzles like the trash cube in the sewers one in Tales of Symphonia.
 
Updated with version 0.2. You can now decide whether to remove the original events or not by using the script call
Code:
$game_system.apm_remove_original_event=true/false
If you're not gonna change it during the game, just set its default value in the script.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top