[XP] Ryex's Collapsing CMS (V2.50 is out!)

Started by Ryex, December 23, 2008, 12:35:44 am

Previous topic - Next topic

Ryex

it's all explained in the comments at the top of the script, but i you really need help then you need to give specifics as to what you want to add and where.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Walthavian

Oh ho! So it is explained there,  I had just assumed that was only explaining how to change the icon of the options already there, appears I was sorely mistaken.  Much thanks for clearing up that small matter for me.

Magus

no hotkeys .._.. I'm no scripter, so I don't know how to implant them... Anyway, this is a very nice script, but I guess, I can't use it.. :/
LEVEL ME DOWN. THE ANTI-BLIZZ GROUP IS AMONG YOU... Do it for the chick below...She watches..<br />

Ryex

I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

djskagnetti

October 08, 2011, 09:49:56 am #124 Last Edit: October 08, 2011, 10:03:17 am by djskagnetti
Extremely, extremely, extremely, intensely love!!  Fantastic job. =)

EDIT:  except it doesn't work for my game =(  i get an error
Script ' ' line 342:  TypeError occurred.
nil can't be coerced into Fixnum

when i try to load a save file

and
Script ' ' line 165: RangeError occurred.
float -1.#IND out of range of integer

when i start a new game and press escape to see the menu

damn it worked in a fresh new game =(

i have the following addons
Variable increase
Spoiler: ShowHide
class Game_Enemy

#-------------------------------------------------------------------------------
# CONFIGURATION
#-------------------------------------------------------------------------------
#  Define the variable used for each enemy here. Follow this pattern:
#
#    when ENEMY_ID then VARIABLE_ID
#
#  If more than one eneky share the same variable, you can define multiple
#  IDs on one line. For example, say you had a Goblin whose ID was 1, and an
#  Orc whose ID was 17. You wanted both of them to be of the same "type", and
#  use the variable with ID of 6:
#
#     when 1, 17 then 6
#
#-------------------------------------------------------------------------------

 def enemy_variable(enemy_id)
   return case enemy_id
   when 2 then 201
   when 3 then 202
   when 4 then 203
   when 5 then 204
   when 6 then 205
   when 10 then 206
   when 14 then 207
   when 15 then 208
   when 16 then 209
   when 19 then 210
   when 20 then 211
   when 21 then 212
   when 28, 29 then 213
   when 40 then 214
   when 41 then 215
   when 42 then 216
   when 43 then 217
   when 45 then 218
   when 47 then 219
   when 48 then 220
   when 50 then 221
   when 51 then 222
   when 52 then 223
   when 53 then 224
   when 72 then 225
   when 74 then 226
   when 88 then 230
   when 75, 76, 77, 81 then 231
   end
 end

#-------------------------------------------------------------------------------
# END CONFIGURATION
#-------------------------------------------------------------------------------

 def increase_count(enemy_id)
   var_id = enemy_variable(enemy_id)
   if var_id != nil
     $game_variables[var_id] += 1
   end
 end

 alias zer0_enemy_type_attack attack_effect
 def attack_effect(attacker)
   result = zer0_enemy_type_attack(attacker)
   if self.dead? && @counted == nil
     increase_count(@enemy_id)
     @counted = true
   end
   return result
 end

 alias zer0_enemy_type_skill skill_effect
 def skill_effect(user, skill)
   result = zer0_enemy_type_skill(user, skill)
   if self.dead? && @counted == nil
     increase_count(@enemy_id)
     @counted = true
   end
   return result
 end

 alias zer0_enemy_type_item item_effect
 def item_effect(item)
   result = zer0_enemy_type_item(item)
   if self.dead? && @counted == nil
     increase_count(@enemy_id)
     @counted = true
   end
   return result
 end
end

under Game_Enemy

Monster Health
Spoiler: ShowHide
class Window_Base < Window  
#--------------------------------------------------------------------------
# * Draw Slant Bar(by SephirothSpawn)
#--------------------------------------------------------------------------
def draw_slant_bar(x, y, min, max, width = 152, height = 6,
    bar_color = Color.new(150, 0, 0, 255), end_color = Color.new(255, 255, 60, 255))
  # Draw Border
  for i in 0..height
    self.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255))
  end
  # Draw Background
  for i in 1..(height - 1)
    r = 100 * (height - i) / height + 0 * i / height
    g = 100 * (height - i) / height + 0 * i / height
    b = 100 * (height - i) / height + 0 * i / height
    a = 255 * (height - i) / height + 255 * i / height
    self.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a))
  end
  # Draws Bar
  for i in 1..( (min / max.to_f) * width - 1)
    for j in 1..(height - 1)
      r = bar_color.red * (width - i) / width + end_color.red * i / width
      g = bar_color.green * (width - i) / width + end_color.green * i / width
      b = bar_color.blue * (width - i) / width + end_color.blue * i / width
      a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width
      self.contents.fill_rect(x + i + j, y + height - j, 1, 1, Color.new(r, g, b, a))
    end
  end
