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.
Scripts not working the way they're supposed to

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 73
RMRK Junior
I am having trouble in rmvx with a whole bunch of scripts that just don't seem to work the way the people who made them have stated. I'm not sure if I'm doing something wrong or what (since I'm pretty much new to the site and to the script format itself). I would greatly appreciate any help but there are just too many problems that I am having to list here in this topic.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, are you copying the scripts correctly? On some forums and with some browsers (ie. IE), the code boxes do not work and scripts copy out all on one line, not recognizing line breaks. If that is your problem, try retrieving the scripts with another browser.

Secondly, are you copying them into your game correctly? They should each be given their own slot in the Script Editor, below Materials but above Main (unless expressly stated otherwise by the author).

Lastly, they could be incompatibilite with one another, but if that is the problem you will need to identify the conflicting scripts and tell the relevant scripters about it.

**
Rep:
Level 73
RMRK Junior
well one of the scripts I did try was the "Integrated reserve Party" script which if I'm not mistaken was one of yours but when I got to the script then pasted where you had stated, all the symbols and words were green but I did notice yours in the demo had the words  "end" and whatnot different colors...I don't mean to trouble you like this, I'm just really lost as far as some scripts are concerned.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
It sounds like they're commented out, but I don't know where you would have found a commented out version of the IRP.

I still suspect it's a copying error. How about actually posting the script here so I can take a look.

Also, you can copy directly out of the demo by the way. That is generally the best way to get scripts.

**
Rep:
Level 73
RMRK Junior
phew alright some of them were figured out by me since I probably didn't put them in the right place but this one I have here I actually may need help on since it's taking me a bit to figure out how to actually work this one out.
Code: [Select]
#==============================================================================
#    Minto's Monster Collapse VX
#    Version: 1.2
#    Author: Minto & modern algebra (rmrk.net)
#    Date: June 25, 2010
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#
#    This is a complete rewrite of Minto's Monster Collapse script in order for
#   it to function optimally in RMVX.
#
#    The script is very simple and allows for three basic functions:
#      1) Can play a specified animation upon the death of a monster
#      2) Can specify a special collapse effect, rather than the default fade.
#      3) Specify the colour each monster changes to, rather than default white
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:

#    Paste this script in its own slot above Main and below Materials in the
#   Script Editor (F11)
#
#    To setup collapse effects, all you need to do is use are the following
#   codes in the notebox of the enemy:
#
#      \COLLAPSE_ANIM[n]
#        n : an integer; the ID of the animation you want played. Defaults to
#           0, which means no animation played.
#   
#      \COLLAPSE_TYPE[n]
#        n : the ID of the collapse effect you want played. These are:
#               0  => Default Collapse Effect
#               1  => Shrink
#               2  => Horizontal Expansion
#               3  => Vertical Expansion
#               4  => Contract and Ascend
#               5  => Rotate
#               6  => Shake and Descend
#               7  => Divides Vertically and Separates Vertically
#               8  => Divides Horizontally and Separates Horizontally
#               9  => Divides Vertically and Separates Horizontally
#               10 => Divides Horizontally and Separates Vertically
#               11 => Wave
#               12 => Blur
#               13 => Rotate Fast & Shrink
#               14 => Eraser
#               15 => Pixel Eraser
#
#      \COLLAPSE_TYPE_RANDOM
#        randomly chooses a collapse type for each instance of the enemy
#
#      \COLLAPSE_COLOR[#hex]
#        can specify in hexadecimal the colour it changes to when collapsing.
#          [#rrggbbaa]
#        Examples: \collapse_color[#FFFFFF] # Black
#                  \collapse_colour[#FF808080] # Default
#
#      \COLLAPSE_BLEND[n]
#        n : the blend type. 0 => Normal; 1 => Addition; 2 => Subtraction
#           The default is 1. You might want to set it to 0 for pixel away or
#           blur effects.
#==============================================================================

#==============================================================================
# ** RPG::Enemy
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new methods - collapse_animation, collapse_type, collapse_blend, effect_ids
#==============================================================================

