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.
[Request] Character Specific Menu Items Script

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 75
RMRK Junior
Good day everyone. My name is Caladbolg Luminaris, I have just registered in the forum, and I did that for the sole purpose of requesting a certain script, also, thanks for the amazing scripts of the forum's members, I was able to make very cool things with my project.  ^-^

Anyhoo, onto the script, you see, I am looking for a script which lets a certain character use a certain item.
In the way that "only actor nº1 can use this item" or "only nº001 and nº003 can use this item".

I'm talking about using menu items, like ones that increase HP and MP.

I wanted to make stat increasing menu items specificly for certain characters(or classes).

But I'm afraid my skill with RGSS is below average. :-[

Is there anyway to make this?

***
Rep:
Level 76
~Crazy Lazy Workaholic~
Battle Engine Melody can both restrict what actors can use an item and what actors/enemies that item can be used on.

however I can understand it's a bit bulky (it's an entire battle engine with this function integrated into the battle engine code) but Melody has a lot of nice features and it has flexibility in offering different combat views and styles, so even if you're using default and want to continue using default, it allows you to do that.

~My Projects~

~ VocaloidVX ~ Second Life Project ~
~ RPG Maker Collective ~
To support this forum, it's the first place that will gets posted some updates of mine, check it out ^_~

**
Rep: +0/-0Level 75
RMRK Junior
Thank You, but doesn't this apply only to battles?   ???

if so than I must keep looking... might as well try it. Thanks Again

***
Rep:
Level 76
~Crazy Lazy Workaholic~
Neither of those scripts apply only to battles. They apply to the Scene_Item in the menu.

^_^; thought this was a different thread
« Last Edit: August 17, 2010, 02:30:23 AM by Terra-chan »

~My Projects~

~ VocaloidVX ~ Second Life Project ~
~ RPG Maker Collective ~
To support this forum, it's the first place that will gets posted some updates of mine, check it out ^_~

**
Rep: +0/-0Level 75
RMRK Junior
That's strange...It's not working, I also try the effect nullify which also takes effect outside of battle, and it still doesn't work.

The Item still takes effect on the Class/Character which I had the effect nullified...  ???

pokeball TDSOffline
***
Rep:
Level 84
-T D S-
Silver - GIAW 11 (Hard)Silver - Game In A Week VII
Well here you go with no need to add a bulky battle system.

You did not specify if you used a custom scene item script, so I made it for the default one.

Code: [Select]
#============================================================================
# ** RPG::Item Module
#----------------------------------------------------------------------------
# This module handles item information.
#============================================================================   

module RPG
    class Item < UsableItem
    #-------------------------------------------------------------------------
    # * Make Item Usability Array
    #-------------------------------------------------------------------------
    def usable_by?
      self.note[/CAN_USE: (.*)/]         
      # Return false if match is nil or collected array of ID's
      return $1 == nil ? false : $1.split.collect! {|id| id.to_i}
    end         
  end 
end

#==============================================================================
# ** Scene_Item
#------------------------------------------------------------------------------
#  This class performs the item screen processing.
#==============================================================================

class Scene_Item < Scene_Base
  #--------------------------------------------------------------------------
  # * Update Target Selection
  #--------------------------------------------------------------------------
  alias tds_item_restriction_scene_item_update_target_selection update_target_selection
  def update_target_selection
    # If input trigger C
    if Input.trigger?(Input::C)     
      # If item does not have any usability limitations
      if @item.usable_by? != false
        # If Item is not usable by the selected character                   
        if !@item.usable_by?.include?($game_party.members[@target_window.index].id)
          # Play Buzzer SE
          Sound.play_buzzer
          return
        end
      end   
    end
    tds_item_restriction_scene_item_update_target_selection   
  end
end

To use just add into the note tags of the items the following:

Code: [Select]

CAN_USE: # # # # # #

#  = Are the ID's of the actors

Example:

Code: [Select]

CAN_USE: 1 2

The above example would make it so the item can only be used by actor 1 or 2 by the database ID.

Let me know if it works for you and have a nice day.

**
Rep: +0/-0Level 75
RMRK Junior
Holy... this is awesome!!

Thanks a bunch, it's works perfectly, I really needed something like this.  ;D