[RESOLVED]Merging Blizz CMS with Guillaume777's Multi-Equip script Need Help-.-

Started by Landith, December 04, 2008, 10:21:11 pm

Previous topic - Next topic

Landith

I'm trieing to merge Blizz CMS with Guillaume777's Multi-Equip script and I get this error and I have no idea what I'm doing lol...

Error: ShowHide



I would post the script but there is kinda a limit on character so I'm going to post the lines of the problem...

#==============================================================================
# ** Window_EquipRight
#------------------------------------------------------------------------------
#  This window displays items the actor is currently equipped with on the
#  equipment screen.
#==============================================================================
class Window_CMSEquipRight < Window_Selectable
  #--------------------------------------------------------------------------
  # * Item Fix On
  #--------------------------------------------------------------------------
  def item_fix_on
    # Fix window
    @fixed_item = @data[self.index]
    @fixed = true
  end
  #--------------------------------------------------------------------------
  # * Item Fix Off
  #--------------------------------------------------------------------------
  def item_fix_off
    #stop fixing window
    @fixed_item = nil
    @fixed = false
  end
  #--------------------------------------------------------------------------
  # * Don't scroll right window if you press L or R
  #--------------------------------------------------------------------------
  def update
    if Input.repeat?(Input::R) or  Input.repeat?(Input::L) then
      return
    else
      super
    end
  end
  #--------------------------------------------------------------------------
  # Draws equipped items with support of translucent and cursed items
  #     item        : item
  #     x           : draw spot x-coordinate
  #     y           : draw spot y-coordinate
  #     translucent : draw translucent
  #--------------------------------------------------------------------------
  def draw_item_name(item, x, y, translucent = false)
    if item == nil
      return
    end
    bitmap = RPG::Cache.icon(item.icon_name)
    if item.cursed
      self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
      self.contents.font.color = G7_MS_MOD::CURSED_COLOR
    elsif translucent
      self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), 128)
      self.contents.font.color = disabled_color
    else
      self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
      self.contents.font.color = normal_color
    end
    self.contents.draw_text(x + 28, y, 212, 32, item.name)
  end
  #--------------------------------------------------------------------------
  # * Prevent needless update of item quantities in item window
  #--------------------------------------------------------------------------
  alias g7_ms_window_equipright_item item  #===============================>>> Error
  def item
    # This ensures that the number of items doesn't get updated if you move
    # cursor in item window
    return @fixed_item if @fixed
    return g7_ms_window_equipright_item
  end
  #--------------------------------------------------------------------------
  # * Change the height of right windows to fit the slots
  #     actor : actor
  #--------------------------------------------------------------------------
  alias g7_ms_window_equipright_initialize initialize
  def initialize(actor)
    # Initialize with a different height
    g7_ms_window_equipright_initialize(actor)
    # Total height of right window
    h = (actor.weapon_slots.size + actor.armor_slots.size) * 32
    # Change the height                                                       
    self.contents = Bitmap.new(width - 32, h)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Shows the slot names and the name of the items you have equipped
  #--------------------------------------------------------------------------
  def refresh
    # Replaced method to show caption of all items and slot
    self.contents.clear
    @data = []
    # Begin Multi-slot equipment script Edit
    self.contents.font.name = G7_MS_MOD::FONT_NAME
    for i in 0...@actor.weapon_slots.size
      # Push the name(s) of the weapon(s)
      @data.push($data_weapons[@actor.weapon_ids[i]])
    end
    for i in 0...@actor.armor_slots.size
      # Push the names of the armors
      @data.push($data_armors[@actor.armor_ids[i]])
    end
    @caption = []
    for i in 0...@actor.weapon_slots.size
      # Push the name(s) of the weapon slots
      @caption.push(@actor.weapon_slot_names[i])
    end
    for i in 0...@actor.armor_slots.size
      # Push the names of the armor slots
      @caption.push(@actor.armor_slot_names[@actor.armor_slots[i]-1])
    end
    @item_max = @data.size
    if @actor.translucent_texts == nil then @actor.translucent_texts = Array.new end
    for i in 0...@data.size
      if @caption[i] != nil
        self.contents.font.color = system_color
        # Draw the name of the slots
        self.contents.draw_text(4, 32 * i, 92, 32, @caption[i])
      end
      # Draw the name of the equipment
      draw_item_name(@data[i], 92, 32 * i, @actor.translucent_texts[i])
    end
    # Support for other script
    if defined? xrxs_additional_refresh
      xrxs_additional_refresh
    end
  # End Multi-slot equipment script Edit
  end
  #--------------------------------------------------------------------------
  # * End of CLASS:  Window EquipRight
  #--------------------------------------------------------------------------
