XaiJu
godspeak
godspeak

patreon


Godspeak's Extra Spanking Tutorials #4

Plugins & Stealth

Metal Gear Solid, Dishonored, Mark Of The Ninja, everyone loves a good stealth game right? Fortunately for us, it's very easy with the help of a plugin, to create this effect in RPG Maker.

As usual, go ahead and download the start file: Project Start Download 

Poke around a bit and you'll find that there's quite a bit of new content. I've taken the liberty of creating our first exterior space for the city in which the game is located. Why is it surrounded by a wall? Why do androids run everything? That's entirely up to you!

Let's go ahead and get started planning our patrol routes now. Open up the City Underground map and take a look at the routes a player could take through it. 

This is the ideal route that a player could take, so this is going to be our path of greatest resistance!

So here are our patrol routes. As you can see, there is quite a bit of activity along the path that the player is most likely to take but plenty of nooks for them to hang out in if they are in a bad spot. 

So how do we make stealth work? The answer is a plugin which I have already provided for you. Let's open up the plugin manager and take a look. Click the button that looks like a puzzle piece at the top of the screen.

This is what you will see. Double click anywhere in the list and select YEP_EventChasePlayer from the Name Dropdown.

This is what you should see now. The YEP plugins are part of the Yanfly engine, which Yanfly has been so kind to provide the RPG Maker community with. Their stuff is great and really well documented, just make sure to credit them if you intend to sell whatever you make. You can peruse the help file and the parameters if you like, but we won't be editing any of those for our usage today.

Click okay back to the map screen. Now all that we need to do is call the plugin to make it work!

Let's create a new event on the top left corner of our circular patrol route that we just laid out.

Here's how your event should be set up. I have provided the character for you to use as the image under the file called Enforcer. Nextly, we want the Autonomous Movement to be set as custom with the highest frequency. This will allow us to add in pauses when we want to the motion. And finally, we want the trigger to be Event Touch, as this will allow them to act when they catch us! Now for the patrol route. Click the Route... button and click the button that says Script.

This is our first command. This sets the range of sight to be 7 units ahead of the NPC.

And here is our second. This will make them pursue the player at the same speed as the player can run, so there is a chance the player could get away. If you don't want this, make this number a 6. Technically, this is a working event, but it doesn't patrol yet. All we need to do to make that happen is record our movement route as we want it. Do this now.

Here's what mine ended up looking like. It's a lot of movement events, so I'm not going to show you everything, but all you need to do is make the loop we laid out earlier. Also, I like to add a 1/2 second pause between each step because it gives the player more of a chance to follow behind the NPC and feel like they're sneaking. It's up to you whether you like this or not.

Now that we have our patrol route in, we can test the game and see how it looks! 

Whoops, I've just noticed that we're suddenly able to pass though walls! This happened as a result of me adding another tileset and is easy to correct.

Open up the database, navigate to the SF Inside tileset's B tab and make sure the circled tile is set to a star. This is an issue with the way that RPG Maker does collision with autotiles and is a fairly common mistake to make.

Back to the patrol route. How does it work? Does it get stuck anywhere? If it all looks good, we can add in the code for the NPC now.

Regardless of what you want the NPC to do when they catch you, this code should always come last. This will check to see if they have the underground open, and if not, reset their progress. The transfer is also important as it removes the player from the area, which will allow all our patrol routes to reset. 

And that is all there is to making stealth and working with plugins. I will be finishing off the rest of our patrols for the final file, but I am curious to see if any of you can come up with better ones!

Next tutorial we will be going over keeping track of the state of our bottom and giving us items to manage it! Stay tuned, until then though...

Happy Eventing!

Final Project Download 

This post was made possible by all of my generous (and attractive) patrons!  

Godspeak's Extra Spanking Tutorials #4

Comments

It's a vague 180 degree-ish range in front of the event. Sight range gets weird on the diagonals because it's measured by tiles. Best way to find a good setting is to just test with different values until you find something that works and feels good. You can use the change event location command to move the event somewhere else on the map, or simply turn on a switch in the event page to trigger a separate page. Hope that helps, and if you have any other questions, feel free to DM me! :)

Godspeak

This really makes the difference, but I do have a couple of questions about the YEP_EventChasePlayer plugin. 1 - Is the sight range just directly ahead or is it in some kind of an arc? 2 - The event keeps repeating after it interacts with my character. I really don't want to transfer the player to another location. Is there another way to "reset" the event back to its original location/mode?

SoreBottomArt

Thanks. I was almost done the first five and then I note you have 1, 2, and 4 of the Extended ones lol

CDW

Right here: <a href="https://www.patreon.com/posts/godspeaks-extra-17766218">https://www.patreon.com/posts/godspeaks-extra-17766218</a> I think I forgot to tag it. :)

Godspeak

Where's number 3?

CDW


More Creators