[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

Heretic's Collection  of Art and 100% Compatible Scripts
Authors: Heretic, Blizzard, ForeverZer0, KK20, LiTTleDRAgo, Wecoc, Ryex, Zeriab, Wachunga, Leon, game_guy, Kellessdee, ThallionDarkshine, Naramura, Trickster, Selwyn, Yeyinde, Lobosque, Inquisitor, SephirothSpawn, Near Fantastica, Prexus, Jimme Reashu, Reaper Phoenix
Version: 2.4
Type: Add-on Collection
Key Term: Add-on Collection



Introduction
Updated - Saturday, January 26th, 2019

This is a massive collection of Art, including Graphics, Configured Tilesets, Characters, Music, and sixty five 100% Compatible Scripts in a giant Demo that tries to teach you how to use every single one of the Scripts!


Features


  • Everything!  Literally!

  • Battle Systems, Message Systems, Caterpillar, Effects, Movement

  • There is not very much this package can not do!

  • Contains 68 71 Total Scripts

  • All of Naramuras Artwork is also contained in this Package




Screenshots

Spoiler: ShowHide


There are far too many features to display in a single screenshot, so this is just the most recently updated stuff of the Caterpillar boarding a Boat Vehicle!


Heretic's Moving Platforms (animated gif, give it a moment to load)


Heretic's Dynamic Lights (animated gif, give it a moment to load)




Demo

This is HALF GAME, and HALF TECH DEMO.  NPC Characters explain everything!

http://downloads.chaos-project.com/heretic86/CollectionVer2.4.zip (Version 2.4)
- Updated Saturday, January 26th, 2019

http://downloads.chaos-project.com/heretic86/HereticsCollectionVer2.3.7z (Version 2.3)
- Updated Saturday, August 20th, 2016

Demo Split into 50 meg files (Version 2.3)
(Use these if you have trouble downloading large files)
File 1 (50 MB)
File 2 (50 MB)
File 3 (50 MB)

(Use 7Zip to open all 3 files once downloaded)

Legacy Versions



Script

Grab the Demo.

Full List of Scripts:
Version 2.3 - Updated August 20th, 2016
Spoiler: ShowHide

Added:
- Heretic's Dynamic Lights and about 20 new Maps
- Heretic's Unlimited Event Page Conditions
- KK20's Custom Prices for Shops
- Sithjester's Characters from Wild Refuge
- Several Maps overhauled for Lights, and a few Tweaks here and there
- Summoner Geeks


Version 2.1 - Updated April 20th, 2016
Spoiler: ShowHide

Added:
- Heretic's Moving Platforms
- Heretic's Advanced Camera Controls
- Zeus Video Player (play .avi files in game)
- Several scripts were given Updates for compatibility and stability.

Version 2.0
- SDK
- SDK Character Update Fix
- Heretic's Dynamic Lights 1.0
- Heretic's Unlimited Event Page Conditions
- KK20's Custom Prices for Shops
- Heretic's Animation Speed
- Modular Passable Core
- Heretic's Modular Collision Optimizer
- Heretic's Loop Maps
- Exclusion Elements
- Auto Font Install (Wachnunga, disabled in favor of ForeverZer0's Memory Font Loader)
- Memory Font Loader 1.1 (ForeverZer0)
- Autonomous Stutter Bugfix
- Pathfind (by ForeverZer0)
- Lagless Path Finder 1.22 (Blizzard)
- Multiple Message Windows 1.56 - Heretic Version (Originally by Wachnunga and Zeriab, SDK Free)
- M.M.W Add-on - Easy Chests
- Heretic's Caterpillar 2.0
- Heretic's Caterpillar Add-on - Auto Door Close
- Move Straight (useful for Projectiles that are at angles)
- Heretic's NPCs on Event Tiles (Modular Passable)
- Heretic's Diagonal Stairs Deluxe (Modular Passable)
- Heretic's Downhill Ice (Modular Passable)
- Heretic's Restrict Bush Passage (Modular Passable, used also with Vehicles)
- Heretic's Restrict Tile Passage (Modular Passabe, Vehicle Core)
- Heretic's Hotfoot Tiles (Modular Passable)
- Heretic's Circular Sprite Motion (Modular Passable)
- Heretic's Mirror Movement (Modular Passable)
- Heretic's Vehicles (Modular Passable, needs Restrict Tile Passage also, Boat and Magic Carpet)
- Heretic's Magic Compass
- Heretic's Rotate, Zoom, and Pendulums
- XRXS ATB Battle System (Front View Battle System)
- XRXS Battle System Add-on - Blink Low Actor Stats
- XRXS Battle System Add-on - No Prior Actor
- Battle System Add-on - Window Help Msg (Custom Help messages)
- Battle Self Switch (LiTTleDRAgo, use A,B,C,D Self Switches in Battle)
- Battle Target Anyone (KK20)
- Battle Target Anyone Add-on - Target Anyone Undead (Heal Zombies to death!)
- Battle System Add-on - Spy Equipment (See HP, SP, Weaknesses with Equipment)
- Reflect Spell (Blizzard)
- Battle Page Conditions
- Battle System Add-on - Always Hit in Demo (100% Hit Rate while Option is On, for Demonstrations)
- Disable Battle Commands
- Animated Battlers (Intended for Front View Battle Systems)
- No Battle Music Change (Leon)
- Variable Prices SDK (Reaper Phoenix)
- Die on Map Screen (from Poison)
- Super Event Sensor (Enemy AI)
- Control Self Switches Anywhere
- More Self Switches (game_guy / Gameus - Highly Recommended)
- Auto State Switches
- Event Range Conditions (ForeverZer0)
- Multiple / Unlimited Fogs (Gameus / game_guy)
- Heretic's Cloud Altitude 2.2
- LiTTleDRAgo Wave (wave Backgrounds, Fogs, and Panoramas)
- VX Ace Battle Backgrounds in XP
- Heretic's Lightning (not Lighting, Lightning, like Thunderstorm)
- Dynamic Lights (Kellessdee)
- Animated Title Scene
- Timed User Input (simulates Player Input for Demo)
- DEE (Ryex - Dynamic Effects Engine, Sound)
- Dynamic Sounds (Ryex)
- Mute Demo Sounds (Animated Title Scene Add-on, pre-game Demo Gameplay)
- RMXP MACL 2.3
- Text Picture
- Ending Credits Script
- Event Transitions (ThallionDarkshine)
- Debug Fast Forward
- Food Tutorial Lesson (learn how to script)



Instructions

Each script will have its own instructions.  Grab the Demo.


Compatibility

There are likely to be some conflicts, but all of these scripts work together with 100% compatability.

NOTE: If you have trouble opening the Demo from the Editor, you can change the version by editing Game.ini Library=RGSS102E.dll or what ever you need to suit your version of RPG Maker.  You can also edit Game.rxproj with Notepad and change RPGXP 1.02 to suit your version of RPG Maker.


Credits and Thanks


  • I'd like to thank Everyone whose content I used with their permission.  I tried to list everybody whose content was used.

  • If I used your content without your permission, please let me know and I will remove it!




Author's Notes

Who is the Crumbling King?  (don't post the answer and spoil it for others!)

---

NOTE:  This demo also contains numerous other scripts that I have NOT posted!  Many can work just fine as standalone scripts.  Such as the Pause script.
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.)

KK20

I played with it for an hour or so. It's a pretty cool thing you got going there. Granted, since most of it is just a collaboration of your demos, it would be pretty hard to understand script calls and configurations if the user wants to learn a specific script.

Just get back to working on your real game! If I can expect it to look as polished as this, I'd be more than happy to destroy the download link.





   


   
   


   
   

Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!



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

Join the CP Discord Server!

Shek

Heretic,

Thank you so much for posting this man!

I've been clocking 4-8 hours per day for the past month working on my game, and I'm starting to burn out.  I needed a break to step back and look at what is possible in order to gain some perspective.  This was very inspiring because I got to see a lot of cool features I could add to my game to improve its polish.

LiTTleDRAgo

nice work Heretic!

I'll try playing with your demo when I have time
but, for a glance I saw SDK in the demo.... O_o

Heretic86

Yeah, I still have dependant scripts.  I do so want to get rid of that thing.  But whats odd is every time I take a crack at getting rid of it, something else in life usually completely sidetracks me.  But when I do something dumb, like a chest animation, oh sure, then I get all the time in the world!  Go figure?
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.)

LiTTleDRAgo

*deleted*

Heretic86

Thanks.  I'll take a look a bit later, too stuff from all that "stuffing"!  There are two other SDK scripts in there that I'd like to dump or replace, and just saw that KK20 wrote one that will take care of one of them, but the other is that pesky Font Install one.  Just never got around to it.

I'll try yanking the SDK Dependancy for MMW tomorrow some time when Im a bit more sober.
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.)

G_G


KinTery

Hey, im using your ATBS, but i have a little problem..  :wacko:

When im using an enemy skill that decrease their SP to make it 0 to my actors, i have this error.

ATB - Window Base Line: 193 ZeroDivisionError occured
divided by 0.

I really don't know why why this happening, please help!

And also, im using your caterpillar script! It's really awesome!  8)

But how can this script Non-SDK compatible?? Because in the comments you said this script can be used even with no SDK.
But when i try i have errors..

Heretic86

I'll work on the two errors you got.  For the time being, you'll just have to deal with the SDK till I get time to make the few SDK dependant scripts SDK free.  Battle System thing is something else, which I'll have to look into.
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

Okay uploading new version now.  It might take a few minutes...  (Edit: Okay, its up for download now)

Fixed Caterpillar Non SDK Bugs
REMOVED SDK Requirements for MMW completely!  Now works WITH and WITHOUT SDK
Fixed Division by Zero Error when Enemies have 0 Max SP
Fixed Bug when Party has 0 Max SP Actor
Added Option to Show SP for Enemies with 0 Max SP or hide it all together
Added moveto(fractional X, Y) explanation guy to Pirate Bay map.

@gameus and LittleDrago

Im glad you posted those fixes.  I built them right in to the last version of MMW in the Collection.

@KinTery - Im glad you posted your errors.  I never would have thought to try Max SP = 0 and that was a Critical Bug!  I also havent been without the SDK for some time as I try to use it to make sure scripts work with and without them, but I havent really focused on the Caterpillar for a long time.  So thanks for posting those as they'd affect more people than just yourself

So this Update is focused on fixing existing bugs.

---

Next Version:

I plan on actually removing a Script.  The Variable Prices script that is currently packaged is SDK dependant, and although it works, I think KK20 has a much better solution.  So its more of a Replacement for Variable Prices as I highly doubt the two script will work together.  Not even gonna try, so I'll just replace it, and have to build a short demo for it.  Theres still plenty of room for expanding even further if anyones interested.

I also want to include Battle Transitions, but I need to fix some things in the Battle System first to make them work together properly.  Right now, Battle Transitions arent compatible, but thats on me.

---

Future Versions:

I have requests out for More Battle Event Page Conditions and an Event Page Item Conditions Scripts.  I think those two Scripts will also greatly increase the flexibility of RMXP as a whole.

Theres also plans for Step Animation Speed Controller Script and a Panorama Scroll Script.

Im runnin low on Ideas!  I've pretty much scripted or found scripts for every single thing I've ever wanted to see in RMXP!  And its not even my birthday!

---

If anyone has any suggestions of other Art, Music, or Scripts that you think should be included, let me know and I'll see what I can do to pop it in!  And that sounded less phalic in my head...
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.)

LiTTleDRAgo

Quote from: Heretic86 on December 01, 2013, 10:25:45 pm
Okay uploading new version now.  It might take a few minutes...  (Edit: Okay, its up for download now)


can you just upload scripts.rxdata (or entire data folder) for your updates (download 70MB++ demo for each update is just waste of bandwith)

Quote from: Heretic86 on December 01, 2013, 10:25:45 pm
If anyone has any suggestions of other Art, Music, or Scripts that you think should be included, let me know and I'll see what I can do to pop it in!  And that sounded less phalic in my head...


Hmm.. If I can ask suggestion, it would be footstep and footprint scripts (and if possible, shadows and water reflection)

then, it would be nice if you could alter passabilities with items / equips / skills
example : you can walk in the water with "Water Shoes" or skill "Water Walk", fire with "Flame Talisman", etc

(you probably need unlimited terrain tags script as well for above suggestion)

for battle system, KGC 3D Camera seems good for eye catching

KinTery

Thanks Thanks!  :D
I'll really try it right now!

Edit:

The skill is really working now! Many thanks!

But i have still problems in MMW (But when MMW in a clean project, it works perfectly. So i think im having incompatability problems but i don't know what script it is because i have tons of scripts in my project. It's ok not to fix it, i just want to know what is the script that it counters with it.)

When im executing my game it shows this error:

'MMW Message System' Line 2684: Name Error occured.
undefined method 'main_dispose' for class 'Scene_Map'

That's the print message showed to me. For the mean time i'll still stick to SDK. Sorry for asking too much.

Heretic86

Okay, two questions.

SDK or no?

and where is MMW in relation to other scripts?
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.)

KinTery

I think still stick to SDK because i have an encounter rate script.

But the MMW script that im talking about is your 1.55
When i insert it i have script errors even with or without the SDK
But when i use your older version it works very fine.

Maybe i could upload my script.rxdata here so you could check out?

Heretic86

Probably a conflict between scripts.  Could be order of scripts as well.  Upload it and 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.)


Heretic86

Bad news.  I couldnt get it to work.

Seems Im missing a crapton of dependancies, including graphics, icons, and all sorts of other stuff like the screenshot.dll.  Theres no way I can get the rxdata to run without spending hours of trying to identify all these additional graphical dependancies.

FYI - Transitions isnt compatible yet.  It is now on my to do list for the Battle System.  I saw that in the massive script list.

And for the record, 100% compatible means that the scripts I bundled together are made to be 100% compatible with each other, not every script in existence, which almost seems to be what you have in your rxdata.  There are a LOT of scripts in there and I cant guarantee compatability with all of them, especially battle system addons for different battle systems.

Were gonna need another way to fix this bug in MMW you've got, since it seems to be the major issue at the moment.  So just focusing on MMW.

You can try popping in another version of MMW.  There are several floating around here, and many now incorporate the few features I've added, like Auto Positioning with /% and /$.

You could also try moving what ever version of MMW you have closer to the top of the list instead of at the bottom.  Script Orders will definitely cause problems, and MMW tends to need to be higher on the list.  As a rule of thumb, script that alias existing definitions can go below safely, but scripts that overwrite an existing method and completely replace it need to be much higher on the list.

This is the section of code that seems to be messing you up with MMW.

Spoiler: ShowHide
  # SDK Compatability
  if Module.constants.include?('SDK') 
    # ... (remove this)

    alias wachunga_mmw_scene_map_main_dispose main_dispose
    def main_dispose
      wachunga_mmw_scene_map_main_dispose
      for mw in @message_window
        mw.dispose
      end
    end


Try moving that out of the "if" loop and see if that helps.  You'll need everything starting with Alias, Def, and the End tag.
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

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

LiTTleDRAgo

you're using different method for SDK and Un-SDK type which is unnecessary (because the code I posted earlier works with/without SDK)
I simply deleted the unnecessary method in the script, also the SDK log if SDK is exist

Spoiler: ShowHide

#------------------------------------------------------------------------------
# * SDK Log Script
#------------------------------------------------------------------------------
sdk = Module.constants.include?('SDK') &&
     SDK.log('Multiple Message Windows','Wachunga',1.5,'2006-11-17')

#------------------------------------------------------------------------------
# * Begin SDK Enabled Check
#------------------------------------------------------------------------------
if !sdk || SDK.state('Multiple Message Windows') == true



class Scene_Map
 attr_reader :message_window
 # changed accessor to reader
 # ALL UNNECESSARY METHOD IS DELETED
 #--------------------------------------------------------------------------
 # * Scene_Map - New Message Window Addition
 #--------------------------------------------------------------------------
 def new_message_window(index)
   .....
 end

end

#------------------------------------------------------------------------------

class Scene_Battle
 attr_reader :message_window  
 # changed accessor to reader
 # ALL UNNECESSARY METHOD IS DELETED
 #--------------------------------------------------------------------------
 # * Scene_Battle - New Message Window Addition
 #--------------------------------------------------------------------------
 def new_message_window(index)
   ......
 end

end


you can use http://text-compare.com/ to find the difference with your script

KinTery

Ok! I'll try both, sorry it didn't come out in my mind about that missing graphics.
(I forgot to put the missing script so it can run without the graphics..)


I'll edit this when i tried it. Sorry for being a pain.

Edit:

Sorry for the really late reply i had an almost two week vacation  :facepalm:
Well now im going back making my game again.
I tried them and it seems no errors. (For now, coz i check it a little..)
But it's okay now! Thanks =D

But i have 2 questions in your ATB:

I don't know how but how can i change the battlers during battle? I tried it but nothing happens.
second,
How can i make a stop time skill? Like all actors & enemies will stop gaining CP and only one actor can move??

Anyway, thanks for everything! Ü

Ranquil

When I tried to enter the Sound When Speaking (?) area the game froze to a black screen during the transition. Interestingly, the music was still playing in the background.

Disregarding that... this is just pure awesomeness! =*___*= please excuse me while i go die from tutorialgasm
Quote from: Some guy on FacebookLife is like a penis. It's short but it feels so long when it gets hard.


Quote from: Steven WinterburnBefore you diagnose yourself with depression or low self-esteem, first make sure that you are not, in fact, just surrounded by assholes.

Ranquil

Time for a double-post, hooray!

This time, soon after I left the cave with lava after getting the iron equipment, the game got an error message during a regular battle:

QuoteScript 'ATB - Spy Equipment' line 394: NoMethodError occurred.

