RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[XP] Super Event Sensor (Event NPC Advanced AI)

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 70
RMRK Junior
Super Event Sensor - Event NPC AI [XP]
Authors: Heretic
Version: 1.0
Type: Event NPC AI
Key Term: Misc Add-on

Introduction

This Script is highly useful as an Artifical Intelligence by allowing you to create different "behaviors" through Event Pages.  When a Sensor is "Triggered", Self Switches change automatically!  Since a Sensor can detect a Target both through "Sight" and "Sound", TWO Self Switches can be specified.  Due to using up half of your Self Switches, it is HIGHLY RECOMMENDED that you also grab More Self-Switches by Game_Guy / gameus as it allows for More Page Conditions

Features

  • Total Overkill of Options (yeah, I think that is kind of a feature)
  • Highly Useful for Enemy AI
  • Line of Sight to Target
  • Different Types of Views (think Metal Gear)
  • Obstruction of Line of Sight - WALL
  • Can "See" Over Specified Tiles like Water for "Smarter Enemies"
  • Triggered Settings can be Different than Non Triggered Settings
  • Sensors can be set to Ignore Walls once triggered
  • Uses Terrain Tags to Fix Problem Tiles like Water or Fences
  • Should be compatible with Terrain Tag Scripts
  • Can use Bush Tags to obstruct the View of Small Enemies
  • Allows Terrain Tags to specify Trees that obstruct Flying Enemies View
  • Sound - Movement makes Sound, and Movement can be Detected
  • Sound Detection doesnt need additional scripts, just DONT MOVE!
  • Compatible with Pathfinding Scripts
  • Supports Suprise Attack Supported Battle Systems - XRXS Rewrite 1.03
  • Suprise Attack Script Calls can prevent Event from turning toward Player
  • Can Target ANY Game_Character, not just Player
  • Move Route Index Reset on Detrigger - Trust me, you want this.
  • Every Event can have Different Settings
  • The Constants in Config are used for Defaults, you can change Per Event
  • Expandable "View" Definitions by Easy Aliasing
  • Added Triggers for Enemy Contact with Heretic's Caterpillar
  • Stores XY Coordinates of First Seen and First Heard for other uses.
  • Stores XY Coordinates of Location of Sensor Event for returning to path
  • Stealth abilities enabled by Game Switches (not Self Switches)
  • Stealth Switches can also alter View and Range
  • Documentation - Intended for better understanding of specific parts
  • Demo - Extremely complex script is given Demos for each feature

Screenshots

Spoiler for:

Image Borrowed from Little Drago's Simple Event Sensor
Concept is exactly the same with way way more features!


Demo

This Demo contains MANY different Scripts.  A high number of the Scripts contained in this Collection Demo are designed to enhance Super Event Sensor!  However, you should know that this Script can work just fine as a Standalone Script and is NOT DEPENDANT on any other Scripts!

http://downloads.chaos-project.com/heretic86/CollectionOfArtAndScripts.exe

Script

http://www.775.net/~heretic/downloads/rmxp/SuperEventSensor.txt

Instructions

Put above Main and below Scene_Debug (and SDK if installed)

Create a Sensor by putting a COMMENT on Page 1 of an Event.  It does NOT have to be at the Top of the Page, but needs to be fairly close.  Also optional in the Scrit Configuration of how many lines to read while looking for Sensor_Configs

In the Comment, put the following:

Sensor_Config
range=4
listen=4
listen_switch=C

* The Keyword "Sensor_Config" needs to be on its OWN LINE.  Do NOT put any Config Options on the same line as the Keyword of Sensor_Config!

Sensor_Config range=4 WILL NOT WORK!!!

* Do NOT use Spaces between your Option Name and Option Value

range = 4 WILL NOT WORK!!!
range=4 WILL WORK because there are No Spaces!!!

**  See Documentation and Demo for explanation of the list of Sensor Config Options.  There are a LOT of them!

**  There are so many Options, that you can easily fill up an entire COMMENT BOX.  Due to this, you can have MORE THAN ONE Sensor_Config!  Each Sensor_Config needs to have Sensor_Config as the FIRST LINE.


Compatibility

Not compatible with SIMPLE Event Sensor due to the nature of the Script.

Should be compatible with everything else, including both major Pathfinder Scripts and the SDK.

NOTE:  The only supported Battle System at this time for the "Suprise Attack" feature is Heretic's Overhaul of the XRXS Battle System - Version 1.03 and above (included in that massive Demo).

Credits and Thanks

  • Little Drago for the Original Concept
  • Blizzard for modifying his Lagless Pathfinder to expand the functionality of this Script

Author's Notes

This script is designed to Change Pages, which is where the Events Behaviors are created.  Really, it is only about HALF of a true NPC AI as the other half would allow for movements toward the Sensor's Target.

I have no intention of making this Script work with VX or VX Ace.

Sensors can only detect ONE TARGET at this time.  I will probably change this later so expect Updates!

Creating any form of Artifical Intelligence is not easy, considering the semi-limited functionality of the nature of RMXP.  Because this script is so complex, expect to be confused by a good number of the Options!

Please ASK if you have any difficulty in getting your Sensors to work exactly as you expect them to, but do expect that they can behave exactly the way you want them to!
« Last Edit: November 28, 2013, 09:14:58 AM by Heretic86 »
Heretic's Vehicles XP (Boat and Magic Carpet)

Heretic's Collection XP Ver 2.3 - Updated to include Dynamic Lighting, Moving Platforms, Vehicles, and much much more!