[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

UPDATED TO 2.4
http://downloads.chaos-project.com/heretic86/CollectionVer2.4.zip

I did test it thoroughly to make absolutely sure the new features work as expected, including with Stealth Switches and Stealth Gear!  They do work correctly!  So for anyone else reading this post wondering what is going on, Dynamic Lighting and Super Event Sensor have been enhanced so Players can hide in the Darkness with customizable ranges!  The scripts work as Standalone or Together.  Demo has been added to the Collection, and the rest of the scripts have some updates all over the place, mostly minor tho.
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

https://mega.nz/#!EBdjVQyQ!LqF3_A3EhhPd85i39T7MAJdTenepDegn_T_TjVBZLa0

Here is the updated demo, with the new 1.12 SES script. I also added a few commentary NPC for your convenience.

callmedan

January 27, 2019, 04:27:50 am #162 Last Edit: January 27, 2019, 08:10:44 am by callmedan
Thanks for your awesome scripts Heretic. They save me a lot of time.
Btw, I'm having some problems with the Restrict Passage scripts, I got no bug message but just some features work and the others won't work at all.

Heretic86

Quote from: Helios on January 27, 2019, 04:25:21 am
https://mega.nz/#!EBdjVQyQ!LqF3_A3EhhPd85i39T7MAJdTenepDegn_T_TjVBZLa0

Here is the updated demo, with the new 1.12 SES script. I also added a few commentary NPC for your convenience.


Ok, I took a look.

Since multiple issues were addressed, I'll tell you what I found:
Two guards at the bottom, that appears to work as designed.  Left guard is light sensitive, and has a Light Range of 6, so he can see the player on the highlighed spot.  The Right guard isnt light sensitive, so it only uses the normal Range, which is set to 4, so its out of range.  That appears to be correct.

The sound stuff, I may have to look deeper into this.  I think I popped the sight range in for sound range, possible bug.  Also, remember there are three settings to Stealth:  Sight, Sound, and Both.  Labels for those respectively are Invisible, Quiet, and Stealth, where Stealth is both Sight and Sound.  Putting on a Sight limiting potion would not affect distace player can be heard at.  The spot on the map where you indicated the guard should not be able to hear you, it does appear youre correct, again,  I think the sight range got plugged for sound, but I want to test this more thoroughly as it may need me to fix that.

---

Quote from: callmedan on January 27, 2019, 04:27:50 am
Thanks for your awesome scripts Heretic. They save me a lot of time.
Btw, I'm having some problems with the Restrict Passage scripts, I got no bug message but just some features work and the others won't work at all.


Can you be more specific?  There are some Tools I put in so you can check Passability of tiles for Events on the fly, and great for debugging.  If you run a script on an event from a spot that is giving you trouble, put in "Script: rtp_tile_info" which will tell you if that location is passable to that event, and on what Layer it conflicts.  Other than that, what other issues is it giving you?
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 January 27, 2019, 09:44:56 amTwo guards at the bottom, that appears to work as designed.


Yes, this appears to be a mistake on my part, sorry!  :haha:

callmedan

Quote from: Heretic86 on January 27, 2019, 09:44:56 am
Can you be more specific?  There are some Tools I put in so you can check Passability of tiles for Events on the fly, and great for debugging.  If you run a script on an event from a spot that is giving you trouble, put in "Script: rtp_tile_info" which will tell you if that location is passable to that event, and on what Layer it conflicts.  Other than that, what other issues is it giving you?


Tbh, I don't know how to be more specific, as I got no error message. I also checked the events with "rtp_tile_info" and no conflict was detected. It seems like it conflicts with my modified system.
Could you take a look please? I'll DM you a demo.

Heretic86

January 28, 2019, 08:02:34 am #166 Last Edit: January 28, 2019, 08:12:02 am by Heretic86
Quote from: Helios on January 27, 2019, 04:25:21 am
https://mega.nz/#!EBdjVQyQ!LqF3_A3EhhPd85i39T7MAJdTenepDegn_T_TjVBZLa0

Here is the updated demo, with the new 1.12 SES script. I also added a few commentary NPC for your convenience.


Ok, I dug a little deeper, and had to go back and reread my own documentation.

Guard on the right that can sense you on the sand.  Config gave him a range=4, but, also gave him a light_range=6.  Since the Player had a Lightsource, the light_range was used instead of range.

Center guard, the one that cant hear you if you are invisible.  This is the confusing part.  The Listen Range applies more to the PAGE than the Distance.  The Listen Range actually applies to how far they will "sense", which is not the distance.  Thus, it applies to both Sight and Sound.  Since Invis sets the distance for the Default state to 2, then 2 becomes the Distance.  The Listen Range is the SIGHT RANGE once the Guard had Heard but NOT SEEN you, thus, you have to be within the Invis Distance to get Sound to Trigger the guard to the LISTEN Page.  Really confusing I know, I had to go back and reread it myself.

You had it right tho.  Basically something like this

range=4
listen_range=5  (remember, that is now how far the guard can "see" you)
on_range=6
light_range=6 (overrides default state at night, not the Listen state, ONLY WHEN LIT)
dark_range=3(also overrides default at night, ONLY WHEN NOT LIT)

Suggest adding these:

invis_range=3 
quiet_range=2
stealth_range=1

Hopefully that makes more sense now.  I didnt set up different ranges for sight and sound, just different ways of triggering different states. 

For example, default state of 4, but youre right next to the guard, in range, and the View keeps him from seeing you.  If you dont move, he wont hear you.  If youre on the other side of a wall, thats when the Listen Range kicks in, and he has farther SIGHT.  Once the guard has SEEN you, then you can do other stuff like Ignore Walls, highest state of alert, and gonna come after you! 
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

So, in other words, listen_range must be equal or less than whatever view range is active right now?

So, if you are using invis_range, let's say invis_range=3, then any form of invisibility also automatically give guards listen_range=3 even if you are not "quiet", since the guard's listen_range can not be higher than active "range", right? :wacko:

This effectively means invisible=stealth since it also "give" you quiet, and it also means the guard can't hear you unless they can see you, which again, doesn't make a lot of sense. :facepalm:

And this still doesn't explain why the third guard on the right with listen_range=1 can hear you from 6 tiles away. As far as I understand, light_range is VIEW range, not listen range.

Heretic86

January 29, 2019, 06:59:30 am #168 Last Edit: January 29, 2019, 07:27:35 am by Heretic86
Guard on the right is using the light_range=6 which overrides range=4.  The listen_range is NEVER used in that case.  The way I set up the Light / Dark features were alternatives to the default range.  The listen_range is not used until a sensor has been triggered by sound but unable to make Line Of Sight (with the wall / listen_wall / on_wall options).  This is also because the Player in your demo has his Light turned on.  Turn it off with a script: $game_player.light.enabled = false (keep in mind command_355 bug), and then the player will not be in Light, which will reduce that senors effective range.  Think of it this way, on a ship in the dead of night with no moon, you can literally see a LIGHTER from 20 miles away.  Light makes you stand out in darkness like a sore thumb.

QuoteSo, in other words, listen_range must be equal or less than whatever view range is active right now?


Yes.  Listen Range is not intended for use as the highest state of awareness.  I could have called it level1 level2 level3 and that may have made more sense.  Listen Range would effectively be Level 2.

Think range=5 listen_range=6 on_range=7.  That means a guard cant "hear" you from 5 tiles away, it does mean that while in a listen state, the guard can see / hear you from 5 tiles away, but ONLY when that state is active.  Once they have "seen" you, then the ON state is used, so the sensor can see you from 6 tiles away.

Yes, each form of stealth reduces the guards ability to detect you.  the listen_range doesnt change as its a State, and is ONLY active if a guard has heard you but has been unable to see you.  The multiple states for stealth (invis, quiet, stealth) are incremental which encourages players to upgrade equipment as they progress thru your game.  Stealth gear has the same effect as consumable potions, but since the effect is permanent, it needs to be set to balance out gameplay, making it less difficult but not impossible to avoid detection.

Of course, sensors can be used even for conversations too.  Hopefully that clears up some confusion.
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

Hmm... yes, I think I understand now. So listen_range is not a separate/independent detection method, it is only used when you are in "range" but outside of "view".

I could roll with that, except maybe the invisible=stealth part... Sadly I'll have to ditch the invis_range etc. :roll:

Anyway, thanks for clearing that up! :haha:

EDIT: One thing though... what's the point of listen_range then, if every type of view range overrides it? Is it ever used? Because the guard seems to hear me from whatever view range is active at the moment, even if I'm out of view/behind walls etc.

Heretic86

Yes, it is used.  If a sensor is triggered by movement but unable to make line of sight, it can be used to create a move route to "investigate" the source of the sound with pathfinding, making the behavior of the event seem more realistic.  Such as make a sound here, while the guard investigates, then slip by to the door for example.  Even the Invis state should trigger the Listen Page if Line Of Sight cant be made.
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

Sorry to bother you again, but I just can't make "listen_range" work.

Let's say range=6, listen_range=4.

Can you make a simple demo where the guard use listen_range instead of (view) range to detect the player? In other words, when player approach the guard from behind, make the guard detect the player from 4 grids away, not 6.

Heretic86

The listen_range should be higher than range, and lower than on_range.  If you use the Lighting aspects, then also make sure that light_range is not higher than on_range also.  Listen_range can be tested by putting a Wall between your Sensor and the Player.  Remember, listen_range is a State, which means it can be its own Page.  Remember that also when testing as it throws people for a loop. 

Understanding that Range and Listen Range are NOT simultaneously active is a major key to understanding how Sensors work.
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 see...though this would be problematic in certain situations, like a sniper with very long vision, but shouldn't be able to hear that far. Guess the level design has to be changed.

BTW, this problem is still hanging there. I'm willing to wait, but... you know, it's been two years now... :^_^\':
https://forum.chaos-project.com/index.php/topic,13686.20.html

PS:
All I need to know is if this problem can be solved or not.
If yes, then I'll continue to use this type of in levels and wait for the fix.
If not, then I'll use alternatives or even remove them altogether. It's not optimal, but better than bugged guards.

polypeak

tried both versions 2.4 and 2.3, change ini files too, on playtest it goes not responding and RGSS player not responding and I force quit
tried multiple times same result

KK20

Another user reported having issues running the demo a few years back. You can try what Heretic suggested: https://forum.chaos-project.com/index.php/topic,13682.msg194076.html#msg194076

To help narrow down if it may be a script causing it, you can put
print 'This is the ____ script'

at the top of each script, replacing the line with the name of the script. You will get alert windows popping up in the order of the scripts list (i.e. from top to bottom). Clearly, whatever message was printed last is your problem script.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!


#Not Important

Where can I get
TransformBitmap.dll
?

EDIT: How could I remove the Day/Night system from the dynamic lights? My game already has one...

KK20

Don't double post.

The DLL comes with the demo in the first post. You just copy it over into your game's project folder.

As stated in the Dynamic Lights documentation:
# The game world only gets dark at night.  You can control the Flow of Time by
# turning Game Switch 74 (Default) to ON.  As time progresses, the Shadow that
# covers your screen will fade out until only Lights with Color are visible.
And when you scroll down far enough into the script, you reach the configuration section. You will see:
  # Game Switch to Enable Time
  Switch_Time = 74
To me, it sounds like all you have to do is make sure you leave Switch ID 74 as OFF. Or change the Switch_Time to some other number and ensure that Switch ID is OFF.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

The_Sa

Hi.
I just wanted to say thank you for all your efforts to give us such a great resource of scripts and more.

I have some trouble to make the demo work, as all the time i try to run it, the game screen just got black and the game just stop responding.

I try the KK20 code:
print 'This is the ____ script'

And i find that it was the "Memory Font Loader 1.1 - F0" that cause it.
i just put "__END__" at the beginning and is running fine now.

Hope it will let me play the entire game...

Thank you again, I am loving it.