undefined method `[]' for nil:NilClass


How wonderful, I couldn't even get to save the game before this happened. All the hard work from saving the hostages and fighting the King is now lost. :)
Quote from: Some guy on FacebookLife is like a penis. It's short but it feels so long when it gets hard.


Quote from: Steven WinterburnBefore you diagnose yourself with depression or low self-esteem, first make sure that you are not, in fact, just surrounded by assholes.

Heretic86

Thats pretty much the end of the Demo.

The rest of it is just mapping bugs, Im sure.  I tried going through it myself, and was able to leave the cave fine, as well as the Sound Speak map.  None the less, I'll see if I can find those bugs and fix them when I get a chance.  

I'll take a look at adding a way to simulate a Stop Spell so monsters and / or Party Members are prevented from accumulating CP.  Probably add an easy way to "ban cp" for Actors or Enemies.  That can be done through an Item or Spell calling a Common Event, similar to using Stealth Potions.

Adding Battlers, that should be an Event Button you can run.  I'll double check to make sure it works.  Its one of those things I know I did look at before because there were things in the original version of the battle system that didnt work right.  Like adding an Actor during battle would cause that actor to never be able to get cp during that battle.  Dont worry, that should already work in this version.

---

Edit:

Okay, got an easy way to create a Stop Spell.

Under the States tab, just use ANY state with a Restriction of "Can't Move".  Create a new State if you wish, and attach it to a Skill (under the Skill tab) with the State Change column to Add that State.  Works with existing code so no need to update the Scripts for that.  Advantage here is that it works just like any other State / Skill combination.  Expires when you want it to, removable with other Skills / Items that remove that state.  Might wanna update your Knockout to also remove that Stop State to balance out gameplay.  A Skill like Haste would be good for counteracting a Stop State and removing it so there is probably no need to create a "Remove Stop" type of Spell for that purpose alone.

No Script Calls required.

---

Changing Party Members During Battle:

I just checked this just now, works fine.  Under the Troops Tab, create a Page with a Condition.  Double click to bring up Event Commands.  On Page 1 right side, in the middle there is a Button for "Change Party Member...".  Use this to change your Actors during a Battle.

No Script Calls required here either, just standard Battle Eventing.  Just make sure your Battle Events Page is being triggered.  You can, if you really want to, put in a Script to say something like 'print "Battle Page is now running" ' if you wish, just to make sure it triggers.

The other Map bugs Im still looking for.
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.)

KinTery

For the second question, it now works but im not sure (sometimes the states doesn't apply to all of my actors and enemies even the % for applying the state is 100 except to the caster)

And for the first question, i mean, changing the battler graphic. Sorry.

Well for now this BS is really great =D

Heretic86

States not applying is normally caused by State Resistances.  For example, the Reflect spell.  The Actors were all given a State Resistance to Reflect of A causing that state to always take.  The Angle Boss doesnt have a State Resistance of A so it can sometimes "miss".

Battler graphics:  I'll take a look into that.  There are some other glitches with the Actor Graphics.  Like when they have a Reflect state, they dont fade in when battle starts.  The issue you're having may be related.  I'll take a look.  Theres other things I want to change too that will expand what the system is capable of.

I might edit this post once things change.

---

Update:

Alright, I just tested out the feature to Change Actor Graphics and it also works just fine.  The built in way to do this is done under the Troops Tab, Event Commands on Page 3, left column, at the bottom of the column.  The button is "Change Actor Graphic...".

The way it works doesnt allow for any form of Transition, it just immediately pops to the new graphic.

Is that what you were looking for?
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.)

KinTery

Yes, i tried it in the tab and it works fine but when in common events it won't work, because i want a skill like transformation but doesn't change the actor.
Well i think i'll find a way so i can make it work on tabs. And thanks for helping me and i know im really asking too much.

Thanks Thanks :) Lvlsup.

Maybe i'll ask again if i have problems so please bear it for awhile :D

locowhiteknight

@Heretic86 Nice work on this project. Man, I can tell you've put a lot of effort into creating/assembling this useful collection of art and compatible scripts. I'll be pawing through this over my x-mas vacation for sure, there are a lot of insightful tips and tricks here. Thanks for creating and sharing this project, I'm looking forward to importing some of the tilesets with all of the properties set (saves so much freakin' time).
"Let's get down to brass tacks. How much for the ape?"

Heretic86

Quote from: KinTery on December 21, 2013, 08:14:16 pm
Yes, i tried it in the tab and it works fine but when in common events it won't work, because i want a skill like transformation but doesn't change the actor.
Well i think i'll find a way so i can make it work on tabs. And thanks for helping me and i know im really asking too much.

Thanks Thanks :) Lvlsup.

Maybe i'll ask again if i have problems so please bear it for awhile :D


Hmm, that would be cool if Actors had a way to Transform the way Enemies do.  Right now I believe it is limited to only swapping the Actors without Transformations.  This could be accomplished by a Script Addon.  I can take a crack at it when I get time, or if someone else feels like taking a whack at it.  But I think its a great idea!

(thanks for the Level Up!)

---

That was really the intent!  Help people save time.  I also thought that teaching people how to use the existing features of RMXP as well as the specific features of the included scripts in a Game instead of a post on a Forum might be more entertaining.  The collection took years to put together.  Most of the stuff came from smaller individual scripts that just got packaged into one giant package.

Another thing to consider is this is NOT ALL MY STUFF.  There are a LOT of different peoples work that has been included.  And there is more stuff that I'd still like to include.  Thus, if you've got something that you'd like to share that is just phenomenal, I'll see what I can do to add this stuff in.

Still working on this.  I've fixed a couple of minor bugs in the Battle System.  Nothing that would crash the game, but will cause visual glitches.  There are some existing mapping bugs that I've been unable to reproduce.  Crash after defeating the Flame Lich and entering the Crypt of the Crumbling King for example.  The last thing I took a crack at was incorporating Battle Transitions, but havent spent as much time on it as it needs.  So the package hasnt been updated yet as there arent enough significant changes.

Some of the things I still want to incorporate:

Scriptable Event and Battle Event Conditions (if Item in inventory)
DLL based distortion effects (higher quality and better framerate)
Animated Front View Battlers
Suggestions from others (some already listed)

Do you have content that you've created that you'd like to see included?  Graphics?  Scripts?  Sounds?
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.)

locowhiteknight

@Heretic86
QuoteDo you have content that you've created that you'd like to see included?  Graphics?  Scripts?  Sounds?


I don't at this time. I've uploaded some weapon sprites and I'm working on a Blizz-ABS 101 for beginners, but nothing worth including in this project. I'm always working and learning with RMXP so I'm sure I'll get into scripting eventually and might make something worth including. I do like making sprites (for my own projects), but I'm definitely no artist, I need to get a lot better at shading. If I come up with anything in the future worth mentioning, I'll give you a shout and see what you think.

Just wanted to give you another kudos on this project. I'm giving a copy to my nephew, he's in sixth grade and trying to learn how to use RMXP. I'm not always around to help him out, but this should help him a ton over the next couple of years, if he sticks with it.
"Let's get down to brass tacks. How much for the ape?"

KinTery

I have a little questions.

1) How can i make another color of the CP bar?
2) Is it compatible with the KGC Camera? Tried it but i'm not sure and it's working fine.
3) Is it possible to be compatible with this script?:

Because it leaves trails to my character and it's so awesome!

Heretic86

1) Hold down CTRL + SHIFT + F and search for "def cp_color_1", adjust CP Colors there as you see fit.  Looks like my labels might be a off.  CP Colors have TWO COLORS.  Top and Bottom.  Gradient is drawn from Top to Bottom.  Adjust both as needed.  Recommend using # and CTRL + D to Duplicate a line just to reference the originals.  Colors are RGB in their values, but should be pretty easy to figure out.

2)  If it works, great!  I never tested it though.

3)  I've never seen that script, so same thing.  Not sure if it would work or not.  Sounds like it may mess up on Transparencies if one of the Cat Actors is set to Ghost (Partial Transparency), but also depends on your config.

Sorry, been busy with Holiday and Family stuff.
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.)

KinTery

Not at all, and i think im really too much for asking.
But i really want to mess the scripts more so i can try learning to script.
Sorry for that.  :^_^':

Heretic86

Well, luckily, there is an NPC for learning to Script! 

Once you can get your head around a couple concepts like Objects and Classes, its not as difficult as people make it out to be!
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.)

KinTery

Ok! It looks like it really works fine =)
And i have no problems for now, really thanks for everything man ^_^
Don't know what to do if your not helping me, THANKS THANKS!

Ranquil

Now that I finally decided to open this with the editor, it just showed this error message:

QuoteThis project is from an old version of RPG Maker and cannot be loaded.


dafuq :O.o:
Quote from: Some guy on FacebookLife is like a penis. It's short but it feels so long when it gets hard.


Quote from: Steven WinterburnBefore you diagnose yourself with depression or low self-esteem, first make sure that you are not, in fact, just surrounded by assholes.

ForeverZer0

Quote from: Ranquil on January 19, 2014, 06:59:27 am
Now that I finally decided to open this with the editor, it just showed this error message:

QuoteThis project is from an old version of RPG Maker and cannot be loaded.


dafuq :O.o:


Just open up the Game.rxproj file with a text editor like Notepad and change the version. Its likely 1.04 or something, try changing it to 1.02 and trying it again.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Heretic86

It should be able to work with both.  I tried f0's suggestion and it worked fine for me either way by editing the ini, but I do have both the 102 and 104 versions of the dlls installed (updated xp a while ago).

I could include both 102 and 104 files with the project if it causes anyone else an issue...
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.)

ForeverZer0

I think the value in the Game.rxproj is has to match the installed version of RMXP, or be lower than the installed version. Having the library included in the folder won't really help, since its the version that will be used by the installed editor. The value found in the Game.ini is what will be used when running the Game.exe, so for that it is pertinent, but no for the editor.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Heretic86

Updated

Added 3 Scripts:

Unlimited Battle Event Page Conditions (Should work with most Page Based Battle Systems, like the Default)
Animation Speed (for Events, Stepping Speed)
Dynamic Lighting Effects - kellessdee

Each script added has a Demo

Battle System Updated, a few minor bugfixes, Bonus Exp, Gold and Items, and set to allow Post Battle Event Pages.  Not too much else has changed.

Version Incompatability:  Just edit the INI file to match your installed version.  1.02 or 1.04

---

Does anyone have any Art, Music or Scripts they'd like to have included with this package?
(Please be reasonable, I cant include incompatible scripts, like alternate Battle Systems)
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.)

Simon Greedwell

Sorry for the necroposting but I've got a problem with the XRXS ATB Battle System. I kept running into an error when the battle party consists of less than 4 members:

Script: 'ATB: Aliases and redefinitions' line 136:NoMethodError Occurred

undefined method 'damage' for nil:NillClass.


Bury with my...money!

Heretic86

Quote from: Simon Greedwell on May 22, 2014, 09:39:25 pm
Sorry for the necroposting but I've got a problem with the XRXS ATB Battle System. I kept running into an error when the battle party consists of less than 4 members:

Script: 'ATB: Aliases and redefinitions' line 136:NoMethodError Occurred

undefined method 'damage' for nil:NillClass.





Okay, I'll take a look.  I have more updates for it anyway (new script features).  Doing anything out of the ordinary when the crash occurs?  Script calls or Evented Battle?  

Quick fix: change that line to read:
    if @battler and @battler.damage == ""


Please let me know if any other bugs.
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

UPDATED

Update includes the above mentioned Bugfix.

Updated Cloud Altitude to fix a bug where changing a Scene (Battle or Menu) would cause Game Guy's Unlimited Fogs to disappear.  Note: Fix itself is a little glitchy.

Added Animated Battlers -  Nothing really too fancy, just a very early version of a script that allows Enemies to have a "Step" Animation.  Available as a Standalone Script for animating Front View Battlers.  Expect Bugs.

Added feature to Target Anyone Undead so that a State of Zombie will now cause Heals to harm whoever has the State applied.

NPC's added to demonstrate each new feature, so there are two new NPC's on the Battle System map.
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.)

Simon Greedwell

Quote from: Heretic86 on May 23, 2014, 03:52:04 am
Quote from: Simon Greedwell on May 22, 2014, 09:39:25 pm
Sorry for the necroposting but I've got a problem with the XRXS ATB Battle System. I kept running into an error when the battle party consists of less than 4 members:

Script: 'ATB: Aliases and redefinitions' line 136:NoMethodError Occurred

undefined method 'damage' for nil:NillClass.





Okay, I'll take a look.  I have more updates for it anyway (new script features).  Doing anything out of the ordinary when the crash occurs?  Script calls or Evented Battle? 

Quick fix: change that line to read:
    if @battler and @battler.damage == ""


Please let me know if any other bugs.


I tested it and that seemed to do the trick. Thanks.

I've ran into some incompatibility problems. nothing game-breaking though. I fixed them by rearranging the other scripts I used i.e putting MOG's Damage and Collapse scripts above the RXS ATB Battle System scripts.

Also, there's this thing when using Dargor's large party script that causes the battle scene to switch between the first row (the first 4 battlers) and the second row (the other 4 battlers) constantly. I assumed that's an inevitable thing, seeing how both scripts work.
Bury with my...money!

Heretic86

MASSIVE UPDATE

I'm bumping this up to Release and removing from Beta, which it has been sitting in for a long time.  Mods, if you wouldn't mind adding to the Script Database

Update Includes:
- Nine different Modular Passable scripts, including VEHICLES!  (Boat and Magic Carpet at this time, thats all I have Graphics for)
- Each Modular Passable script has tremendous power.
- Added VX Ace Battle Backgrounds in XP script

DEMO
http://downloads.chaos-project.com/heretic86/HereticsCollectionVer2.exe
(thank you Blizz for hosting this for me!)

So here is a screenshot of the Caterpillar boarding an RPG Maker XP style Vehicle!

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

Standard bump.

I plan in putting out an update for the Collection shortly, with a few very minor bugfixes, a touch of more functionality, but more importantly, an example of how to allow Boats to dock on ANY shoreline.  Landing Boats on Shore Tiles works just fine with the previous release, I just never created an example of how to do it so people could use it as a Template to build on.  Its mostly just an Eventing Update with very minor bugfixes in a few scripts.

Edit:  Updated.  The Vehicles Map now links to another map where you can park your Boat on shore tiles, not just docks.  Its just eventing so no reason to grab this update.  Two other script updates for Downhill Ice, fixed a fatal error with an improperly nested if statement, and fixed a Visual Glitch in Magic Compass where the graphic was not initialized to the screen tone. 
End Edit.

This does come with some GOOD NEWS / BAD NEWS.  

I finally got what hopefully will be meaningful work instead of these crap jobs that never last long, but this comes at the price of me having to put Scripting down for a while.  Probably at least until I get settled in.  So I'll have to put new scripts on the backburner for a while.  I wanted to do a Damage Tiles script that would compliment the Hotfoot Tiles script, and possibly Moving Platforms, but i wont be able to do these right away.  So I also have to say sorry that I cant do any Script or Feature Requests right now, but will do my best to offer support for what I have released.

One thing I did want to ask everyone is about everything that is in this collection?  How useful are the Vehicles scripts are to you?  How about Modular Passable?  Any conflicts?  Are these scripts useful to you?  All of the Visual Effects?  I've only received a very very minimal level of feedback on this release even though it was posted on several sites.  

So, would you guys care to give me a bit of FEEDBACK?
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.)

Loveless

I'm extremely late on this. I'll dl and give you some feedback later today or tomorrow.

ThallionDarkshine

May 28, 2015, 04:24:56 pm #48 Last Edit: May 28, 2015, 05:14:55 pm by ThallionDarkshine
So I've managed to modify the Transition Pack script to ensure compatibility with this addon pack. I think this is a very cool script that would go well with the rest of these addons. I'll be updating the main topic with it shortly. Here's the script:
Spoiler: ShowHide


#==============================================================================
# ** Transition Pack
#------------------------------------------------------------------------------
# by Fantasist
# extra transitions by ForeverZero
# edited by ThallionDarkshine
# Version: 0.22
# Date: 5 March 2014
#------------------------------------------------------------------------------
# Description:
#
#     This script adds some exotic transitions which can't be attained by
#   regular transition graphics.
#------------------------------------------------------------------------------
# Compatibility:
#
#     This script replaces Scene_Map#transfer_player method.
#==============================================================================
# Instructions:
#
#     This script NEEDS "screenshot.dll"! Place it in the game folder.
#     Place this script below Scene_Debug and above Main. To use this, instead
#   of calling a scene directly like this:
#
#           $scene = Scene_Something.new
#
#   call it like this:
#
#           $scene = Transition.new(Scene_Something.new)
#
#     Before calling it, you can change "$game_temp.transition_type" to
#   activate the transiton.
#
#     As of version 1.11 and above, the battle, menu, name, shop and save scenes
#   automatically use the predefined transition effects, so all you have to do
#   is call the scenes using the event command.
#
#     You can also call a certain effect like this:
#
#           Transition.new(NEXT_SCENE, EFFECT_TYPE, EFFECT_TYPE_ARGUMENTS)
#
#
#   Here is the list of transitions (as of version 1.11):
#
#    -1 - Uses the default effect (in most cases, simple transition)
#     0 - Zoom In
#     1 - Zoom Out
#     2 - Shred Horizontal
#     3 - Shred Vertical
#     4 - Fade
#     5 - Explode
#     6 - Explode (Chaos Project Style)
#     7 - Transpose (by Blizzard)
#     8 - Shutter
#     9 - Drop Off
#
#   For Scripters:
#
#     For adding new transitions, check the method Transition#call_effect.
#   Simply add a new case for "type" and add your method. Don't forget to
#   add the *args version, it makes it easier to pass arguments when calling
#   transitions. Check out the call_effect method for reference.
#------------------------------------------------------------------------------
# Configuration:
#
#     Scroll down a bit and you'll see the configuration.
#
#   BATTLE_EFFECT: Effect to be used for calling battles
#   SHOP_EFFECT: Effect to be used for calling the Shop scene
#   NAME_EFFECT: Effect to be used for calling the Name scene
#   MENU_EFFECT: Effect to be used for calling the Menu scene
#   SAVE_EFFECT: Effect to be used for calling the Save scene
#
#   - Set to any number (-1 to 9) to use the respective effect.
#   - Set to "nil" to use the effect defined in "$game_temp.transition_type".
#   - Use an array to use any random effect. For example, setting BATTLE_EFFECT
#     to [1, 3, 6, 8, 9] will use any of those effects each time the battle
#     scene is called.
#
#   Explosion_Sound: Filename of the SE for Explosion transitions
#       Clink_Sound: Filename of the SE for Drop Off transition
#------------------------------------------------------------------------------
# Issues:
#
#     None that I know of.
#------------------------------------------------------------------------------
# Credits and Thanks:
#
#   Fantasist, for making this script
#   Blizzard, for the Transpose effect
#   shdwlink1993, for keeping the demo for so long
#   Ryexander, for helping me with an important scripting aspect
#   Memor-X, for pointing out some bugs
#------------------------------------------------------------------------------
# Notes:
#
#     If you have any problems, suggestions or comments, you can find me at:
#
#  - forum.chaos-project.com
#
#   Enjoy ^_^
#==============================================================================

#==============================================================================
# ** Screen Module
#------------------------------------------------------------------------------
#  This module handles taking screenshots for the transitions.
#==============================================================================
module Screen
 
  @screen = Win32API.new 'screenshot.dll', 'Screenshot', %w(l l l l p l l), ''
  @readini = Win32API.new 'kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l'
  @findwindow = Win32API.new 'user32', 'FindWindowA', %w(p p), 'l'
  #--------------------------------------------------------------------------
  # * Snap (take screenshot)
  #--------------------------------------------------------------------------
  def self.snap(file_name='scrn_tmp', file_type=0)
    game_name = "\0" * 256
    @readini.call('Game', 'Title', '', game_name, 255, '.\Game.ini')
    game_name.delete!("\0")
    window = @findwindow.call('RGSS Player', game_name)
    @screen.call(0, 0, 640, 480, file_name, window, file_type)
  end
end

#==============================================================================
# ** Transition
#------------------------------------------------------------------------------
#  This scene handles transition effects while switching to another scene.
#==============================================================================
class Transition
  attr_reader :started
 
  #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  # * CONFIG BEGIN
  #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  BATTLE_EFFECT = [6, 7, 8, 9, 14, 17] # randomly choose from any of those
  BATTLE_USE_BACK = true
  SHOP_EFFECT = [16, 17, 18]
  SHOP_USE_BACK = true
  NAME_EFFECT = nil # uses default effect set in $game_temp.transition_type
  NAME_USE_BACK = false
  MENU_EFFECT = 16
  MENU_USE_BACK = true
  SAVE_EFFECT = -1 # disable effect/use default
  SAVE_USE_BACK = false
 
 
  Explosion_Sound = nil
      Clink_Sound = nil
  #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  # * CONFIG END
  #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 
  #--------------------------------------------------------------------------
  # * Call Effect
  #     type : Transition type
  #     args : Arguments for specified transition type
  #--------------------------------------------------------------------------
  def call_effect(type, args)
    # if "type" is an array, choose a random element.
    if type.is_a?(Array)
      type = type[rand(type.size)]
    end
    # Call appropriate method with or without arguments depending
    # on values of type and args.
    no_args = args.nil? || args == []
    if no_args
      case type
      when 0 then zoom_in
      when 1 then zoom_out
      when 2 then shred_h
      when 3 then shred_v
      when 4 then fade
      when 5 then explode
      when 6 then explode_cp
      when 7 then transpose
      when 8 then shutter
      when 9 then drop_off
      when 10 then ff_IV_style
      when 11 then downward_spiral
      when 12 then blackhole
      when 13 then wave_distort
      when 14 then radial_break
      when 15 then double_zoom
      when 16 then cover
      when 17 then uncover
      when 18 then shift
      end
    else
      case type
      when 0 then zoom_in(*args)
      when 1 then zoom_out(*args)
      when 2 then shred_h(*args)
      when 3 then shred_v(*args)
      when 4 then fade(*args)
      when 5 then explode(*args)
      when 6 then explode_cp(*args)
      when 7 then transpose(*args)
      when 8 then shutter(*args)
      when 9 then drop_off(*args)
      when 10 then ff_IV_style(*args)
      when 11 then downward_spiral(*args)
      when 12 then blackhole(*args)
      when 13 then wave_distort(*args)
      when 14 then radial_break(*args)
      when 15 then double_zoom(*args)
      when 16 then cover(*args)
      when 17 then uncover(*args)
      when 18 then shift(*args)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Initialize
  #     next_scene : Instance of the scene to transition into
  #           type : Transition type
  #          *args : Arguments for specified transition type
  #--------------------------------------------------------------------------
  def initialize(next_scene=Scene_Menu.new, type=nil, show_next=nil, *args)
    @next_scene = next_scene
    @args = args
    # If transition type is specified, use it.
    # Otherwise, use default.
    @type = type.nil? ? $game_temp.transition_type : type
    @show_next = show_next.nil? ? $game_temp.use_back : show_next
  end
  #--------------------------------------------------------------------------
  # * Main
  #--------------------------------------------------------------------------
  def main
    if @type == -1
      $scene = @next_scene
      return
    end
    @started = true
    # Take screenshot and prepare sprite
    path = ENV['appdata'] + "\\scrn_tmp"
    Screen.snap(path)
    @sprite = Sprite.new
    @sprite.bitmap = Bitmap.new(path)
    @sprite.x = @sprite.ox = @sprite.bitmap.width / 2
    @sprite.y = @sprite.oy = @sprite.bitmap.height / 2
    @sprite.z = 100000
    @sprite.disposable = true
    @next_scene.main if @show_next == true
    # Activate effect
    Graphics.transition(0)
    call_effect(@type, @args)
    # Freeze screen and clean up and switch scene
    Graphics.freeze
    @sprite.bitmap.dispose unless @sprite.bitmap.nil?
    @sprite.dispose unless @sprite.nil?
    $skip_trans = @show_next
    #File.delete(path)
    $scene = @next_scene
    $game_system.disposables.each { |el| el.dispose }
    $game_system.disposables = []
  end
  #--------------------------------------------------------------------------
  # * Play SE
  #     filename : Filename of the SE file in Audio/SE folder
  #        pitch : Pitch of sound (50 - 100)
  #       volume : Volume of sound (0 - 100)
  #--------------------------------------------------------------------------
  def play_se(filename, pitch=nil, volume=nil)
    se = RPG::AudioFile.new(filename)
    se.pitch  = pitch unless pitch.nil?
    se.volume = volume unless volume.nil?
    Audio.se_play('Audio/SE/' + se.name, se.volume, se.pitch)
  end
 
  def tile_sprites(tilesize)
    tiles = []
    # Iterate through main sprite, creating sprites for each square.
    (0...@sprite.bitmap.width / tilesize).each {|x|
      (0...@sprite.bitmap.height / tilesize).each {|y|
        sprite = Sprite.new(@sprite.viewport)
        sprite.x, sprite.y = x*tilesize, y*tilesize
        sprite.bitmap = Bitmap.new(tilesize, tilesize)
        rect = Rect.new(sprite.x, sprite.y, tilesize, tilesize)
        sprite.bitmap.blt(0, 0, @sprite.bitmap, rect)
        tiles.push(sprite)
      }
    }
    @sprite.opacity = 0
    return tiles
  end
 
  def double_zoom(frames = 30, zoom1 = 12, zoom2 = 32)
    # Calculate the stages. Account for final zoom being longer.
    stage3 = (frames * (zoom1.to_f / zoom2)).round
    stages = [(frames - stage3) / 2, (frames - stage3) / 2, stage3]
    # Calculate the zoom rates to apply each frame, for each stage.
    zoom_rates, opacity_rate = [zoom1-1, -zoom1+1, zoom2], (255 / frames.to_f)
    zoom_rates.each_index {|i| zoom_rates[i] /= stages[i].to_f }
    # Initialize local variable to keep track of current stage being executed.
    current_stage = 0
    3.times do
      # Iterate each stage, using the calculated rates for each one.
      stages[current_stage].times do
        @sprite.zoom_x += zoom_rates[current_stage]
        @sprite.zoom_y += zoom_rates[current_stage]
        @sprite.opacity -= opacity_rate
        Graphics.update
      end
      current_stage += 1
    end
  end


 
  #==========================================================================
  #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  # ** Effect Library
  #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  #==========================================================================
 
  #--------------------------------------------------------------------------
  # * Zoom In
  #     frames : Effect duration in frames
  #   max_zoom : The max amount the screen zooms out
  #--------------------------------------------------------------------------
  def zoom_in(frames=20, max_zoom=12)
    # Calculate difference b/w current and target
    # zooms (1 and max_zoom)
    zoom_diff = max_zoom - 1
    # Calculate unit values
    unit_zoom = zoom_diff.to_f / frames
    unit_opacity = (255.0 / frames).ceil
    # Apply unit values to sprite
    frames.times do
      @sprite.zoom_x += unit_zoom
      @sprite.zoom_y += unit_zoom
      @sprite.opacity -= unit_opacity
      Graphics.update
    end
  end
  #--------------------------------------------------------------------------
  # * Zoom Out
  #     frames : Effect duration in frames
  #--------------------------------------------------------------------------
  def zoom_out(frames=20)
    # Calculate unit values
    unit_zoom = 1.0 / frames
    unit_opacity = (255.0 / frames).ceil
    # Apply unit values to sprite
    frames.times do
      @sprite.zoom_x -= unit_zoom
      @sprite.zoom_y -= unit_zoom
      @sprite.opacity -= unit_opacity
      Graphics.update
    end
  end
  #--------------------------------------------------------------------------
  # * Shred Horizontal
  #      thickness : Shred thickness
  #       slowness : How slow the screens move out
  #    start_speed : Speed of first step in pixels
  #--------------------------------------------------------------------------
  def shred_h(thickness=4, slowness=4, start_speed=8)
    t = thickness
    # Shred screen
    sprite2 = Sprite.new(@sprite.viewport)
    sprite2.bitmap = Bitmap.new(@sprite.bitmap.width, @sprite.bitmap.height)
    sprite2.x = sprite2.ox = sprite2.bitmap.width / 2
    sprite2.y = sprite2.oy = sprite2.bitmap.height / 2
    for i in 0..(480/t)
      sprite2.bitmap.blt(0, i*t*2, @sprite.bitmap, Rect.new(0, i*t*2, 640, t))
      @sprite.bitmap.fill_rect(0, i*t*2, 640, t, Color.new(0, 0, 0, 0))
    end
    # Make sure starting step is not zero
    start_speed = slowness if start_speed < slowness
    # Move sprites
    dist = 640 - @sprite.x + start_speed
    loop do
      x_diff = (dist - (640 - @sprite.x)) / slowness
      @sprite.x += x_diff
      sprite2.x -= x_diff
      Graphics.update
      break if @sprite.x >= 640 + 320
    end
    sprite2.bitmap.dispose
    sprite2.dispose
  end
  #--------------------------------------------------------------------------
  # * Shred Vertical
  #      thickness : Shred thickness
  #       slowness : How slow the screens move out
  #    start_speed : Speed of first step in pixels
  #--------------------------------------------------------------------------
  def shred_v(thickness=4, slowness=4, start_speed=8)
    t = thickness
    # Shred screen
    sprite2 = Sprite.new(@sprite.viewport)
    sprite2.bitmap = Bitmap.new(@sprite.bitmap.width, @sprite.bitmap.height)
    sprite2.x = sprite2.ox = sprite2.bitmap.width / 2
    sprite2.y = sprite2.oy = sprite2.bitmap.height / 2
    # Shred bitmap
    for i in 0..(640/t)
      sprite2.bitmap.blt(i*t*2, 0, @sprite.bitmap, Rect.new(i*t*2, 0, t, 480))
      @sprite.bitmap.fill_rect(i*t*2, 0, t, 480, Color.new(0, 0, 0, 0))
    end
    # Make sure starting step is not zero
    start_speed = slowness if start_speed < slowness
    # Move sprites
    dist = 480 - @sprite.y + start_speed
    loop do
      y_diff = (dist - (480 - @sprite.y)) / slowness
      @sprite.y += y_diff
      sprite2.y -= y_diff
      Graphics.update
      break if @sprite.y >= 480 + 240
    end
    sprite2.bitmap.dispose
    sprite2.dispose
  end
  #--------------------------------------------------------------------------
  # * Shred Grid
  #      thickness : Shred thickness
  #       slowness : How slow the screens move out
  #    start_speed : Speed of first step in pixels
  #       priority : Which direction comes first (0 - vertical, 1 - horizontal)
  #--------------------------------------------------------------------------
  def shred_g(thickness=4, slowness=4, start_speed=8, priority = 0)
    t = thickness
    # Shred screen
    sprite2 = Sprite.new(@sprite.viewport)
    sprite2.bitmap = Bitmap.new(@sprite.bitmap.width, @sprite.bitmap.height)
    sprite2.x = sprite2.ox = sprite2.bitmap.width / 2
    sprite2.y = sprite2.oy = sprite2.bitmap.height / 2
    sprite3 = Sprite.new(@sprite.viewport)
    sprite3.bitmap = Bitmap.new(@sprite.bitmap.width, @sprite.bitmap.height)
    sprite3.x = sprite3.ox = sprite3.bitmap.width / 2
    sprite3.y = sprite3.oy = sprite3.bitmap.height / 2
    sprite4 = Sprite.new(@sprite.viewport)
    sprite4.bitmap = @sprite.bitmap.clone
    sprite4.x = sprite4.ox = sprite4.bitmap.width / 2
    sprite4.y = sprite4.oy = sprite4.bitmap.height / 2
    #sprite2.visible = sprite3.visible = sprite4.visible = false
    # Shred bitmap
    if priority == 0
      for i in 0..(640/t)
        sprite2.bitmap.blt(i*t*2, 0, @sprite.bitmap, Rect.new(i*t*2, 0, t, 480))
        @sprite.bitmap.fill_rect(i*t*2, 0, t, 480, Color.new(0, 0, 0, 0))
        sprite4.bitmap.fill_rect(i*t*2, 0, t, 480, Color.new(0, 0, 0, 0))
        sprite2.z = 4
        sprite3.z = 3
        @sprite.z = 2
        sprite4.z = 1
      end
      for i in 0..(480/t)
        sprite3.bitmap.blt(0, i*t*2, @sprite.bitmap, Rect.new(0, i*t*2, 640, t))
        @sprite.bitmap.fill_rect(0, i*t*2, 640, t, Color.new(0, 0, 0, 0))
        sprite4.bitmap.fill_rect(0, i*t*2, 640, t, Color.new(0, 0, 0, 0))
      end
    else
      for i in 0..(480/t)
        sprite3.bitmap.blt(0, i*t*2, @sprite.bitmap, Rect.new(0, i*t*2, 640, t))
        @sprite.bitmap.fill_rect(0, i*t*2, 640, t, Color.new(0, 0, 0, 0))
        sprite4.bitmap.fill_rect(0, i*t*2, 640, t, Color.new(0, 0, 0, 0))
        sprite3.z = 4
        sprite2.z = 3
        @sprite.z = 2
        sprite4.z = 1
      end
      for i in 0..(640/t)
        sprite2.bitmap.blt(i*t*2, 0, @sprite.bitmap, Rect.new(i*t*2, 0, t, 480))
        @sprite.bitmap.fill_rect(i*t*2, 0, t, 480, Color.new(0, 0, 0, 0))
        sprite4.bitmap.fill_rect(i*t*2, 0, t, 480, Color.new(0, 0, 0, 0))
      end
    end
    # Make sure starting step is not zero
    start_speed = slowness if start_speed < slowness
    # Move sprites
    disty = 480 - sprite4.y + start_speed
    distx = 640 - @sprite.y + start_speed
    loop do
      y_diff = (disty - (480 - sprite4.y)) / slowness
      x_diff = (distx - (640 - @sprite.x)) / slowness
      sprite4.y += y_diff
      sprite2.y -= y_diff
      @sprite.x += x_diff
      sprite3.x -= x_diff
      Graphics.update
      break if @sprite.x >= 640 + 320
    end
    sprite2.bitmap.dispose
    sprite2.dispose
    sprite3.bitmap.dispose
    sprite3.dispose
    sprite4.bitmap.dispose
    sprite4.dispose
  end
 
  def custom_tile_sprites(size_x, size_y, conditions, properties, centered = true)
    raise "Tile Error: not the same amount of conditions and properties" if conditions.length != properties.length
    tiles = []
    # Iterate through main sprite, creating sprites for each square.
    (0...@sprite.bitmap.width / size_x).each {|col|
      (0...@sprite.bitmap.height / size_y).each {|row|
        sprite = Sprite.new(@sprite.viewport)
        sprite.x += col*size_x
        sprite.y += row*size_y
        sprite.bitmap = Bitmap.new(size_x, size_y)
        rect = Rect.new(sprite.x, sprite.y, size_x, size_y)
        sprite.bitmap.blt(0, 0, @sprite.bitmap, rect)
        for i in 0...conditions.length
          if conditions[i].call(col, row)
            properties[i].each { |prop|
              sprite.send("#{prop[0]}=", prop[1])
              #sprite.zoom_x = 1
              #sprite.zoom_y = 1
            }
            break
          end
        end
        if centered
          sprite.ox = size_x / 2
          sprite.oy = size_y / 2
          sprite.x += size_x / 2
          sprite.y += size_y / 2
        end
        tiles.push(sprite)
      }
    }
    @sprite.opacity = 0
    return tiles
  end
 
  def effect3(size_x = 640, size_y = 4)
    tiles = custom_tile_sprites(size_x, size_y, [proc { true }], [{}])
    # Make sure starting step is not zero
    #start_speed = slowness if start_speed < slowness
   
    frames = 0
   
    while (tiles.select { |i| i.visible == true }).length > 0
      selected_length = (tiles.select { |i| i.visible == true }).length
      frames += 1
      for i in tiles
        i.visible = false if rand(selected_length / 4) == 0
      end
      Graphics.update
    end
   
    tiles.each { |tile|
      tile.bitmap.dispose
      tile.dispose
    }
  end
 
  def effect2(fade_length = 10, size_x = 20, size_y = 20)
    tiles = custom_tile_sprites(size_x, size_y, [proc { true }], [{}])
    # Make sure starting step is not zero
    #start_speed = slowness if start_speed < slowness
   
    frames = 0
    opac_diff = 255 / fade_length
   
    while (tiles.select { |i| i.visible == true }).length > 0
      selected_length = (tiles.select { |i| i.visible == true }).length
      frames += 1
      for i in tiles
        i.opacity -= opac_diff if (i.opacity != 255 and i.opacity > 0) or rand(selected_length / 4) == 0
        i.visible = false if i.opacity <= 0 and i.visible
      end
      Graphics.update
    end
   
    tiles.each { |tile|
      tile.bitmap.dispose
      tile.dispose
    }
  end
 
  def cover(dir = 0, duration = 40)
    frames = 0
    x_mod = case dir;when 7,0,1 then -640; when 3,4,5 then 640;else 0;end
    y_mod = case dir;when 1,2,3 then -480; when 5,6,7 then 480;else 0;end
    s_pos = []
    d_pos = []
    $game_system.disposables.each { |i|
      if i.respond_to?(:x=) and i.respond_to?(:y=)
        d_pos.push([i.x, i.y])
        i.x += x_mod
        i.y += y_mod
        s_pos.push([i.x, i.y])
      elsif i.is_a?(Tilemap)
        d_pos.push([i.ox, i.oy])
        i.ox -= x_mod
        i.oy -= y_mod
        s_pos.push([i.ox, i.oy])
      else
        d_pos.push([0, 0])
        s_pos.push([0, 0])
      end
      i.z = 100000 if i.respond_to?(:z=)
    }
    loop do
      frames += 1
      $game_system.disposables.each_with_index { |i, ind|
        if i.respond_to?(:x=) and i.respond_to?(:y=)
          ts_pos = s_pos[ind]
          td_pos = d_pos[ind]
          i.x = (ts_pos[0] * (duration - frames) + td_pos[0] * frames) / duration
          i.y = (ts_pos[1] * (duration - frames) + td_pos[1] * frames) / duration
        elsif i.is_a?(Tilemap)
          ts_pos = s_pos[ind]
          td_pos = d_pos[ind]
          i.ox = (ts_pos[0] * (duration - frames) + td_pos[0] * frames) / duration
          i.oy = (ts_pos[1] * (duration - frames) + td_pos[1] * frames) / duration
        end
        i.z = 100000 if i.respond_to?(:z=)
      }
      Graphics.update
      break if frames == duration
    end
  end
 
  def uncover(dir = 0, duration = 40)
    frames = 0
    x_mod = case dir;when 7,0,1 then -640; when 3,4,5 then 640;else 0;end
    y_mod = case dir;when 1,2,3 then -480; when 5,6,7 then 480;else 0;end
    s_pos = [@sprite.x, @sprite.y]
    d_pos = [s_pos[0] + x_mod, s_pos[1] + y_mod]
    loop do
      frames += 1
      @sprite.x = (s_pos[0] * (duration - frames) + d_pos[0] * frames) / duration
      @sprite.y = (s_pos[1] * (duration - frames) + d_pos[1] * frames) / duration
      Graphics.update
      break if frames == duration
    end
  end
 
  def shift(dir = 0, duration = 40)
    frames = 0
    x_mod = case dir;when 0 then -640; when 2 then 640;else 0;end
    y_mod = case dir;when 1 then -480; when 3 then 480;else 0;end
    s_pos = []
    d_pos = []
    $game_system.disposables.each { |i|
      if i.respond_to?(:x=) and i.respond_to?(:y=)
        d_pos.push([i.x, i.y])
        i.x += x_mod
        i.y += y_mod
        s_pos.push([i.x, i.y])
      else
        d_pos.push([0, 0])
        s_pos.push([0, 0])
      end
      i.z = 100000 if i.respond_to?(:z=)
    }
    s_pos.push([@sprite.x, @sprite.y])
    d_pos.push([@sprite.x - x_mod, @sprite.y - y_mod])
    @sprite.x, @sprite.y = *s_pos.last
    loop do
      frames += 1
      $game_system.disposables.each_with_index { |i, ind|
        if i.respond_to?(:x=) and i.respond_to?(:y=)
          ts_pos = s_pos[ind]
          td_pos = d_pos[ind]
          i.x = (ts_pos[0] * (duration - frames) + td_pos[0] * frames) / duration
          i.y = (ts_pos[1] * (duration - frames) + td_pos[1] * frames) / duration
        end
        i.z = 100000 if i.respond_to?(:z=)
      }
      ts_pos = s_pos.last
      td_pos = d_pos.last
      @sprite.x = (ts_pos[0] * (duration - frames) + td_pos[0] * frames) / duration
      @sprite.y = (ts_pos[1] * (duration - frames) + td_pos[1] * frames) / duration
      Graphics.update
      break if frames == duration
    end
  end
 
  #--------------------------------------------------------------------------
  # * Fade
  #     target_color : Color to fade to
  #           frames : Effect duration in frames
  #--------------------------------------------------------------------------
  def fade(target_color=Color.new(255, 255, 255), frames=10)
    loop do
      r = (@sprite.color.red   * (frames - 1) + target_color.red)   / frames
      g = (@sprite.color.green * (frames - 1) + target_color.green) / frames
      b = (@sprite.color.blue  * (frames - 1) + target_color.blue)  / frames
      a = (@sprite.color.alpha * (frames - 1) + target_color.alpha) / frames
      @sprite.color.red   = r
      @sprite.color.green = g
      @sprite.color.blue  = b
      @sprite.color.alpha = a
      frames -= 1
      Graphics.update
      break if frames <= 0
    end
    Graphics.freeze
  end
  #--------------------------------------------------------------------------
  # * Explode
  #     explosion_sound : The SE filename to use for explosion sound
  #--------------------------------------------------------------------------
  def explode(explosion_sound=Explosion_Sound)
    shake_count = 2
    shakes = 40
    tone = 0
    shakes.times do
      @sprite.ox = 320 + (rand(2) == 0 ? -1 : 1) * shake_count
      @sprite.oy = 240 + (rand(2) == 0 ? -1 : 1) * shake_count
      shake_count += 0.2
      tone += 128/shakes
      @sprite.tone.set(tone, tone, tone)
      Graphics.update
    end
    @sprite.ox, @sprite.oy = 320, 240
    Graphics.update
    bitmap = @sprite.bitmap.clone
    viewport = @sprite.viewport
    @sprite.bitmap.dispose
    @sprite.dispose
    # Slice bitmap and create nodes (sprite parts)
    hor = []
    20.times do |i|
      ver = []
      15.times do |j|
        # Set node properties
        s = Sprite.new(viewport)
        s.ox, s.oy = 8 + rand(25), 8 + rand(25)
        s.x, s.y = s.ox + 32 * i, s.oy + 32 * j
        s.bitmap = Bitmap.new(32, 32)
        s.bitmap.blt(0, 0, bitmap, Rect.new(i * 32, j * 32, 32, 32))
        s.tone.set(128, 128, 128)
        # Set node physics
        angle  = (rand(2) == 0 ? -1 : 1) * (4 + rand(4) * 10)
        zoom_x = (rand(2) == 0 ? -1 : 1) * (rand(2) + 1).to_f / 100
        zoom_y = (rand(2) == 0 ? -1 : 1) * (rand(2) + 1).to_f / 100
        (zoom_x > zoom_y) ? (zoom_y = -zoom_x) : (zoom_x = -zoom_y)
        x_rand = (2 + rand(2) == 0 ? -2 : 2)
        y_rand = (1 + rand(2) == 0 ? -1 : 1)
        # Store node and it's physics
        ver.push([s, angle, zoom_x, zoom_y, x_rand, y_rand])
      end
      hor.push(ver)
    end
    bitmap.dispose
    # Play sound
    play_se(explosion_sound) if explosion_sound != nil
    # Move pics
    40.times do |k|
      hor.each_with_index do |ver, i|
        ver.each_with_index do |data, j|
          # Get node and it's physics
          s, angle, zoom_x, zoom_y = data[0], data[1], data[2], data[3]
          x_rand, y_rand = data[4], data[5]
          # Manipulate nodes
          s.x += (i - 10) * x_rand
          s.y += (j - 8) * y_rand + (k - 20)/2
          s.zoom_x += zoom_x
          s.zoom_y += zoom_y
          tone = s.tone.red - 8
          s.tone.set(tone, tone, tone)
          s.opacity -= 13 if k > 19
          s.angle += angle % 360
        end
      end
      Graphics.update
    end
    # Dispose
    for ver in hor
      for data in ver
        data[0].bitmap.dispose
        data[0].dispose
      end
    end
    hor = nil
  end
  #--------------------------------------------------------------------------
  # * Explode (Chaos Project Style)
  #     explosion_sound : The SE filename to use for explosion sound
  #--------------------------------------------------------------------------
  def explode_cp(explosion_sound=Explosion_Sound)
    bitmap = @sprite.bitmap.clone
    viewport = @sprite.viewport
    @sprite.bitmap.dispose
    @sprite.dispose
    # Slice bitmap and create nodes (sprite parts)
    hor = []
    20.times do |i|
      ver = []
      15.times do |j|
        # Set node properties
        s = Sprite.new(viewport)
        s.ox = s.oy = 16
        s.x, s.y = s.ox + 32 * i, s.oy + 32 * j
        s.bitmap = Bitmap.new(32, 32)
        s.bitmap.blt(0, 0, bitmap, Rect.new(i * 32, j * 32, 32, 32))
        # Set node physics
        angle  = (rand(2) == 0 ? -1 : 1) * rand(8)
        zoom_x = (rand(2) == 0 ? -1 : 1) * (rand(2) + 1).to_f / 100
        zoom_y = (rand(2) == 0 ? -1 : 1) * (rand(2) + 1).to_f / 100
        # Store node and it's physics
        ver.push([s, angle, zoom_x, zoom_y])
      end
      hor.push(ver)
    end
    bitmap.dispose
    # Play sound
    play_se(explosion_sound) if explosion_sound != nil
    # Move pics
    40.times do |k|
      hor.each_with_index do |ver, i|
        ver.each_with_index do |data, j|
          # Get node and it's physics
          s, angle, zoom_x, zoom_y = data[0], data[1], data[2], data[3]
          # Manipulate node
          s.x += i - 9
          s.y += j - 8 + k
          s.zoom_x += zoom_x
          s.zoom_y += zoom_y
          s.angle += angle % 360
        end
      end
      Graphics.update
    end
    # Dispose
    for ver in hor
      for data in ver
        data[0].bitmap.dispose
        data[0].dispose
      end
    end
    hor = nil
  end
  #--------------------------------------------------------------------------
  # * Transpose (bt Blizzard)
  #     frames : Effect duration in frames
  #   max_zoom : The max amount the screen zooms out
  #      times : Number of times screen is zoomed (times * 3 / 2)
  #--------------------------------------------------------------------------
  def transpose(frames=80, max_zoom=12, times=3)
    max_zoom -= 1 # difference b/w zooms
    max_zoom = max_zoom.to_f / frames / times # unit zoom
    unit_opacity = (255.0 / frames).ceil
    spr_opacity = (255.0 * times / 2 / frames).ceil
    @sprites = []
    (times * 3 / 2).times {
      s = Sprite.new(@sprite.viewport)
      s.x, s.y, s.ox, s.oy = 320, 240, 320, 240
      s.bitmap = @sprite.bitmap
      s.blend_type = 1
      s.opacity = 128
      s.visible = false
      @sprites.push(s)}
    count = 0
    loop {
        @sprites[count].visible = true
        count += 1 if count < times * 3 / 2 - 1
        (frames / times / 2).times {
            @sprites.each {|s|
                break if !s.visible
                s.zoom_x += max_zoom
                s.zoom_y += max_zoom
                s.opacity -= spr_opacity}
            @sprite.opacity -= unit_opacity
        Graphics.update}
        break if @sprite.opacity == 0}
    @sprites.each {|s| s.dispose}
  end
  #--------------------------------------------------------------------------
  # * Shutter
  #       open_gap : How much the shutters open before moving away
  #       flip_dir : Whether or not the direction of shutters if reversed
  #       slowness : How slow the screens move out
  #    start_speed : Speed of first step in pixels
  #--------------------------------------------------------------------------
  def shutter(flip_dir=true, open_gap=16, slowness=4, start_speed=8)
    # Shred screen
    sprite2 = Sprite.new(@sprite.viewport)
    sprite2.bitmap = Bitmap.new(@sprite.bitmap.width, @sprite.bitmap.height)
    sprite2.x = sprite2.ox = sprite2.bitmap.width / 2
    sprite2.y = sprite2.oy = sprite2.bitmap.height / 2
    if flip_dir
      ver_step = 1
      sprite2.bitmap.blt(0, 240, @sprite.bitmap, Rect.new(0, 240, 640, 240))
      @sprite.bitmap.fill_rect(0, 240, 640, 240, Color.new(0, 0, 0, 0))
    else
      ver_step = -1
      sprite2.bitmap.blt(0, 0, @sprite.bitmap, Rect.new(0, 0, 640, 240))
      @sprite.bitmap.fill_rect(0, 0, 640, 240, Color.new(0, 0, 0, 0))
    end
    # Move the shutters apart
    open_gap.times do
      @sprite.y -= ver_step
      sprite2.y += ver_step
      Graphics.update
    end
    # Make sure starting step is not zero
    start_speed = slowness if start_speed < slowness
    # Move sprites
    dist = 640 - @sprite.x + start_speed
    loop do
      x_diff = (dist - (640 - @sprite.x)) / slowness
      @sprite.x += x_diff
      sprite2.x -= x_diff
      Graphics.update
      break if @sprite.x >= 640 + 320
    end
    sprite2.bitmap.dispose
    sprite2.dispose
  end
  #--------------------------------------------------------------------------
  # * Drop Off
  #     clink_sound : The SE filename to use for clinking sound
  #--------------------------------------------------------------------------
  def drop_off(clink_sound=Clink_Sound)
    bitmap = @sprite.bitmap.clone
    viewport = @sprite.viewport
    @sprite.bitmap.dispose
    @sprite.dispose
    # Slice bitmap and create nodes (sprite parts)
    max_time = 0
    hor = []
    10.times do |i|
      ver = []
      8.times do |j|
        # Set node properties
        s = Sprite.new(viewport)
        s.ox = rand(32)
        s.oy = 0
        s.x = s.ox + 64 * i
        s.y = s.oy + 64 * j
        s.bitmap = Bitmap.new(64, 64)
        s.bitmap.blt(0, 0, bitmap, Rect.new(i * 64, j * 64, 64, 64))
        # Set node physics
        angle = rand(4) * 2
        angle *= rand(2) == 0 ? -1 : 1
        start_time = rand(30)
        max_time = start_time if max_time < start_time
        # Store node and it's physics
        ver.push([s, angle, start_time])
      end
      hor.push(ver)
    end
    bitmap.dispose
    # Play sound
    play_se(clink_sound) if clink_sound != nil
    # Move pics
    (40 + max_time).times do |k|
      hor.each_with_index do |ver, i|
        ver.each_with_index do |data, j|
          # Get node and it's physics
          s, angle, start_time = data[0], data[1], data[2]
          # Manipulate node
          if k > start_time
            tone = s.tone.red - 6
            s.tone.set(tone, tone, tone)
            s.y += k - start_time
            s.angle += angle % 360
          elsif k == start_time
            tone = 128
            s.tone.set(tone, tone, tone)
            $game_system.se_play(Clink_Sound) if clink_sound != nil
          end
        end
      end
      Graphics.update
    end
    # Dispose
    for ver in hor
      for data in ver
        data[0].bitmap.dispose
        data[0].dispose
      end
    end
    hor = nil
  end
 
  def ff_IV_style(zoom1 = 1.2, zoom2 = 32)
    # Set number of frames and zoom rates for each stage.
    stages = [4, 4, 4, 4, 20]
    zooms = [zoom1, -zoom1, zoom1, -zoom1, zoom2]
    zooms.each_index {|i| zooms[i] /= stages[i].to_f }
    current_stage = 0
    5.times do
      # Begin processing.
      stages[current_stage].times do
        @sprite.zoom_x += zooms[current_stage]
        @sprite.zoom_y += zooms[current_stage]
        @sprite.opacity -= 12 if current_stage == 4
        Graphics.update
      end
      # Increase current stage.
      current_stage += 1
    end
  end

  def downward_spiral(frames = 40, rotation_speed = 15)
    # Calculate the zoom to subtract each frame.
    zoom, opacity = 1.0 / frames, 128.0 / frames
    frames.times do
      # Begin processing.
      @sprite.zoom_x -= zoom
      @sprite.zoom_y -= zoom
      @sprite.opacity -= opacity
      @sprite.angle += rotation_speed
      Graphics.update
    end
  end

  def blackhole(speed = 4, tilesize = 12, source = [320, 240])
    # Initialize squares array to hold each sprite.
    tiles = tile_sprites(tilesize)
    # Make each sprite slightly smaller than full size.
    tiles.each {|tile| tile.zoom_x = tile.zoom_y = 0.85 }
    # Begin looping until all sprites have been disposed.
    until tiles.compact == []
      # Iterate each tiles.
      tiles.each_index {|i|
        next if tiles[i] == nil
        # Get distance of this sprite from the source for each axis.
        sx = source[0] - tiles[i].x
        sy = source[1] - tiles[i].y
        # Calculate total distance and set base speed for each axis.
        dist = Math.hypot(sx, sy).to_f
        move_x = (dist / (sx == 0 ? 1 : sx))
        move_y = (dist / (sy == 0 ? 1 : sy))
        # Add a little randomness to the mix.
        move_x += move_x < 0 ? -rand(speed) : rand(speed)
        move_y += move_y < 0 ? -rand(speed) : rand(speed)
        # Apply movement.
        tiles[i].x += move_x
        tiles[i].y += move_y
        tiles[i].angle += rand(20)
        # If tile is within its own size from source, dispose it.
        if sx.abs <= tilesize && sy.abs <= tilesize
           tiles[i].bitmap.dispose
           tiles[i] = tiles[i].dispose
        end
      }
      Graphics.update
    end
  end

  def wave_distort(frames = 60, direction = 2, power = 0.4)
    radius, tiles = 0, tile_sprites(16)
    # Define starting point for zoom, depending on direction.
    origin = case direction
    when 2 then [@sprite.bitmap.width / 2, @sprite.bitmap.height]
    when 4 then [0, @sprite.bitmap.height / 2]
    when 6 then [@sprite.bitmap.width, @sprite.bitmap.height / 2]
    when 8 then [@sprite.bitmap.width / 2, 0]
    end
    # Initialize local variable for the rate the radius will increase.
    rate = Math.hypot(@sprite.bitmap.width, @sprite.bitmap.height) / frames
    # Begin processing.
    frames.times do
      # Iterate through each tile, calculating distance from focal point.
      tiles.each {|tile|
        dist = Math.hypot((origin[0] - tile.x), (origin[1] - tile.y))
        # Zoom tile on one axis, depending on direction.
        next if radius < dist
        [4, 6].include?(direction) ? tile.zoom_x += power : tile.zoom_y += power
      }
      # Increase radius for next iteration.
      radius += rate
      Graphics.update
    end
    # Dispose each bitmap and sprite used for the tiles.
    tiles.each {|tile| tile.bitmap.dispose; tile.dispose }
  end

 
  def radial_break(frames = 60, tilesize = 16, direction = 4, speed = 9)
    radius, tiles = 0, tile_sprites(tilesize)
    # Define starting point for zoom, depending on direction.
    origin = case direction
    when 2 then [@sprite.bitmap.width / 2, @sprite.bitmap.height]
    when 4 then [0, @sprite.bitmap.height / 2]
    when 6 then [@sprite.bitmap.width, @sprite.bitmap.height / 2]
    when 8 then [@sprite.bitmap.width / 2, 0]
    end
    # Initialize local variable for the rate the radius will increase.
    rate = Math.hypot(@sprite.bitmap.width, @sprite.bitmap.height) / frames
    # Begin processing.
    until tiles == []
      tiles.compact!
      # Iterate through each tile, calculating distance from focal point.
      tiles.each_index {|i|
        # Get distance of this sprite from the source for each axis.
        sx = origin[0] - tiles[i].x
        sy = origin[1] - tiles[i].y
        dist = Math.hypot(sx, sy).to_f
        # Zoom tile on one axis, depending on direction.
        next if radius < dist
        # Calculate total distance and set base speed for each axis.
        move_x = (dist / (sx == 0 ? 1 : sx))
        move_y = (dist / (sy == 0 ? 1 : sy))
        # Add a little randomness to the mix.
        move_x += move_x < 0 ? -rand(speed) : rand(speed)
        move_y += move_y < 0 ? -rand(speed) : rand(speed)
        # Half distance of one axis, depending on rate.
        [2, 8].include?(direction) ? move_x /= 2 : move_y /= 2
        # Apply movement.
        tiles[i].x += move_x
        tiles[i].y += move_y
        angle = (tiles[i].object_id % 2 == 0) ? rand(25) : -rand(25)
        tiles[i].angle += (angle + 5)
        # If tile is within its own size from source, dispose it.
        if sx.abs <= tilesize || sy.abs <= tilesize
           tiles[i].bitmap.dispose
           tiles[i] = tiles[i].dispose
        end
      }
      # Increase radius for next iteration.
      radius += rate / 2
      Graphics.update
    end
  end
end
#==============================================================================
# ** Game_Temp
#------------------------------------------------------------------------------
#  Added transition_type attribute which controls transition shown.
#==============================================================================
class Game_Temp 
  attr_accessor :transition_type
  attr_accessor :use_back
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias transpack_game_temp_init initialize
  def initialize
    @transition_type = 0
    @use_back = false
    transpack_game_temp_init
  end
end
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#  Scene_Map modded to use the transition effect when battle begins.
#==============================================================================
class Scene_Map
  #--------------------------------------------------------------------------
  # * Battle Call
  #--------------------------------------------------------------------------
  alias transpack_call_battle call_battle
  def call_battle
    transpack_call_battle
    $scene = Transition.new($scene, Transition::BATTLE_EFFECT, Transition::BATTLE_USE_BACK)
  end
  #--------------------------------------------------------------------------
  # * Shop Call
  #--------------------------------------------------------------------------
  alias transpack_call_shop call_shop
  def call_shop
    transpack_call_shop
    $scene = Transition.new($scene, Transition::SHOP_EFFECT, Transition::SHOP_USE_BACK, rand(4))
  end
  #--------------------------------------------------------------------------
  # * Name Input Call
  #--------------------------------------------------------------------------
  alias transpack_call_name call_name
  def call_name
    transpack_call_name
    $scene = Transition.new($scene, Transition::NAME_EFFECT, Transition::NAME_USE_BACK)
  end
  #--------------------------------------------------------------------------
  # * Menu Call
  #--------------------------------------------------------------------------
  alias transpack_call_menu call_menu
  def call_menu
    transpack_call_menu
    $scene = Transition.new($scene, Transition::MENU_EFFECT, Transition::MENU_USE_BACK, rand(8))
  end
  #--------------------------------------------------------------------------
  # * Save Call
  #--------------------------------------------------------------------------
  alias transpack_call_save call_save
  def call_save
    transpack_call_save
    $scene = Transition.new($scene, Transition::SAVE_EFFECT, Transition::SAVE_USE_BACK)
  end
  #--------------------------------------------------------------------------
  # * Player Place Move
  #--------------------------------------------------------------------------
  def transfer_player
    # Clear player place move call flag
    $game_temp.player_transferring = false
    # If move destination is different than current map
    if $game_map.map_id != $game_temp.player_new_map_id
      # Set up a new map
      $game_map.setup($game_temp.player_new_map_id)
    end
    # Set up player position
    $game_player.moveto($game_temp.player_new_x, $game_temp.player_new_y)
    # Set player direction
    case $game_temp.player_new_direction
    when 2  # down
      $game_player.turn_down
    when 4  # left
      $game_player.turn_left
    when 6  # right
      $game_player.turn_right
    when 8  # up
      $game_player.turn_up
    end
    # Straighten player position
    $game_player.straighten
    # Update map (run parallel process event)
    $game_map.update
    # Remake sprite set
    @spriteset.dispose
    @spriteset = Spriteset_Map.new
    # If processing transition
    if $game_temp.transition_processing
      # Clear transition processing flag
      $game_temp.transition_processing = false
      # Execute transition
      $scene = Transition.new($scene)
    end
    # Run automatic change for BGM and BGS set on the map
    $game_map.autoplay
    # Frame reset
    Graphics.frame_reset
    # Update input information
    Input.update
  end
end

class Game_System
  attr_accessor :disposables
 
  alias transition_init initialize
  def initialize
    transition_init
    @disposables = []
  end
end

module Modifier
  def self.included(mod)
    mod.module_eval {
      alias_method :tdks_trans_updt, :update
      define_method(:update) {
        return tdks_trans_updt() unless $scene.is_a?(Transition) or $skip_trans
      }
    }
  end
end

class Scene_Title;include Modifier;end
class Scene_Map;include Modifier;end
class Scene_Menu;include Modifier;end
class Scene_Item;include Modifier;end
class Scene_Skill;include Modifier;end
class Scene_Equip;include Modifier;end
class Scene_Status;include Modifier;end
class Scene_Save;include Modifier;end
class Scene_Load;include Modifier;end
class Scene_End;include Modifier;end
class Scene_Battle;include Modifier;end
class Scene_Shop;include Modifier;end
class Scene_Name;include Modifier;end
class Scene_Gameover;include Modifier;end
class Scene_Debug;include Modifier;end

module Disposable
  def self.included(mod)
    mod.module_eval {
      attr_accessor :disposable
   
      alias_method :tdks_trans_init, :initialize
      define_method(:initialize) { |*args|
        tdks_trans_init(*args)
        @disposable = false
      }
   
      alias_method :tdks_trans_disp, :dispose
      define_method(:dispose) {
        if $scene.is_a?(Transition) and (($scene.started and !@disposable)) and !self.is_a?(Sprite_Battler)
          if respond_to?(:z=)
            self.z -= 1000
          end
          if self.is_a?(Spriteset_Map) or self.is_a?(Spriteset_Battle)
            tdks_trans_disp
          end
          if (self.is_a?(Sprite) or self.is_a?(Plane)) and self.viewport != nil
            self.tone = self.viewport.tone.clone
            self.color = self.viewport.color.clone
          end
          if self.is_a?(Viewport)
            self.tone = Tone.new(0, 0, 0)
            self.color = Color.new(0, 0, 0, 0)
          end
          $game_system.disposables.push(self)
          return nil
        elsif self.is_a?(Window_Base) && self.disposed?
        else
          tdks_trans_disp
        end
      }
    }
  end
end

class Tilemap
  include Disposable
 
  alias tdks_trans_tileset tileset
  def tileset
    return tdks_trans_tileset unless self.disposed?
    return Bitmap.new(1, 1)
  end
 
  alias tdks_trans_autotiles autotiles
  def autotiles
    return tdks_trans_autotiles unless self.disposed?
    return Array.new(7) { Bitmap.new(1, 1) }
  end
end

class Plane
  include Disposable
end

class Sprite
  include Disposable
end

class Viewport
  include Disposable
end

class Window_Base
  include Disposable
end

class Bitmap
  include Disposable
end

class Spriteset_Map
  include Disposable
end

class Spriteset_Battle
  include Disposable
end

module RPG
  class Weather
    include Disposable
  end
end

module Graphics
  class << self
    alias new_transition transition unless method_defined?(:new_transition)
    alias new_update update unless method_defined?(:new_update)
  end
 
  def self.transition(*args)
    args.push(10) if args.length == 0
    args[0] = 0 if $scene.is_a?(Transition) or $skip_trans
    $skip_trans = nil if $skip_trans
    self.new_transition(*args)
  end
 
  def self.update
    self.new_update
    if $scene.is_a?(Transition) and $scene.started
      $game_system.disposables.each { |disp| disp.update if !(disp.is_a?(Tilemap) or disp.is_a?(Spriteset_Map) or disp.is_a?(Spriteset_Battle)) and disp.respond_to?(:update) }
    end
  end
end


There's just one issue. For whatever reason, whenever the game title contains a '0', the screenshot dll will take a screenshot of the upper left side of the screen instead of the game. So if you want to use the transition pack in your game, stay away from titles containing '0'.

Edit - Fixed the issue.

Heretic86

Is that the version of the script you want updated in the collection?
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.)

ThallionDarkshine

Yeah, there were a few minor compatibility issues that I found, mostly that your project name contained a '0' lol, but they're all fixed now.

Heretic86

Im gonna hold off a bit before publishing with this.  I ran a few tests and theres a few things that need to be done.  Nothing too major tho. 

First minor thing I noticed was use of 'alias_method'.  Hitting F12 causes a stack level too deep crash.  Easy fix tho, just put 'unless $@' at the end of each alias_method call.  Just three of them.

Next one is transfer_player replacement.  I see why it had to be replaced, but due to other aliases, I think there might be another way to do this.

alias transpack_transfer_player transfer_player unless $@
def transfer_player
  if $game_temp.transition_type != -1
    (your code with $scene = Transition.new($scene) )
    # Prevent two transitions
    return
  end
  # Old code with Graphics.transition(20)
  transpack_transfer_player
end



There might be another way to do this also, so any feedback from anyone would be appreciated.

From a quick test, everything else seems to work pretty well.  Needs to be really close to main.  Just those two minor issues and I'll publish with the updated code.  Loading a save game causes a crash, so need to either start a new game or change code to set a default value when the variable is nil.  Transitions arent called every frame so you could use a getter method for transition_type with '@transition_type ||= 0' so no peformance hits there.

Side note: a couple of weeks ago, I was trying to get this working on the XP Ace project, and had a few issues that were also easy fixes in Event Transitions Module.  The fix there was to change all the 'when' statements with following colons to remove the colons.  IE, change 'when 1:' to just 'when 1' and Event Transitions works on XP Ace.  Not sure if I'll have time to test the Transitions Pack (not Event Transtions) on XP Ace.  Been hella busy lately.  Few minor things and we will be good to go!

Im definitely quite impressed with this script and am looking forward to plugging into the collection!  Fantastic 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.)

G_G

Or instead of modifying the alias methods, you could just put this at the top of your game.

if $game_exists
  Thread.new {system('Game')}
  exit
end
$game_exists = true

Heretic86

Quote from: gameus on June 04, 2015, 12:27:28 pm
Or instead of modifying the alias methods, you could just put this at the top of your game.

if $game_exists
 Thread.new {system('Game')}
 exit
end
$game_exists = true



I know about the F12 Fix.  Its the first script, but I have it commented out cuz its annoying while editing when it conflicts with full screen scripts.

I'll probably upload a minor update this weekend sometime with Thallions Transition Pack, but I have to put together a small demo for it...
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

Updated.  New version includes Thallions Transition Pack script as well as a brief demo.

I made a couple of minor changes to the script to fix F12 crash (just added 'unless $@' to alias calls) and several $game_system options so you can turn on or off Transitions during gameplay.  There was one compatability issue with a method that fully replaced transfer_player that I also fixed.  I just aliased transfer_player and called to the original or other aliases when the Map Transitions are disabled. 

No other changes made to any other scripts.
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

Hi Heretic

I added your "Pathfind (by ForeverZer0)" + "Super Event Sensor" + "Control Self Switches Anywhere" + "More Self-Switches - Gameus" (in that script order, And fixed Command 355 already) into my game, and copied one of your template enemy into my debug map to test it. I replaced the "fade event" part with manual opacity change so I omitted the "Fade Events or Heretic's Caterpillar" part.

When I walk into the sight of that enemy, the game crashes with Pathfind (by ForeverZer0) at line 201: Undefined method "original_move_route".

I removed every other custom script I added, leaving only those scripts I copied from your demo, and the error persists, so conflicting script is unlikely.

Some help please?

Heretic86

Try adding this code in as its own script:

class Game_Character
  attr_accessor :original_move_route
end

Let me know if that doesnt fix it.
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 June 26, 2015, 05:41:22 am
Try adding this code in as its own script:

class Game_Character
  attr_accessor :original_move_route
end

Let me know if that doesnt fix it.


Yep, that did it. Thanks for your timely help!

EDIT: yet another crash:

I put your fix below Pathfind by ForeverZer0 (also added attr_accessor :original_move_route_index to fix another related crash), and added Lagless Path Finder 1.22 below it since your demo enemies use it.
Then I modified the patrol route of an enemy, copied from the demo.

When the enemy reached his first waypoint, the game crashed:
Pathfind (by ForeverZer0)
Line 693 NoMethod error undefined method [] for nil:NilClass.

The game also crash when the enemy run into walls (seemingly failed to find his way):
Line 802 NoMethod error undefined method [] for nil:NilClass.

The previous test with another enemy worked, but his route is relatively simple (walking in a small square, no obstacles).
This one is a bit longer and mostly diagonal: moving from 55,64 to 22,22 with some walls in the way.

Heretic86

And youre not going over Stairs or Downhill Ice, right?  All pathfinders have problems with stairs and ice.

I had a little better luck with Blizz's Pathfinder since his also includes Waypoints, but that was a change I tried to put into F0's pathfinder with minimal success.  Both scripts play nice with each other (no conflicts) so if one or the other works better for you, just use that one.  The three Mercenaries on the Crumbling King quest use Blizz Pathfind commands as examples.
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.)

RedHorse

Spoiler: ShowHide


this is what i get, the project don't start and crashes, can you please help me?

KK20






   


   
   


   
   

Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!



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

Join the CP Discord Server!

RedHorse

I uploaded a screenshot, it get started and thats it, black screen and when you click on the test screen window freezes.

KK20

No idea then. I downloaded the demo and it ran fine. Other than doing this:
Quote
NOTE: If you have trouble opening the Demo from the Editor, you can change the version by editing Game.ini Library=RGSS102E.dll or what ever you need to suit your version of RPG Maker.  You can also edit Game.rxproj with Notepad and change RPGXP 1.02 to suit your version of RPG Maker.

I made no other changes.





   


   
   


   
   

Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!



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

Join the CP Discord Server!

Heretic86

Black screen with no Error Messages, and NO other changes to it, hmm...

You can disable entire scripts by putting "__END__" at the very top line.  Dont put any spaces or ANY other characters after the last _ character.

Try disabling the Animated Title Scene script by using that "__END__" code and see if that does anything.

if that doesnt work, also try disabling "Auto Font Install".

The Black Screen is used for a Logo, but is actually a MAP.  The MAP is called "Title Map Animated - All Black".  You should be able to change Tilesets to draw on that map and see if anything there changes that first screen.

Also, are you running the game and editor with Administrator privileges?  Try right clicking on Game.exe and click on "Run as Administrator".  RPG Maker XP was released when Windows XP was the main operating system, and it doesnt play quite as nice with newer versions of windows.  So, just out of curiosity, what version of Windows are you running?

---

Update News:

Im scripting again!  I have a few ideas for some new scripts.  They may or may not work, but seems like they are coming along so far.  Im working on a PLATFORMS script that will allow Characters to do things like walk on a floating island to cross impassable areas.

Would anyone be interested in a Moving Platforms script, or any other requests?
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.)

schmoggi

Hi Heretic86,

Quote from: Heretic86 on March 22, 2016, 06:17:13 pm

Update News:

Im scripting again!  I have a few ideas for some new scripts.  They may or may not work, but seems like they are coming along so far.  Im working on a PLATFORMS script that will allow Characters to do things like walk on a floating island to cross impassable areas.

Would anyone be interested in a Moving Platforms script, or any other requests?


Oh, and there i thought this Day could not get any better  8). A "Moving Platforms" Script would be a Dream! I waited and searched so long for this. But there is nothing alike for our beloved XP :/ ... eh, well not 100% true. I saw a Script, worked fine, but it was bound to a pixel moving Script with inbuild Jump System. At first, such Systems does make sense in combination with moving Platforms but some (like me) like to give Players only the Possibility to jump (to other Platforms) at specific Points/Positions. Furthermore the "Moving Platforms" Script should be independently so People can decide on their own if they stay with the standard 32x32 Tile Movement or go with 16x16/8x8/... and so on.
So in short ... yes there is a lot interest, at least from my Side! A "Moving Platforms" Script in a "basic" form, means totally independently would be great. If you could customize it in the way, telling via some configuration Lines in the Scripts self what a Movement System you use so it can adapt to it would be awesome!

By the Way ... if you already asking for other requests:

I don't know if you remember, i started a Request some Time ago about Z Layers etc.

http://forum.chaos-project.com/index.php/topic,15059.msg191893.html#msg191893

Though it is outdated (did an Update in other Places), i had to realize that it was a doomed Dream, at least with the standard Tilemap Class and much Effort would be needed and so on. So i made up my Mind a while ago and canceled completely the realistically drawing Part of the Sprites. I changed my plans and decided to go only with the "Z Terran Tag" Thing. I don't want to bother you with the long (old) Thread so i sum up my Idea(s):

1. A Script for a local Variable for Events and Player which can store a Value (in my Case it would be the Z Level). It seems there is already a Script out there (here) which can do that though. So, maybe that wouldn't be needed anymore:

http://forum.chaos-project.com/index.php/topic,5357.0.html

2. A Script which gives the Possibility to give specific Tile ID's in your Tileset more than just one Value, independently . So, for Example, one Tile in your Tileset could have the Value "1" and "2". Pretty much like Terrain Tags. Difference here is, a Tile ID can have different Values at the same Time. This should not override or replace the standard Terrain Tag System but instead advance it.
There are Scripts out there which handles "unlimited" Terrain Tags. As much as i understand them, the Values are stored in an Array with a specific Name. But there is still only one Value for one Tile ID. So to make this happen, in theory, i guess there could be more some sort of multiple Arrays with differents Names. Through this a Tile ID could have different Values, stored in different Arrays and you could refer to one or multiple Arrays in Conditions with the help of the individual Names.

Furthermore, i would have two little additions which relate to both Requets and make it complete:

A "negative" collision and trigger check for specific Events (e.g. Commment or Character in Event Name) and Player when they have different Values stored in the local Variable. So, no blocking or triggering between them when the Values are different. Maybe customization for enabling/disabling only collision or trigger check but thats just optional.
Furthermore when that specific Events and our Player are moving towards Tile ID's with a different Value (customization which Array should be checked) than their own, stored in the local Variable, their local Variable Value should change to the Value from the Tile ID's they are moving toward.

greetz 

Heretic86

Well, Moving Platforms is coming along with some degree of success.  I didnt have too much of a choice but to make it dependent on Modular Passable tho.  Its probably gonna take some time in order to maintain compatability with other scripts.  I dont think I'll be able to do partial steps tho because it would decrease compatability severely, but is possible.  I tried to leave the stuff to be as open and as compatabile as I possibly could.  The SDK sucks.  We all know this.  But one thing that the SDK never did was to allow any changes to the definitions of Passable.  Thats what gave birth to the idea of Modular Passable.  Modular Passable is basically like the SDK but only for two very important methods in our scripts.  And I've written quite a few scripts that enhance the movements of characters that all work together.  It allowed for Stairs and Downhill Ice to work together, as well as Looping Maps, a Collision Optimizer (performance), Vehicles, Mirror Movement, Hotfoot Tiles, NPCs on Event Tiles, and a couple more that Im now working on, which will include Moving Platforms!  So yes, you can have Stairs and Moving Platforms, or just Stairs or just Moving Platforms, but for them to work together, they need Modular Passable.  Modular Passable by itself doesnt do anything.  Putting the script in your game and you wont notice any other changes.  Modular Passable is a framework that allows other scripts to alter behaviors with compatability.

I do recall having read your request for Z-Index stuff.  I was able to achieve something similar to your requested effects with some clever eventing.  Z-index stuff, like having different enemies on different layers, thats a small part of what I already did in the Modular Passable packages, and I did specific Z-Index stuff in several scripts.  The caterpillar has some Z-Index controls, but also so does NPCs on Event Tiles and Restrict Tile Passages.  The whole point of all the Modular Passable scripts was to give everyone as much control over everything as I could incorporate. 

But I did do a bit more thinking about what you were saying.  What I came up with seemed to work okay.  It can be achieved with both Event Tiles by swapping Event Pages, and can be achieved by getting direct access to the tiles themselves.  Events is way easier, but limited in scope, but swapping tiles creates an Illusion.  If you duplicate a set of graphics in your tilesets, you can give them different passages and priorities, even though they look exactly the same to the Player.  So what Im thinking is you have a map with at least two "Levels", a top and a bottom.  While on the bottom, a player can walk under or behind some of the terrain, but on the top layer, those passages are totally different and allow walking around on all parts of the top layer.

Im pretty sure I understand givng a tile two sets of graphics, but that gets two deep into the graphics class to be able to do.  However, there is another way to do it.  Keep the graphic the same and give each Character a different set of responses to that same graphic.  That is exactly what my Restrict Tile Passages script does.  It doesnt just block, but allows movements also.  So you can have one NPC walk on water, while another character is not allowed to move on water.  You dont even have to change the passages in the database, so it is very character specific.  Every event can be customized!  You can set Wildlife to only move on Grass Tiles (with those tile IDs in an Array), or a Human NPC to only move on Road Tiles, but not grass!  Being able to customize which characters (both Player and Events) is what allowed me to create a Vehicles script that allows the Player to move on Water or Lava, while NPC characters that move around at random wont be able to step on water or lava.  So we dont need to do anything to the graphics, just monkey with each character.  I tried to set this up to be as easy as I could make it.  In the top ten lines of list of event commands, just put in one of three comments with an array of Tile IDs.  \tile_allow_move[1] would allow an Event to move on a Water Tile if your first Autotile is water and normally unpassable.  \tile_only_move[1] would be appropriate for a fish in water.  \tile_no_move[252] might keep an Event from randomly stepping on a specific plant, if that is what tile 252 is.

I did do even more tho.  Events can be both NPCs and Tiles.  By default, NPCs can not step onto other Events, but with my scripts they can!  So you can have a Bridge Event Tile and have an NPC walk on it!  That one is pretty simple: \allow_npc Comment on the Event Tile.  Its configurable so you can auto-allow NPCs to step on Event Tiles.  The scripts also work together so the NPC will step on Event Tiles unless the NPC has a Comment of \tile_no_move[567] and the Event Tile has a Tile ID of 567.  They'll step on everything else.  You can even set Events to move through other Events, but still be restricted by Tiles!  I called that \event_through  So an Event with a Butterfly graphic can fly through other characters, even the player, but cant fly through mountain walls or big trees.  All these things can be applied to the Player as well, but need to be done with script calls.  For example $game_player.tile_no_move = [567,568,569] or in a Move Route Script @tile_no_move = [3,4,6,7,9]; @tile_allow_move = [1];  It gives you as much control as I could give you.

Im not sure I understand "Negative" trigger, but you seem to be familiar enough with scripts and programming in general that I think this explanation will be worth while.  Triggers for each event can be changed with simple Move Routes!  Even though you set the Trigger with the Editor where it says "Action, Player Touch, Event Touch, Autorun and Parallel", its a simple numeric value and that value can be changed as easily as Through can be turned on and off with Move Routes also.  It just requires a script call: @trigger = 0 thru 4.  The default of 0 thru 4 represent each of the default behaviors, where 0 = Action Button, 1 = Player Touch, etc.  The default code says anything higher than 2 is an autorun or parallel and is always updated in its list of event actions, but you can go negative also!  For example @trigger = -1 makes an event Untriggerable!

Anyway, almost everything I talked about has been done in the demo except for the stuff I havent worked in yet.  Many solutions are already in place for you, but require some creative thinking.  This script demo will probably take you HOURS to check out every feature because there are literally that many things I've done.  It is a massive training session, and EVERY script is nearly fully explained and given fully functional examples!  The things that I havent put in yet, I am now working on, and have numerous ideas.

Its almost sad when my Script Demo is bigger and more in depth than many games, and yes, there is even a part that lets you experience some actual gameplay with a Boss and everything!  An actual Boss Battle in a Demo?  Who'd have thunk it?
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.)

schmoggi

Quote from: Heretic86 on March 24, 2016, 09:27:02 pmSo yes, you can have Stairs and Moving Platforms, or just Stairs or just Moving Platforms, but for them to work together, they need Modular Passable.  Modular Passable by itself doesnt do anything.  Putting the script in your game and you wont notice any other changes.  Modular Passable is a framework that allows other scripts to alter behaviors with compatability.


That is totally fine with me. I'm planning to use some Scripts from your Collection Art anyway and i felled in love especially with the Modular Passable and the Possibility it provides like the "restricted Tile Passage" and "event through event but no tileset" part. Makes Life much easier :). With independently i actually just ment to not combine it with other Scripts or Functions which alters your Movement Behavior, i you like or not. Thats all. If you like, i could provide you the other Moving Platforms Script i talked about so you can have a Glance at it.

Quote from: Heretic86 on March 24, 2016, 09:27:02 pm
But I did do a bit more thinking about what you were saying.  What I came up with seemed to work okay.  It can be achieved with both Event Tiles by swapping Event Pages, and can be achieved by getting direct access to the tiles themselves.  Events is way easier, but limited in scope, but swapping tiles creates an Illusion.  If you duplicate a set of graphics in your tilesets, you can give them different passages and priorities, even though they look exactly the same to the Player.  So what Im thinking is you have a map with at least two "Levels", a top and a bottom.  While on the bottom, a player can walk under or behind some of the terrain, but on the top layer, those passages are totally different and allow walking around on all parts of the top layer.


Exactly, that is what i talked about in the first Point back then. Add the Drawing Part and you have a real Elevation System. But like i said, i dropped that Thing back then after i realized there is no chance realize the Drawing Part with the standard Tilemap Class. And without the Drawing Part there is no Point to talk about the other stuff because the Illusion of different Z Levels is broken. The Thing is, i can easily build a Eleveation System through swapping Event Pages or through swapping the Tiles on the Map directly with the Help of some Script Commands right now, even without the Additions of the Collection Art. The Problem is and was back then, this would only apply to either the Events or the Player but not both at the same Time! Look here:

The Characters are on different Z Levels, so they can not interact with each other and are drawn behind or above the Tiles, depending on their actual Z level, at the same Time. Sadly, not possible (right now), at least the drawing Part, so i dropped it and changed my Plans. Situations like this one are not possible anymore because Cliff Tiles like the one on the Pic have no higher Priority and are only passable from one side (pretty standard). The "Logic" for the Z Levels are still there though and that is the Reason for the "give Tile ID's multiple Values" Script or just call it "Z Terrain Tags". It could be easily done with the standard Terrain Tag System but then you have no Terrain Tags anymore for other Things and "unlimited Terrain Tags" Scripts don't help because Tiles can still only hold one Value per Time. In short, there is need of more than just one Terrain Tag System which all work independently and don't override eatch other Values.

Quote from: Heretic86 on March 24, 2016, 09:27:02 pm
Im not sure I understand "Negative" trigger, but you seem to be familiar enough with scripts and programming in general that I think this explanation will be worth while.  Triggers for each event can be changed with simple Move Routes!  Even though you set the Trigger with the Editor where it says "Action, Player Touch, Event Touch, Autorun and Parallel", its a simple numeric value and that value can be changed as easily as Through can be turned on and off with Move Routes also.  It just requires a script call: @trigger = 0 thru 4.  The default of 0 thru 4 represent each of the default behaviors, where 0 = Action Button, 1 = Player Touch, etc.  The default code says anything higher than 2 is an autorun or parallel and is always updated in its list of event actions, but you can go negative also!  For example @trigger = -1 makes an event Untriggerable!


Thank you Sir, i didn't even know that is possible. You can learn every Day :).

But, i guess "negative" Trigger was not clear enough. I mean Events and Player with a different Value in their local Variable can not interact (triggering) and do not block each other when moving, but this only applies to Characters with different Values. So, for example two NPC's with the same Value interact with each other as they would normally do.

greetz

Heretic86

Well, I got a small something working...

MOVING PLATFORMS



Its VERY buggy since I've only spent about 2 days working on it so far.  None the less, functional concept!  Im sure there are people interested in seeing what is happening, so here is my Prototype!

DOWNLOAD: Prototype Demo

Get used to hitting F12!

I put some comments in there to explain the overall concept.  Im sure the majority of this will be rewritten.  What Im curious to see is if any other scripters would be interested in writing their own version, which I gave a brief description of how to do.

Anyway, whaddya think so far?
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.)

orochii

I was actually thinking about making one myself for my game some days ago. Now I think I'm maybe using this xD.

How usable is it right now? I could lend a hand in testing at least. But depending I would need to adapt it to work with my game since I've made a lot of changes everywhere, and so I'm not sure if my testing would help you.

I'm going to give it a try anyway. Or at least take a look at it.

schmoggi

Looking fine so far, Heretic!

I get sometimes an endless loop of Aluxes moving Animation on the Platform when trying to move in the opposite direction the Platform is going. But i can not reproduce it, seems pretty random. Otherwise it is usable, respect for this short amount of Time. Looking forward for the "getting on Platforms while they are moving". While testing i think i realized why the other Platform Script has an inbuild pixel Movement.
When heading in the opposite Direction the Platform is moving, you get this "strange" and "slow" feeling of Movement. I don't know if you will fix that or it is there because we have a 32x Tile Movement. Furthermore i don't know how "getting on Platforms while they are moving" can be achieved with our Tile Movement. I think there would be a Problem with synchronization the Position of the Player, based on the Tile Movement, when e.g. jumping on a moving Platform. It would result in an offset of x/y and the Player would not be anymore in the Grid itself.

greetz

Heretic86

Quote from: orochii on March 27, 2016, 12:47:14 pm
I was actually thinking about making one myself for my game some days ago. Now I think I'm maybe using this xD.

How usable is it right now? I could lend a hand in testing at least. But depending I would need to adapt it to work with my game since I've made a lot of changes everywhere, and so I'm not sure if my testing would help you.

I'm going to give it a try anyway. Or at least take a look at it.


What changes just out of curiosity?

Custom changes that you do are fine too.  I know they are necessary, so they are permitted.  I didnt put any legal stuff on this yet, but it will be allowed anyway.

Right now, it definitely isnt ready to be put into a game because it can cause the player to get completely stuck, but semi fun to play with. 

---

Quote from: schmoggi on March 27, 2016, 01:28:49 pm
Looking fine so far, Heretic!

I get sometimes an endless loop of Aluxes moving Animation on the Platform when trying to move in the opposite direction the Platform is going. But i can not reproduce it, seems pretty random. Otherwise it is usable, respect for this short amount of Time. Looking forward for the "getting on Platforms while they are moving". While testing i think i realized why the other Platform Script has an inbuild pixel Movement.
When heading in the opposite Direction the Platform is moving, you get this "strange" and "slow" feeling of Movement. I don't know if you will fix that or it is there because we have a 32x Tile Movement. Furthermore i don't know how "getting on Platforms while they are moving" can be achieved with our Tile Movement. I think there would be a Problem with synchronization the Position of the Player, based on the Tile Movement, when e.g. jumping on a moving Platform. It would result in an offset of x/y and the Player would not be anymore in the Grid itself.

greetz


Thanks!

Okay, movement works like this, as you may already know:

distance = 2 ** @move_speed

I had to change that to this:

x_dist = y_dist = 2 ** @move_speed
# Set X and Y distance to 0 if direction is not relevant
case @platform_move_direction
when 4, 6 # Left and Right
  y_dist = 0
when 2, 8 # Up and Down
  x_dist = 0
end

When the Platforms move, they use the original method, which works fine.  Speed comes out to a real value of 9 with a speed of 3 and 16 with a speed of 4.  I understand that feeling of "slow movement" because of  the screen scrolling.  Adjustments made cause the screen to scroll at a real speed of 7 since 16 - 9 = 7.  If the platform moved the same speed, it wouldnt be just slow, it would be no scrolling at all!  Im not sure what I can do about that since the screen always centers the player.

While getting on and off platforms, and changing between two different groups, the whole Platform Group will stop moving until "boarding" and "unboarding" is complete.  Im not sure if this is a good way to do this.  I didnt want the platform to move away from a characters position until they were fully on that platform.  It just broke the illusion.  So far, I sort of set it up so while boarding, a platform wont move at all, it wont even update its Wait counter!  What I wanna do, not fully working, is allow two platform groups to be evented so they end up next to each other, then characters can transfer between them without either platform taking off prematurely.

Current way they are set up is so you cant get on or off a Platform unless they have been given a Wait command!  You can (sort of) walk between Tile Groups 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.)

schmoggi

Quote from: Heretic86 on March 27, 2016, 06:35:17 pm
Thanks!

Okay, movement works like this, as you may already know:

distance = 2 ** @move_speed

I had to change that to this:

x_dist = y_dist = 2 ** @move_speed
# Set X and Y distance to 0 if direction is not relevant
case @platform_move_direction
when 4, 6 # Left and Right
  y_dist = 0
when 2, 8 # Up and Down
  x_dist = 0
end

When the Platforms move, they use the original method, which works fine.  Speed comes out to a real value of 9 with a speed of 3 and 16 with a speed of 4.  I understand that feeling of "slow movement" because of  the screen scrolling.  Adjustments made cause the screen to scroll at a real speed of 7 since 16 - 9 = 7.  If the platform moved the same speed, it wouldnt be just slow, it would be no scrolling at all!  Im not sure what I can do about that since the screen always centers the player.


I think, i get it now. I played a little more with it and did not think about the movement speed of the Platforms at first, so i changed their Speed from 2 to 3 and then to 4 (same Speed as Player). With every increase that "slow movement" fades away, of course. But the correct movement (x/y position) while going in the opposite Direction is messed up then (with every increase).

Quote from: Heretic86 on March 27, 2016, 06:35:17 pm
While getting on and off platforms, and changing between two different groups, the whole Platform Group will stop moving until "boarding" and "unboarding" is complete.  Im not sure if this is a good way to do this.  I didnt want the platform to move away from a characters position until they were fully on that platform.  It just broke the illusion.  So far, I sort of set it up so while boarding, a platform wont move at all, it wont even update its Wait counter!  What I wanna do, not fully working, is allow two platform groups to be evented so they end up next to each other, then characters can transfer between them without either platform taking off prematurely.

Current way they are set up is so you cant get on or off a Platform unless they have been given a Wait command!  You can (sort of) walk between Tile Groups tho.


It would be very hard, even imposibble, anyway to set up the possibility for Platforms to move avay while Characters/Player are moving on the Platform with the Restriction of Tile Movement like we have it now. Like you said, it brakes the illusion but also brakes the right Positions from the Characters. Guess, that kind of Thing needs pixelmovement. So being able to only move on Platforms while they are on hold and Platforms only moving again when Characters/Player is finished with the "move on Platform" process is fine.

I do not know if you thought about it, but i also noticed, making some changes in the Platform Events after you set them up (Speed, Route) could be a bit annoying, especially when you have more and bigger Plaform Groups on your Map. An Idea to avoid that and make it more comfortable would be, to control and set up whole Platform Groups with only one Command/Event. In this case, you would ony need to change the Sprite (if needed) when changing something.
An Alternative could be, but i don't know if thats possible and even fit into the Platform Script, to have only one Event with the whole Platform Sprite
(obviously a character then) and somehow tell the system that this Character is logically bigger than just one 32x32 Event and have custom passabilites in that Range of x/y Values the Sprites is being displayed.

greetz

Heretic86

@schmoggi

I cant do collisions larger than 32 x 32 without severiously compromising compatability.  Any script that could would most likely be ADHOC and almost completely incompatible with everything else due to how much core stuff would need to be replaced.  Anyone else thats tried to do Collision Checking would probably be able to verify this, but may have some clever ideas.

---

One Platform to Rule Them All

Thats a good idea.  Since platforms are being set up to work in "Groups", I can do something like @>Comment: \platform_master[1]  then just have all the rest of the Platforms of the same Group set to Custom Move Route, but leave the Move Route itself blank, then I'll try to take care of the rest.

---

General

Great progress so far!  Collisions now work almost perfect, and Im now working in Looping Maps, so I'll have to redo a couple of Redefinitions and Aliases.  Collisions are perfect with non looping maps, but I need to round some stuff to make it work with Looping Maps.  The earliest version was glitchy as all hell and I figured that out.  Since I needed Collision Optimizer, I wasnt updating the Event Coordinates after Platforms moved the Events, causing some collision detection failures.  That is now fixed.  But after that, there is still more stuff to do, such as Event Pages and moving the Events and Player onto Platforms.

Moving Platforms is coming!   8)
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.)

schmoggi

Nice to hear, i can't wait for it :).

I would love if you post another, advanced Demo to see the Progress when you have time :).

greetz

Heretic86

Quote from: schmoggi on April 01, 2016, 03:41:09 am
Nice to hear, i can't wait for it :).

I would love if you post another, advanced Demo to see the Progress when you have time :).

greetz


For Platform Development, lets switch this over to this thread:
http://forum.chaos-project.com/index.php/topic,15371.0.html

Im posting some new code in it right now.
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.)

schmoggi

I've got one Question regarding alternatve Movement Scripts:

In your Modular Passable Script it is stated

Quote# -----  Compatability  -----
#
# This script will NOT be compatible with any other script that replaces
# either Game_Map Passable or Game_Character Passable.  If a script replaces
# Game_Event Refresh, that can be fixed by putting the entire Game_Event class
# below the conflicting script, but leave Game_Map and Game_Character classes
# in this script above other user created scripts, except the SDK.
#
# If the nature of other scripts is extremely different, expect problems.  So
# other scripts like Pixel Movement Scripts most likely will be too foreign
# for this script to offer any compatability.  Bananas and Screwdrivers.
#
# This is intended for making the Default Movements more Modular only.


Does this mean, Scripts which alters the Movement of Player/Events have no chance at all or can be made compatible when adapting the Movement Script to the Modular Script?
To be clear, i do not like Pixel Movement in Maker Games. But the standard Movement (32x) can be sometimes too "big", if you know what i mean. Especially, when working with an Action Battle System (Zelda like) like i do, small steps when attacking etc. can look unfortunate. So, i thought a long time ago about it and did a Request for a more precise Movement Script, so Player/Events Movement is reduced to 16 instead 32 pixels. Fortunately, someone called delura was so nice to create such a script and with it you can customize the Movement from 32 down to 16, 8 and 4 pixels.
This means, i have this Script lying around and originally planned to use it. Did a Test with the Modular_Passable Scripts and, of course, it did not go so well. Well, it works but things like diagonal Stairs (lite and delxue) are not recognized anymore and who knows what else. Anyway, in short, Is it worth starting a Request to ask someone with enough time for making it compatible with the Modular_Passable Script or is it an already doomed plan and I'll have to stay with standard Movement?

greetz

Heretic86

I doubt it would work, or if it did, it would just take a lot more time than Im willing to put in.  I have a life outside here.

I'll try to explain what I mean by "replacing" methods.

def foo
return bar
end

def foo
return taco
end

Thats a Replacement


This is an "Alias"

def foo
  return 1
end

alias my_foo foo unless $@
def foo
  #Call Original
  result = my_foo
  return false if result != 1
  # do other stuff
end

That allows multiple scripts to work together.  If Modular Passable is replaced, it wont work, obviously, but I wrote it so it could be aliased heavily.  The following is the basic way the default XP code is written.

def passable
  if @through
  return true
  end
  for event in events
    if not event.through
      return false
    end
  end
  return true
end

There are no methods in the middle of the core that can be Aliased so the only way to modify the behavior is to replace it completely.  The way I wrote Modular Passable was semi SDK style

def passable
  return true if my_method
  return false if my_method2(arg)
  return false if method_to_check_events
  return true
end

The way that is written lets you change the way "my_method2" for example works, and alter its results without having to replace the entire definition.

---

I do know what you mean, I did play the very first Zelda game and remember how it had those smaller "half step" tiles.  It was one of those kind of cool things about the game.  It didnt feel as blocky as XP games do.  Anyone can use Modular Passable to write scripts that do whatever they want and hopefully be compatible.  As long as the two main methods arent replaced, and they stick with Aliases as much as possible, whatever they write should hopefully work.  I doubt anyone will be able to do anything because so many of my scripts already stick to that default tile movement.  Platforms messes with "moving?" heavily, so it only causes that 32 tile thing to be even harder to change.  Basically, if you are on a platform, moving is determined if you are at the same X and Y as the event and it doesnt care about the tile restrictions.  The 32 tile thing is still there, however it is constrained by relational positions to the platform, just not the grid.  But after you step off of a platform, it goes back to the normal way of checking how far a character can move.  The thing is, collisions with that much complexity are a logistical nightmare without a grid.  Imagine playing chess with no grid and allowing any chess piece to move anywhere, no restrictions at all.  It would just be a mess for the average people to figure out.  Collisions without the XP grid of 32 pixles per tile means that an already inefficient engine would have twice as much work to do.  But, it would be neat looking!

You could post a request for a script of that type, but I dont think Modular Passable has caught on as I kinda hoped it might so I doubt anyone has the experience with that particular script to fulfill such a request.  Hopefully Im wrong tho!

---

Aside from that, I was able to get Stairs and Platforms working together, but it came at a price: have to put Platforms script below Stairs.  I dont think its that bad of a restriction tho, but one I have in general tried really hard to avoid whenever possible.
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

UPDATED!

Added 3 Scripts!

  • - Moving Platforms (Final, hopefully, legal restrictions removed, should be perfectly stable)

  • - Zeus Video Player - Play MOVIES in RMXP finally!

  • - Advanced Camera Control System - You'll have to see the Demo Map to understand what it does.  Also, change Map Width and Height on the fly!



I would appreciate some feedback on the new scripts!

The Demo Maps can be found on the big map with all the caves.  Follow the BOATS to get to this map and just read the signs.  I tried to guide you to Boats, but the Caves on that same map are the ones with the Demos of the New Scripts!

Sorry, there is just so much content, but thats a good thing too!

If I dont get any negative feedback, such as bugs, I'll update the original post in this thread in a few days.  So, basically, beta testing!

Version 2.1
http://downloads.chaos-project.com/heretic86/HereticsCollectionVer2.1.7z

Edit: New version, apparently the self extractor doesnt like to self extract the movies.  :p
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.)

schmoggi

I checked the new Collection with the new Demo(s) and it is wonderful. Specially the Advanced Camera Control System is a very nice addition, no to mention the Moving Platforms (i love it). You put some nice explanation in there and i find it very outstanding, that your collection Project outmatches a lot of Game Projects out there when it comes to detail love although it is "just" a Project demonstrating your beautiful Script Collection. Thank you!

greetz

Heretic86

Quote from: schmoggi on April 23, 2016, 08:19:57 am
I checked the new Collection with the new Demo(s) and it is wonderful. Specially the Advanced Camera Control System is a very nice addition, no to mention the Moving Platforms (i love it). You put some nice explanation in there and i find it very outstanding, that your collection Project outmatches a lot of Game Projects out there when it comes to detail love although it is "just" a Project demonstrating your beautiful Script Collection. Thank you!

greetz


Makes me feel good to hear that!

I gave it a very minor update, had a few Event bugs that I didnt like, but no script changes.

If you like it that much, perhaps do a Video Review of it on YouTube?  I think this works best if done in your native language and not by be so the video is seen more objectively by viewers.  I know there are some Event Bugs deep inside that I've never figured out, but considering the size of this monster, I think that is to be expected.  Im not perfect despite my best efforts to get as close as can be achieved.

I've put literally years of work on and off into creating this package to support the community.  Would anyone be interested in doing a Video Review on YouTube?
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.)

Loveless

Is there any reason you can think of that would explain your collection staying on a black screen whenever I start it up? I've definitely used an older version in the past on a different computer so I assume it's something on my end. I tried downloading the previous version to try that but it always fails to extract near the end and the unfinished extract, of course, gives me the same problem. It's been a while since I've messed around with XP but none of the other projects I've checked out so far have given me this problem.

KK20

How long did you wait for it to load? I tried it now and it took a good 15-20 seconds before the CRAPCOM logo started. You can check to see it's working by putting print statements in the code.


begin
  # Prepare for transition
  Graphics.freeze
  # Make scene object (title screen)
print "Make scene"
  $scene = Scene_Title.new
  # Call main method as long as $scene is effective
print "Main update for scene"
  while $scene != nil
    $scene.main
  end
  # Fade out
  Graphics.transition(20)
rescue Errno::ENOENT
  # Supplement Errno::ENOENT exception
  # If unable to open file, display message and end
  filename = $!.message.sub("No such file or directory - ", "")
  print("Unable to find file #{filename}.")
end


I remember when a background sound loaded, it froze my game sometimes. Might have been because of my lower spec laptop.





   


   
   


   
   

Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!



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

Join the CP Discord Server!

Loveless

Quote from: KK20 on May 10, 2016, 09:00:15 pm
How long did you wait for it to load? I tried it now and it took a good 15-20 seconds before the CRAPCOM logo started. You can check to see it's working by putting print statements in the code.

I've left it alone for at least an hour for it to load. That being said, the RGSS Player window goes unresponsive less than 30 seconds in regardless of what I do. I don't imagine it's a case of low specs but I'm running an i7-4790K with a GTX 980, 16 gigs of ram, and 64bit W10 if anything there seems off.

KK20

I'd still suggest trying to remove the audio. Google search seems to point to that being the biggest offender.





   


   
   


   
   

Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!



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

Join the CP Discord Server!

Heretic86

Quote from: Loveless on May 10, 2016, 09:12:36 pm
Quote from: KK20 on May 10, 2016, 09:00:15 pm
How long did you wait for it to load? I tried it now and it took a good 15-20 seconds before the CRAPCOM logo started. You can check to see it's working by putting print statements in the code.

I've left it alone for at least an hour for it to load. That being said, the RGSS Player window goes unresponsive less than 30 seconds in regardless of what I do. I don't imagine it's a case of low specs but I'm running an i7-4790K with a GTX 980, 16 gigs of ram, and 64bit W10 if anything there seems off.


It shouldnt take an hour to load.  Something else is going on...

My old box that I kept this project of mine on was a Core 2 Duo E8400 with 3 gigs of ram and a 1 gig video card, with Windows XP and dying hard drives and even then it did not take more than 2 or 3 seconds to start up.  So lets figure this out.

Are you running as Administrator?

Try running game.exe only, also as admin and with Compatibility Mode enabled for XP

It might be a sign of other failing hardware.  Could be other goofy stuff like Norton Antivirus.  You can replace the game.exe files in the folder with other game.exe files.  The ones I chose to go with were from the 1.02 version but I know it runs on 1.04 with some font issues, hence the switch.

The Font scripts also could cause some issues.  I have a few in the collection, but only used one at a time.  Auto Font Install is present but disabled in favor of ForeverZer0's Memory Font Loader.  It makes a few Windows calls that I know worked on XP but dont have the same confidence in later versions of Windows.  Im currently running Windows 7 x64 because 8 has been turned into a cell-phonified piece of crap and Windows 10 is spyware in a box.

If the above suggestions dont work, try disabling the Memory Font Loader by putting "__END__" at the top of the script.  No quotes and no spaces after the __ characters, so it needs to go on its own line.  Im unable to test this so it would be helpful if you could report if this resolved your issues or not.  If it doesnt, we will still need to dig a bit deeper...
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.)

Loveless

Quote from: Heretic86 on May 11, 2016, 04:10:58 am
Are you running as Administrator?

Always.

Quote from: Heretic86 on May 11, 2016, 04:10:58 am
Try running game.exe only, also as admin and with Compatibility Mode enabled for XP

No dice.

Quote from: Heretic86 on May 11, 2016, 04:10:58 am
Could be other goofy stuff like Norton Antivirus. 

Disabling my antivirus (Avast) did nothing and I've used your collection in the past on computers with Norton and had no problems. Those were all XP, Vista, or Windows 7 though.

Quote from: Heretic86 on May 11, 2016, 04:10:58 am
You can replace the game.exe files in the folder with other game.exe files.

Same problem.

Quote from: Heretic86 on May 11, 2016, 04:10:58 am
The Font scripts also could cause some issues...
If the above suggestions dont work, try disabling the Memory Font Loader by putting "__END__" at the top of the script.  No quotes and no spaces after the __ characters, so it needs to go on its own line.  Im unable to test this so it would be helpful if you could report if this resolved your issues or not.  If it doesnt, we will still need to dig a bit deeper...

This here worked perfectly. The collection loads almost immediately now and the print statements KK20 had me add finally pop up. Problem solved. I'll definitely be checking it out later to see what's new and I'll be around since I'm working on stuff again and I've got tons of free time. Thanks for your help.

Heretic86

Thanks for saying so.

I may need F0's, or even Blizzards help in getting that to work since it makes Windows calls that Im unfamiliar with and dont have access to Windows 10...

Until there is a Windows 10 fix, for anyone on Windows 10, it sounds like the Memory Font Loader script in the Collection doesnt 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.)

KK20

On the reply where I said it took me a good 15-20 seconds, that was on Windows 10. And I just double clicked the Game.exe as soon as I extracted it. So there's something more to it.

If the problem is not obvious, I suggest the "print statements" approach again, locate where the script is hanging. It's gotta be one of the WinAPI calls.





   


   
   


   
   

Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!



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

Join the CP Discord Server!

schmoggi

Hey there,

i was playing around the last day(s) in the maker and thought about some nice Idea which could be very useful. Since Heretic asked that day about new Ideas i thought, why not just post it here and see if there is some interestit to script it.

Event Size

So, as we know, Events are always 32 x 32 pixels and so they only take up one single tile on the map with collision etc. However, this also includes events with bigger graphics assigned to them. Logically, the big Dragon from the RTP for example should not be able to pass a 1 Tile space, but sadly it can. How about changing that?
The Possibility to give Events a proper Event Size (maybe through Comments) would be great. With that, Events with bigger Graphics could not pass anymore, for them, impassable areas or not be crossed by Player/Events where it should not be possible (think of the carriage). Furthermore,  the new size could be taken into account for triggering other Actions like Player touch/Event touch.

greetz

Heretic86

Its a good idea but a nightmare level of work to achieve that.  It would require rewriting damn near every movement and modular passable script and anything else that checks @real_x = @x * 128
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.)

Blizzard

Actually it's not that complex. But yes, it's a compaibility nightmare.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Heretic86

Updated
Saturday, August 20th, 2016

Added
- Heretic's Dynamic Lighting Version 1.0 - Release
Spoiler: ShowHide

Smooth Day / Night Transitions


Pendulum Lights

Features:
* - Very Fast Light and Shadow System
* - Fully Dynamic Lights (sorry, no realtime shadows)
* - Detect if a Character is being Illuminated with "in_light?(id)"
* - Built In Day and Night System
* - Pre Formatted Time in a Game Variable to display with \v[n] - 3:52 PM
* - Separate Indoor and Outdoor Settings (with a Game Switch)
* - Easy to configure Event Lights with Comments
* - Lights can be customized to Flicker either Size or Opacity
* - Smooth Transitions between Day and Night
* - Events and Lights can have different Opacity during Day and Night
* - Built In Game Clock or Sun / Moon Graphic (or both)
* - Highly Customizable, Length of Day, Color of Day, Night and Indoors, etc.
* - Lights can be Rotated
* - Shadows can prevent Lights for rooms and tops of buildings for logic
* - Spotlights point at characters and follow their movements
* - Pendulum Lights swing at the end of Pendulums
* - Standalone Script, should work fine with the SDK and Non SDK
* - Tested with XP Ace on Chaos-Project.com and it seems to work
* - Gluten, Peanut, and Lactose Free


- Heretic's Unlimited Event Page Conditions
Spoiler: ShowHide
Use Scripts for Page Conditions


- KK20's Custom Prices
Spoiler: ShowHide
Set Prices for Every Item when Shops are called
http://forum.chaos-project.com/index.php/topic,13681.0.html


- Added Sithjesters Sprites (800+ New Characters)
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.)

LiTTleDRAgo

September 06, 2016, 10:44:52 am #92 Last Edit: September 06, 2016, 11:00:04 am by LiTTleDRAgo
I downloaded your latest demo (oh wow 143mb!) O.o
but when I tried to playtest, it was extremely laggy

you should've included antilag script in your demo

Edit : used ABSEAL but still didn't reduce the lag

KK20

I do agree the download size is pretty absurd. Should separate the download so that, when there's an update, users don't have to download all the graphics or w/e again.

What part was laggy? The light system?





   


   
   


   
   

Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!



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

Join the CP Discord Server!

LiTTleDRAgo

Quote from: KK20 on September 06, 2016, 01:35:32 pm
What part was laggy? The light system?


only tried first few maps and lost interest because of lagg
the game seems paused for a few seconds for every step

KK20

How's your computer specs? I'm not really seeing any frame drops on the first few maps, it's still above 30.





   


   
   


   
   

Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!



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

Join the CP Discord Server!

Heretic86

Framerates gave me some difficulty because my specs are retardedly high and I pretty much dont experience any lag anywhere.

- My Specs: Intel i7-6700k OC'd to 4.6Ghz with 16 gigs of DDR4 RAM, also OC'd to 3000.

There are Framerate Optimization Scripts already in place.  Unfortunately, due to my systems high specs, I have not really been able to test adequately for framerate optimizations.  It is possible that some of the lag is caused by the sheer volume of scripts.  I know my video card is not great.  GeForce 750TX, which is not really a high end card, but compared to onboard video, may also be a possible source of the aforementioned lag.

File size is exceptionally large for a standard Demo due to the art assets that are included.  The upside of that is the Tilemaps are fully configured, which is where the size really comes from.  Scripts take up diddly squat for size.

There are Legacy versions, so now I am curious if the lag you experienced also occurs in the older version also?  I know the Lighting Script, with its heavy use of stretch_blt is most likely a culprit as far as video lag, but if the Legacy version runs well and this one doesnt, we will at least know it is the Dynamic Lighting script.

Thanks for reporting the issue with performance!  If you experience it and report it, others that experience it also may not report it at all.

---

Edit:

Also worth mentioning, my primary drive is a SSD.  For stuff that needs to be loaded, it may be a slow hard drive, but I would also like to keep the minimum system specs as low as I can...
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.)

LiTTleDRAgo

September 07, 2016, 12:23:37 am #97 Last Edit: September 07, 2016, 12:30:46 am by LiTTleDRAgo
my computer spec


http://imgur.com/kxntCI6

I'll try legacy version later

Heretic86

Onboard Video.  I believe that is the issue.  It will most likely cause you a ton of issues in other games as well, especially higher end ones.  Upside is that a half way decent video card, even like an $80 dollar one can remedy most of those issues.  Not to brag but my system only dropped to 37 fps at a few points so it made it difficult for me to check performance on lower end machines as I built it all.  I may have to put in a disclaimer that recommends the use of non onboard video card...
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.)

LiTTleDRAgo

sigh... too bad :(

but I think most people in my country still use their onboard card (oh well, and pirated winxp :v)
even if I bought external video card, it meaningless if people who will play my games didn't.

just my suggestion, if you somehow can corporate multi layer script : http://forum.chaos-project.com/index.php/topic,13318.0.html
I think you can reduce those event tile block thing that almost fill the map in your demo

Heretic86

Quote from: LiTTleDRAgo on September 07, 2016, 07:41:03 am
sigh... too bad :(

but I think most people in my country still use their onboard card (oh well, and pirated winxp :v)
even if I bought external video card, it meaningless if people who will play my games didn't.

just my suggestion, if you somehow can corporate multi layer script : http://forum.chaos-project.com/index.php/topic,13318.0.html
I think you can reduce those event tile block thing that almost fill the map in your demo


I can possibly try to put that in.  Not sure if it will work with both of our core scripts together, but it really is a good idea.  There will be a lot of work to be done, that is for sure, but I'll probably try when / if I have any time this weekend.
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.)

LiTTleDRAgo

September 07, 2016, 07:01:01 pm #101 Last Edit: December 13, 2016, 03:45:39 am by LiTTleDRAgo
there is some conflict with your timed user input, I updated my core script (just commenting 2 lines)


Kamuro

Hey first of all thank you for this Collection :)
But I have some trouble configuring the Dynamic lighting...
I understand the Basics of this Script, but I dont want the Lighting under my Char at the beginning. So I put this on an Event Page with AutoStart like in the Demo:
$game_system.dynamic_lights = false
$game_player.light.enabled = false
a transition and other stuff too... The Problem is that after the first Line nothing happens, I cant even control my Char (I know its AUTORUN but there is an transition which is not working) but I dont get any error messages...
So I copied the first Event from the Demo (where this Lines work!!!) and..... guess... nothing happend....
Could someone tell me why this is not working?
I have no other Scripts execpt the Lighting, Rotation, and Conditions in my Game.
Thanks for help 8)

KK20






   


   
   


   
   

Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!



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

Join the CP Discord Server!

Kamuro

Wow that was quick :^_^\':
Thank you I will test it when im back at home from work.
Ive not been working with the RPG Maker for seven Years...   :roll:
Thanks a lot :D

Heretic86

Yep.  There is an Interpreter bug that caused your script call to not work.  In the demo, the Interpreter contains a different fix, but it is part of a much larger script for the Caterpillar system.

$game_system.foo = false
$game_system.bar = true (NEVER RUNS)

class Interpreter
  #--------------------------------------------------------------------------
  # * Script
  #--------------------------------------------------------------------------
  def command_355
    # Set first line to script
    script = @list[@index].parameters[0] + "\n"
    # Loop
    loop do
      # If next event command is second line of script or after
      if @list[@index+1].code == 655
        # Add second line or after to script
        script += @list[@index+1].parameters[0] + "\n"
      # If event command is not second line or after
      else
        # Abort loop
        break
      end
      # Advance index
      @index += 1
    end
    # Evaluation
    result = eval(script)
    # If return value is false
    if result == false
      # End
      # [b]REMOVED THIS LINE, CAUSES NEXT SCRIPT LINE TO NOT BE CALLED[/b]
      #return false
    end
    # Continue
    return true
  end
end
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.)

superafroboy

Heretic thanks so much for this awesome collection!
I'm trying to use several of these scripts in a brand new project but when I try to access the menu in game I get the below error:
http://i.imgur.com/Ky0HmQY.png

The scripts I have copied from your demo are all placed in the same order as your demo.

Heretic86

There may be a Dependency.

I've tried really hard to make sure that either additional scripts that are needed are well documented, or are not needed at all.

How many scripts do you have in use?

Also, I know the SDK really sucks, but do you have the SDK also installed?
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.)

superafroboy

I do have the SDK installed (copied the script from your demo).

These are the scripts I've copied from your demo, in order (I also copied all DLL files):
SDK
SDK - Character Update Fix
Heretic's Animation Speed
Heretics Modular Passable 1.0
Heretics Modular Collision Optimizer
Heretic's Loop Maps 1.01
Exclusion Elements
Autonomous Stutter BUGFIX
Pathfind (by ForeverZer0)
Lagless Path Finder 1.22
MMW - Heretic Version
MMW Addon - Easy Chests
Caterpillar
Cat Addon - Auto Door Close
Move Straight
Heretics NPCs on Event Tiles
Heretics Diagonal Stairs Deluxe
Heretics Downhill Ice Deluxe
Heretics Restrict Bush Passage
Heretics Restrict Tile Passage
Heretics Hotfoot Tiles
Heretics Circular Sprite Motion
Heretics Mirror Movement
Heretics Vehicles
Heretics Moving Platforms
Heretic's Magic Compass
Heretic's Rotate, Zoom, Pendulum
Heretic's Advanced Camera System
Background Sound Playing?
Variable Prices SDK
Die on Map Screen
Super Event Sensor
Sensor Addon
Control Self Switches Anywhere
More Self-Switches - Gameus
Auto State Switches
Event Range Conditions - F0
Unlimited Page Conditions
Multiple Fogs - game_guy
Heretic's Cloud Altitude 2.3
Little Drago Wave
VXA Battle Backgrounds
Heretic's Lightning
Dynamic Lights - Kellessdee
DEE
Dynamic Sounds
Dynamic Sounds Patch
Ambient SFX
Heretic's Dynamic Lights

Heretic86

Okay, then lets take a look for Script Conflicts.

Hit CTRL + SHIFT + F (to search all scripts) and take a look for "class Window_Base" and see if any scripts that are NOT by me are in use.  Odds are, they are overwriting some stuff that my scripts added.  Then lets see what other scripts you have that also make changes to class Window_Base so we can find a possible conflict there.
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.)

superafroboy

Thats the strange part, I'm not using any other scripts. Just the default system ones, and the ones I listed that I copied from your demo.

http://imgur.com/a/THFUd

LiTTleDRAgo

Not truly a fix but try insert this.


class Window_Base
  alias dispose_window_base_error_fix dispose
  def dispose
    dispose_window_base_error_fix unless disposed?
  end
end

superafroboy


TheNewSon

Hello! Firstly, thank you very much for developing and sharing so many useful scripts, I am especially interested in the Dynamic Lighting one! But would you please upload it somewhere else? I have been trying to download it here, but it is very slow and it always fails near completion. Again, thank you very much!

Heretic86

I'll put a smaller copy up here.  It uses a DLL file so I put that and the script in a ZIP file.  Copy and paste the script into your game, and put the DLL file in the same directory as game.exe and it should work just fine.

Heretic's Dynamic Lighting Script and DLL
http://downloads.chaos-project.com/heretic86/HereticsDynamicLighting.zip
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.)

TheNewSon


Sin86

If I start a new game or load a saved game, then quit to main menu, and then start a new game, I get this crash. Though the funny thing is, it doesn't affect loading a saved game, just starting a new game but only after you quit to main menu.


Script 'Heretic's Dynamic Lights' line 3266 noMethodError occurred.

undefined method `reset_light_event_daynight_opacity' for
#<Map_Enemy:0xedeec08>

