The Steal and Peep Script
#1
The Steal and Peep Script
A Revision of Steal Script by makeamidget & Khatharr

Version: Revisionist Version 1.2


Introduction
This script allows the developer to define a skill that allows an actor to steal an item from an enemy target.  Further, this script allows the developer to define a skill that permits an actor to scan and reveal an enemy's basic stats within a pop-up screen.

With this script,  the items are custom ones  that can only be attained by stealing them in combat. The developer may assign a single common (or easy to steal) item and a rare (hard to steal) item. These items aren't defined in the enemy database,  so they are not part of the end-of-battle treasure drop system.

Compared to the original, this version is a structural rewrite, containing the basics of the original system,  but performing rewrites in a manner to make it more compliant with other scripts.  Methods that involved rewrites have been altered to become aliased. New methods and tests have been added and most of the hard-coded vocabulary is now in the configuration page.


Features
  • Allows one common and/or one rare item to be stolen per enemy
  • Allows the ability to scan/analyze/peep on an enemy to see its stats
  • (NEW) Allow for more than one steal and/or peep skill to exist
  • (NEW) Allows both steal and peep skills to apply damage
  • (NEW) Allows customization of the custom skill/peep damage pop
  • (NEW) All text used in windows and damage pops may be configured
  • (NEW) Different text shows in the steal window if a damage steal skill used
  • (NEW) Able to turn off the after-damage steal window
  • (NEW) Able to define armor that can increase/decrease system's stat checks
    • Compatible with MultiSlots! by DerVVulfman
    • Compatible with Multi-Slot Equipment Script by Guillaume777


Screenshots
Three presented


Demo
None


Script
Introduction Header Page (important)
Configuration Page
Main Engine Page


Instructions

Instructions are in the Instruction and configuration page.  Otherwise, paste below Scene_Debug and above Main as usual. If used with either MultiSlots! (by DerVVulfman) or the Multi-Slot Equipment Script (by Guilaume777), place it below your chosen multiple-slot system as well.


FAQ
I was like "WHY ARE THE PEEP AND STEAL WINDOWS NOT SHOWING"???  I found that the skills needed a 'target' battle animation to trigger them.  If you don't want a battle animation to show, you can just create an empty battle animation (no graphic, no audio) and use that.  It doesn't care.


Compatibility
For RPGMaker XP.
Compatible with MultiSlots! by DerVVulfman
Compatible with Multi-Slot Equipment Script by Guilaume777



Author's Notes
ROFL.  Some of the comments made by Khatharr and makeamidget were hilarious in the original script, so I kept a few of the back-and-forths within.


Terms and Conditions
Free for use, even in commercial scripts. However, I require due credit for myself, Khatharr, makeamidget and Ace_V who asked for the damage-based options.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#2
Shocked Shocked Shocked Shocked
Omigoodnessomigoodnessomigoodness!

Thank you soooo much for making this update, DerVVulfman! It's everything I dreamed and hoped it would do. Incredible
I can't thank you enough, really. The freedom compared to the original script's limitations blows my mind. The ability to customize nearly everything about it, to include the peep/steal/mug/mind-attack mechanic on multiple skills, the easy-to-read-and-edit configuaration section, the help text, it's all so organized. You've made my month! 

I can't tinker with my project just yet, but I'm hoping I'll have free time to implement this over the weekend! Grinning
Reply }
#3
It works!!!

Now I just need to populate the script with the whole enemy roster.

I did notice that running a peep/steal skill a second time causes some funky reactions.
The character casts peep / steal the first time, and succeeds (often the common item)
The enemy moves as normal.
The character casts peep / steal a second time (to try to nab the rare item) but nothing happens
The monster acts.
Then the peep / steal proceeds (and it either displays stolen/stingy, or the enemy's stats) Either way, this happens AFTER the enemy has moved, and not immediately after the spell was used.

Other than that, it is great! I managed to steal the enemy's rare item once and a peep skill confirmed it (the rare slot was now empty)


EDIT:

I've tested it further, and I finally succeeded in stealing the rare drop of one of the bosses! However, I noticed that the icon of the armor was incorrect (it was a different item).
Also, the icon of the common item seems to appear whenever "Being Stingy!" appears. (And "no item left!" displays the rare item that I just stole.)
Reply }
#4
BUMP
To version 1.1

