Main Menu
  • Welcome to The RPG Maker Resource Kit.

Death Watch Status v1.05

Started by tSwitch, October 05, 2007, 05:43:37 PM

0 Members and 1 Guest are viewing this topic.

tSwitch

Death Watch Status
Version: 1.05
Author: NAMKCOR
Date: Oct. 6, 2007

Version History




  • v1.00 - completed version
  • v1.01 - bug fixed (turns would not reset if status removed0
  • v1.05- death watch affects enemies as well

Planned Future Versions


  • v1.10- displays turns left beside Death Watch status (possible, but not 100% planned)

Description



Inflicts characters with the condition Death Watch, which gives them X number
turns to live before they are declared dead at the start of turn X

Features


  • easily customizable
  • utilizes states to make it easy to create Death Watch skills

Screenshots

N/A for this type of script

Instructions

Place the script above main, below any battle options
add a state called "Death Watch" or what have you
simply change turns_to_live to decide how long the character lasts
simply change DW_status_number to the number of the Death Watch skill in the database
make skills/items or whatnot that add the status Death Watch
you're all set

Script




#=====================================================================================================================
#   Death Watch Condition v1.05                                                 
#---------------------------------------------------------------------------------------------------------------------
#   Created By: NAMKCOR                                                                                                     
#   Created for the Websites: Chaos Project, RPG Maker Resource Kit
#                                                  (www.chaosproject.co.nr; www.rmrk.net)                     
#   If this script is hosted on any other website, then it is stolen, please contact           
#   me at the address given below       
#   Requested by: gameo (RMRK)
#--------------------------------------------------------------------------------------------------------------------
#   If you find any Bugs/Incompatability issues with this script, please contact me at   
#   the following e-mail address: Rockman922@aol.com, and please be descriptive   
#   with your e-mail subject, as I delete spam on sight.                                                                                                             
#--------------------------------------------------------------------------------------------------------------------
#   Function:                                                                                                                             
#    Inflicts characters with the condition Death Watch, which gives them X number
#    turns to live before they are declared dead at the start of the turn marked with
#    Death Watch 0
#                                                                         
#    Compatability:
#     most likely compatible with SDK (untested)
#     most likely compatible with battle modifications (untested)
#     no known issues at the moment       
#
#     Instructions to modify:                                                                                                                     
#      Comments and instructions for the individual customizations will be given           
#      right where they are located.  Only real skills needed are reading, typing,             
#      and copy&paste
#
#     Instructions for use:
#       All you need to do to give an enemy a death watch skill, is set the state
#       addition for any skill to + for the death watch state
#       
#--------------------------------------------------------------------------------------------------------------------
#     Version History:
#     1.0 - completed system
#     1.01 - fixed bug where the dw_turns would not be reset if status was removed
#     1.05 - death watch also affects enemies
#====================================================================================================================

#================================================================================
# START DONT TOUCH
#================================================================================
class Game_Battler
  attr_accessor :dw_turns
  alias old_init initialize
    def initialize
      old_init
      @dw_turns = 0
    end
  end
#================================================================================
# END DONT TOUCH
#================================================================================

#====================================================================================================================
# - DW_status_number - the number of the Death Watch status in the database
# - turns_to_live - the number of turns before Death Watch kills the character
#====================================================================================================================
class Scene_Battle
 
  alias oldstart start_phase2
  def start_phase2
    #modify turns to live
    @turns_to_live = 3
    #modify DW_status_number
    @DW_status_number = 17
    #===========================================================================
    # DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING
    #===========================================================================   
    oldstart
    for i in 0...$game_party.actors.size
      for j in 0...$game_party.actors[i].states.size
        if $game_party.actors[i].hp > 0
          if $game_party.actors[i].states.include?(@DW_status_number)
            if $game_party.actors[i].dw_turns >= @turns_to_live
              $game_party.actors[i].hp = 0
              $game_party.actors[i].dw_turns = 0
              @status_window.refresh
            else
              $game_party.actors[i].dw_turns += 1
            end
          else
            $game_party.actors[i].dw_turns = 0         
          end
        end
      end
    end
    for i in 0...$game_troop.enemies.size
      for j in 0...$game_troop.enemies[i].states.size
        if $game_troop.enemies[i].hp > 0
          if $game_troop.enemies[i].states.include?(@DW_status_number)
            if $game_troop.enemies[i].dw_turns >= @turns_to_live
              $game_troop.enemies[i].hp = 0
              $game_troop.enemies[i].dw_turns = 0
              @status_window.refresh
            else
              $game_troop.enemies[i].dw_turns += 1
            end
          else
            $game_troop.enemies[i].dw_turns = 0         
          end
        end
      end
    end
  end
end


Credit




  • Creator: NAMKCOR
  • Requested By: Gameo

Thanks


  • Gameo - for giving me the idea :D

Support



You may contact me at the email address below/found in the comments of the script
Rockman922@aol.com
or you may PM me here or on www.chaosproject.co.nr
please title your messages accordingly, I delete spam on sight

Known Compatibility Issues

No known compatibility issues at the moment

Demo



N/A at the moment

Author's Notes

Fun Fact - the comments are longer than the script itself :P

Restrictions

Created for the Websites: Chaos Project, RPG Maker Resource Kit
(www.chaosproject.co.nr; www.rmrk.net)                     
If this script is hosted on any other website, then it is stolen, please contact me at either of the locations given

If you use this script in your game, please link me to the topic
I love to see what my work is used for :P

do NOT use this script in a commercial game unless you get my permission first


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

modern algebra

Good job, it's a pretty cool script. It does have the limitation that it does not seem to apply to enemies, only to heroes. It might also be a nice feature to allow for the setting of multiple states, each with their own turns variable. It's a very nice, clean script and I like the skill you made here. Nice job.

tSwitch

I'll fix it up so you can use it against enemies, I completely overlooked that tbh


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

gameo

Does 2+2 equal a peanut?

tSwitch

#4
it is now functional against enemies, upgraded to 1.05
(took me 5 min of copy paste work tbh)


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

Falcon

Well done, sorry for not moving this to the database sooner.

Demonic Blade

But what excactly does it DO? And couldn't any1 post some screenies please? :)
I wonder how many of my-reps are there for a reason, and not just because some jackass wanted to show off in front of some other jackasses...?
Probably a lot of them - and those people sure as hell don't deserve my pity, let alone my disgust.
That's right, let's see some more -Rep'ing! BOOYEAH!!

Mjustin

Nice script, but I found a bug. If you kill the last enemy on the screen with Death Watch, you don't win the battle until one of your characters tries to take an action. Not really a huge problem, but just a little strange.

tSwitch

hrm...I'll have to take a look into that, that's really strange
I need to probably call an update line after the hitpoints are dropped to zero, I'll fix it when this whole guild thing is over and done with


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

chipino

Sorry for the nooby question do I put state or skill in @DW_status_number = ?