Hi I am someone who is very new to coding (literally zero experience in coding) and recently I am trying to pick up script writing and plugin creation in RPG maker.
Currently I am running into a problem with trying to get Js to create multiple instances of the Equip Window in the Equip Scene in game (I'm trying to make a loadout system that allows players to equip different sets of equipment loadouts and change them mid combat), the problem I'm having now is that I am able to create 3 different Equip Windows for the Equip Scene but the Equip Slots are not showing up except for the first window, so what it looks like now is my first window looks normal with all the Equip Slots present but my second and third windows are just empty windows without the Equip Slots in the middle.
To help make my problem clearer below is the code I'm trying to edit (I apologize if my code looks dumb or redundant, right now I'm just trying to achieve my desired outcome lol),
So here I tried to overwrite the Scene_Equip.prototype.createSlotWindow function to make three separate Equip Windows hence the _slotWindows, _slotWindows2 and _slotWindows3. But the game only initialized the Window_EquipSlot(rect) method for the first _slotWindows. I looked through some post on the forum and some of them mentioned something about Js only initializing the method once for the first instance and not doing it for subsequence ones.
Would really appreciate any guidance/pointers as to how the Window_EquipSlot(rect) method is being initialized (do I need to edit some code for the method as well) or if the way I'm doing this is even correct to begin with (maybe the way I added the extra windows was incorrect) so I can troubleshoot this problem. Thanks a lot!
ps. In terms of my coding abilities I'm still learning the some fundamentals through online courses and I figured the best way for me to learn is to learn the basics while doing some actual coding as well.
Currently I am running into a problem with trying to get Js to create multiple instances of the Equip Window in the Equip Scene in game (I'm trying to make a loadout system that allows players to equip different sets of equipment loadouts and change them mid combat), the problem I'm having now is that I am able to create 3 different Equip Windows for the Equip Scene but the Equip Slots are not showing up except for the first window, so what it looks like now is my first window looks normal with all the Equip Slots present but my second and third windows are just empty windows without the Equip Slots in the middle.
To help make my problem clearer below is the code I'm trying to edit (I apologize if my code looks dumb or redundant, right now I'm just trying to achieve my desired outcome lol),
So here I tried to overwrite the Scene_Equip.prototype.createSlotWindow function to make three separate Equip Windows hence the _slotWindows, _slotWindows2 and _slotWindows3. But the game only initialized the Window_EquipSlot(rect) method for the first _slotWindows. I looked through some post on the forum and some of them mentioned something about Js only initializing the method once for the first instance and not doing it for subsequence ones.
Would really appreciate any guidance/pointers as to how the Window_EquipSlot(rect) method is being initialized (do I need to edit some code for the method as well) or if the way I'm doing this is even correct to begin with (maybe the way I added the extra windows was incorrect) so I can troubleshoot this problem. Thanks a lot!
ps. In terms of my coding abilities I'm still learning the some fundamentals through online courses and I figured the best way for me to learn is to learn the basics while doing some actual coding as well.