First, there's nothing wrong with the new 'Steal Damage' pop methods within RPG::Sprite. The damage values, icons and flags are solely local. That being, they only exist within that method. When that method runs, the values passed into it only exists for that instance And when the creation of that steal damage pop is done, they vanish.

On a layman's perspective, we can compare these two values/variables (solely as an example):
* stealing_damage : (a local variable) - Only exists for the moment and only within that method until it is done
* @stealing_damage : (an instance variable) - Will exist throughout its class and will not erase until the class is closed

So, issues with values or icons in the Steal Damage pop must have been when it was called/triggered.

* * *

Now the Game_Battler is usually the class that handles any damage applied to an actor or enemy, but this code uses the Game_Enemy class. That is actually not a problem as Game_Enemy inherits all the methods that were created in Game_Battler. Ergo, adding content to creating a Steal Damage pop or effects within Game_Enemy is inventive and shouldn't be an issue.

What IS an issue is that, while the method in Game_Battler erases the values of normal damage pops after the pops are done, there was nothing within Game_Enemy's code to reset or erase the steal damage pops. Sure, the Game_Battler code defined and initialized the values to nil, but they were never reset.

So, I chose to have them initialized/reset at the very start of the Steal or Peep skill tests. Since they are erased or reset at the very beginning of the routine, this should eliminate issues where a peeper damage pop accidentally has an icon attached, an icon that should be nil.

* * *

Towards the Steal Window that appears after the damage pops... my bad! I recognized within other sections of the code that I needed to acquire item names and item icons based upon the type of item, whether weapon, armor or generic item. But I forgot to replace the original icon bitmap methods from makeamidget's and Khatharr's code with one that recognized the three types. Now it is fixed and will generate the proper type of icon.

That should take care of everything.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#5
Yay! Thanks for the update! The resetting fixed the wrong icons popping up.

However, I noticed two more oddities:

- Peeping after the opening turn still results in a delay (the stats only show up after the enemies all complete moving)
- After a steal attempt, the next time the monster attacks, their common item and item name text pop up on them (along with damage text on the player character they attacked)
Reply }
#6
I do not receive either of these conditions you are reporting.

When I target an enemy with the peep command, the battle freezes after a successful 'battle-animation' "PEEPER!" score.  The image of the enemy splits off and moves up into the location of the upcoming Peep window as it should and you can see the enemy's stats.  And once I press [ENTER], the battle resumes, including any other hits/scores from enemies and actors (which can be steal or peep) alike.

Nor do I see any additional icons or extraneous damage pops among enemies or actors alike when performing normal attacks

