[XP] Heretic's Collection of Art and 100% Compatible Scripts

Started by Heretic86, November 26, 2013, 09:22:35 am

Previous topic - Next topic

Heretic86

If version 1.1 of Super Event Sensor is working exactly as posted, I'll update the real version to reflect what is here.

And no worries, Ive made the same mistake before too, spend half an hour looking at code and just had a wrong setting.
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Helios

The script itself works, yes, but still have one problem.

Like I said before, the guard should be able to see you, whether lit or not, and being lit only makes you more visible. That's the way it should be.

In the new 1.1 version, if guard has light=true, then being in the dark will render you completely invisible to the guard, which is just absurd. But if a guard's setting does not include light=true, then the "lit makes you more visible" part does not work at all. As the guard's range remain the same regardless of lit or not, lights around the map become pure decoration instead of level design element. Not everyone is running around with a flashlight all the time, you know.

To sum it up, they should able to see you from far away when you are in light, and must still able to see you when you are close enough without light. The current version can only do one or the other. That's the problem.

Although I have to admit, this might be a bit too much to ask. I'm already pretty happy with the current version, so it's okay if you feel there is no need to improve it.

Heretic86

I think it would be pretty easy to allow for customization too.  What about something like "light_range"?  Thus, the dynamic lighting is no longer just for visuals and also allows for functionality.  Should be pretty simple to add also, its just one variable, and a minor adjustment to the get_range function.  Would that work?  Basically, what Im thinking is if the Player / Target is being illuminated, then that range is used instead of the default range.

I also understand what you mean, that not all enemies carry a flashlight.  Non human enemies definitely wouldnt, and the player should still be detectable.  I didnt make that many changes to the code, just added the three new variables, added one new method called "def target_lit?" and slight modification to "def can_see?"  Perhaps it would work better for you if you take a look at the code where I made the changes? 

I'd like to see what you change to make it suit everyones needs...
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Helios

Quote from: Heretic86 on December 03, 2018, 08:53:32 pmBasically, what Im thinking is if the Player / Target is being illuminated, then that range is used instead of the default range.

What about something like "light_range"?


That's EXACTLY what I suggested in the first place.

Quote from: Helios on November 13, 2018, 08:04:45 pm
What I envisioned is something like a third "layer" of range for SES, like the listen range which is different fron view range. The "lit range" would be longer than the view range, but only active if "in light".


If only I know how to code...

Anyway, I think I've been bothering you for too long about this, like I said I'm already pretty happy with the last update, so I'll stop here.

Thanks again for helping me out, Heretic86!  :up:

Heretic86

Ok, Super Event Sensor Version 1.11 in Testing:

http://downloads.chaos-project.com/heretic86/SuperEventSensorVersion1.11LightDetection.txt

I added TWO features, per your request, and with some forward thinking:
light_range=5
dark_range=3

You can use both the features together.  Just put those in your Sensor_Config.  The light/dark_range will ONLY kick in AT NIGHT or INDOORS when Lighting Effects are on.  I havent fully tested this as much as I prefer to do, but it appears stable and functional.

Here is how it works:

When at night, your Sensor will use Light Range instead of the Default Range, when the Target (typically Player) is Illuminated.  Thats a HINT to turn off your torches since it makes you show up to the Sensors.  Now, for Non Humanoid Sensors like Animals, thats when Dark Range is most useful.  Dark Range is intended to DECREASE but NOT FULLY ELIMINATE Light Detection features.  Thus, your Dark Range should be LESS than your normal range.  If you use "range=5", then turn it town by 1 or 2 for Dark Range, "dark_range=3".  The sensor can still "see" but is not blind.

NOTE:  If you make a Sensor Light Sensitive with "light=true" in the Sensor_Config, it WILL BE BLIND when the Target is shrouded in shadow without the Light / Dark Features.  I did not offer any means for changing VIEW with the new Light Integration features.

@Helios - does this suit your needs?  Please let me know if there are glitches or bugs you come across.
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Helios

That did it! That's exactly what I need!

Thanks a ton, Heretic86! :cclove: :cclove: :cclove:

Helios

Found a minor bug:

The @light.hue command only works when the event is facing down.

When the event is triggered from up/left/right, the light won't change hue.

Heretic86

Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Heretic86

Quote from: Helios on December 20, 2018, 11:52:28 am
Found a minor bug:

The @light.hue command only works when the event is facing down.

When the event is triggered from up/left/right, the light won't change hue.


Im unable to recreate the bug in the Collection.  It seems to work fine when I tested it.  Probably something minor.  Can you upload a Demo so I can take a look?
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Helios

Sure, here:

https://www.mediafire.com/file/1lg580qzt14s4oc/Project_Demo_2.zip/file

I also tested this event in your Collection. The @light.hue -= 20 script only work once when the event is turning. Make sure to test the event multiple times from the same direction.

Heretic86

Im getting an Error when trying to download....