I don't know if it has something to do with Blizz ABS though but I do have enemies on the screen in this testing map I'm using. It is not like I'm trying to put lights onto the enemies because I'm not. I did try it in another test map with no enemies and no crash when starting a new game.

KK20

The fact it says "Map_Enemy" is already enough to know BlizzABS is the problem. It iterates through Game_Map#events to find enemy events (i.e. \e in name) and directly replaces them with Map_Enemy instances. The subclass hierarchy for Map_Enemy is Map_Battler < Game_Character. It is not a subclass of Game_Event.

reset_light_event_daynight_opacity is a Game_Event method, which Map_Enemy does not have access to as explained above.

The reason for the game working the first time is because of this line positioned just above the reported line:
    # Return if no Game Map exists
    return unless $game_map

Initially, $game_map is nil until it is initiated when Scene_Title#command_new_game or Scene_Load#read_save_data is called. Game_System#reset_event_light_daynight_opacity gets called before $game_map is assigned a value. It also never resets when returning to the title screen; thus, starting another game will trigger the error.

It's up to Heretic to decide how to resolve this. I can't imagine it will be particularly easy either.





   


   
   


   
   

Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!



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

Join the CP Discord Server!

Heretic86

I just tested the start, quit to menu, and start / load save game does not cause any crashes in the Collection.  As KK20 said, it does sound like a BlizzABS bug / glitch.
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.)

