Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

8 Pages V   1 2 3 > »   
Reply to this topicStart new topic
> ~[Stealth Detection System v1.1]~, Multi-style stealth system (v1.1 since June 17 2008)
cmpsr2000
post Jun 11 2008, 11:16 PM
Post #1


Keeper of the Ruby Code of DOOM!
Group Icon

Group: Revolutionary
Posts: 355
Type: Scripter
RM Skill: Masterful




Stealth Detection System (SDS)

Version: 1.1
Author: Cmpsr2000
Release Date: June 17 2008

Introduction
SDS allows the developer to build games that include "Stealth" features similar to certain Final Fantasy games or even Metal Gear Solid.


Features
  • Make any event "aware" of its surroundings, effectively turning it into a "guard"
  • Execute 4 different actions on detection:
    • Mode 0: Send to Jail (transfer player)
    • Mode 1: Game Over
    • Mode 2: Common Event
    • Mode 3: MGS Mode
  • Create a "jail" event anywhere on the map!
  • MGS Mode allows guards to be alerted before trying to capture the player
  • Guard intercept speed in MGS mode can be customized
  • Final capture action in MGS mode can be customized
  • Guard search time in MGS mode can be customized
  • Guards can have custom sight ranges
  • Guards can have tunnel vision or a "cone" field of view
  • Tunnel width for tunnel vision can be customized
  • Guards' sight is blocked by objects by default, but this can be disabled by granting "truesight"
  • Mode 2 can execute any custom event you specify
  • Guards have a circle of awareness around themselves that can be disabled if desired


Script
Redefinitions
Game_Stealth
Also, put this sound in your ../Sound/SE folder: Attached File  found.wav ( 83.52K ) Number of downloads: 1837



Customization

How to configure an event:
CODE

#-------------------------------------------------------------------------------
#
# SDS is an advanced stealth detection system for use in RPG Maker VX games.
# To use the system, you need to build an event that begins with a script call:
#
# $game_stealth.detector(eventID, detectRange, detectAction,
# tunnelVision, trueSight)
#
# eventID: The ID of the event. Use @event_id as it's the easiest way
# detectRange: How far the "guard" is able to see. Higher numbers require
# more CPU time to proccess! Lag increases exponentially if
# you are NOT using tunnel vision.
# detectAction: The action to perform when the guard detects the player
# DEFAULT = 1
# 0: Goto jail event
# 1: Game Over
# 2: Execute common event
# 3: MGS Mode
# tunnelVision: determines whether the guard's field of view cones out or
# goes in a straight line.
# DEFAULT = false
# trueSight: determines whether the guard can see through obstacles
# DEFAULT = false
#
# NOTE: You do NOT have to set parameters that have a default.
#
# MGS MODE EXPLAINATION:
#
# When using detectAction 3 (MGS Mode) guards will be "alerted" if
# they spot the player. The guard will run to the position they spotted
# the player at, then begin to look around for the player again. If the
# guard sees the player a second time, the captureAction is performed.
#
#-------------------------------------------------------------------------------

Game_Stealth options:

Tunnel width option:
CODE

#---------------------------------------------------------------------------
# If you use tunnel vision, set the tunnel width here. It MUST be an ODD
# number or the game will round up to the next odd number! Widths over 3
# are not recomended.
#---------------------------------------------------------------------------
@tunnelWidth = 3

To specify the common event for Mode 2:
CODE

#---------------------------------------------------------------------------
# The common event ID to execute when using the common event detect action
#---------------------------------------------------------------------------
@common_event_id = 1

To specify the speed of an intercepting MGS guard:
CODE

#---------------------------------------------------------------------------
# The speed and frequency the guards move when they detect the player in
# MGS mode.
# speed: 1: x8 slower,
# 2: x4 slower
# 3: x2 slower
# 4: normal
# 5: x2 faster
# 6: x4 faster
#
# frequency: 1: lowest
# 2: lower
# 3: normal
# 4: higher
# 5: highest
#---------------------------------------------------------------------------
@guardInterceptSpeed = 4
@guardInterceptFrequency = 5

To set the MGS Mode capture action:
CODE

#---------------------------------------------------------------------------
# When in MGS mode, the action to be performed if the guard detects the
# player a second time. This is set by default to game_over since all other
# options require some configuration. Valid values are:
# captureAction: 0: Goto jail event
# 1: Game Over
# 2: Execute common event
#---------------------------------------------------------------------------
@captureAction = 1

