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.

Equip Slot Changing Help

This might sound strange, but I recently tried to re-arrange the order of the Equipment slots so that Helmet is at the bottom and the 2 previously below it move up so that it would look like:

Weapon
Shield
(Body) Armor
Accessory
Helmet

Now you might ask why I'd do this... well, I'm actually ditching helmets in my game and have renamed the slot to be used for something else. I figure that rather than chance "Accessory" into the something else, Armor into Accessory, and Helmet into Armor, it would be better to just move the slots around and do the one swap. Changing what everything is would likely confuse me in my database editing.

So anyway, re-arrange the text as drawn in the Equip screen was a piece of cake and I even got it so that the bottom windows will actually show the right type of equipment for what you have hovered over (at first, it should show Helmets under "Armor" because by default, that's the 2nd armor slot). HOWEVER... that doesn't mean that the game actually lets you EQUIP it slot. No, instead it now still tries to equip that Helmet and shows the Helmet's stat changes as if you were hovering over those items, even though you can't see them and just see the Armors printed (the cursor kinda disappears too).

So I can't seem to figure out how to change all the stuff that is needed to connect up the slots so they work in their new order with their new indexes and whatnot.

Any help?

FYI: I'm using the Special Equipment System that came with Atoa's XP conversion of Enu's SBS, though I don't think that this really affects anything. The Window & Scene Equips looks like the same basic stuff as the default XP ones, just with the extra stuff added for the possibilities of additional accessory slots and 2 weapon types and stuff like that.
 
bump

I don't know if that was worded too confusingly... if it needs more clarification, let me know.

I basically re-ordered writing of text for the various Equipment slot names so that they display in the order I indicated in the 1st post. But the help windows are still matched up with the indexes that the game uses by default (so where I now have Armor, it will give the description of the headgear equipped, instead of the armor equipped). And when I try to change the equipment in that slot, it looks for what was originally there (so once again, trying to change the equipped armor, tries to equip to the helmet slot instead).
 
Yeah, I think you do misunderstand. I want to change the order in which the armors show up on the Equip screen. I can't do that through the database without making armor management hell (everything would be in a different slot than what the database says, so I would be confused and not know what is what)

Instead of the display order going:

$data_system.words.armor2
$data_system.words.armor3
$data_system.words.armor4

I need it to read:

$data_system.words.armor3
$data_system.words.armor4
$data_system.words.armor2

but merely draw_text stuff so the positions are different makes it so the wrong help windows display and when you try to equip an item to that slot, it searches for a competely different item slot and puts that item in a different slot.

is there really no simple way to change the display order around?
 
There is, but it isn't a super quick fix.

Things you would need to change:

Window_EquipRight - Reorder @data.push lines, and make changes in the draw_text lines.
Code:
    @data.push($data_weapons[@actor.weapon_id])

    @data.push($data_armors[@actor.armor1_id])

    @data.push($data_armors[@actor.armor2_id])

    @data.push($data_armors[@actor.armor3_id])

    @data.push($data_armors[@actor.armor4_id])

    @item_max = @data.size

    self.contents.font.color = system_color

    self.contents.draw_text(4, 32 * 0, 92, 32, $data_system.words.weapon)

    self.contents.draw_text(4, 32 * 1, 92, 32, $data_system.words.armor1)

    self.contents.draw_text(4, 32 * 2, 92, 32, $data_system.words.armor2)

    self.contents.draw_text(4, 32 * 3, 92, 32, $data_system.words.armor3)

    self.contents.draw_text(5, 32 * 4, 92, 32, $data_system.words.armor4)

Window_EquipItem
- Above the line, @equip_type = equip_type, you need to add something like:
Code:
  if equip_type == 2

    equip_type = 3

  elsif equip_type == 3

    equip_type = 4

  elsif equip_type == 4

    equip_type = 2

  end


That might be all you need to do, but I didn't look into this completely.
 
well, I had already figured the change to Window_EquipRight. that one was the easy part... but it's after that that baffled me. I tried your Window_EquipItem change, but it didn't quite work as expected.

to try to explain exactly what it does now, let me take you step-by-step what's on the screen.

Actor is equipped with:

Armor: Chain Mail
Accessory: (none)
Helmet: Headband

I go down to Armor and try to unequip the Chain Mail, and it instead removes the Headband from the Helmet slot. I click again on Armor, and the list of items is empty. I go down there and it doesn't equip anything to anything.

I moved down to Accessory (which was blank to start) and click that, go down to a blank box and select. It unequips the Armor.

I move down to Helmet where it shows the headband in the item list. I go down and pick it, try to equip, but it forces the Helmet into the accessory slot instead. Now that the Helmet slot is free, the Armor slot equips the Chain Mail to the Helmet slot.

It seems that things are a little bit bonkers now.

In an attempt to try to fix this myself, I went to Scene_Equip and to def item_window_update. I saw:

Code:
@item_window3 = Window_EquipItem.new(@actor, 2)

    @item_window4 = Window_EquipItem.new(@actor, 3)

    @item_window5 = Window_EquipItem.new(@actor, 4)

in particular and thought that making the order: 4,2,3 instead might help. Well, that made it so that the equipment went in the right slots... but not from the right selected option. In other words, going to Armor, unequipped the Headband, but also re-equipped back to Helmet.

Well, I figured this wasn't the answer, so I put it back to the way it was.

I obviously have no idea what I'm doing, so I'm not going to keep playing around with random numbers I don't understand, taking random stabs in the dark. I'm hoping you can help me further here.
 

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