KK20

It's neither a bug nor glitch. Just a scenario your script doesn't account for (that is to assume every object in $game_map.events is not necessarily a Game_Event).

If you don't want BlizzABS enemy events to be a light source, that's a simple check. Otherwise, you will need to create an add-on.





   


   
   


   
   

Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!



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

Join the CP Discord Server!

Heretic86

If it is that important to him, I'll work on fixing it.
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

Awesome stuff Heretic, I've been using a majority of your scripts from this bundle in my project so far and love them.

Just a heads up, it seems there is a bug when trying to position a message window over an enemy, I was getting "can't convert Fixnum into String" on line 1489, since it was checking for "abcd" first. Looks like a line in the def reposition method:
  
def reposition
    if $game_temp.in_battle
      if "abcd".include?(@float_id) # must be between a and d
        @float_id = @float_id[0] - 97 # a = 0, b = 1, c = 2, d = 3
        if $scene.spriteset.actor_sprites[@float_id] == nil
          @tail.visible = false
          return
        end
        sprite = $scene.spriteset.actor_sprites[@float_id]
      else
        @float_id -= 1 # account for, e.g., player entering 1 for index 0
        if $scene.spriteset.enemy_sprites[@float_id] == nil
          @tail.visible = false
          return
        end
        sprite = $scene.spriteset.enemy_sprites[@float_id]
      end