To set the search time for an alerted guard in MGS mode:
CODE

#---------------------------------------------------------------------------
# How many frames a guard will wait before executing each turn when
# searching for the player after detecting them in MGS mode.
#---------------------------------------------------------------------------
@waitTime = 60

To disable "awareness" bubble around guards:
CODE

#---------------------------------------------------------------------------
# Change this to false to disable the detection radius around guards.
# This means the player can safely stand next to a guard as long as he's
# not in the guard's line of sight.
#---------------------------------------------------------------------------
@allowDetectRadius= true


Compatibility
Requires RGSS2. Redefines Scene_Title, Scene_Map and Game_Event


Screenshot
Guard field of view explanations:

Normal Cone Vision:

An obstacle in the way hides the area behind the object:

Tunnel Vision with an obstacle:

Tunnel Vision and True Sight:


DEMO
Right Here!


Installation
Copy the script files into your game under the materials section.


Todo List:
  1. Check pathfinding logic more thouroughly
  2. Add ability to stop checking FoV when all tiles in a row are blocked
  3. Add ability for fighting MGS events
  4. Add option for more realistic FoV obstacles (blocking cones should extend out at the angle of incidence)
  5. Fix mgs goto bug where guard stops in front of player if the player doesn't move


FAQ
None yet!


Terms and Conditions
Feel free to use this in your game, but please give me a shout in the credits! Also, feel free to edit this for your own personal purposes but please do not repost an edited version without my consent first.

Thanks ^^/

Attached File(s)
Attached File  Redefinitions.txt ( 11.92K ) Number of downloads: 1124
Attached File  SDS.zip ( 316.61K ) Number of downloads: 4162
Attached File  Game_Stealth.txt ( 17.68K ) Number of downloads: 1232
 


__________________________
Go to the top of the page
 
+Quote Post
   
Netto
post Jun 11 2008, 11:38 PM
Post #2


芸術家
Group Icon

Group: Revolutionary
Posts: 708
Type: None
RM Skill: Skilled




QUOTE (cmpsr2000 @ Jun 11 2008, 11:30 PM) *
Hey guys, it's 1:30am and I'm really tired, so I'm just going to post the demo and the script and goto bed, then come back tomorrow morning and add the screen shots and detailed instructions and all that jazz.

This script was extremely easy to write until I decided to implement an MGS stealth option @.@ There is no pathfinding in RGSS so I had to program my own routine to handle it. I'm 90% certain that it is finding the shortest route, but I still need to do a few more tests to verify. Anyway there is one known bug: when a guard in MGS mode heads to your location, if you stand still and don't move out of the way he will just sit there next to you, trying to get onto the space you are occupying. Other than that I think it should mostly work.

Please enjoy, full details tomorrow. thumbsup.gif

Cool, I'll test it out tomorrow...too sleepy to do anything.
Also I'll need you to explain a bit more about the script because I'm confused.

This post has been edited by Netto: Jun 11 2008, 11:39 PM


__________________________
Current Project[RC]: Twilight Realm 3DMMORPG w/dx9, and char creation through mysql after I get a server, now C++ scripting
Current Project[VX]: Obsidian Trilogy just started 08/12/2008
Current Project[XP&RM2K3]: none
Go to the top of the page
 
+Quote Post
   
ultima
post Jun 11 2008, 11:45 PM
Post #3



Group Icon

Group: Banned
Posts: 1
Type: None
RM Skill: Undisclosed




[i]Retarded post edited by puppet smile.gif[i]
Reason for edit: Bad post


__________________________
Lyrics By: Anonymous

HEROES COME BACK!
OH YEAH
THIS IS THE END OF
R-R-R!!!
FTP PASSWORD WAS GOT
HE'S READY TO DELETE ALL CONTENT
OH SO YEAH!!!
HEROES BECAME DEMONS!!!
ANY ACCOUNT HERE
CAN HACK BY THE "FTP MASTER"
ALSO KNOWN AS NIGHTMARE ZERO!!!
3-2-1 MAKE SOME LOUD!!!
Go to the top of the page
 
+Quote Post
   
YanXie
post Jun 12 2008, 12:14 AM
Post #4


Because Tomorrow Will Surely Come...
Group Icon

Group: Revolutionary
Posts: 1,137
Type: None
RM Skill: Skilled




Falcon is a big fail.

Shot down again.


__________________________
how make teleport to graveyard then your character die?

