Stealth game concept -- I need help with making it work !

Hello,

So found a concept for a game I want to build.
I think it should be possible to do it in RPG maker however there is a bunch of things that I am struggling with.
I made a very ugly GIF to illustrate the game concept :
Stealth game concept.gif


So basically it's a semi-turn based stealth game in which your character needs to sneak behind guards to reach the exit.
What I mean by semi turn based is that the time is frozen unless the character moves. So basically the guards will have their own patrolling route but they can only move if the player is also moving. Else they will be frozen in time. (It's similar to Crypt of the necrodancer except you don't have to move in rythm). Of course I have plenty of ideas to spice up the gameplay, like some guards that can walk faster than the player, abilities that allows the player to teleport / freeze a guard or something similar.

I'm also planning on using fully custom sprites and tilemap that I will do (I'm more an artist than a developper).

I'm struggling to get the core mechanics to work and would need help with it. This are the features I'm trying to achieve :

1 ) Guard stop moving if Player is not moving. I asked on the forum and some people showed me the command $gamePlayer.isMoving() and I managed to turn on and off a switch while player walks. But now I'm struggling with making the guard have a specific route and stop then return to it's path.

2 ) Making a "sight zone" for the guard. If the player is caught in the zone he needs to restart the level. For this one I'm not even sure how to start. Do I need to make a bigger sprite for the guard including it's sight zone ? How do I make it so that if the player is hiding behind an item it isn't detected by the guard ?

3 ) Making abilities : Is it possible to link an event to a specific Key mapping ? Or add an additional menu that will always be shown at the bottom ? Maybe with a plugin ?


If some of you have ideas on how to do this it would be super helpfull, especially the point 1 and 2.

Thanks in advance !
it might be rudimentary, but you could try keeping track of your player and your guard's x and y co-ordinates, then use if statements to keep track of if the players in direct eyesight for example. If (guard facing up), if (player y>guard y), if (player x>guard y) common event stealth fail game over. After you get that up and running, then implement obstacles co-ordinates.
Now I understand! You need a pathfinding plugin! Then you can basically turn off the pathfinding when the player is not moving. I recommend Qpathfind. But any pathfinding plugin will work I suppose.
As for the sight zone thingy, use Qsight. It's perfect for what you're trying to do. Everything you need is handled by the plugin so you don't have to worry about the obstacles/hiding behind objects.
Also, I should mention. Yanfly has a stealth plugin which also handles all of this. It's not free though but it's really good. You should watch the video demonstration and see if you need that plugin.
Can you explain no. 3 more elaborately? It's hard to understand.
Now I understand! You need a pathfinding plugin! Then you can basically turn off the pathfinding when the player is not moving. I recommend Qpathfind. But any pathfinding plugin will work I suppose.
As for the sight zone thingy, use Qsight. It's perfect for what you're trying to do. Everything you need is handled by the plugin so you don't have to worry about the obstacles/hiding behind objects.
Also, I should mention. Yanfly has a stealth plugin which also handles all of this. It's not free though but it's really good. You should watch the video demonstration and see if you need that plugin.
Can you explain no. 3 more elaborately? It's hard to understand.

Ahah yeah sorry it was so hard to explain so I added a little gif this time !

Thanks so much, those plugins seems to be exactly what I am looking for. I'll try them out and let you know how that works.

For 3 ) Basically I just want the player to be able to press a button (or select in a menu) and then it plays an even.
An example in my context would be :
- Player press the Q button --> the player can select an area to teleport on the map (this is just 1 ability example).
Ah, that's really simple. You can just have a parallel event that checks for the button input.
1595870992531.png

81 is the keycode for the button Q. Just put your event stuff inside the condition.
Amazing ! Thank you so much 🙂
I'll try to get all of this running tomorrow and hopefully I can do it this time !

Thanks so much for your help, I appreciate it a lot !
Now I understand! You need a pathfinding plugin! Then you can basically turn off the pathfinding when the player is not moving. I recommend Qpathfind. But any pathfinding plugin will work I suppose.
As for the sight zone thingy, use Qsight. It's perfect for what you're trying to do. Everything you need is handled by the plugin so you don't have to worry about the obstacles/hiding behind objects.
Also, I should mention. Yanfly has a stealth plugin which also handles all of this. It's not free though but it's really good. You should watch the video demonstration and see if you need that plugin.
Can you explain no. 3 more elaborately? It's hard to understand.


So... sorry to bother you again.

I just wanted to give it a quick try tonight and I installed the plugins but I can't make it work at all.
I tried to use the pathfinding plugin but nothing happenend
Screenshot 2020-07-27 at 20.10.48.png