#def reposition continues below...


The fix was to replace the line:
if "abcd".include?(@float_id) # must be between a and d


with:
if "abcd".include?(@float_id.to_s) # must be between a and d

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

mobiusclimber

I found a bug in the demo. On the Cat_To_Player map (the one about followers and orienting characters when moving between maps, and pathfinder), when I talked to the kid who wanted me to help him find his momma, he doesn't follow me and I could go to the map to the left and talk to people (who said things like "I wanna go to the cave, but you already have a follower"). When I went back to the other map and talked to people, they all said and did their stuff. The professor looking person showed the orient caterpillar thing, but I had no one following me so it didn't really make sense ( I mean, it did, I knew what the effect was, but I couldn't see it cuz no one was following me). After that, I could not walk off to other maps bc a message would pop up saying I can't leave without my party. When I tried to talk to the boy again, he didn't say anything. So I was just stuck on that small map.

Helios

Much thanks Heretic86! I appreciate the effort you put into this awesome collection. Definitely going to use the Dynamic Lighting in my game.

One question: is there a way to make Dynamic Lighting work in conjunction with Super Event Sensor?

Namely, standing in the light should make you easier to spot in the dark. I can't make it work with "in_light?" (switching pages will reset move route), nor does SES have options like lit_range.

Heretic86

November 13, 2018, 04:31:17 pm #125 Last Edit: November 13, 2018, 04:36:31 pm by Heretic86
Yes, you can make Dynamic Lighting an Super Event Sensor work together!

Keep in mind that the "magic" behind Super Event Sensor really is only a ultra fancy way of changing Event Pages, there are other scripts that you can use to do that too, to achieve your Sensor Light goal!

The simplest form of a Sensor is this:
Sensor_Config
range=3


To make just the Sensor there work, put a check in Self Switch D (by default).  Keep in mind this is WITHOUT LIGHTING.

Now, to add Light Detection, I wrote another seemingly unrelated script called Unlimited Page Conditions.  This allows you to use SCRIPTS or CODE for ANY CONDITION.  It is mostly intended for those with some familiarity with scripting.  Thus, you are no longer limited to Switches or Variables, but quite literally any code you can write!  So if you wanted a Page Condition to be Player X at exactly one coordinate, you can write it out as this:
Condition: $game_player.x == 12


I did have the foresight to put some Light Detection into the Dynamic Lighting code.  It also appears I lacked the foresight to Document the method I wrote specifically for it!  All Characters (Player and Event) have a method to check to see if they are Illuminated by running the method "in_light?(Event_ID, Tolerance)".

  #--------------------------------------------------------------------------
  # * In Light? - Game_Character
  #  - Returns true when Character's Center is in a Light
  #          arg : can be an Event ID (or 0 for Player), Character, or nil
  #    tolerance : Percent to Add so Light registers as false if in tolerance
  #--------------------------------------------------------------------------


To make the code for "in_light?" work with Super Event Sensor, make sure you also have Unlimited Page Conditions too!  It is in the Collection.  That script was not gone over very heavily, but in hindsight, I probably should have given it more focus as it is Extremely Powerful.  So, the trick here is to add "in_light?" as a Page Condition, as well as Sensor Switches!

Comment: Condition: in_light?(0,0)


The "in_light?(Id, Tolerance)" code can be used either as "Condition: $game_player.in_light?" or "Condition: in_light?(0, 10)".  First argument is an Event ID.  You can use the number 0 for Game Player, since Events start at 1.  The Tolerance is also useful for decreasing the In Light Sensitivity, which is due to the fact we dont use pitch black very often.  The higher the Tolerance, the LESS SENSITIVE the Light Detection will be.

To make this all work, the Page Setup will be that of a standard Sensor.  To keep it simple, lets assume one Non Moving Sensor Guard.  Remember, simple, so just the Range and he can "see" or "hear" anything in his range.  Also remember, Sensor Configs go on Page 1 no matter what, and the Comment Conditions go ONLY on the page you want a New Condition for.

Event Page 1:
Comment: Sensor_Config
range=4


Now, if you recall, the ORDER that pages are checked in is RIGHT TO LEFT.  The pages that should be active when the Player triggers them go all the way to the RIGHT, and default states should be on the LEFT.  Page 1 has Sensor_Config and is the default state that just stands there.  Page 2 is the "Attack the Player" page.  Set Move Route to Approach, so it will approach the player.  Make the Page 2 Condition Self Switch to D, which is the default.  Then make a comment also on Page 2, and say either "Condition: $game_player.in_light?(0,0)" or "Condition: in_light(0,0)".  Only use one, but both code will check to see if the player is illuminated.

=============================

tl;dr

Use this script (check to see if it is already in your scripts tho):

Spoiler: ShowHide
#==============================================================================
#
#           HERETIC'S UNLIMITED EVENT PAGE CONDITIONS [XP]
#           Version - 1.0
#           Monday, August 8th, 2016
#
#==============================================================================
#
#  ---  Overview  ---
#
#  This script will allow you to use Scripts as a Page Condition! 
#
#  This completely unlocks the functionality of Page Conditions, which now have
#  absolutely NO LIMITS!  For example, the Default Page Conditions allow
#  you to check a Game Variable, and the Page is only active if that
#  Game Variable is equal to or greater than what ever number you put there.
#  But, you could not check if the Game Variable was equal to or less than!
#  Now you can easily make Game Variable Less Than a Page Condition!
#
#  ---  Installation  ---
#
#  Place above Main and below Scene Debug.  Place below the SDK if used.
#
#  ---  Instructions  ---
#
#  Add a Comment to an Event says "Condition:" followed by a Script Condition.
#
#  Example 1:
#  @>Comment: Condition: $foo == $bar
#
#  Example 2:
#  @>Comment: Condition: $game_player.direction == 2 and $game_switches[12]
#
#  Example 3:
#  @>Comment: Condition: $game_player.moving? and $game_switches[12] and
#           : (not $game_system.map_interpreter.running? or $foo == $bar)
#
#  Example 4: (Not every line needs to be dedicated to evaluation.)
#  @>Comment: Condition: p = $game_player
#           : p.direction != 2
#
#  Example 5: (Comments within Comments work too, note the # Character)
#  @>Comment: Condition: p = $game_player
#           : # If Player is facing Down
#           : p.direction == 2
#
#  ---  Common Events  ----
#
#  This script does NOT affect Common Events, ONLY Map Events.
#
#  ---  Battle Event Pages  ---
#
#  This script does NOT affect Battle Event Page Conditions.  I wrote another
#  script for Battle Event Pages already. 
#
#  That script is called "Unlimited Battle Page Conditions" and is available
#  as one of my many scripts in Heretic's Collection.
#
#  ---  Multi Line Support  ---
#
#  You can extend your scripts to Multiple Lines of Comment Boxes!  The
#  Comment Box should be plenty big enough to hold your text!  Besides
#  that, you're using Script Calls, so if you can't fit your text into
#  one Box, you can write a Method that returns true or false and plug
#  that into your own script!
#
#  You can have Multiple Conditions also, each in their own Comment Box.
#
#
#  ---  Self Switches  ---
#
#  This script doesn't interfere with the use of Self Switches (ABCD).  Feel
#  free to combine both Self Switches and Script Conditions.
#
#
#  ---  Skipping Evaluation  ---
#
#  There may be certain conditions when you do NOT want a certain Page to
#  evaulate its Script Conditions.  For example, running an Event and you
#  don't want the Page to change until it is done doing its thing.  You
#  can turn Script Evaluation ON or OFF by either a Script Call or with
#  a Comment.  It is intended to use BOTH in conjunction with each other.
#  Basically, it gives you more control over when Scripts are evaluated.
#
#  To temporarily prevent a Page from executing its Script Conditions, simply
#  add a Comment to the Event's Page that reads:
#
#  @>Comment: \skip_eval
#
#  This is intended to be turned OFF with a Script Call or Move Route.
#
#  @>Script: $game_map.events[id].skip_eval = true / false
#  @>Set Move Route: This Event
#                  : $>Script: self.skip_eval = false
#                  : $>Script: skip_eval=(false)
#
#  NOTE: The Page MUST BE ACTIVE to change Skip Eval or else you will set
#        the Skip Eval on the WRONG PAGE.
#
#  NOTE: Once Skip Eval has been changed, it will retain the state you set
#        until the Map has been left entirely and transferred back to.  This
#        includes going into Battle Scenes.  The value of Skip Eval will be
#        remembered even after Battles are exited, but RESET if you leave
#        the Map and come back to this Map.
#
#
#  ---  Performance  ---
#
#  Each Script Condition is evaluated once per frame so don't go crazy using
#  too many Script Conditions, or at least make sure they evaluate quickly.
#  Script Conditions all evaluated on each Map.  Thus, if you have many maps
#  but only a few maps that use Script Conditions, don't worry too much.  You
#  may see performance issues if you use lots and lots of Script Conditions
#  on the same map.  This does end up being tons faster than using multiple
#  Parallel Events for very specific purposes however.
#
#
#  ---  Compatability  ---
#
#  This script may have some compatability issues with other scripts that
#  modify the RPG::Event::Page::Conditions class.  It has been tested with
#  More Self-Switches by Gameus / Game Guy and although only briefly tested
#  appears to work just fine.  This script works by replacing attr_accessor
#  methods with my custom definitions.  Instead of returning a property of
#  an object, it now uses self_switch_valid and self_switch_ch as getter
#  methods which consider if Script Conditions are being used.
#
#  It should also work just fine with Optimization Scripts as evaluation of
#  the Script Conditions is handled outside of Event and Game Map update
#  methods entirely.
#
#
#  ---  Legal  ---
#
#  You may distribute this script on websites in the scripts unaltered form.
#
#  You may use this script in Commercial or Non Commercial projects without
#  compensation as long as you give me credit for the use of my scripts.
#
#
#  ---  Config  ---
#
#  This script has no configurable Options.
#
#
#  ---  Version History  ---
#
#  Version 1.0 - Monday, August 8th, 2016
#  - Initial Release
#
#==============================================================================

#==============================================================================
# ** RPG - Main RPG Module
#==============================================================================
module RPG
  #----------------------------------------------------------------------------
  # ** Event - RPG::Event
  #----------------------------------------------------------------------------
  class Event
    #--------------------------------------------------------------------------
    # ** Page - RPG::Event::Page
    #--------------------------------------------------------------------------
    class Page
      #------------------------------------------------------------------------
      # ** Condition - RPG::Event::Page::Condition
      #------------------------------------------------------------------------
      class Condition
        #----------------------------------------------------------------------
        # * Public Instance Variables - RPG::Event::Page::Condition
        #----------------------------------------------------------------------
        attr_accessor :script_condition
        attr_accessor :map_id
        attr_accessor :event_id
        attr_accessor :skip_eval
        #----------------------------------------------------------------------
        # * Initialize - RPG::Event::Page::Condition
        #  - Adds Default Values for new Properties
        #----------------------------------------------------------------------
        alias script_condition_initialize initialize unless $@
        def initialize
          # Call Original or other Aliases
          script_condition_initialize
          # Container for Script Conditions
          @script_condition = nil
          # New Properties used for generating a Self Switches Hash Key
          @map_id = nil
          @event_id = nil
        end
        #----------------------------------------------------------------------
        # * Self Switch Valid - RPG::Event::Page::Condition
        #  - Replaces attr_reader with reader method
        #----------------------------------------------------------------------
        def self_switch_valid
          # Overrides @self_switch_valid value if a Script Condition exists
          return true if not @script_condition.nil?
          # Return Original Value (Self Switch is Checked in Edit Event)
          @self_switch_valid
        end
        #----------------------------------------------------------------------
        # * Self Switch Ch - RPG::Event::Page::Condition
        #  - Replaces attr_reader with reader method
        #  - Self Switch Channel is usually 'A' unless 'BCD' are specified
        #  - Checks both Self Switch and Script Condition to return Channel
        #----------------------------------------------------------------------
        def self_switch_ch
          # Use Self Switch Ch (ABCD) if Valid and Switch is OFF
          if @self_switch_valid
            # Hash Key for Self Switches
            key = [@map_id, @event_id, @self_switch_ch]
            # Use Self Switch Ch (ABCD) if Valid and Switch is OFF
            return @self_switch_ch if not $game_self_switches[key]
          end
          # If Script Condition Array has any Scripts
          if not @script_condition.nil? and @script_condition.size > 0
            # Iterate each Self Switch Script Condition
            for script in @script_condition
              # Create a Hash Key for Self Switches Hash with Script
              ss_key = [@map_id, @event_id, script]
              # Return the Script if Self Switch Script is OFF
              return script if not $game_self_switches[ss_key]
            end
            # Return Last Script in Array as Self Switch Channel
            return @script_condition.last
          end
          # Default Self Switch Channel (ABCD)
          @self_switch_ch
        end
      end
    end
  end
end

#==============================================================================
# ** Game_Event
#==============================================================================
class Game_Event < Game_Character
  #----------------------------------------------------------------------------
  # * Initialize - Game_Event
  #  - Checks each Page of Event for Script Conditions in Comments
  #        map_id : Map ID
  #         event : Game_Event stored in $data
  #----------------------------------------------------------------------------
  alias script_condition_initialize initialize unless $@
  def initialize(map_id, event)
    # Default value and Shorthand
    script, sc = nil, $game_map.script_conditions
    # Iterate each of the Event's Pages
    event.pages.each {|page|
      # Store values in Condition Object for Self Switch Keys
      page.condition.map_id, page.condition.event_id = map_id, event.id
      # Iterate Each Command
      page.list.each {|command|
        # If Event Command is the first line of a Comment
        if command.code == 108
          # If Script is not nil (two Script Conditions in sequence)
          if not script.nil?
            # Modify Condition Object and Add to Hash for Evaluation
            add_script_condition(page.condition, script, map_id, event.id, sc)
            # Clear the String since it is now stored in the Condition Object
            script = nil
          end
          # Scan the Comment and look for \skip_eval Comments for this Page
          command.parameters[0].gsub(/^\\skip_eval/i) {
            page.condition.skip_eval = true
          }
          # Use Regular Expression to look for "Condition:" and Capture String
          command.parameters[0].gsub(/^Condition:(.*)/){ script = $1.strip }
        # Else if Script and Event Command is a Comment, but not the first line
        elsif not script.nil? and command.code == 408
          # Append Script String with any text from this line of the Comment
          script += "\n" + command.parameters[0]
        # If Script String has contents
        elsif not script.nil?
          # Modify Condition Object and Add to Hash for Evaluation
          add_script_condition(page.condition, script, map_id, event.id, sc)
          # Clear the String since it is now stored in the Condition Object
          script = nil
          # Next Command (One Condition per Comment Box)
          next
        end
      }
    }
    # Call Original or other Aliases
    script_condition_initialize(map_id, event)
  end
  #----------------------------------------------------------------------------
  # * Add Script Condition - Game_Event
  #  - Modifies the Condition Object with New Parameters for Script Evaluation
  #               c : RPG::Event::Page::Condition
  #          map_id : Map ID of Event
  #        event_id : Event ID
  #              sc : Shorthand for $game_map.script_conditions
  #----------------------------------------------------------------------------
  def add_script_condition(c, script, map_id, event_id, sc)
    # Loop to check for Syntax Errors
    begin
      # Evaluate the Script String and remember result
      result = eval(script)
    # Script Evaluated has a Syntax Error
    rescue
      # Display Warning to User
      script_condition_error(script, event_id, map_id)
      # Prevent Storing of Script Condition
      return
    end
    # Create a Boolean Value based on result for proper storage
    value = (result) ? true : false
    # Remember value of Script Evaluation in the Self Switch Hash
    $game_self_switches[[map_id, event_id, script]] = value   
    # Create Array if Nil
    c.script_condition = [] if c.script_condition.nil?
    # Push Script on to Script Condition Array
    c.script_condition << script
    # Add Script to Script Conditions Hash in Game Map with Event ID as Key
    sc[event_id] ? sc[event_id] << script : sc[event_id] = [script]
  end
  #----------------------------------------------------------------------------
  # * Eval Script Condition - Game_Event
  #  - Evaluates Script Conditions
  #       scripts : Array of Scripts for this Event's Conditions
  #----------------------------------------------------------------------------
  def eval_script_condition(scripts)
    # Default
    refresh_event = false
    # Iterate each Script in the Array
    for script in scripts
      # Run the Script and remember the result (Syntax already checked)
      result = eval(script)
      # Create a Boolean Value based on result for proper storage
      value = (result) ? true : false
      # If Stored Self Switch Value is not the same as the result
      if $game_self_switches[[$game_map.map_id, id, script]] != value
        # Store the Result in the Self Switches Hash
        $game_self_switches[[$game_map.map_id, id, script]] = value
        # Flag to Refresh this Event after running all Scripts if more than 1
        refresh_event = true
      end
    end
    # Refresh this Event if the Refresh Flag is set
    refresh if refresh_event
  end
  #----------------------------------------------------------------------------
  # * Script Condition Error - Game_Event
  #  - Prints a Warning and shows Script with a Syntax Error
  #        script : String of Script with Syntax Error
  #            id : Event ID with the Problem
  #        map_id : ID of Map with Event with Syntax Error in Condition
  #----------------------------------------------------------------------------
  def script_condition_error(script, id, map_id)
    # If running game from Editor
    if $DEBUG
      # Explain the Problem
      print "Warning: A Script Condition has a Syntax Error\n",
            "Event ID: ", id, "\nMap ID: ", map_id, "\n\n",
            "Condition: ", script, "\n\n",
            "Conditions should evaluate to true or false\n",
            "Example 1: Condition: $foo == $bar\n",
            "Example 2: Condition: $foo == $bar or $baz"
    end
  end
  #----------------------------------------------------------------------------
  # * Erased? - Game_Event
  #  - Returns true if Event is Erased
  #----------------------------------------------------------------------------
  def erased?
    return @erased
  end
  #----------------------------------------------------------------------------
  # * Skip Eval? - Game_Event
  #  - Getter method, returns Flag set in RPG::Event::Page::Condition
  #----------------------------------------------------------------------------
  def skip_eval?
    @page.condition.skip_eval if @page
  end
  #----------------------------------------------------------------------------
  # * Skip Eval= - Game_Event
  #  - Setter method, sets Flag set in RPG::Event::Page::Condition
  #----------------------------------------------------------------------------
  def skip_eval=(arg)
    @page.condition.skip_eval = (arg) ? true : false
  end
end

#==============================================================================
# ** Game_Map
#==============================================================================
class Game_Map
  #----------------------------------------------------------------------------
  # * Public Instance Variables - Game_Map
  #----------------------------------------------------------------------------
  attr_accessor     :script_conditions    # Holds Event Script Page Conditions
  #----------------------------------------------------------------------------
  # * Setup - Game_Event
  #  - Creates a Hash to hold Script Conditions for constant Evaluation
  #      map_id : Map ID from $data
  #----------------------------------------------------------------------------
  alias script_condition_setup setup unless $@
  def setup(map_id)
    # If Map ID is Valid and does not match current Map ID
    if map_id > 0 and map_id != @map_id
      # Create or Clear Hash
      @script_conditions = {}
    end
    # Call Original or other Aliases
    script_condition_setup(map_id)
  end
  #----------------------------------------------------------------------------
  # * Eval Script Conditions - Game_Map
  #  - Evaluates all Script Conditions in Hash and Refreshes Event if needed
  #----------------------------------------------------------------------------
  def eval_script_conditions
    # Check that Script Conditions exists
    return unless @script_conditions
    # Iterate any Script Condition
    @script_conditions.each {|id, scripts|
      # Get the Event
      event = @events[id]
      # If Event does not exist (typically event removed during game editing)
      if not event
        # Remove the Script Conditions from the Hash
        @script_conditions.delete(id)
        # Next Script
        next
      end
      # Skip this Event if Event has a Skip Eval flag
      next if event.skip_eval?
      # Evaluate Script Conditions (Array of Scripts) from within the Event
      event.eval_script_condition(scripts) unless event.erased?
    }
  end
end

#==============================================================================
# ** Game_Screen
#==============================================================================
class Game_Screen
  #----------------------------------------------------------------------------
  # * Update - Game_Screen
  #  - Calls to eval_script_conditions in the Map, so it will still evaluate
  #    even during Battle Scenes
  #  - Game_Screen is updated after important objects are updated for proper
  #    timing of changing Pages.  Thus, the Map, Events, Interpreter, Player
  #    and System are all updated before evaulating Script Conditions.  If
  #    the evaluations were run, for example, prior to updating either the
  #    Player or Map Interpreter, Page Changes would occur at improper times
  #    and most likely cause you a headache trying to figure out why thinggs
  #    did not work as you expect at the times you expect.
  #----------------------------------------------------------------------------
  alias script_condition_update update unless $@
  def update
    # Call Original or other Aliases
    script_condition_update
    # Update any Event Script Conditions
    $game_map.eval_script_conditions
  end
end


Next, simply edit your Sensor Event, go to the "Attack" page, or what ever page you want or how its labeled, and put a Comment that says "Condition: in_light?(0, 0)" and that page will ONLY come on if the Player is illuminated! 
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

Thanks for your very detailed reply, Heretic86! I probably should describe my problem in more detail.

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".

Because the guard should be able to see you, in light or not. In light simply makes you easier to be seen. With the method you described ("in_light?" as a second condition), it means unless you are in light, the guard can't see you at all, even if you are hugging him in the face!

Come to think of it, maybe I could use a conical light to mark the vision range of guards, giving player a visual reference of their actual view range, a feature which I believe scripts like SES really should have.

Edit: Ah, I get it. The solution is to make the guard have longer view range than his own light range, so if the player is outside of his own light but in other enviromental lights, they would be seen too. Thanks again Heretic86! You are great! :clap:

Heretic86

Quote from: Helios on November 13, 2018, 08:04:45 pm
Thanks for your very detailed reply, Heretic86! I probably should describe my problem in more detail.

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".

Because the guard should be able to see you, in light or not. In light simply makes you easier to be seen. With the method you described ("in_light?" as a second condition), it means unless you are in light, the guard can't see you at all, even if you are hugging him in the face!

Come to think of it, maybe I could use a conical light to mark the vision range of guards, giving player a visual reference of their actual view range, a feature which I believe scripts like SES really should have.

Edit: Ah, I get it. The solution is to make the guard have longer view range than his own light range, so if the player is outside of his own light but in other enviromental lights, they would be seen too. Thanks again Heretic86! You are great! :clap:


Thanks a ton!  And those ideas are fantastic as well!  The idea that the Player illuminating themselves is a dead giveaway is a suggestion for them to put out their torches / lights, and use the Guard as a Lightsource!  Mostly all it should take is just adjusting some switches, and if you do want to change the view range, you should be able to do that on the fly also!  Scripting, even if its one line of code, can be extremely powerful stuff!

You can also think outside the box.  The Unlimited Page Conditions script has plenty of rooms for YOU to exploit!  I left that wide open as to provide more functionality instead of locking it down.  Thus, you can run Scripts in the Condition.  As long as the final code evaluates to true / false, the code will still run!  Thus, you could run something like "@sensor.range = ($game_player.light.enabled) ? 5 : 4" and change the range on the fly!

Im glad the examples helped!  If you need anything else, feel free to ask!
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

Sadly, after messing around for about two hours, I still can't get it to work.

I tried putting "Condition: $game_player.in_light?" on page 2 (Guards Trigger Battle). This causes strange behavior, as the guard switch to page 2, his facing (and directional light) is also switched to the default facing of page 2. If page 2 facing is different than page 1, the player would not be lit by the directional light, failing the "in_light" Condition, causing the guard to immediately switch back to page 1, fulfilling the "in_light" Condition again, thus rapidly switching between the two pages without ever approching the player.

Also, with "Condition: $game_player.in_light?" on page 2, if the player approch the guard from behind while not "in_light", the game hangs up, similar to an autorun event that doesn't end.

Btw I'm using a moving guard to test all this. You simply must have some moving guards in a stealth based game, you know, and if a moving guard doesn't cause any problem, so shouldn't a stationary guard.

Quote"@sensor.range = ($game_player.light.enabled) ? 5 : 4"


This seems to be exactly what I needed, changing the guard's range without switching pages or adding conditions. I changed "$game_player.light.enabled" to "$game_player.in_light?", it should work in theory. When I run it, It says stynax error. My comments on page 1 looks like this:


\light[ForwardLight.png]
\light_match_direction
\light_offset_xy[0, -24]
Condition:
@sensor.range=($game_player.in_light?)? 6:4
Sensor_Config
range=4 listen=3 on_range=6 view=6 on_view=0
listen_range=5 listen_view=5
listen_switch=listener
wall listen_wall=true on_wall=false inter


I also tested my idea of having guard's view range longer than his own light, by putting "Condition: $game_player.in_light?" on page 1. This causes the guard to disappear when the player is not in light. Duplicating page 1 (with "Condition: $game_player.in_light?" on the second page 1) to prevent the guard from disappearing also doesn't work, causing the same "switching back and forth" problem described above.

Speak of which, is there a way to maintain previous facing when switching pages?

Heretic86

November 14, 2018, 04:58:10 pm #129 Last Edit: November 14, 2018, 05:27:16 pm by Heretic86
I will have to mess around with this a bit to dig deeper into achieving what you want.  Im sure its possible, but I did end up using a lot of scripts in move routes themselves.

As far as @sensor, there are several ways to do this.  First, basically, anything in the "Condition:" comment must evaluate to true / false, but, you can run other code there before returning the true / false.  Second, the Sensor should be accessible from anywhere, so you can also do stuff like this:

Condition: e = $game_map.events[14]
# l player is in light or not, its a return value also
l = in_light?(0, 0)
# Adjust Range of Sensor Sight
e.sensor.range = (l) ? 5 : 4
# Return stored instead of running code again (faster)
return l


And yes, Comments should work fine in Condition Code also.  I will have to dig into your issue a bit later since it seems I broke something and need to fix that first.  Other thing to note is since you can access $game_map.events[14].sensor from anywhere, one event can change the Range of other events, or anything else inside the Sensor object.

---

EDIT: Lol, ok, apparently all I needed was a reboot. 

Agreed, Guards should not be stationary.  To get the Guard to maintain facing the same direction is quite tricky.  I always had trouble with that also.  So I dont have a definitive solution at this time.  I will see what I can put together when I get some time to dig in deep. 

I tested it for a few minutes, and also got Syntax Error.  It may be necessary to write a custom method to run in the Condition box, which isnt as difficult as it sounds.  Its been a while since Ive played with this, but I'll dig into it.
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

Many thanks, Heretic86. I'm not in any hurry, so take your time.

Also, please try to make the guard events self-contained, if possible. Using other events or event number like" $game_map.events[14]" to control guard behavior is rather counter-productive in larger scale, because you have to manually setup every guard. I hope this is not too much to ask. :)