AWAY FOR VACATION.
NOT HERE UNTIL JAN/FEB 2010 -w-/
Go to the top of the page
 
+Quote Post
   
woratana
post Jun 12 2008, 12:26 AM
Post #5


Looking for scripter to hire? PM me *O*
Group Icon

Group: +Gold Member
Posts: 1,038
Type: Scripter
RM Skill: Undisclosed




Nice, puppeto smile.gif

@cmpsr
Good script biggrin.gif
I have tried the demo~

Nicely done~^^


__________________________
Check out my NEW blog!!!



MVP (Most Valuable Poster) Award 2008


Go to the top of the page
 
+Quote Post
   
Hanmac
post Jun 12 2008, 12:28 AM
Post #6


Level 8
Group Icon

Group: Revolutionary
Posts: 121
Type: Scripter
RM Skill: Skilled




its nice... very nice, but i have ideas for the alert system
Go to the top of the page
 
+Quote Post
   
gend0
post Jun 12 2008, 04:15 AM
Post #7


Level 1
Group Icon

Group: Member
Posts: 14
Type: Artist
RM Skill: Skilled




Wow, very interesting. wub.gif


__________________________
Go to the top of the page
 
+Quote Post
   
cmpsr2000
post Jun 12 2008, 09:22 AM
Post #8


Keeper of the Ruby Code of DOOM!
Group Icon

Group: Revolutionary
Posts: 355
Type: Scripter
RM Skill: Masterful




Thanks for the support guys ^^

Why does that falcon guy always go after my threads ;.;

I guess I need to make good on my promise and update the main post. Screen shots and instructions on the way! biggrin.gif


__________________________
Go to the top of the page
 
+Quote Post
   
Neo22
post Jun 12 2008, 01:29 PM
Post #9


Level 4
Group Icon

Group: Member
Posts: 59
Type: Event Designer
RM Skill: Skilled




very nice, I like this script. I just have one question. if you get caught, you can add dialouge to it, then have a game over? or is it just a mini-game?

This post has been edited by Neo22: Jun 12 2008, 01:29 PM


__________________________

Go to the top of the page
 
+Quote Post
   
Mr_E_Man
post Jun 12 2008, 01:52 PM
Post #10


Level 8
Group Icon

Group: Revolutionary
Posts: 124
Type: Event Designer
RM Skill: Skilled




You should be flattered you're worth harrassing wink.gif

This is an excellent script. It was a nightmare calculating line of sight with events. I look forward to the upgrades.


__________________________
We exist within all things and all things exist within us... it's very crowded.
Go to the top of the page
 
+Quote Post
   
bob_saget
post Jun 12 2008, 02:16 PM
Post #11


Level 5
Group Icon

Group: Member
Posts: 64
Type: Event Designer
RM Skill: Advanced




Will you marry me!? This is exactly what I needed for my Metal Gear Solid mini-project!


__________________________
Go to the top of the page
 
+Quote Post
   
Calintz16438
post Jun 12 2008, 02:23 PM
Post #12


Level 5
Group Icon

Group: Member
Posts: 74
Type: Artist
RM Skill: Skilled




This system looks pretty amazing, I'm not gonna lie.
Go to the top of the page
 
+Quote Post
   
Ganon
post Jun 12 2008, 02:31 PM
Post #13


Level 11
Group Icon

Group: Revolutionary
Posts: 187
Type: Mapper
RM Skill: Skilled




Great! found a bug though. When you get caught it proscesses events twice.
Like trasfers and tranfers again.


__________________________
[Show/Hide] random stuff

[Show/Hide] Get This?
Cna yuo raed tihs? Olny 55% of plepoe can.
I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt!
fi yuo cna raed tihs, palce it in yuor siantugre.

The following sentence is true. The previous sentence is false. This sentence is a lie.
QUOTE
Welcome to the Internet - where the men are men , the women are men and the children are the FBI


^New game dev team working on an action RPG.
Go to the top of the page
 
+Quote Post
   
cmpsr2000
post Jun 12 2008, 02:34 PM
Post #14


Keeper of the Ruby Code of DOOM!
Group Icon

Group: Revolutionary
Posts: 355
Type: Scripter
RM Skill: Masterful




QUOTE (Neo22 @ Jun 12 2008, 03:43 PM) *
very nice, I like this script. I just have one question. if you get caught, you can add dialouge to it, then have a game over? or is it just a mini-game?

