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.

I need one more equipment slot.Just one.

The game has 4 slots, shield, helmet, body armor and accessory right?
Well I need one more, just one, there's a few equipment scripts but they are all really complicated, 2 handed weapons, 15 different slots, cursed items, I don't need any of that stuff, all I need is one, ONE extra slot named accessory 2.
Can anyone please make one or edit an existing one so it will only add an additional equipment slot named "accessory 2"?
 
While the ones by Trickster and Guillaume777 allow for multiple slots of all sorts, they can (or should) be able to accomodate just adding one more Accessory slot.

All you have to do is remove the additional slots from the default code supplied. As an example, Guillaume777's code is normally set up as:
Code:
  WEAPON_KINDS = [0,0]
  WEAPON_KIND_NAMES = ['R-Hand', 'L-Hand']
  WEAPON_KIND_POWERS = [100, 100]
Change it to
Code:
  WEAPON_KINDS = [0]
  WEAPON_KIND_NAMES = ['Weapon']
  WEAPON_KIND_POWERS = [100]
Resets the weapon portion back to using just one weapon. Editing of the rest of the configuration section is just as easy. It's just a case customizing the equipment slot system you are using.
 
Each of those are arrays. The number of items each one holds determines the number of weapons you have. So if you want to have two weapon slots, each of those arrays must have TWO items... for three weapon slots... three items... and etc.

Now, the WEAPON_KINDS = [0,0]... since he has already set the WEAPONS to use the '0' for weapons... this 'I' think was unnecessary, but that's how he has it coded to set the weapon slots. If you want three weapon slots, you need to set [0,0,0].

The second array, WEAPON_KIND_NAMES, merely holds the names for each slot. Simple.

The third array, WEAPON_KIND_POWERS, holds the percentage of damage for each weapon. So, [100,20,120] would deliver 100% damage for the first weapon, only 20% damage for the second weapon, and 120% damage for the third.
 
EDIT: When I copy the scripts over and try to equip something it says: "unable to find graphics/icons/blacksuit."

EDIT: Nevermind got it to work.

Ohh well thanks anyway I will try to figure it out.
 

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