Heretic86

Quote from: Helios on November 14, 2018, 07:08:30 pm
Many thanks, Heretic86. I'm not in any hurry, so take your time.

Also, please try to make the guard events self-contained, if possible. Using other events or event number like" $game_map.events[14]" to control guard behavior is rather counter-productive in larger scale, because you have to manually setup every guard. I hope this is not too much to ask. :)


Agreed.  I will set something up as a Template so you can copy and paste.
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

Ok, I have a version for you to TEST out.  I believe this is stable.  It didnt take too much work.

SUPER EVENT SENSOR Version 1.1 - LIGHT SENSITIVITY FEATURE ADDED (click me)

I didn't do a template because this should be REALLY EASY to add Light Detection.  Remember, you can have MORE THAN ONE Sensor_Config comment if you need additional room.

Sensor_Config
light=true listen_light=true on_light=true
light_tol=34.5


Please let me know if this does the job for you before I publish a Final Version of it.
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 November 20, 2018, 04:45:57 am
Ok, I have a version for you to TEST out.  I believe this is stable.  It didnt take too much work.

SUPER EVENT SENSOR Version 1.1 - LIGHT SENSITIVITY FEATURE ADDED (click me)

I didn't do a template because this should be REALLY EASY to add Light Detection.  Remember, you can have MORE THAN ONE Sensor_Config comment if you need additional room.