Yes, you can do this with Mode 2 or Mode 3. You'll need to build a common event for the message and game over.

QUOTE (Mr_E_Man @ Jun 12 2008, 04:06 PM) *
You should be flattered you're worth harrassing wink.gif

This is an excellent script. It was a nightmare calculating line of sight with events. I look forward to the upgrades.

Thanks ^^ Calculating LoS in an event would be murder on the game engine's performance as well.

QUOTE (bob_saget @ Jun 12 2008, 04:30 PM) *
Will you marry me!? This is exactly what I needed for my Metal Gear Solid mini-project!

Only if you're a girl biggrin.gif

QUOTE (Calintz16438 @ Jun 12 2008, 04:37 PM) *
This system looks pretty amazing, I'm not gonna lie.

Thanks ^^ I hope it just keeps getting better!

QUOTE (bowser @ Jun 12 2008, 04:45 PM) *
Great! found a bug though. When you get caught it proscesses events twice.
Like trasfers and tranfers again.

Yeah for some reason that started when I turned on the true sight for those events. I need to track that one down. Thanks for reminding me!


__________________________
Go to the top of the page
 
+Quote Post
   
SojaBird
post Jun 12 2008, 03:52 PM
Post #15


Level 51
Group Icon

Group: Revolutionary
Posts: 1,573
Type: Scripter
RM Skill: Advanced




this is realy hot!!

i like the demo and the sound effect, shocked my some time biggrin.gif cool!! haha
realy nice.


__________________________
Art from the highest shelf?

Scriptology, scripting podcast



HUD's Request Lobby (multiple hud-scripts)


------------------------------------------------------------------

Random Stuff
OMG, it's Hab!!


This is a crazy drawing application! (by me)

How did I learned to script
QUOTE
Hey pim! I'm the Law G14!

For the past couple of months I've been learning RGSS and I've got the basic stuff down such windows, variables, conditional statements, ect. But, I can't see myself making big scripts such as a jumping system or a side view battle system. I was wondering how you learned to script because I really want to know how to script really well.

Thanks in advance.


Hey there,

Well I don't make battle neither though I can still teach you some things :)...
The way I've learned to script is by reading other scripts for the most part.
I've allways been interested in other peoples work but this time I though I had to try to make something myself...and it worked!!
The most importand thing when you go scripting is (at least in my case) that you want to make something to help an other wich can't script.
You also need to feel the competition that's around in the scripting-community.
Cause, I have to say, if you get pushed to get a sertain request done before an other scripter does, you feel POWERFULL!! :P
So that's an other thing...
You also don't need to be afraid to learn from others or helpfiles.
When I write my scripts, I actualy always have the helpfiles open to look things up I don't know or remember.
Then, you must be calm, cause you need to try the script a lot of times.
When I write a script, I test it after almost every changes.
First I set up the major structure.
Like when I make a window-script or part of a script I start with something like this:
CODE
class Window_Name < Window_Base
def initialize(x,y,width,height)
super(x,y,width,height)
refresh
end

def refresh
self.contents.clear
draw_contents
end

def draw_contents
draw_something(with, some, parameters)
end

def update
refresh if @something != @what_it_should_be
end
end
So that's also very important.
Then, the biggest thing I learned scripting from is TRIAL AND ERROR.
That's the most irritating way to learn something, cause it's more ERROR than TRIAL, but it does the trick realy good.

