Newbie here, can I dynamically create items?

I just bought and downloaded RPGMaker VX Ace. I've done some modding over the years, am a professional programmer, and have been playing games for a long time. I've been planning a Wild West type RPG.

Question: how do I dynamically add a building? For example: do some action, gather some stuff, and then "build" a barn. A building appears where there wasn't one before. Possible? If so, can I add attributes to it? Like a barn adds to the "feeding" skill or something. Or maybe the barn is always there in it's own map, but only opens after some action? Hmmm.....

Question: basically the same for NPC's. Put the right mix of cows into a pasture, and they produce more cows. Create cows dynamically based on conditions. Possible?

Question: territory control. Can a ranch "expand"? You could add an owner tag to each map tile, and then display them based on tag, right?

Any help would be appreciated.
I've moved this thread to VX Ace Support. Please be sure to post your threads in the correct forum next time. Thank you.


1. You would need to use multiple maps and switches/variables to determine which one to transfer to, or a script that lets you change tiles on the fly. A search in the Master Script List or through the RGSS3 Scripts forum will reveal a few.


2. An event spawning script, or have events conditioned by switches and turn on the switches when you're ready for a new cow to be born.


3. What? You'll need to explain this one more. It sounds like more dynamically changing maps, which goes back to #1.
Thanks for the quick response.

For #3, I mean territory control. Let's say the cow is inside your ranch's border, it's your cow. But if it is outside your ranch's border, it's not your cow. The border of the ranch expands or contracts based on factors, like number of cows, how many improvements you have (corral, barn, pasture, etc). In wargaming terms, it would be Zone of Control, or Supply. If you are outside your ranch's supply zone, yoiu might have to move at 1/2 speed, for example.
Repeating what Shaz said:

1. Tile-swapping script like this one: http://www.rpgmakervxace.net/topic/3873-tile-swap-20/

With this you can set up your building and show its development in stages if you wanted. You could set restrictions with eventing, and make the barn accessible at the final stage of building; with a switch, you could make other options available then.

2. You can use a script like this one: https://yanflychannel.wordpress.com/rmvxa/utility-scripts/spawn-event/ or this one: https://gist.github.com/kl/1790186

I'm not familiar with spawning events like this but in theory you could add variables, switches or conditional branches to spawned events, or use a menu to select which animals to mate; those would have traits coded into the event (with variables), and spawn an animal based on those traits you've set. Perhaps have reserved events in the barn and spawn the animals there based on the variables.

I'm probably being confusing so someone else should clarify what I'm getting at. x.x
Perfectomundo! This will keep me busy for a while .... 🙂
Glad to be of service. ^.^
mmm - normally I'd say you could do something with regions to determine whether a cow is yours or not based on its location. But those are not changeable within the game, unless you write a script.


Probably the only non-script solution I can think of is to just do a calculation at the time to see where it is and where your boundaries are based on all the given factors.
mmm - normally I'd say you could do something with regions to determine whether a cow is yours or not based on its location. But those are not changeable within the game, unless you write a script.

Probably the only non-script solution I can think of is to just do a calculation at the time to see where it is and where your boundaries are based on all the given factors.
You could create squares of regions each with a different number, counting up or down. Then all you need to do when the boundary expands is update a size variable. Then a conditional branch with something like variable A (Size) is greater then or equal to variable B (Region).
If the territories are rectangles you can store the coordinates of two corners as global variables.

If they aren't rectangles, you're probably best off writing a script to set and test region values.

Original thread: https://forums.rpgmakerweb.com/threads/newbie-here-can-i-dynamically-create-items.43586/