Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 2,658
» Latest member: ariaoneta
» Forum threads: 7,786
» Forum posts: 57,133

Full Statistics

Latest Threads
News of the World
Forum: General Chat
Last Post: kyonides
Yesterday, 08:38 PM
» Replies: 1,084
» Views: 416,908
HiddenChest RGSS Player E...
Forum: Tools
Last Post: kyonides
Yesterday, 06:52 PM
» Replies: 151
» Views: 113,334
What's up, RMers?
Forum: Development Discussion
Last Post: kyonides
Yesterday, 09:18 AM
» Replies: 2,673
» Views: 1,917,850
Birthday Thread
Forum: Occasions
Last Post: DerVVulfman
05-16-2024, 05:04 AM
» Replies: 3,571
» Views: 2,230,533
Stellar Bewitching (Remas...
Forum: Upcoming Projects
Last Post: Starmage
05-15-2024, 12:08 PM
» Replies: 8
» Views: 1,930
The Weekly Gazette 05-12-...
Forum: Announcements and Updates
Last Post: DerVVulfman
05-13-2024, 05:00 AM
» Replies: 0
» Views: 221
Remi-chan's Writing Snipp...
Forum: Literature Section
Last Post: Remi-chan
05-13-2024, 02:28 AM
» Replies: 27
» Views: 12,801
Remi-chan's Cinematic The...
Forum: Filmography
Last Post: Remi-chan
05-13-2024, 01:38 AM
» Replies: 11
» Views: 1,885
Chinese Hackers
Forum: Tech Talk
Last Post: kyonides
05-12-2024, 06:12 AM
» Replies: 65
» Views: 33,626
News of the Cyber World
Forum: Tech Talk
Last Post: kyonides
05-12-2024, 06:09 AM
» Replies: 329
» Views: 129,108

 
  NPC Interactions
Posted by: Near Fantastica - 03-02-2008, 07:43 AM - Forum: Scripts Database - No Replies

NPC Interactions
by Jaime 'Near Fantastica' Webster
Not DerVVulfman

Introduction
"First off I know this script is going to confuse more of you then I would like but that's the way it has to be just sit down and think about it for a second... About what it is, what it dose and how it works... I am sure you will get it think of Morrowind NPC interaction system..." - Near Fantastica

By the poster
I didn't create the script, and as of now the links that Near Fantastica put up are down (and he can't get to them) and his RMXP system is down. Given that he posted the original (though broken) demo links here, there should be no problem to post the script.

However as I didn't create the script, I cannot offer support.

Script
NPC Interactions


Instructions
This script works in the following way...
  1. The script starts a scene...
  2. It opens the text file you tell it too or if you leave it blank opens the file with the event name...
  3. Displays the text in the window and add any keywords to the menus list key words are defined in the text file and display as a different color...
  4. When you select and new item form the list the script opens and displays that text file repeating step 3 over again...

Instructions
Keywords are linking words the name of another text file you want to link to for more information about a topic a keyword is placed with square brackets and any spaces are replaced by underscores...

[Key_Words]
[NPC]
[Interactions]


These are all valid keywords...

Text Files
The text files need to be saved with the ending .rxdata and the name should be in all CAPS... As well is the keyword uses an underscore the file name dose not it uses a space... Also to open and read .rxdata file do an open with notepad... Don't forget to make an NPC Interactions folder which the text files are placed in...

Commands:
Code:
$scene = Scene_NPC_Interaction.new(self, "START")
Self is a must so don't remove it.
"START" is the name of the first text you want to call if start is left out then it takes the event name and displays that file.
Code:
$scene = Scene_Player_Log.new

Take Care,
Near

Print this item

  Keyboard Input Module (Revised)
Posted by: Near Fantastica - 03-02-2008, 07:40 AM - Forum: Scripts Database - No Replies

Keyboard Input Module (Revised)
Revision 1.2
based on Jaime 'Near Fantastica' Webster's system


Introduction
"I know there is a few keyboard input scripts out there but not like this one... this one works fundamentally different then the others you press and key and it returns what was pressed... which lets you easily have string input for names, conversations, or what ever you see fit." - Near Fantastica

Pretty much what he said. :thumb:

This system is not a name input module, a message system or menu system that uses keyboard input. This is the basic module that you would use to CREATE such systems. It reads keyboard presses, be they letter characters, shift keys, or whatnot and allows you to access them in place of the default systems' routines.

Now far be it from me to just post my own system without acknowleding Near Fantastica's original work. Without his work, this wouldn't be available. As such, I am posting his script in this topic along with the newly revised system.


Script
Keyboard Input Module (Revised)
NOTE:
In this 'revised' version, I have included [Caps Lock] for determining capital letters and [NumLock] for changing the functions on the numeric keypad. I have also revised the code and added the ability to detect individual 'left' and 'right' function keys (left shift, right shift, left alt, etc.). Even with the inclusions, it is still smaller than Near Fantastica's system.