end
end


class Window_EnemyHP < Window_Base

def initialize
  super(0, 0, 640, 480)
  self.contents = Bitmap.new(width - 32, height - 32)
  self.opacity = 0
  refresh
end

def refresh
  self.contents.clear
  for i in 0...$game_troop.enemies.size
    @enemy = $game_troop.enemies
    @percent = (@enemy.hp * 100) / @enemy.maxhp
    unless @enemy.hp == 0
    draw_slant_bar(@enemy.screen_x - 55, @enemy.screen_y - 10, @enemy.hp, @enemy.maxhp, width = 75, height = 6, bar_color = Color.new(150, 0, 0, 255), end_color = Color.new(255, 255, 60, 255))
    self.contents.draw_text(@enemy.screen_x - 39, @enemy.screen_y - 22, 100, 32, "#{@percent}" + "%")
  end
end
end
end

class Scene_Battle

alias raz_update update
alias raz_update_phase5 update_phase5
alias raz_update_phase4_step1 update_phase4_step1
alias raz_update_phase4_step5 update_phase4_step5
alias raz_enemy_hp_main main

 def main
  @troop_id = $game_temp.battle_troop_id
  $game_troop.setup(@troop_id)
  @enemy_window = Window_EnemyHP.new
  @enemy_window.z = 95
  raz_enemy_hp_main
  @enemy_window.dispose
end

def update
  @enemy_window.update
  raz_update
end

def update_phase5
  # If wait count is larger than 0
  if @phase5_wait_count > 0
    # Decrease wait count
    @phase5_wait_count -= 1
    # If wait count reaches 0
    if @phase5_wait_count == 0
      @enemy_window.visible = false
      # Show result window
      @result_window.visible = true
      # Clear main phase flag
      $game_temp.battle_main_phase = false
      # Refresh status window
      @status_window.refresh
      @enemy_window.refresh
    end
    return
  end
 raz_update_phase5
end

def update_phase4_step1
raz_update_phase4_step1
@enemy_window.refresh
end

def update_phase4_step5
  # Hide help window
  @help_window.visible = false
  # Refresh status window
  @status_window.refresh
  @enemy_window.refresh
  raz_update_phase4_step5
end
end

Skill Shop
Tons of Addons
EasyLVL

ForeverZer0

Probably not compatible with old save games. Just start a new game once you add the script and work off of it. You shouldn't have more troubles loading after that.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

djskagnetti

October 08, 2011, 10:51:44 am #126 Last Edit: October 08, 2011, 10:55:03 am by djskagnetti
Quote from: djskagnetti on October 08, 2011, 09:49:56 am
and
Script ' ' line 165: RangeError occurred.
float -1.#IND out of range of integer

when i start a new game and press escape to see the menu


line 165 is
      fill_rect(x + 1, y + i + 1, p * (w - 2), 1, Color.new(r, g, b))

Ryex

The script is incompatible with old save files and the other error is only possible is another script is messing with ti and there is now way that the two you posted could be the cause. you'll have to do a little debugging in a new game adding you additional scripts until you get an error. then you'll know which on is causing the error. and THEN I'll be bale to help ypu
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Vexus

Hi a little necropost but would it be possible to remove the gradient bars from this cms?

Thanks.
Current Project/s:

Vexus

January 14, 2012, 10:31:27 am #129 Last Edit: January 14, 2012, 10:33:00 am by Vexus
Sorry for the necropost.

I found a problem with this script (Apart of the equip screen) and that is if you have a picture showing on the map and you open the menu the picture will show over the menu even status screen, item screen, options, etc etc.

I'm trying to add z values for every scene but I don't know each location for every option but that is pretty much the solution.
Current Project/s:

Magus

LEVEL ME DOWN. THE ANTI-BLIZZ GROUP IS AMONG YOU... Do it for the chick below...She watches..<br />