Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Equipment scripting

Where do i go to edit equipment in the scripts? I want to be able to make it so players will always be wearing a weapon, and so the grappler will immediately equip "fist". Any ideas on how to do this? (i also want to know how to do this, not just a script, if someone has one.)
 

Kairo

Member

So you want your grappler to only be able to equip fist? All in the database ^^

First, make the weapon "fist", then go to the class tab and select the grapplers class. Then it'll show what weapons it can or can't use, tick the "Fist" box. Then go into the hero/actor tab and down the bottom it'll show you what the hero will equip at the stat of the game. Change the weapon to fist if it already isn't and there you go ^^

~Winged
 
That is part of what I needed. Thanks.

But where do I put it? Since the grappler is 1, i want it so that when the grappler "dequips" any weapon, the fist is automatically equipped.

Also, any help would be great on maiking it work with Guillaume777's Multislot system. The grappler will end up wearing 4 weapons. Two "fists" and two "feet".
 
Well, I am not too familiar with G's Multi-equip, but you should be able to use something like this:

Code:
class Game_Actor
  Force_Reequip = {}
  alias_method :seph_mustequipfist_gmactr_equip, :equip
  def equip(type, id)
    seph_mustequipfist_gmactr_equip(type, id)
    if id == 0 && Force_Reequip.has_key?(@actor_id) && Force_Reequip[@actor_id].has_key?(type)
      equip(type, Force_Reequip[@actor_id][type])
    end
  end
end

Ok. You never need to call this, but you do need to set up up the Force_Reequip constant.

Lets say, for actor 1, you want them to equip item 2 when you unequip an item in the first weapon slot (0).

You would set your constant up like so:
Code:
  Force_Reequip = { 1 => { 0 => 2}}


If you want, give me your exact setup, I will tell you the code for it.
 
Grappler is ID 10
Fist is ID 34
Bare Feet is ID 35

Also, incase your thing does not do it (I am a newb... I can't read RGSS yet), can you make sure that "fist" and "bare feet" are not put into the items when you equip another Weapon?

EDIT: If it matters, grappler can only use two weapons at first, later getting more.
 
I need you to post me your version you are using of G's Multi-Equip, so I can view his syntax a bit.

As for making items not appear, you can use this:
Code:
class Game_Party
  Weapons_That_Dont_Count = [34, 35]
  alias_method :seph_weaponsdontcount_gmprty_wn, :weapon_number
  def weapon_number(weapon_id)
    return 0 if Weapons_That_Dont_Count.include?(weapon_id)
    return seph_weaponsdontcount_gmprty_wn(weapon_id)
  end
end

I am going to have to see his code though, and hopefully I can figure it out for what you need.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top