...and the original v3 script
Keyboard Input Module (Original Version)
NOTE:
This system (when acquired) referred to a 'wow' method that was not included in this system. It was used to generate the actual alphanumeric character/number (from the ascii value) to be returned. Somehow it was a 'mis'-copy and the actual method used was a 'chr'. This has been corrected.

Presented in the original format (minus the 'wow' error) I was able to obtain from 'Creation Asylum.'


Instructions
This script is used to detect keys being pressed and return them for use in your scripts... whether it is a message script, a custom menu system or advanced battlesystem. This script alone accomplishes nothing unless you create a system that utilizes the calls within:

Syntax (Just like Near Fantastica's - with one addition.)
Code:
if Input.get_function   == "function"  # Keys like [Esc], [Ctrl], [Tab]
if Input.get_letters    == "letter"    # The alphabet keys (augmented by (Shift] or [Caps])
if Input.get_numbers    == "number"    # The number keys (disabled if [Shift] is being pressed)
if Input.get_key        == "char"      # All other printable keys (and top-row number keys [shift]ed)
if Input.get_direction  == "number"    # Number Pad & [Home], [PgUp] and etc.
and
if Input.get_individual == "function"  # Keys like [Left Alt], [Right Alt], [Left Shift]

Input.get_function
[SIZE="1]This call allows you to detect specialized keys such as 'Esc', 'Ctrl', 'Backspace' , 'Print Screen' and the 'F1 to F12' keys
[/SIZE]
Input.get_letters
This call allows you to detect the alphabetic characters being returned, and whether they are 'shifted' or not. Unlike cybersam's system, this detects whether the left and/or right shift buttons are being pressed so generation of capital and lowercase characters can be produced.

Input.get_numbers
This call allows you to detect the number keys (0 to 9) along the TOP of the keyboard. It does not detect any 'shifted' characters and does not detect the number keys on the keypad.

Input.get_key
This call returns most other alpha-numeric characters such as the space key, brackets and parenthesis, equals and the 'shifted' characters along the top of the keyboard.

Input.get_direction
This call returns the number keys on the directional keypad when the Numberlock is on and directional keys when it is off. It also returns keys such as PgUp, PgDown, Home and etc.

Input.get_individual
This call returns the specialized function keys of [CapsLock], [NumberLock] and [ScrollLock]. But it also detects the unique keys such as [Lf Ctrl] and [Rt Cntl] and matching ones for Alt and Shift. The pressing of [CapsLock] and [NumberLock] automatically alters the returned values of the other functions, but this function is useful if you want to detect and return the button as part of your special menu/battle/whatever system.


FAQ
Again, this system is used to detect keypresses but it is up to the end-user to create system(s) that use these key-detection functions.


Keys to NOT Consider (Unless you're real good)
As the [F1], [F2] and [F12] keys are most likely hardwired into Game.Exe or cleverly concealed within the RGSS default coding, I would not recommend testing and writing code for these. This is under the assumption that an advanced script has not been made that could disable these key's built-in functions.

Also, while detection of the Left and Right Windows key (for the Microsoft Natural keyboard) is now available, these are not recommended given as well. Not unless you can disable Windows's key reactions themselves.


Compatibility
As it adds routines to the INPUT module, it should be compatible with nearly any system. The only exception being systems that also add or edit the INPUT module that may use the same routine names... rare instances.


Example Code
Based on a small submission by GoldenShadow in N.F's post in Creation Asylum, this example shows how you can detect certain keys with this system. Just press [Esc] from the field map to bring up a 'butchered' main menu screen and press keys to your heart's content. :D

Example

Print this item

  Anti Event Lag Script
Posted by: Near Fantastica - 03-02-2008, 07:38 AM - Forum: Scripts Database - No Replies

Anti Event Lag Script
Version 3
by Jaime 'Near Fantastica' Webster
not DerVVulfman


Introduction
"This script uses my view range script to limit which events are being updated... therefore a large map with lots of events 300 + can still run at 40 fps... this is probably not a final version as I can think of a few more ways to limit event lag...

It removes the events from updating and the events sprites from updating when it is out side the screen (2 titles out side) auto start and parallel are not included in this though."
- Near Fantastica

By the poster
I didn't create the script, and as of now the links that Near Fantastica put up are down (and he can't get to them) and his RMXP system is down. Given that he posted the original (though broken) demo links here, there should be no problem to post the script.

However as I didn't create the script, I cannot offer support.

Script
Anti Event Lag Script

Instructions
Place it above the main above any other custom scripts but below the default scripts and it should work fine...

Print this item

  Advanced Event Triggers
Posted by: Near Fantastica - 03-02-2008, 07:36 AM - Forum: Scripts Database - No Replies

Advanced Event Triggers
Version: 1
by Jaime 'Near Fantastica' Webster
Not DerVVulfman

Introduction
"This script give you control over events like you never had before..." - Near Fantastica

Features
  1. You can now use script calls to trigger events...
  2. You can use as many calls as you need...
  3. You can use Logic opperators like AND OR NOR NAND XOR XNOR

By the poster
I didn't create the script, and as of now the links that Near Fantastica put up are down (and he can't get to them) and his RMXP system is down. Given that he posted the original (though broken) demo links here, there should be no problem to post the script.

However as I didn't create the script, I cannot offer support.

Script
Advanced Event Triggers


How it works
The below describes how you create additional triggers within events. This is done by creating 'Comments' within the map event's 'Event Code' like below:

Comment: Event Trigger
Comment: Logic NUMBER
Comment: SCRIPT TEST
Comment: EndTrigger


Boolean Logic
NUMBER = 0 :: NO Logic
NUMBER = 1 :: AND Logic
NUMBER = 2 :: OR Logic
NUMBER = 3 :: NOR Logic
NUMBER = 4 :: NAND Logic
NUMBER = 5 :: XOR Logic
NUMBER = 6 :: XNOR Logic

SCRIPT TEST :: is the script you want to test

Take Care,
Near

Print this item

  Visual Equipment
Posted by: Derk-Jan - 03-02-2008, 07:34 AM - Forum: Scripts Database - No Replies

Visual Equipment
version 2.2.31
update 14 february 2007


Updates:
New in version 2.2.X
Added: guill_trick_*: Compatible with tricks multi-equip
New in version 2.1.X
Added: Can now return false and [false]
Fixed: Not updating
version 2.0.X
Added: Now Compatible with N+ 2.X.X +
version 1.2.X
Added: Now possible to use other maps then Visual Equipment
Fixed: Unable to load bug
Fixed: Guillaume update bug
Fixed: Guillaume Weapon not showing bug
Demo: Added
version 1.1.X
Added: Guillaume777's script support
Added: Equipment in windows visible


Introduction
Today I strumbled over the internet looking fro some good Visual Equipment scripts, beacuse I was goign to make an only one. I stumbled on more then one script, so I studied them all. The two best by my meanings where those from Rataime and the one from Geso Chiku. However the lack on proper coding (not that I did that myself) and the methods outside objects (top-level methods) where bugging me... So, I started wrinting a new one, with features from both, and some from myself.


Features:
  • Shows the players equipment on map and in windows
  • Initial body value possible (skin, eyes and hair)
  • Up to 5 types of equipment (visual). From weapons to accesoiry's
  • Shows NPC equipment on the map events if set
  • Compatible with Caterpillar and Squad Based Action Battle System
  • Compatible with Half Kaizer- and other different size-sprites
  • New coding, I hope easier set-up
  • Now also compatible with Guillaume777's script
  • Now also compatible with Tricksters script
  • Now also compatible with Netplay Plus™ 2.X.X

Demo
Click here for older one


Script
Visual Equipment v 2.2.32 (SDK)
Visual Equip v 1.2.1 (Removed SDK & SBABS Use)


Instructions
Just place the script above main, under the SDK
Detailed instructions are in the first part of the script!


FAQ
Q: I need special character sets right?
A: What would be the point if you would not need it. This script was made for those sets...

Q: I have X script that modifies Sprite_Character?
A: Place it below this script.


Compatibility
? Known compatibility issues
[*]SDK required
[*]With extra equipments scripts, does not shows things in the extra slots
[*]With Raitaimes shadow script, only shows character sprite, not equipments
[*]With Only scripts like Netplay and Netplay+, only shows head/does not work
[*]Only works with SDK version of Caterpillar
[*]Only works with Guillaime777's Script version 6.X.X +
[*]Works with Trickster Multi-Equip version 2.X.X +
[/list]


Credits and Thanks
- Rataime for the idea
- Geso Chiku for the method constructions


Author's Notes
What features should I add?
New: I know the Guillaume thing could have been done with fewer lines, but I thought to keep it clean, I coded it this way.

Print this item

  Timed Hit Add-On
Posted by: Zephren - 03-02-2008, 07:29 AM - Forum: Scripts Database - Replies (14)

Timed Hit Add-On
Version: 1.30


Introduction

This is a rewrite of a script I created a few months ago. It is much simpler, and much more likely to successfully integrate with other battle systems (I have tested it on a few). It has actually come a long way since I posted it. I've gotten some good suggestions, and would definately love some more.


Screenshots
Using the static option
[Image: Ezjh27l.png]
Using the dynamic option
[Image: 7sv4ckr.png]


Demo
Version 1.3


Instructions

The different settings are at the top of Timed_Hit found in the section titled Timed_Hit. I decided that it would make the most sense to construct character and skill data by using arrays.

Descriptions of the settings:
Content Hidden


Compatibility

I have tested this with a few other systems, which all worked. The exception is Trickster's RTAB, but that is because other things happen in the background while a character is making an action. This add-on should work as long as the battle system pauses when it is a characters turn to preform an action.

More technical information:
Content Hidden


Author's Notes

This is an update to the first script that I posted. I would love to make it as compatible with as many systems as possible. My next focus is to work on commenting the script and adding any new suggested features.

Updates:
Content Hidden

Print this item

  Multi-Slot Equipment Script
Posted by: Guillaume777 - 03-02-2008, 07:27 AM - Forum: Scripts Database - Replies (3)

Multi-Slot Equipment Script
Version: 6.2.2
by Guillaume777
(February 14, 2006)
not DerVVulfman


Introduction
Quote:Do you want :
To equip more than one weapon ?
To attack once with each weapon you have equiped ?
To equip new armor types beyond shield, helmet, armor and amulet ?
To equip 2 handed weapons, which either take your shield or weapon slot ?
To customize your slots and slot name so no character is alike ?

If so then I highly suggest you try my multi-equipment script. It is very powerful and adds a lot of features to the equipment screen. Download my demo for quick try :D

The Multi-Slot script has gone through a number of changes since it's original incarnation. The inclusion of cursed weapons... RTAB compatability... SKD 1.3 compatability (possibly still?)... multiple strike weapons.

Here, you will find what is possibly the last version of Guillaume777's great work.


Features
  • Can go beyond the default five equipment slots
  • Can wield multiple weapons (demo shows 4 weapon slots possible!)
  • Can add 'Cursed' (unremovable) armors and weapons
  • Can make two-handed weapons
  • Can make weapons that deliver multiple strikes
  • Can set up off-hand weapon values
  • Can rename your equipment slots to your choosing
  • Can display the enhanced list in your Status window
  • Can show 1 more actor parameter (evade), assuming you've created it already


Screenshots
[Image: Ny2Ba4v.png]
Well, a pic of Gloria's equipment going BEYOND the normal 5 items.


Demo
You got one right HERE!


Script
This script has been formatted to more-closely match the standard formatting of RGSS scripts in RPGMaker XP. At no point has any of Guillaume777's functions been removed.

NOTE: The EVADE switch in the configuration section assumes that you've created an additional parameter (strength/dexterity/etc) which you want to have displayed in the status window. If you have not created this additional parameter yourself, or are not using a script that adds an 8th parameter, then turning this switch to 'true' will give you an error.

Multi-Slot (Section 1: Modules)
Multi-Slot (Section 2: Actor)
Multi-Slot (Section 3: Windows)
Multi-Slot (Section 4: Other)


Instructions
So many features, so little time. It IS pretty much plug 'n' play. To use, paste it just above main (like normal). When using with the RTAB system, paste it just below RTAB (and any Cogwheel script with it).

Features such as multi-hit weapons, or double-attacking weapons can be created by tagging it with a so-named element (made in your Database's System page), entering it's .id values in their hashes in the script, or entering strings like '(2handed)' in their names.

Cursed weapons, cursed armors and off-hand weapons can be made by entering strings like (cursed) or the like into their names or adding their .id numbers in their hash values too.

Other features like these are all explained in the script (thank god ':| ), cause I didn't make it... I just use it :D.

FAQ
While I posted this topic at HBGames.Org in September '06... I didn't expect to hear from Guillaume777 himself since his sabatical after RMXP.net went down. I received the followup 6.2.2 directly from him on May 19, '07. Now THAT is an honor. I expect this to BE the final version and do not expect it to be updated.

Compatibility
It may be incompatible with scripts that has anything to do with the actor's equipment (weapon modifications, window edits, etc.). It was designed for use with the default battle, default menu system and apparently the RTAB system in mind.

If used with the Animated Battlers script, it's advised to use battle-system add-ons like Connected Attacking (for RTAB) or Multi-Attack (by Trickster) to perform multiple strikes with a weapon or skill. Using this system's multiple-attacking system 'does' work, but appears strange in that the heroes run to attack... strike... retreat... run to attack (again)... strike... retreat... rinse and repeat. Kinda awkward looking.

There is (as far as I know) only one topic for a Guillaume777-based shop script. I made it guys... If you are the owner of a shop, please add your support. ;)

Credits and Thanks
Obvious credits goes to Guillaume777 for creating this script, and his eMailing me his newest version. Additional credits goes to Cygnea of HBGames.Org for saving a previous 'fixed' version from RMXP.net before it went down (which also spawned my interest and Guillaume777's eMail).

[Image: xp_warning.png]
Image has link to Enterbrain's Download Page

Print this item

  Fog of War
Posted by: Wachunga - 03-02-2008, 07:19 AM - Forum: Scripts Database - No Replies

Fog of War
Ver 2.01
by Wachunga
Not DerVVulfman

Text within the post was written by Wachunga, Dec. 6, 2005.

Summary
A map specified as having "fog of war" has tiles that are (fully or partially) obscured until the player gets within visual range. The amount of fog of war to disappear as the player moves depends on the visual range specified. Gamers with experience playing Real Time Strategy games like Warcraft, Age of Empires, etc. should be quite familiar with the concept.

This script supports two kinds of fog of war: static and dynamic.

Static fog of war is the kind that typically hides terrain in RTS games. It covers the entire map until the player explores the area, discovering the underlying terrain. Once static fog of war disappears from an area of the map, it stays gone indefinitely (even if loading a saved game, leaving the map and returning later, going to the menu, etc).

Dynamic fog of war is identical to the static kind except that it doesn't stay gone forever: as soon as the player leaves visual range of an explored tile, dynamic fog of war covers it again. This kind is typically used to hide enemy units in RTS games.


Features
  • both types of fog of war supported
  • customizable view range
  • customizable fog autotile (plug in your own if you wish)
  • doesn't take up any tileset or autotile slots
  • handles move events (jumping, speed)
  • works with Cogwheel's Pixel Movement script
  • persists between saves, teleports, etc.
  • customizable opacity
  • can be turned on and off dynamically



Resources
You'll need this custom fog of war autotile, unless you choose to make your own.


Demo
Featuring a cantankerous old man:

.zip   FOG OF WAR DEMO.zip (Size: 955 KB / Downloads: 5)
-- Instructions are within the script --


Compatibility
For compatbility with Cogwheel's Pixel Movement script, place Cog's script ABOVE the Fog of War script. Then replace Cog's Game_Player/update method with the following version (or just copy and paste the section preceded by a "FoW" comment):
Compatability Patch

Note: this is a repost. There were many pages of discussion in the original thread at RMXP.net that you would have liked to look through. Site no longer available.


.png   fow_default.png (Size: 4.51 KB / Downloads: 7)

Print this item

  Enemy Troop Extender
Posted by: SephirothSpawn - 03-02-2008, 07:18 AM - Forum: Scripts Database - No Replies

Enemy Troop Extender
by SephirothSpawn
Originally posted in Creation Asylum
Version: 1.1
Not by DerVVulfman


Introduction
This system extends the number of enemy battlers for a single TROOPS beyond the default maximum of eight. Yes, beyond eight in a single battle.

While your default system allows you to have only eight battlers in battle, this allows you to have nine... ten... even seventeen enemies at a time in battle.

This system cannot alter the RPGMaker XP editor itself so you must add the enemy battlers into your TROOPS through this script. You will be required to declare the ID number(s) of each enemy you add, as well as the horizontal and vertical position of the battler on the screen.


Features
  • Add battlers beyond the 8 enemy max
  • Global Compatability (Edits the RGSS class)


Screenshots
None. But you WOULD see more enemies on the screen than normal.


Demo
None. Easy plug-n-play usage.


Script
SephirothSpawn's Enemy Troop Extender


Instructions
Paste this below Scene_Debug and above main. After that, you have to add your 'additional' enemy battlers to your TROOPS through editing the script's configuration section.

More instructions inside the script.


FAQ
This script was part of a request made at Creation Asylum that SephirothSpawn answered almost immediately. The instructions within the script came about from the posts and paraphrased a little here and there.

I asked whether I could post it here. He said it was cool. :thumb:


Compatibility
As it edits the default RGSS 'TROOPS' class, you should have no problems with it at all.


Credits and Thanks
SephirothSpawn for making it in the first place. And to scoates for asking it in Creation Asylum.


Author's Notes
Well, Seph... Got anything to say?? ;)


Terms and Conditions
Um, he wrote it for someone as part of a request and he said I could post it. My guess is it's free for use. :D

Print this item

  Window Sprites
Posted by: Trickster - 03-02-2008, 07:15 AM - Forum: Scripts Database - No Replies

Window Sprites
Version: 2.0.1


Introduction
This simple script lets you tag sprites to a window, when they are tagged it automatically updates/disposes/moves with the window.


Screenshots
Take a sprite and add it to a window. There is your screenshot right there.


Demo
For a demo of this script in action see the following

Animated Gradient Bars
Skill Shop
State Cycling


Script
Ok, ok I'll spare the families this time.

Code:
#============================================================================
# ** Window Sprites
#----------------------------------------------------------------------------
# Trickster
# Version 2.0.1
# Date 3/5/07
# SDK Version : 2.1
#============================================================================

#--------------------------------------------------------------------------
# * Begin SDK Log
#--------------------------------------------------------------------------
SDK.log("Window Sprites", "Trickster", 2.01, "3.24.07")

#--------------------------------------------------------------------------
# * Begin SDK Requirement Check
#--------------------------------------------------------------------------
SDK.check_requirements(2.0, [1])

#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if SDK.enabled?("Window Sprites")
  
class Window_Base
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  if @trick_sprites_windowbase.nil?
    alias_method :trick_sprites_base_x=, :x=
    alias_method :trick_sprites_base_y=, :y=
    alias_method :trick_sprites_base_z=, :z=
    alias_method :trick_sprites_base_ox=, :ox=
    alias_method :trick_sprites_base_oy=, :oy=
    alias_method :trick_sprites_base_width=, :width=
    alias_method :trick_sprites_base_height=, :height=
    alias_method :trick_sprites_base_contents_opacity=, :contents_opacity=
    alias_method :trick_sprites_base_back_opacity=, :back_opacity=
    alias_method :trick_sprites_base_opacity=, :opacity=
    alias_method :trick_sprites_base_visible=, :visible=
    @trick_sprites_windowbase = true
  end
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias_method :trick_sprites_base_initialize, :initialize
  def initialize(x, y, width, height)
    # Setup Sprites Array
    @window_sprites = []
    # The Usual
    trick_sprites_base_initialize(x, y, width, height)
  end
  #--------------------------------------------------------------------------
  # * Dispose
  #--------------------------------------------------------------------------
  alias_method :trick_sprites_base_dispose, :dispose
  def dispose
    # The Usual
    trick_sprites_base_dispose
    # Dispose all Sprites
    @window_sprites.each {|sprite| sprite.dispose}
  end
  #--------------------------------------------------------------------------
  # * Update
  #--------------------------------------------------------------------------
  alias_method :trick_sprites_base_update, :update
  def update
    # The Usual
    trick_sprites_base_update
    # Update
    @window_sprites.each {|sprite| sprite.update}
  end
  #--------------------------------------------------------------------------
  # * Set X
  #--------------------------------------------------------------------------  
  def x=(x)
    # Run through each window sprite
    @window_sprites.each do |sprite|
      # If Has Method sprite type
      if sprite.respond_to?(:sprite_type)
        # Branch by Type
        case sprite.sprite_type
        when 'content', 'content2', 'cover', 'background', 'background2'
          # Include Scroll Calculation Set X
          sprite.x = sprite.x - self.x + x + ox
        when 'border'
          # Exclude Scroll Calculation Set X
          sprite.x = sprite.x - self.x + x
        end
      else
        # Default is Content Sprite
        sprite.x = sprite.x - self.x + x + ox
      end
    end
    # The Usual
    self.trick_sprites_base_x = x
  end
  #--------------------------------------------------------------------------
  # * Set Y
  #--------------------------------------------------------------------------
  def y=(y)
    # Update All Y's
    @window_sprites.each do |sprite|
      # If Has Method sprite type
      if sprite.respond_to?(:sprite_type)
        # Branch by Type
        case sprite.sprite_type
        when 'content', 'content2', 'cover', 'background', 'background2'
          # Include Scroll Calculation Set Y
          sprite.y = sprite.y - self.y + y + oy
        when 'border'
          # Exclude Scroll Calculation Set Y
          sprite.y = sprite.y - self.y + y
        end
      else
        # Default is Content Sprite
        sprite.y = sprite.y - self.y + y + oy
      end
    end
    # The Usual
    self.trick_sprites_base_y = y
  end
  #--------------------------------------------------------------------------
  # * Set Z
  #--------------------------------------------------------------------------
  def z=(z)
    # Update All Z's
    @window_sprites.each do |sprite|
      # If Has Method sprite type
      if sprite.respond_to?(:sprite_type)
        # Branch By Sprite Type
        case sprite.sprite_type
        when 'content'
          sprite.z = self.z + 1
        when 'content2'
          sprite.z = self.z + 2
        when 'cover', 'border'
          sprite.z = self.z + 3
        when 'background'
          sprite.z = self.z
        when 'background2'
          sprite.z = self.z - 1
        end
      else
        # Default is content
        sprite.z = self.z + 1
      end
    end
    # The Usual
    self.trick_sprites_base_z = z
  end
  #--------------------------------------------------------------------------
  # * Set Origin X
  #--------------------------------------------------------------------------
  def ox=(ox)
    # Get Ox Change
    cx = self.ox - ox
    # Run Through Each Sprite
    @window_sprites.each do |sprite|
      # If Has Method sprite type
      if sprite.respond_to?(:sprite_type)
        # Branch By Sprite Type
        case sprite.sprite_type
        when 'content', 'content2', 'cover', 'background', 'background2'
          # Add to X
          sprite.x += cx
          # Setup Visibility
          sprite.visible = sprite.x.between?(x + 16, x + width - 16) && visible
        end
      else
        # Add to X
        sprite.x += cx
        # Setup Visibility
        sprite.visible = sprite.x.between?(x + 16, x + width - 16) && visible
      end
    end
    # The Usual
    self.trick_sprites_base_ox = ox
  end
  #--------------------------------------------------------------------------
  # * Set Origin Y
  #--------------------------------------------------------------------------
  def oy=(oy)
    # Get Oy Change
    cy = self.oy - oy
    # Run Through Each Sprite
    @window_sprites.each do |sprite|
      # If Has Method sprite type
      if sprite.respond_to?(:sprite_type)
        # Branch By Sprite Type
        case sprite.sprite_type
        when 'content', 'content2', 'cover', 'background', 'background2'
          # Add to Y
          sprite.y += cy
          # Setup Visibility
          sprite.visible = sprite.y.between?(y + 16, y + height - 16) && visible
        end
      else
        # Add to Y
        sprite.y += cy
        # Setup Visibility
        sprite.visible = sprite.y.between?(y + 16, y + height - 16) && visible
      end
    end
    # The Usual
    self.trick_sprites_base_oy = oy
  end
  #--------------------------------------------------------------------------
  # * Set Width
  #--------------------------------------------------------------------------
  def width=(width)
    # Run Through Each Sprite
    @window_sprites.each do |sprite|
      # If Has Method sprite type
      if sprite.respond_to?(:sprite_type)
        # Branch By Sprite Type
        case sprite.sprite_type
        when 'content', 'content2', 'cover', 'background', 'background2'
          # Setup Visibility
          sprite.visible = sprite.x.between?(x + 16, x + width - 16) && visible
        end
      else
        # Setup Visibility
        sprite.visible = sprite.x.between?(x + 16, x + width - 16) && visible
      end
    end
    # The Usual
    self.trick_sprites_base_width = width
  end
  #--------------------------------------------------------------------------
  # * Set Height
  #--------------------------------------------------------------------------
  def height=(height)
    # Run Through Each Sprite
    @window_sprites.each do |sprite|
      # If Has Method sprite type
      if sprite.respond_to?(:sprite_type)
        # Branch By Sprite Type
        case sprite.sprite_type
        when 'content', 'content2', 'cover', 'background', 'background2'
          # Setup Visibility
          sprite.visible = sprite.y.between?(y + 16, y + height - 16) && visible
        end
      else
        # Setup Visibility
        sprite.visible = sprite.y.between?(y + 16, y + height - 16) && visible
      end
    end
    # The Usual
    self.trick_sprites_base_height = height
  end
  #--------------------------------------------------------------------------
  # * Set Contents Opacity
  #--------------------------------------------------------------------------
  def contents_opacity=(opacity)
    # Run Through Each Sprite and Setup Opacity
    @window_sprites.each do |sprite|
      # If Has Method sprite type
      if sprite.respond_to?(:sprite_type)
        # Branch By Sprite Type
        case sprite.sprite_type
        when 'content', 'content2', 'cover'
          # Setup Opacity
          sprite.opacity = opacity
        end
      else
        # Setup Opacity
        sprite.opacity = opacity
      end
    end
    # The Usual
    self.trick_sprites_base_contents_opacity = opacity
  end
  #--------------------------------------------------------------------------
  # * Set Back Opacity
  #--------------------------------------------------------------------------
  def back_opacity=(opacity)
    # Run Through Each Sprite and Setup Opacity
    @window_sprites.each do |sprite|
      # Skip if not Has Method sprite type
      next if not sprite.respond_to?(:sprite_type)
      # Branch By Sprite Type
      case sprite.sprite_type
      when 'background', 'background2'
        # Setup Opacity
        sprite.opacity = opacity
      end
    end
    # The Usual
    self.trick_sprites_base_back_opacity = opacity
  end
  #--------------------------------------------------------------------------
  # * Set Opacity
  #--------------------------------------------------------------------------
  def opacity=(opacity)
    # Run Through Each Sprite and Setup Opacity
    @window_sprites.each do |sprite|
      # Skip if not Has Method sprite type
      next if not sprite.respond_to?(:sprite_type)
      # Branch By Sprite Type
      case sprite.sprite_type
      when 'border', 'tagged'
        # Setup Opacity
        sprite.opacity = opacity
      end
    end
    # The Usual
    self.trick_sprites_base_opacity = opacity
  end
  #--------------------------------------------------------------------------
  # * Set Visibility
  #--------------------------------------------------------------------------
  def visible=(bool)
    # Get Rect
    rect = Rect.new(x + 16, y + 16, width - 32, height - 32)
    # Run Through Each Sprite
    @window_sprites.each do |sprite|
      # If Has Method sprite type
      if sprite.respond_to?(:sprite_type)
        # Branch By Sprite Type
        case sprite.sprite_type
        when 'content', 'content2', 'cover', 'background', 'background2'
          sprite.visible = bool && sprite.in_rect?(rect)
        when 'border', 'tagged'
          sprite.visible = visible
        end
      else
        sprite.visible = bool && sprite.in_rect?(rect)
      end
    end
    # Update Visibility
    self.trick_sprites_base_visible = bool
  end
end

class Sprite
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :sprite_type
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  if @trick_sprites_sprite.nil?
    alias_method :trick_sprites_sprite_initialize, :initialize
  end
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(*args)
    # The Usual
    trick_sprites_sprite_initialize(*args)
    # Setup Default for sprite_type - 'content'
    @sprite_type = 'content'
  end
  #--------------------------------------------------------------------------
  # * Tag
  #--------------------------------------------------------------------------
  def tag(window)
    # Get Attributes
    x, y, width, height = window.x, window.y, window.width, window.height
    # Setup Rect
    rect = Rect.new(x + 16, y + 16, width - 32, height - 32)
    # Branch by Sprite Type
    case sprite_type
    when 'content'
      # Set Visibility
      self.visible = in_rect?(rect) && window.visible
      # Set Z Between Window
      self.z = window.z + 1
      # Setup Opacity
      self.opacity = window.contents_opacity
    when 'content2'
      # Set Visibility
      self.visible = in_rect?(rect) && window.visible
      # Set Z Between Window
      self.z = window.z + 2
      # Setup Opacity
      self.opacity = window.contents_opacity
    when 'cover'
      # Set Visibility
      self.visible = in_rect?(rect) && window.visible
      # Set Z Between Window
      self.z = window.z + 3
      # Setup Opacity
      self.opacity = window.contents_opacity
    when 'border'
      # Set Visibility
      self.visible = window.visible
      # Set Z Between Window
      self.z = window.z + 3
      # Setup Opacity
      self.opacity = window.opacity
    when 'background'
      # Set Visibility
      self.visible = in_rect?(rect) && window.visible
      # Set Z at Window
      self.z = window.z
      # Setup Opacity
      self.opacity = window.back_opacity
    when 'background2'
      # Set Visibility
      self.visible = in_rect?(rect) && window.visible
      # Set Z at Window
      self.z = window.z - 1
      # Setup Opacity
      self.opacity = window.back_opacity
    when 'tagged'
      # Set Visibility
      self.visible = window.visible
      # Setup Opacity
      self.opacity = window.opacity
    end
  end
  #--------------------------------------------------------------------------
  # * In Rect?
  #--------------------------------------------------------------------------
  def in_rect?(*rect)
    # If 1 Argument Sent
    if rect.size == 1
      # Get Rect
      rect = rect[0]
      # Return in rect state
      return (x.between?(rect.x, rect.x + rect.width) &&
      y.between?(rect.y, rect.y + rect.height))
    else
      # Get variables sent
      x, y, width, height = rect
      # If In Rect
      return self.x.between?(x, x + width) && self.y.between?(y, y + height)
    end
  end
end
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end


Instructions
Add Above Main

Then in any window class (By this I mean any child of Window_Base) just do this:

Code:
@window_sprites <<
.tag(

where is a Sprite object

and window is the window you want to tag the sprite to

NEW types have been added

to change the type of tagging used on a sprite just call
.sprite_type = type

where type is either content, content2, cover, border, background, background2 tagged

content and contents2 are the same except contents2 is positioned higher than content
content.z = window.z + 1 contents2.z = window.z + 2

cover is like contents but is positioned over the window
cover.z = window.z + 3

border is like cover but it can be positioned outside the contents of the window

background is like contents but is positioned below the window
background2 is like background but it is positioned below background
background.z = window.z, background2.z = window.z - 1

tagged is just a tagged sprite to a window you are free to position it anywhere

Also the default for all sprites is content

Note you can also add other objects to the window sprite array, but the object you push must respond to methods x=, y=, z=, visible=, opacity=
if you define a method called sprite_type within the object's class you can set the type of tagging used, but if you don't define it the script will use content tagging.


FAQ
Note: Permission granted by Trickster to post:
Quote:And if you post what you have now of my stuff then you don't have the latest versions. I'm too lazy/busy to post stuff.
As this is his material, it is deletable upon his request. Due to his current absense, no support is available. Please do not PM or eMail him for support.


Compatibility
Should be compatible with any other script

Requires SDK Part 1


Author's Notes
Please do not post saying you don't know what this does, if you can't figure it out then chances are you won't have a use for this. If you do post you will be getting a surprise from me (and it will not be a good surprise)


Terms and Conditions
Hey, I posted this publicly. You can use it. What do you expect? But if you do use it, I do expect you to spell my name correctly in your game. And yes you can use it in commercial games too.

Print this item