Land acquisition plus upgrade help.

I have a thing in the game that I am making where the user can buy a piece of property and then they need to find someone who can build on it. Once, the party hires a builder, the land will go through a series of upgrades. I plan on doing these upgrades through multiple maps with switches since you cannot just place houses and stuff in events.


I decided to have the upgrade be initiated via certain number of steps. I thought about doing this with story progression but I realized that the user could buy the land at any time during the game so I cannot just have an upgrade be done when the user beats X boss fight or does Y thing because there is a chance that the user has not bought the land yet. I also thought about doing this via level up but the user could be level 99 when they buy the land if they totally missed the NPC.

So, steps seems to be the best option.

In my mind, this seems like it would work. However, I do not want to dive into test play and get real far only to find that it does not work the way I expected. So, I need someone to check my work.

Here is my setup: Capture.JPG
This is to initiate the build and to set up variables for the steps.


Capture 2.JPG
This to initiate how many steps the party needs to take in order for the first land upgrade to be available


Capture 3.JPGCapture 4.JPG
This is where it gets tricky and I am unsure if this is set up correctly. I need someone to check my work.

Basically what we have here is when the the party walks the required number of steps, it turns on a switch, which changes what map you enter when you enter your own property and you'll see more stuff on it, then it adds some thousand steps to variable 20 that the party needs to take for the next upgrade. When the party meets that amount of steps, another upgrade, another new map, and another some thousand steps are added to variable 20 that the user must take in order for yet another upgrade. This will repeat until the property is fully upgraded.

To me, this parallel process seems it would do what I want it to do, but I know from experience that fairly often, what makes sense to me that would work does not work sometimes and I need to fix it. Which is fine for events that take place in the moment, but this is a long term event and I want to make sure it is right before I do any major progression in test play.

Will this work the way that I intended?
I wouldn't do it using parallel or autorun events at all. It's not necessary and is very inefficient. The only time you need to check what map to go to is right before you go there. So on the transfer event from the previous map.

Let's say you have 7 different maps for the stages, from bare land to completed building. I'll call them Map 11 to Map 17. You can go to Map 11 at any point in the game. After hiring the builder, you need to take 1000 steps to go to map 12, then another 1000 to map 13, then another 1000 to map 14, and so on. So you can access map 17 when you've taken 6000 steps after hiring the builder.

When you hire the builder, set a variable to the current number of steps (I'll use variable 19 for this and call it Steps When Hired).

On the transfer event, do something like this:
Code:
Control Variables [20: Extra Steps] = Game Data > Other > Steps
Control Variables [20: Extra Steps] -= Variable [19: Steps When Hired]
If Variable [20: Extra Steps] >= 6000
  Transfer to Map 17
Else
  If Variable [20: Extra Steps] >= 5000
    Transfer to Map 16
  Else
    If Variable [20: Extra Steps] >= 4000
      Transfer to Map 15
    Else
      If Variable [20: Extra Steps] >= 3000
        Transfer to Map 14
      Else
        If Variable [20: Extra Steps] >= 2000
          Transfer to Map 13
        Else
          If Variable [20: Extra Steps] >= 1000
            Transfer to Map 12
          Else
            Transfer to Map 11
          End
        End
      End
    End
  End
End


If you don't want the same number of steps for each stage, just add up all the steps up to and including the stage you're testing. So if you have to take the following number of steps for each new stage to open:
Map 12 - 1000
Map 13 - 500
Map 14 - 700
Map 15 - 800
Map 16 - 600
Map 17 - 1000

then your event will look like this (for map 17, you need to have taken a total of 1000+500+700+800+600+1000=4600 steps)

Code:
Control Variables [20: Extra Steps] = Game Data > Other > Steps
Control Variables [20: Extra Steps] -= Variable [19: Steps When Hired]
If Variable [20: Extra Steps] >= 4600
  Transfer to Map 17
Else
  If Variable [20: Extra Steps] >= 3600
    Transfer to Map 16
  Else
    If Variable [20: Extra Steps] >= 3000
      Transfer to Map 15
    Else
      If Variable [20: Extra Steps] >= 2200
        Transfer to Map 14
      Else
        If Variable [20: Extra Steps] >= 1500
          Transfer to Map 13
        Else
          If Variable [20: Extra Steps] >= 1000
            Transfer to Map 12
          Else
            Transfer to Map 11
          End
        End
      End
    End
  End
End


This does mean that you could hire the builder, go and walk 5000 steps (or 6000 in the first example), then return to the map and your building will be done. If you want to have to visit the site and view progress at each stage, you'll need to do things a little bit differently. If you DO want that, say so, and I'll give you the correct event commands for that.

Original thread: https://forums.rpgmakerweb.com/threads/land-acquisition-plus-upgrade-help.157148/