end



Aqua

Did you try putting Blizz-ABS both above and below Guillaume's?

Landith

Yeah I just tried that but didn't work... Let me try putting it in a new project to see if it's one of my scripts that cause the problem.

Edit:
Alright it definitely isn't one of my other scripts... Can you change the limit on the character's in a post so i can post the script or does it have to be blizzard?


winkio

He's modding blizz's CMS, not ABS, but yeah, it looks like that error is being caused by the CMS script that you are modding being below your mod script in the editor.  You must put modifications of other scripts below the scripts they modify.  If that is not the problem, your CMS script is probably messed up, try redownloading the newest version.

Aqua

Oh... it's the Stormtronic's CMS?

Lol... before, he had ABS in his title, so... yeah...
Confusion >.<


Control + Shift + F
Search:  def item

And see what comes up.

If nothing does... you can't alias a method that doesn't exist :P

Starrodkirby86

Quote from: Landith on December 04, 2008, 10:28:29 pm
Can you change the limit on the character's in a post so i can post the script or does it have to be blizzard?

Only administrators have access to that dirty, dirty stuff.

In the meantime, just upload the Scripts.rxdata or something, whatever that floats your boat, so you can bypass the character limit and stuff. XD

@Aqua: Yeah, I got confused with that too, but I read the actual data in the post, along with looking at the screenshot, which specifically had CMS in it. :P

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




Landith

@aqua: Yea, I was thinking of Blizz Abs while typing it lol but I fixed it

@Starrodkirby86: So I upload it with Megaupload or something?

Edit:
Okay I uploaded it with Meadiafire...
Download Scripts.rxdata


Starrodkirby86

Quote from: Landith on December 04, 2008, 10:39:33 pm
@Starrodkirby86: So I upload it with Megaupload or something?
Whatever suits you. I personally recommend http://sendspace.com since it doesn't really contain much ads and it's easy to use for something quick and casual like this. There's no big time limit in waiting when it comes to getting your download too.

Also, make sure to read Aqua's edit. It may help in your problem here. :)

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




Landith

Alright I did as you said Aqua and the results are mainly default scripts but here are the ones that aren't.

Results: ShowHide



All by Blizzard...

Aqua

Hmmm...

I /think/ that Guillaume might have rewritten the whole class so it doesn't have the item method.  I might be wrong though.

Or... since it's 'class Window_CMSEquipRight', there might not be a parent 'def items' for the alias...

However, I'm not entirely sure...

Landith

I think it's right below the alias because it says

  alias g7_ms_window_equipright_item item 
  def item


But I have little to none scripting knowledge so I have no clue..


Aqua

The alias uses an existing method to write into.
Since that 'def item' is within the alias, the alias is writing into the 'def item' method.
But if there is no previous 'def item' then it can't overwrite.

Check Guillaume's script for a 'def item'

Landith

Alright I got it to work  :^_^':

Thanks Aqua, Starrodkirby86 and winkio :)

Aqua

Hehe no problem :)

I'm curious as to what the problem was...
Was I correct in my statements? lol

Landith

Yeah. Once I did everything and moved a def item into the script it seemed to work fine. I'll post here if I have any more questions.

The only problem is that it's not animated but I'll deal lol

Punn


Landith

Yeah, I think I got a messed up version that was modded but I got the original and it worked fine lol

Well I just copied the def item into it from the other one... Which Aqua suggested lol