I also tried the global lock from QPlus but it didn't do anything appart from making my character immobile when it was supposed to do the opposite.
Screenshot 2020-07-27 at 20.09.52.png


And last I tried the sight plugin but it doesn't seem to work either. And I'm not sure what command I would need to use to make the react when the player cross their sight :
Screenshot 2020-07-27 at 20.23.15.png
Read the help file carefully.
Firstly, there is no this in Qpathfind. It's either the event ID or the Player. For the Player, it's 0.
Edit: There is a this.
1595874721410.png

I've never used global lock before. What does it do?
And lastly, <sight: poly,6,A> is not a plugin command. It's either a comment or a note tag.
Either
1595874806934.png
or
1595874835464.png

If you use the note tag, the event will always check for the player. If you use comment, it will only work for the event page it's in.
Oh for some reason the qPathfind was not working but now it does. Actually the This is a command (I saw it in the help file and that is why I was trying it).

However I'm still not able to achieve exactly what I want.

Right now I set up two events :

1595875647778.png


1595875661336.png


The problem is that the NPC does the full animation and doesn't stop when my Player does . You can see it here : https://www.loom.com/share/315305c19d4c45dbb9818d16c4c210b1


Global lock is a tool from Qplus that is supposed to do what I want :
1595875923450.png


I used the command "globalLock 1 player only" which is supposed to lock everyone appart from my character but it only locks my character which is weird..


Also sorry again but I'm not sure how to use the comment or note, where do I put it ?
Oh my god I managed to make it work ! https://www.loom.com/share/6e94f9d3e47a499291b54951114485de

So the global lock thing was weirdly explained, but It now works as I want !!


Just need to understand where to put the thing for the sight
Remove the wait from the pathfind and then see if it works. Here it's making sure that nothing happens until the pathfind is completed. So, your else branch is not working.
Edit: Oh you fixed it. Nice.
Btw, the comment and note tag:
1595877095617.png
Yeah I'm pretty happy about the way it works now 🙂
I'm gonna try to make the sight work with the comments or notes tommorw !
Thanks again !
Remove the wait from the pathfind and then see if it works. Here it's making sure that nothing happens until the pathfind is completed. So, your else branch is not working.
Edit: Oh you fixed it. Nice.
Btw, the comment and note tag:
View attachment 153018


Hello,

So I actually managed to make the sight work, however I know have 2 issues I hadn't anticipated :

- The sight is a bit wide. Do you know if it is possible to make it thiner ? For instance if I want it to have a height of 3 tiles but a width of only 1.

- I want to be able to show the sight radius to the player. But currently the only way I found to do that was to add an animation with a single image on it. However first it doesn't look very natural, but the main issue is that it goes through obstacles (even if the sight isn't). Do you know a plugin that would maybe allow me to make it work ? Maybe some sort of directional light that stops at obstacles ?

Here is an example of what I did : https://www.loom.com/share/99ff1545369d4348a54717bb2e1d9072
1. It's not possible to do that unless you edit the plugin somehow. But the plugin might break if you try it So if you do attempt to do it, make sure to keep a backup of the plugin.
2. Nothing is coming to mind about this. How about using a lighting plugin? Khas Ultra Lighting makes it so that the light doesn't go through certain objects. But that would require your map to be dark sonce it is a lighting plugin.
So I actually just found this tutorial that you made a while back https://forums.rpgmakerweb.com/inde...item-that-uses-batteries-demo-included.85509/

But I don't get how add shadow to the rest of the map and how to attach the light to one of my guards.

I did this to the guard :
1595929580997.png


But it isn't really doing anything because there isn't any shadow on the rest of the map.


For the point 1 : Is it possible to instead use the flashlight as an event touch trigger somehow ? If so I just need to set it up so that when the player comes in contact with the flashlight an event triggers.
So, it is starting to work, however the light is still going through the wall, do you know how to stop that ?
1595931725875.png


EDIT : Apparently just adding the shadows on top of the walls worked !
Mark your tiles with a region. Judging by your map, you should mark them as 20. 10=walls that are 1 tile high, 20=walls that are two tiles high, 30=walls that are three tiles high etc.
1595932078323.png
Yeah that worked !
So my only issue remaining is that I can't really accurately map the light and the shape of the poly. Do you know if I can maybe make it that the flashlight is considered like a collision item ?
The light isn't matching the poly shape and size?
No it isn't. I think it's 2 different plugins. But I might be able to do something if I play with the image of the flashlight. I'll try and let you know how it goes !

Original thread: https://forums.rpgmakerweb.com/threads/stealth-game-concept-i-need-help-with-making-it-work.124589/