Sensor_Config
light=true listen_light=true on_light=true
light_tol=34.5


Please let me know if this does the job for you before I publish a Final Version of it.


Thanks!

I've tested it, with mixed results. Namely, it still suffers from the same "rapidly switching back and forth" problem, when the player is in range but not lit.

And sometimes, if the player is lit and in range, the guard would not rapidly switch pages, but still does not work properly. I have that "guards_can_see?" addon from earlier, and made a UI with that condition, which display a yellow warning sign when not "seen", and switch to a red sign when "seen". Some times when the player is lit, the guard would just sit there watching, while the warning sign rapidly switching between yellow and red. Cause unknown, needs further testing.

Heretic86

Hmm, ok.

I used one of the Forest Bees as a Template, then just edited that to update, and just added the "light" stuff to the Config.  I'll have to experiment with the Guard...
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

In case you couldn't reproduce the problem, here are some details:

SENSOR_READ_LINES = 12 (with the flashlight code added, the default 10 is not enough)

The guard is standing 10 grids away from player, walking towards the player.

The player is lit by a street light:
\light[Lamp Glow.png]
\light_flicker_opacity[224, 255, 7]
\light_offset_xy[0, -32]


the guard's settings:
\light[ForwardLight.png]
\light_match_direction
\light_offset_xy[0, -24]
Sensor_Config
range=8 listen=3 on_range=6 view=6 on_view=0
listen_range=5 listen_view=5
listen_switch=listener
wall listen_wall=true on_wall=false inter
Sensor_Config
light=true listen_light=true on_light=true
light_tol=34.5


