Author Topic: [XP] Heretic's Collection of Art and 100% Compatible Scripts  (Read 41860 times)

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 775
  • LV: 33
    • View Profile
Re: [XP] Heretic's Collection of Art and 100% Compatible Scripts
« Reply #140 on: December 02, 2018, 07:20:47 AM »
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.)

Offline Helios

  • Trained Member
  • *
  • Posts: 39
  • LV: 1
    • View Profile
Re: [XP] Heretic's Collection of Art and 100% Compatible Scripts
« Reply #141 on: December 03, 2018, 05:56:00 PM »
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.
« Last Edit: December 03, 2018, 06:17:09 PM by Helios »

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 775
  • LV: 33
    • View Profile
Re: [XP] Heretic's Collection of Art and 100% Compatible Scripts
« Reply #142 on: December 04, 2018, 03:53:32 AM »
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.)

Offline Helios

  • Trained Member
  • *
  • Posts: 39
  • LV: 1
    • View Profile
Re: [XP] Heretic's Collection of Art and 100% Compatible Scripts
« Reply #143 on: December 04, 2018, 01:16:57 PM »
Basically, 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.

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:
« Last Edit: December 05, 2018, 04:32:06 AM by Helios »

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 775
  • LV: 33
    • View Profile
Re: [XP] Heretic's Collection of Art and 100% Compatible Scripts
« Reply #144 on: December 05, 2018, 05:08:29 PM »
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.)

Offline Helios

  • Trained Member
  • *
  • Posts: 39
  • LV: 1
    • View Profile
Re: [XP] Heretic's Collection of Art and 100% Compatible Scripts
« Reply #145 on: December 06, 2018, 03:00:27 AM »
That did it! That's exactly what I need!

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

Offline Helios

  • Trained Member
  • *
  • Posts: 39
  • LV: 1
    • View Profile
Re: [XP] Heretic's Collection of Art and 100% Compatible Scripts
« Reply #146 on: December 20, 2018, 06:52:28 PM »
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.
« Last Edit: December 20, 2018, 06:58:05 PM by Helios »

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 775
  • LV: 33
    • View Profile
Re: [XP] Heretic's Collection of Art and 100% Compatible Scripts
« Reply #147 on: December 21, 2018, 02:21:24 AM »
Ok, I'll 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.)

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 775
  • LV: 33
    • View Profile
Re: [XP] Heretic's Collection of Art and 100% Compatible Scripts
« Reply #148 on: December 23, 2018, 11:20:44 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.)

Offline Helios

  • Trained Member
  • *
  • Posts: 39
  • LV: 1
    • View Profile
Re: [XP] Heretic's Collection of Art and 100% Compatible Scripts
« Reply #149 on: December 24, 2018, 01:31:27 PM »
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.
« Last Edit: December 24, 2018, 01:32:38 PM by Helios »

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 775
  • LV: 33
    • View Profile
Re: [XP] Heretic's Collection of Art and 100% Compatible Scripts
« Reply #150 on: December 25, 2018, 02:53:03 AM »
Im getting an Error when trying to download....

Quote
Upload 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.)

Offline Helios

  • Trained Member
  • *
  • Posts: 39
  • LV: 1
    • View Profile

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 775
  • LV: 33
    • View Profile
Re: [XP] Heretic's Collection of Art and 100% Compatible Scripts
« Reply #152 on: December 25, 2018, 04:31:25 PM »
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.)

Offline Helios

  • Trained Member
  • *
  • Posts: 39
  • LV: 1
    • View Profile
Re: [XP] Heretic's Collection of Art and 100% Compatible Scripts
« Reply #153 on: December 31, 2018, 08:01:45 AM »
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.
« Last Edit: December 31, 2018, 08:33:52 AM by Helios »

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 775
  • LV: 33
    • View Profile
Re: [XP] Heretic's Collection of Art and 100% Compatible Scripts
« Reply #154 on: January 01, 2019, 11:18:44 AM »
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.)

Offline Jaiden

  • Awakened Visionist
  • **
  • Posts: 82
  • LV: 4
  • Gender: Female
  • Local Karen
    • View Profile
    • Legends of Astravia
Re: [XP] Heretic's Collection of Art and 100% Compatible Scripts
« Reply #155 on: January 23, 2019, 06:55:01 PM »
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.

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 775
  • LV: 33
    • View Profile
Re: [XP] Heretic's Collection of Art and 100% Compatible Scripts
« Reply #156 on: January 24, 2019, 03:27:51 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:
Code: [Select]
    # 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:
Code: [Select]
    # <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:
Code: [Select]
    # 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.
« Last Edit: January 24, 2019, 05:24:59 PM by 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.)

Offline Helios

  • Trained Member
  • *
  • Posts: 39
  • LV: 1
    • View Profile
Re: [XP] Heretic's Collection of Art and 100% Compatible Scripts
« Reply #157 on: January 26, 2019, 03:23:05 PM »
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.
« Last Edit: January 26, 2019, 03:49:01 PM by Helios »

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 775
  • LV: 33
    • View Profile
Re: [XP] Heretic's Collection of Art and 100% Compatible Scripts
« Reply #158 on: January 26, 2019, 06:44:39 PM »
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.)

Offline Helios

  • Trained Member
  • *
  • Posts: 39
  • LV: 1
    • View Profile
Re: [XP] Heretic's Collection of Art and 100% Compatible Scripts
« Reply #159 on: January 27, 2019, 04:36:23 AM »
Yes, like this. You can try editing the script in the demo above.

Final result should look like this:
Code: [Select]
    # 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  :)