class RPG::Enemy
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Collapse Animation
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def collapse_animation
    @collapse_anim = self.note[/\\COLLAPSE_ANIM\[(\d+)\]/i] != nil ? $1.to_i : 0 if @collapse_anim.nil?
    return @collapse_anim
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Collapse Type
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def collapse_type
    return $1.to_i if self.note[/\\COLLAPSE_TYPE\[(\d+)\]/i] != nil
    array = self.effect_ids
    return array[rand (array.size)] if self.note[/\\COLLAPSE_TYPE_RANDOM/i] != nil
    return 0
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Collapse Colour
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def collapse_color
    r, g, b, a = 255, 128, 128, 128
    if self.note[/\\COLLAPSE_COLOU?R\[#([\dABCDEF]+)\]/i] != nil
      r = $1[0, 2].to_i (16) if $1.size >= 2
      g = $1[2, 2].to_i (16) if $1.size >= 4
      b = $1[4, 2].to_i (16) if $1.size >= 6
      a = $1[6, 2].to_i (16) if $1.size >= 8
    end
    return r, g, b, a
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Collapse Blend
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def collapse_blend
    return $1.to_i % 3 if self.note[/\\COLLAPSE_BLEND\[(\d+)\]/i] != nil
    return 1
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Effect IDs
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def effect_ids
    effects = []
    for i in 0...16 do effects.push (i) end
    return effects
  end
end

#==============================================================================
# ** Game Enemy
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new instance variable - collapse_type
#    aliased method - perform_collapse
#==============================================================================

class Game_Enemy
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Public Instance Variable
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_reader   :collapse_type # The collapse type for this enemy
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Perform Collapse
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias malg_mino_prfrmclpse_mons_0ki2 perform_collapse
  def perform_collapse (*args)
    # Do not play Sound Effect here unless no animation is specified
    if enemy.collapse_animation > 0 && $game_temp.in_battle && dead?
      @collapse = true
      self.animation_id = enemy.collapse_animation
    else
      # Run Original Method
      malg_mino_prfrmclpse_mons_0ki2 (*args)
    end
    @collapse_type = enemy.collapse_type
  end
end

#==============================================================================
# ** Sprite_Battler
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased methods - update_collapse, x=, y=
#    new method - execute_special_collapse, create_dup_sprite
#==============================================================================

class Sprite_Battler
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Update Collapse
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias malg_mint_moncollapse_upd_0kh2 update_collapse
  def update_collapse (*args)
    if @battler.actor?
      malg_mint_moncollapse_upd_0kh2 (*args) # Run Original Method
      return
    end
    # If animation, hold off on executing collapse
    if self.animation?
      # Restore lost time
      @effect_duration += 1
      return
    end
    execute_special_collapse (@battler.collapse_type)
    malg_mint_moncollapse_upd_0kh2 (*args) # Run Original Method
    self.color.set (*@battler.enemy.collapse_color)
    self.blend_type = @battler.enemy.collapse_blend
    # Update Duplicate Sprite Opacity
    @dup_sprite.opacity = self.opacity if @dup_sprite != nil
    # If Ending the effect
    if @effect_duration == 0
      # Restore Zoom
      self.zoom_x = 1
      self.zoom_y = 1
      # Free @dup_sprite (not dispose because of Cache)
      @dup_sprite = nil
    elsif @effect_duration == 47 && @battler.enemy.collapse_animation > 0
      # Play Collapse SE once animation has finished.
      Sound.play_enemy_collapse
    end
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Set X
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias mal_minto_setx_collapse_0kh3 x=
  def x= (n, *args)
    # Override general x setting when collapsing
    return if @effect_type == COLLAPSE && n == @battler.screen_x
    mal_minto_setx_collapse_0kh3 (n, *args)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Set Y
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias algbmod_ntomi_yset_cllpse_9gb2 y=
  def y= (n, *args)
    # Override general x setting when collapsing
    return if @effect_type == COLLAPSE && n == @battler.screen_y
    algbmod_ntomi_yset_cllpse_9gb2 (n, *args)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Create Duplicate Sprite
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def create_dup_sprite (split_type = 0)
    # Create new sprite of the same class and set components
    @dup_sprite = self.class.new (self.viewport, @battler)
    @dup_sprite.x, @dup_sprite.y = self.x, self.y
    @dup_sprite.blend_type = 1
    @dup_sprite.color.set(255, 128, 128, 128)
    @dup_sprite.update
    if split_type == 0 # Vertical Split
      @dup_sprite.src_rect.width = @dup_sprite.ox
      self.src_rect.x = self.ox
      self.x += self.ox
    elsif split_type == 1 # Horizontal Split
      @dup_sprite.src_rect.height = @dup_sprite.oy / 2
      self.src_rect.y = self.oy / 2
      self.y += self.oy / 2
    end
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Execute Special Collapse
  #    collapse_type (type of collapse)
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def execute_special_collapse (collapse_type)
    case collapse_type
    when 1 # Shrink
      self.zoom_x -= 0.02
      self.zoom_y -= 0.02
      self.y -= (0.01*self.height)
    when 2 # Horizontal Expansion
      self.zoom_x += 0.05
    when 3 # Vertical Expansion
      self.zoom_y += 0.05
      self.zoom_x -= 0.02
    when 4 # Spring Ascent
      if @effect_duration >= 24 then
        self.zoom_y = [self.zoom_y - 0.02, 0].max
        self.zoom_x = [self.zoom_x + 0.01, 1.24].min
      else
        self.zoom_x -= 0.115
        self.zoom_y += 0.6
      end
    when 5 # Rotate
      self.zoom_x -= 0.03
      self.zoom_y += 0.05
      self.angle += 7.5
    when 6 # Shake Descent
      if @effect_duration >= 44
        self.ox -= 1
      else
        self.ox += ((@effect_duration / 4) % 2) == 0 ? 2 : -2
      end
      self.src_rect.y -= self.bitmap.rect.height / 48
    when 7 # Vertical Division; Vertical Movement
      create_dup_sprite (0) if @effect_duration == 47 # Split Vertically
      self.y += [self.oy / 96, 1].max
      @dup_sprite.y -= [@dup_sprite.oy / 96, 1].max
    when 8 # Horizontal Division; Horizontal Movement
      create_dup_sprite (1) if @effect_duration == 47 # Split Horizontally
      self.x += [self.ox / 48, 1].max
      @dup_sprite.x -= [@dup_sprite.ox / 48, 1].max
    when 9 # Vertical Division; Horizontal Movement
      create_dup_sprite (0) if @effect_duration == 47 # Split Vertically
      self.x += [self.ox / 48, 1].max
      @dup_sprite.x -= [@dup_sprite.ox / 48, 1].max
    when 10 # Horizontal Division; Vertical Movement
      create_dup_sprite (1) if @effect_duration == 47 # Split Horizontally
      self.y += [self.oy / 96, 1].max
      @dup_sprite.y -= [@dup_sprite.oy / 96, 1].max
    when 11 # Wave
      self.wave_amp += 1
    when 12 # Blur
      self.bitmap = self.bitmap.dup if @effect_duration == 47
      self.bitmap.blur if @effect_duration % 4 == 0
    when 13 # Fast Rotate and Shrink
      self.angle += 48 - @effect_duration
      execute_special_collapse (1)
    when 14 # Eraser
      self.bush_opacity = 0
      self.bush_depth += (self.height / 48.0).ceil
    when 15 # Pixel Eraser
      if @effect_duration == 47
        self.bitmap = self.bitmap.dup
        @pixels_to_erase = []
        for i in 0...self.bitmap.width
          for j in 0...self.bitmap.height
            @pixels_to_erase.push ([i, j])
          end
        end
        @pixel_erase_rate = @pixels_to_erase.size / 48
      end
      erase_color = Color.new (255, 255, 255, 0)
      @pixel_erase_rate.times do
        x, y = @pixels_to_erase.delete_at (rand (@pixels_to_erase.size))
        self.bitmap.set_pixel (x, y, erase_color)
      end
    end
  end
end

All I really need to know is how to specify how each enemy is killed and how to specify the Ids for the enemy itself (i apologize on behalf of my stupidity lol)
Oh and about the IRP, i think it was because I was using a custom Menu system with it, the FFVII style one since with the IRP, the options window covers up the character status screen. I've learned that much. Oh and another thing is about the SkillTree script since I have pretty much no idea where to put which id, same as the last. Once more, I apologize for my stupidity

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
You do that in the notebox of the enemy. So, go into the database and to the enemies tab. Each enemy has a little notebox. That is where you put the codes mentioned in the instructions of the script. I assume the same is probably true of the SkillTree script, except on Skills and not Enemies.

**
Rep:
Level 73
RMRK Junior
Okay I've got that part all figured out but now for some odd reason, even though I'm specifying the id of the collapse effect, they keep on dying as in the random type collapse. Now I'm not sure whether I'm putting the # in the correct place or not