I have two peep and two steal skills.   "Hurricane" indicates a skill that also attacks...
I also replaced Do-Nothing on Ghosts with a Fire-spell skill
  • Turn 1:
  • I set Aluxes to Peep on Ghost 1
  • I set Basil to Steal  steal Ghost 1
  • I set Gloria to Steal from Ghost 2
  • I set Hilda to Hurricane Peep  on Ghost 2  (your mind blast peep)
  • Turn 1: Result
  • Gloria Steals potion from Ghost 2 - Steal Window appears as normal
  • Aluxes Peeps on Ghost 1 - The ghost image move into the Peep Window location and the stats are shown.  Here, I need to hit enter to resume battle.
  • Basil Steals potion from Ghost 1 - Steal Window appears as normal, and automatically vanishes after 65 frames.
  • Ghost 1 attacks Basil.  Normal damage pop appears with no icons or extra messages
  • Ghost 2 Fire-spell's Gloria.  Normal skill damage pop appears with no icons or extra messages
  • Hilda Hurricane Peeps on Ghost 2 - 167points of damage but failed to peep.
  • Turn 2
  • I set Aluxes to Peep on Ghost 2
  • I set Basil to Steal  from Ghost 2
  • I set Gloria to Hurricane Steal from Ghost 1 (Ghost #1 is getting mugged)
  • I set Hilda to Hurricane Peep on Ghost 1
  • Turn 2: Result
  • Aluxes Peeps on Ghost 2 - Ghost has 373 of 540 HP and Common Item says "None"
  • Basil attempts to Steal from Ghost 2 - But ghost was Stingy
  • Hida Hurricane Peeps on Ghost 1 - 156pts damage and is a successful peep - 384hp remain and no common item
  • Gloria Hurricane Steals from Ghost 1 - Hits for 132hp but Ghost was Stingy
  • Ghost 1 attacks Gloria and misses
  • Ghost 2 attacks Gloria and misses


Likewise, during a successful peep:
  1. The Peeper! battle pop will show after the battle animation plays over the target
    • If it is a Peeper skill that applies damage, both the damage pop and the skill/peeper pop appear simultaneously
    • The peeper pop appears below the damage pop.
  2. After the Peeper pop, a duplicate of the Enemy's battler image splits off and floats up and to the right into position
  3. The Peep Window, after positioning,  will begin to appear with stats already defined within.
  4. Only after the battler is in place will the Peeper Window become visible (sizing can be a delay as well)
  5. The window will stay in place until the player presses Enter/Select.

IF there is a sizing issue (oversized enemy) some of the above does change as the enemy battler must scale down to fit.  This will be after the battler has moved into position, so it will first (1) move, (2) scale, and then (3) allow the window to appear.

This is how it is functioning within a base project.  And by design, this should be normal behavior.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#7
Ohhh. OK I tested it again, but this time no more random text/icons popping up. But still a delay from Peep after the first time I used it. (In case it matters, I've only used the script in Battle Test and not yet in-game)

I'll keep trying it out to see what triggers the issues I mentioned above.

I also tried replacing Game_Enemy and Game_Battlers_1-3 with the default version from a new project, but the game crashed because apparently I implemented a Regen script in 2005 and I don't exactly know what I played around with (that script does do something with one of those scripts, just that I'm not entirely sure which among those were touched.)

Anyway, this is a minor issue. I'm just glad that the script works and the player can go after rare and hidden things!
Reply }
#8
I cannot account for scripts of which I am unaware. And likely those may be in play. As a rule, it is better to have an outside script that performs changes than to directly edit the already-existing default scripts. Those changes are typically untraceable and can cause issues down the line.

But as I stated a few hours ago (after some cleanup):

BUMP
To version 1.2

Some cleanup was done by way of replacing the older names used within the original alias commands with newer ones that were more on-par with the standard that includes the name(s) of the actual class and a suggested name for the script.

As to why the class name is a requirement, Assume you were to alias the 'initialize' method within Game_Battler and within Game_Enemy. The Game_Enemy class inherits methods from Game_Battler. And if you used the same alias name (like mk_init), the project would crash because of issues as Game_Battler's initialize method has no passed parameters whilst Game_Enemy does.

Next was the consolidation of certain repeated statements that garnered item names and icons. Methods that performed these tasts were scattered about. But as of now, only one of each method now exist within the MM_Steal module.

And now, I added a new feature!!! Armor bonuses specifically for steal and peep skills!

While true that armor can boost or reduce the wearer's basic stats, I thought it would be an interesting idea if something worn could give an additional boost to an actor's stats when performing a bit of grand larceny.

You could have a "Gloves" accessory that boosts an actor's dexterity. But with this, you could make an exact copy of the gloves, but have the second pair (let's call them "Thieves Gloves") give a +20 to an actor's dexterity score solely when stealing from an enemy. Likewise, and within the currently supplied configuration page, I gave a -10 agility penalty to most default Helmets when one wishes to try and Peep an enemy's stats.

The new Armors bonus/penalty system works with systems using both my MultiSlots! system and Guilaume777's Multi-Slot Equipment Script. BUT, Steal and Peep must be placed below those systems.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#9
Quote:As a rule, it is better to have an outside script that performs changes than to directly edit the already-existing default scripts. Those changes are typically untraceable and can cause issues down the line.