QuoteUpload still in progress...
Download not available yet because the upload for this file is still in progress.
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)


Heretic86

Quote from: Helios on December 25, 2018, 06:14:10 am
Oops...Try this one.

https://mega.nz/#!5EV3SQob!G4MCS5M3JK4PkcuvyyZK158v1eL-h193VsuCcaj4qXQ


That one works.

Ok, updated Heretic's Dynamic Lights to Version 1.02 containing your bugfix, and a previously unreleased version which just fixed an issue with alignment during Screen Shake.

http://downloads.chaos-project.com/heretic86/HereticsDynamicLights1.02.txt

Thanks for pointing out the bug!

---

I will release a new version of the Collection when I get some time to put together a brief demo explaining the requested new features of integrating Super Event Sensor v1.11 and Dynamic Lights.  It will be a minor update since I havent written anything new for the Collection.  There is some junk in there I need to clean up before I do that from me playing around.  Script updates are available now in Text in this thread.
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Helios

No problem.

Unfortunately there are still some other bugs, this time with invisibility and light.

Here's the demo.

https://mega.nz/#!ZQsUlCjT!LUSyC1KLnGIvDgEyT6YECq1YLkv6ukxViv9fKEUYrWA

First, talk to the cat to turn on the invisibility switch.

BUG #1:
Move down to the single plank tile. Both guards have been given invis_range=1, which shouldn't detect you at this range.
However the guard on the left have light=true and light_range=6, which seem to override invisibility and still see you.

BUG #2:
Move left and right on the plank path near the tree trunk. You are "invisible" but not "quiet", so both guards with listen_range=5 should be able to hear you.
However the guard on the middle with invis_range=2 can't hear you when you are invisible, only hearing you when you are right next to the trunk, which indicates he's using invis_range for listen_range.
And the guard on the right with light_range=6, have listen_range=1, shouldn't hear you at all, but still hear you from far away, indicating he might be using light_range for listen_range.

Heretic86

I will take a look when I get a bit of free time.  Might be in a few days.
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Jaiden

Hey Heretic, someone else saw this error in battle when using MMW:


I don't know if you want to update MMW with the fix I posted earlier in the thread, but I figured I'd give you a heads up.

Heretic86

January 23, 2019, 08:27:51 pm #156 Last Edit: January 24, 2019, 10:24:59 am by Heretic86
Quote from: Jaiden on January 23, 2019, 11:55:01 am
Hey Heretic, someone else saw this error in battle when using MMW:


I don't know if you want to update MMW with the fix I posted earlier in the thread, but I figured I'd give you a heads up.


I will take a look at it when I get some time.  As far as your errors, that almost looks like a Script Order?

Edit:

Done.  Added the Bugfix Jaiden mentioned into MMW.  I havent posted it yet tho so just roll with his for now.  Not much else has changed.

Light and Stealth

Found the error.  When I added the Light features in, there were two lines that werent supposed to be separated due to the use of Capture Groups.  Those got split up so Stealth Features were not turning on.

Go to Line 1461 where it says this:
    # If Sensor responds to the Stealth Game Switches
    cfg.gsub(/stealth=(true|false)/i){$1}


Cut / Move those to close to about Line 1516, or JUST ABOVE where it says:
    # <stealth> - Default to CONFIG els use the Value in stealth=true/false
    @stealth=($1.nil?)?SENSOR_STEALTH : ($1.to_s.downcase=="true")? true:false


Final result should look like this:
    # If Sensor responds to the Stealth Game Switches
    cfg.gsub(/stealth=(true|false)/i){$1}
    # <stealth> - Default to CONFIG else use the Value in stealth=true/false
    @stealth=($1.nil?)?SENSOR_STEALTH : ($1.to_s.downcase=="true")? true:false


Updated code will contain the fix on the next version.  Sorry it took so long for the fix.  I also did some work putting together a brief demo in the Collection which will contain the updated scripts.  There is some junk work I need to get rid of before releasing, but it should be out in a few days.  The new Demo for combining Dynamic Lights and Super Event Sensor will be on the Dynamic Lights Map to the North in a new room in the Lighthouse.
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Helios

I edited the script as you instructed, the line number doesn't match so I just searched the whole line and moved them. The bugs are still there.

Heretic86

New Collection almost ready for release.

Is the line that says gsub(/stealth just above the next non comment line that says @stealth=($1.nil?
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Helios

Yes, like this. You can try editing the script in the demo above.

Quote from: Heretic86 on January 23, 2019, 08:27:51 pm
Final result should look like this:
    # If Sensor responds to the Stealth Game Switches
    cfg.gsub(/stealth=(true|false)/i){$1}
    # <stealth> - Default to CONFIG else use the Value in stealth=true/false
    @stealth=($1.nil?)?SENSOR_STEALTH : ($1.to_s.downcase=="true")? true:false



I'll just wait for the new Collection and grab the updated script, then see how it goes  :)