Upon seeing the player, the guard would appear to be standing still. If you use "guards_can_see?" conditional branch to display 2 different pictures, indicating detection status, you would see the two pictures rapidly flashing. I could provide a demo if you need it.

Heretic86

Yes, please post a demo and I can try coding in that to see whats happening.  Sorry, just been rather busy, I will jump on this as soon as I get a chance.
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


Heretic86

December 01, 2018, 06:53:58 pm #138 Last Edit: December 01, 2018, 06:55:20 pm by Heretic86
Ok, I think I figured it out.

Sensor_Config
range=8 listen=3 on_range=6 view=6 on_view=0

Take a look at the bold parts.

What appears to be happening is the ON Range is Less than the Range.  Each time the Sensor gets triggered, ON takes over and ON Range is used.  Since the ON range is less than the Range, it says "nope, the target is out of range so cant see it" then it disables and changes Event Pages, then the next frame it says "yep, the target is in range so yep I can see it", changes Event Pages again, and it just goes back and forth.

Basically, with any Range, it should increase as awareness increases also.

For example

range=5
listen_range=6
on_range=7

If the Increased "Awareness" is less than default awareness, you'll end up with that toggling like you are seeing.  That was my intent anyway...  When I changed that one setting in your Sensor_Config, it looks like it was working as intended without any script changes.  Its definitely an easy thing to miss, so dont blame yourself!  And now we have a better idea of where to look if things start doing that back and forth page triggering!

Try using this:

Sensor_Config
range=6 listen=4 on_range=8 view=6 on_view=0
listen_range=7 listen_view=5
listen_switch=listener
wall listen_wall=true on_wall=false inter

NOTE: Bolded numbers are what I changed.

---

Also, and Im figuring this is just for the Demo, but I saw that the command_355 bug was also present.

    # Evaluation
    result = eval(script)
    # If return value is false
    if result == false
      # End
      return false
    end
    # Continue
    return true

Need to get rid of the "return false" line.  If the bug still exists, if you make a Script Call like $game_player.light.enabled = false, then the game will just hang.  It wasnt your script that broke it, it was a bug in command_355.
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

Oops, that's just me being stupid :^_^\':

Usually I run with range=4, changed it to 8 for testing purpose but forgot about the other range settings. After correcting the settings it works smoothly.

And yeah, I started a new project for the demo, so that command_355 bug was left in. In the working version it was fixed.

Thanks again!

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  :)

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 AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!



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

Join the CP Discord Server!