Definitely! I was still very inexperienced back in 2005. I'd never apply something like that today, but alas this is an old project. Laughing

Armor bonuses are so cool! Didn't occur to me to make them temporary. I just used regular stat-boosting equipment.

I implemented the script, and hashed out the armor penalties (as most of the headgear are bandanas, masks, etc). I did add two bits of headgear, and made the second one give bonuses to both peep and steal:

Code:
  # SKILL ARMOR
  # ===========
  # These hash arrays allows you to give a bonus or penalty to worn armor that
  # specifically affects a steal or peep effect.
  #
  # SYNTAX:  ARMOR[armor_id] = [steal)bonus, peep_bonus]
  #--------------------------------------------------------------------------
  #
  #  ARMOR[5]    = [ 0,-10] # The default helmets are 5-8
  #  ARMOR[6]    = [ 0,-10] #   I made it a -10 to their agility check
  #  ARMOR[7]    = [ 0,-10] #   when trying to 'peep' on an enemy. There
  #  ARMOR[8]    = [ 0, -5] #   is a -5 for Mythril... just because
  #
  #  ARMOR[14]   = [ 0,  5] # EXAMPLE: Thief Gloves: Gives +10 to wearer's dex for steals
    ARMOR[14]   = [ 5,  5] # Pink Okami Mask: Gives +5 to wearer's agi for peeps
    ARMOR[15]   = [10, 10] # Purple Okami Mask:  Gives +10 to wearer's agi and dex for peeps and steals

However, whenever I use either peep / steal, this tiny error pops up (see attached) and after I click OK, the battle continues. (The numbers are different for another character)
I searched the code for those numbers thinking I messed up the item or skill table, but there were no lines that matched those numbers exactly.  Sweat


Attached Files Thumbnail(s)
   
Reply }
#10
This usually happens to Wulfo because he forgets to remove some testing calls like p or print plus some string or a custom array. So just try finding those methods in the peep! peep! script and remove them.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9

Maranatha!

The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.

[Image: SP1-Scripter.png]
[Image: SP1-Writer.png]
[Image: SP1-Poet.png]
[Image: SP1-PixelArtist.png]
[Image: SP1-Reporter.png]

My Original Stories (available in English and Spanish)

List of Compiled Binary Executables I have published...
HiddenChest & Roole

Give me a free copy of your completed game if you include at least 3 of my scripts! Laughing + Tongue sticking out

Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Script Commands Bug Fixes kyonides 2 171 02-13-2025, 08:35 PM
Last Post: kyonides
   Text Scroll Script - Enhanced DerVVulfman 23 35,982 02-18-2021, 04:16 AM
Last Post: DerVVulfman
   Cursor Script Selwyn 7 16,149 09-28-2019, 02:13 PM
Last Post: DerVVulfman
   ACBS FIX SCRIPT #2: Advanced Cry Correction DerVVulfman 1 5,028 08-09-2019, 03:42 PM
Last Post: aeliath
   ACBS FIX SCRIPT #1: Victory Cries Patch DerVVulfman 1 5,096 08-08-2019, 02:53 PM
Last Post: aeliath
   Spritesheet Generator Conversion Script DerVVulfman 0 4,528 11-21-2018, 04:48 AM
Last Post: DerVVulfman
   Neo Mode 7 Script by MGCaladtogel MGC 59 129,747 09-29-2017, 03:48 AM
Last Post: DerVVulfman
   Longer Script Calls LiTTleDRAgo 0 5,169 05-17-2017, 12:36 AM
Last Post: LiTTleDRAgo
   SLOLS: Snake Look-alike on Load Script Zeriab 3 11,794 05-14-2017, 06:25 PM
Last Post: LiTTleDRAgo
   Character Select Script Selwyn 3 11,226 03-07-2017, 04:14 AM
Last Post: JayRay



Users browsing this thread: 4 Guest(s)