So that's it how I did it.
Now it's up to you.
Do some requests (if I didn't do it allready :P) and learn from them.

Hope that helped you out a little.
If not, keep your eye on the Scriptology-topic (see my sig) where I'll be updating for my scripting(video)tutorials.
Perhaps they're going to be usefull for you one day ;)


Greatzz,
SojaBird.
Go to the top of the page
 
+Quote Post
   
Ganon
post Jun 12 2008, 04:06 PM
Post #16


Level 11
Group Icon

Group: Revolutionary
Posts: 187
Type: Mapper
RM Skill: Skilled




QUOTE (cmpsr2000 @ Jun 12 2008, 05:48 PM) *
QUOTE (Neo22 @ Jun 12 2008, 03:43 PM) *
very nice, I like this script. I just have one question. if you get caught, you can add dialouge to it, then have a game over? or is it just a mini-game?

Yes, you can do this with Mode 2 or Mode 3. You'll need to build a common event for the message and game over.

QUOTE (Mr_E_Man @ Jun 12 2008, 04:06 PM) *
You should be flattered you're worth harrassing wink.gif

This is an excellent script. It was a nightmare calculating line of sight with events. I look forward to the upgrades.

Thanks ^^ Calculating LoS in an event would be murder on the game engine's performance as well.

QUOTE (bob_saget @ Jun 12 2008, 04:30 PM) *
Will you marry me!? This is exactly what I needed for my Metal Gear Solid mini-project!

Only if you're a girl biggrin.gif

QUOTE (Calintz16438 @ Jun 12 2008, 04:37 PM) *
This system looks pretty amazing, I'm not gonna lie.

Thanks ^^ I hope it just keeps getting better!

QUOTE (bowser @ Jun 12 2008, 04:45 PM) *
Great! found a bug though. When you get caught it proscesses events twice.
Like trasfers and tranfers again.

Yeah for some reason that started when I turned on the true sight for those events. I need to track that one down. Thanks for reminding me!

Im talking about ones w/o true sight... mgs mode...
it triggers the commone event or w/e and then before you move it does again.


__________________________
[Show/Hide] random stuff

[Show/Hide] Get This?
Cna yuo raed tihs? Olny 55% of plepoe can.
I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt!
fi yuo cna raed tihs, palce it in yuor siantugre.

The following sentence is true. The previous sentence is false. This sentence is a lie.
QUOTE
Welcome to the Internet - where the men are men , the women are men and the children are the FBI


^New game dev team working on an action RPG.
Go to the top of the page
 
+Quote Post
   
cmpsr2000
post Jun 12 2008, 07:28 PM
Post #17


Keeper of the Ruby Code of DOOM!
Group Icon

Group: Revolutionary
Posts: 355
Type: Scripter
RM Skill: Masterful




QUOTE (bowser @ Jun 12 2008, 06:20 PM) *
Im talking about ones w/o true sight... mgs mode...
it triggers the commone event or w/e and then before you move it does again.


Ok I know what's going on there, I'll fix that for the next update.



__________________________
Go to the top of the page
 
+Quote Post
   
The Wizard 007
post Jun 13 2008, 12:01 AM
Post #18


Jack of all trades
Group Icon

Group: Revolutionary
Posts: 118
Type: Developer
RM Skill: Skilled




Excellent work cmpsr2000, your scripting continues to amaze me. What a very useful script.


__________________________
Currently working on:

Underground Syndicate (mafioso/modern type RPG)
Mind Maze (old school dungeon crawler with a different feel)
Dragon Adventure (Dragon Quest type fangame with more customization)
Dark Grind (Survival horror RPG)
Go to the top of the page
 
+Quote Post
   
Ganon
post Jun 13 2008, 03:20 AM
Post #19


Level 11
Group Icon

Group: Revolutionary
Posts: 187
Type: Mapper
RM Skill: Skilled




Ok good, Ive wanted sneak stages for a while. banana.gif


__________________________
[Show/Hide] random stuff

[Show/Hide] Get This?
Cna yuo raed tihs? Olny 55% of plepoe can.
I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt!
fi yuo cna raed tihs, palce it in yuor siantugre.

The following sentence is true. The previous sentence is false. This sentence is a lie.
QUOTE
Welcome to the Internet - where the men are men , the women are men and the children are the FBI


^New game dev team working on an action RPG.
Go to the top of the page
 
+Quote Post
   
cmpsr2000
post Jun 13 2008, 11:48 PM
Post #20


Keeper of the Ruby Code of DOOM!
Group Icon

Group: Revolutionary
Posts: 355
Type: Scripter
RM Skill: Masterful




QUOTE (pim321 @ Jun 12 2008, 06:06 PM) *
this is realy hot!!

i like the demo and the sound effect, shocked my some time biggrin.gif cool!! haha
realy nice.

QUOTE (The Wizard 007 @ Jun 13 2008, 02:15 AM) *
Excellent work cmpsr2000, your scripting continues to amaze me. What a very useful script.

QUOTE (bowser @ Jun 13 2008, 05:34 AM) *
Ok good, Ive wanted sneak stages for a while. banana.gif


Thanks for the kind words, guys. b^^b

Important edit: There was a problem with the demo file that From_Ariel pointed out to me: The player was configured to start on map 3 instead of map one. I updated the demo. You don't have to re-download the update, just open the project file and change the start position to somewhere on the left grey dragon on map001.


__________________________
Go to the top of the page
 
+Quote Post
   

8 Pages V   1 2 3 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th May 2013 - 05:20 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker