RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Show Slip Damage

0 Members and 1 Guest are viewing this topic.

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Show Slip Damage
Version: 1.3a
Author: cozziekuns
Date: June 23, 2011

Version History


  • <Version 1.3a> 07.22.2011 - Updated with Mr. G&W's bugfix.
  • <Version 1.3> 07.14.2011 - Updated because of a (relatively) small bugfix.
  • <Version 1.2> 06.23.2010 - Wow its really been a whole year. Updated because I saw how flimsy my code was in a script request topic.
  • <Version 1.1> 07.13.2010 -After 1 whole month, updated with an error that Modern Algebra came across.l
  • <Version 1.0> 06.13.2010 - Original Release

Planned Future Versions

    None! Suggest something.

Description


A system designed to show the amount of slip damage dealt to both actors and enemies. Originally found in my Tales of Icarus Script Package.

Screenshots



Sorry kids, the battle system doesn't come with the script.

Instructions

To install this script, open up your script editor and copy/paste this script to an open slot below ? Materials but above ? Main. Remember to save.

Script


Code: [Select]
#===============================================================================

# Cozziekuns Show Slip Damage
# Last Date Updated: 7/22/2011
#
# A system designed to show the amount of slip damage dealt to both actors and
# enemies.
#
#===============================================================================
# Updates
# -----------------------------------------------------------------------------
# o 06/13/10 - Created Script.
# o 07/13/10 - After 1 whole month, updated with an error that Modern Algebra
#              came across.
# o 06/23/11 - Wow its really been a whole year. Updated because I saw how flimsy
#              my code was in a script request topic.
# o 07/22/11 - Updated with Mr G&W's Bugfix.
#===============================================================================
# What's to come?
# -----------------------------------------------------------------------------
# o Compatibility with most popup scripts and other battle systems. (Though it's
#   usually already built into those type of scripts.)
#===============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ? Materials but above ? Main. Remember to save.
#===============================================================================

$imported = {} if $imported == nil
$imported["CozShowSlipDamage"] = true

module COZZIEKUNS
  module SHOW_SLIP_DAMAGE
    SLIP_DAMAGE_STRING = " damage due to" # Text you want after "Actor took xxxx".
    WAIT = 90 # How many frames you want the slip damage message to stay on the screen.
  end
end

#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
#  This class deals with battlers. It's used as a superclass of the Game_Actor
# and Game_Enemy classes.
#==============================================================================

class Game_Battler
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :slip_damage_message
  #--------------------------------------------------------------------------
  # * Application of Slip Damage Effects
  #--------------------------------------------------------------------------
  alias coz_sd_gb_slip_damage_effect slip_damage_effect
    def slip_damage_effect
    coz_sd_gb_slip_damage_effect
    array = " "
    if slip_damage? and @hp > 0
      for state in states
        array += " and " if (array != " " and state.slip_damage)
        array += state.name if state.slip_damage
      end
      @slip_damage_message = "#{self.name} took #{self.hp_damage}" +
      COZZIEKUNS::SHOW_SLIP_DAMAGE::SLIP_DAMAGE_STRING + array + "."
    end
  end
end

#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================

class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # * End Turn
  #--------------------------------------------------------------------------
  def turn_end
    $game_troop.turn_ending = true
    $game_party.slip_damage_effect
    for i in 0...$game_party.members.size
      for state in $game_party.members[i].states
        if state.slip_damage
          unless $game_party.members[i].dead?
            $game_troop.screen.start_shake(5, 5, 10)
            @message_window.replace_instant_text($game_party.members[i].slip_damage_message)
            Sound.play_actor_damage
            wait(COZZIEKUNS::SHOW_SLIP_DAMAGE::WAIT)
    break
          end
        end
      end
    end
    $game_troop.slip_damage_effect
    for i in 0...$game_troop.members.size
      for state in $game_troop.members[i].states
        if state.slip_damage
          unless $game_troop.members[i].dead?
            $game_troop.members[i].blink = true
            @message_window.replace_instant_text($game_troop.members[i].slip_damage_message)
            Sound.play_enemy_damage
            wait(COZZIEKUNS::SHOW_SLIP_DAMAGE::WAIT)
            $game_troop.members[i].slip_damage_message = nil
    break
          end
        end
      end
    end
    $game_party.do_auto_recovery
    $game_troop.preemptive = false
    $game_troop.surprise = false
    process_battle_event
    $game_troop.turn_ending = false
    start_party_command_selection
  end
end

Credit


  • cozziekuns
  • Mr. G&W, for a bugfix.

Thanks

  • Pacman, for reminding me this script existed.
  • Modern Algebra, for pointing out and helping me fix a bug.
  • Mr. G&W, for finding a bug.

Support


Just post down below.

Known Compatibility Issues

Probably won't work with any custom battle systems, but most have this built in anyways.
« Last Edit: August 10, 2011, 12:18:12 AM by cozziekuns »

*
Last Stop
Rep:
Level 88
Everyone Off
Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.Secret Santa 2012 ParticipantSilver - GIAW 10Silver - GIAW 92011 Biggest Drama WhoreBronze - GIAW HalloweenGold - Game In A Week VII
Slip damage?

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Damage from states like Poison and Burn.

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Most Missed Member2014 Zero to Hero2014 Best IRC Quote2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
You're very welcome.

PAC'd. I would've written my own but it was early in the morning and I was running late.
Actually, I think I might now.
it's like a metaphor or something i don't know

**
Rep: +0/-0Level 71
RMRK Junior
Ive noticed that if you have multiple states.

For example if you have 2 states.

It will say: Took damage from Poison and .

3 states

Took damage from Poison and and .

If you have multiple Slip Damage states it will show them in separate textboxes (the screen shakes twice too):

Took damage from Poison and Burn.
Took damage from Poison and Burn.


If you have multiple slip damage states and other state it will show something like this.

Took damage from Poison and Burn and .
« Last Edit: July 14, 2011, 01:57:41 PM by Mr G W »

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Thanks and fixed.

**
Rep: +0/-0Level 71
RMRK Junior
The glitch with the "Took damage from Poison and and and and ." is still there but it can be fixed by replacing this line (line 60 or so)

Code: [Select]
        array += " and " if array != " "

with this

Code: [Select]
        array += " and " if (array != " " and state.slip_damage)



*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Funny.. It works on my end even without that fix. Oh well, better safe then sorry. Thanks Mr. GW!

**
Rep: +0/-0Level 71
RMRK Junior
Thats odd, it showed me that when i had other non slip damage buffs. Well guess its all good now. This script will be very useful for me.