Jump to content

UnknownUser1

Member
  • Content Count

    12
  • Joined

  • Last visited

  • Days Won

    1

UnknownUser1 last won the day on November 6

UnknownUser1 had the most liked content!

About UnknownUser1

  • Rank
    Member
  1. Well.. my post information got deleted when I went to edit. Here goes the re-post. I wanted to post my last resolution as I had two issues from my main initial post. Under the "Window_ActorCommand" class and under the "add_item_command", I have placed the code below if it will help benefit anyone else. I had to make the change to not use variables for the equip slots as I needed the slot to refresh at the beginning of each turn to determine if the item command needs to be disabled. *Very nice roninator2! To bad this mod was not done when RPG Maker VX Ace was the latest maker at the time. Would of been useful for others.
  2. Yeah, I understand. Every time I felt you were taking a stab at it, I was taking a look in the background myself trying to figure it out. Its just more or less not knowing the syntax or where to start for me. But, once I can figure either one of those out, I can usually resolve my own issue and progress further. Not sure if you noticed, but I did already resolve my issue So, I will do a test between my inserted code and yours to see if I see any negative effects from either one. As mentioned, appreciate you jumping into this and helping resolve this. Definitely much appreciated! This is now resolved and can be closed down.
  3. After taking a look at my initial post, yes I can see how my original message was not portrayed properly as I was focusing on items in the additional new slots. When in reality, I wanted the additional 2 slots to behave like Slot 4. You can add accessory armor and with Kread-EX Actor Inventory, you can now also add items. Adding in the new change, I would say I am 99.9% there. Ha. I am able to attach items correctly in the 2 additional slots and armors. But, I have armor that is not the equipment type of "Accessory" and I am still able to add in these additional slots - which I do not want. I appreciate you looking into this and providing a solution that is technically working at this point. I get the sense you want to move on from this and I don't blame you. I will take a look to try and resolve the the last 0.01% myself to only target "Accessory" equipment for the new slots... unless it is an easy change for you to make at first glance. Edit: I have modified the Window_EquipItem class and plugged in the "# added this in" section at the bottom of the def include?(item). What this does, it essentially removes all the armor from my Slot 4, 5, 6. So, I now have all 3 slots correctly defined for items. But, I want to take that expression a tad bit further and instead of excluding the "ALL" armor, only remove the armor that do not have the equip type set as "Accessory" Here is my equip_slot setup - DEFAULT_BASE_SLOTS = [ 2, 1, 3, 4, 5, 6, 0] Edit 2: I appended the "&& item.etype !=4" on my added in section.. and it seems to work? It can't be that easy! Ha. Logic makes sense if I take a look at it. Will need to ensure all works fine in battle and outside battle with swapping armor around multiple characters. return false if @slot_id > 2 && item.is_a?(RPG::Armor) && item.etype_id != 4 # Added this in Edit 3: I originally stripped out the Weapon side of the code you provided, but doing this "removed" the weapon in my weapon slot (Even though it is locked). To fully complete the solution with the original code you provided roninator2 , I added the 2 additional lines that target my slot 5 and 6. If there is a weapon in the list, return false. Viola! That seems to finish this off. I now have 2 duplicated slots like my Slot 4 and with different IDs. This will allow my to insert logic for my "item" command in battle if a consumable item is attached return false if @slot_id > 2 && item.is_a?(RPG::Armor) && item.etype_id != 4 # Added this in return false if @slot_id == 4 && item.is_a?(RPG::Weapon) # Added this in return false if @slot_id == 5 && item.is_a?(RPG::Weapon) # Added this in Greatly appreciate the help roninator2! I will ensure all works perfect within my game before closing this request (As I have been doing this test on from scratch demo).
  4. So, I have plugged in the code on my current game and a from scratch and I would say 99% is correct from what I can see (Haven't done extensive testing). The last 1% would be to have the Slot 5 and 6 to behave like Slot 4 (Accessory). Only allow items and armor that is set to the "accessory" equip to be able to be equipped in the additional Slot 5 and 6. This would fully solve my problem. Edit: The armor that is selectable in the slot 5 and slot 6, when I go to attach, it does not populate in the slot. I think its the similar issue before - being consumed as it disappears forever. Same applies to a weapon (Not that I will use weapons). When I use items, it works as intended. So, as mentioned above... if this slot issue is fixed along with the 1% above, then this will completely resolve my dilemma I am having.
  5. I gave the code you provided above a go and received the same results you did. Very odd behavior. I even was able to get all items attached and then went into battle to use/consume a potion and under this scenario, it also removed the items from the other slots as well. But... it is VERY CLOSE!
  6. I appreciate you responding and taking a stab at this. I plugged in the additional parts you have provided and ended up with some errors related to my specific game. Not an issue - I can fix those. So, I did a quick test in a from scratch game and I don't think it is entirely working (More like half working). When I go try to add an item to either "extra 2" or "extra 3", I can select the item to attach, but once I attach.. I get nothing in the slot name wise. The item must be in the slot as no more items are in my inventory after the attach. Is there something I am missing or something additional that needs to be added to this? I guess the bigger question, are you receiving the same result? * I added a screenshot to show what I mean. It looks like I have not added anything in both Extra's, but I have.
  7. If I require an additional script to make this work, then I can look to implement this into my game. I'm pretty good at taking an existing piece of a script and stripping out what I need or at least the logic side. I only like to avoid additional scripts as I am intertwining my scripts and everything together. So, the chances of incompatibility are increasing the further I progress in my game I am developing. The issue with making the accessory slots armor slots, I would then have to alter the existing actor inventory script to read that properly and then I would have the issue where every armor could have the potential to put an item in the slot - which I don't want. The only way around this is by creating a custom slot... and this goes back to what I have already tried and making an easy system to complex at this point. I essentially wanting a way to identify if any items are currently in the accessory slot for in battle - it will then disable the item command if no items are attached. For the armor slots, there is the $game_party.has_item?, but it does not extend to the accessory slot which is bizarre (Unless I am wrong). I need a similar call that will point towards the accessory slot. Edit: I have dug a little further and I am printing the information of @actor.equips[index] to the console. This technically reads each of the duplicated accessory slot normally and will tell me what piece of data is equipped in the slot (item, armor, weapon etc.). I have tried grabbing the name of the equipped with @actor.equips[index].name but, this is not a valid syntax I guess. So, if I could simply grab the correct "name" of the equipment, then I could easily perform some logic to achieve what I want. For example.. if @actor.equips[index].name == 'potion' # Item command enabled else # Item command disabled end Something along those lines... So, any help with the correct syntax? (I have also tried [@actor.equips[index]].include('potion') and this does not work... well comes back nil/false.)
  8. This is done with Kread-EX - Actor Inventory script. I have the link to the script on the original post. It allows you to "attach" items to the accessory slot.
  9. No problem. I figured it was something along those line. I understand. For others reading this support request, I have resolved my initial issue in my post and have also posted the code snippet if it helps anyone. But, I am still needing assistance with the second issue. I need to be able to... grab strings from different slot ids or the same slot (4) with a custom name. Slot IDs Slot 4 - Accessory Slot 5 - (This would be a custom slot more likely. Just need to make items equippable in this slot) Slot 6 - (This would be a custom slot more likely. Just need to make items equippable in this slot) or Slot Names Slot 4 - Extra Slot 4 - Extra 2 (The ability provide a custom name) Slot 4 - Extra 3 (The ability provide a custom name) I am trying to disable my individual actor command in battle based on if any items are equipped in the accessory slot. I currently have no way of doing this due to my current accessory slot is clone 2 extra times and when I try to grab the string from Slot 4, it only grabs from one of the clones. So I need to make additional custom slots. There are a few here available, but I cannot make the items equippable to these custom slots. Is there something from Kread-EX - Actor Inventory script that I am missing to help with the custom slot - the ability to add item to it?
  10. Okay, so my goal was to try and avoid external scripts and just construct logic within the already supplied game engine ruby code. But, that's fine. I guess my question is, what specific additional equipment slot script did you use to achieve this? I have tried a few and they do not seem to work because they only target the armor/weapon equipment and not items. But, I am willing to give another go. From the the code you provided above, assuming you are using Yanfly Ace Equip Engine possibly? (Or is is actually the "BlackMorning VK equip" script?)
  11. Technically you are both right. I am wanting 2 additional slots, but they will only be adding to existing equip_slot[4]. So, it will look like below. By default, this is what you would have in the default system slot wise. Slot 2 Slot 1 Slot 3 Slot 4 But, I am essentially wanting a duplication of equip_slot[4] twice with a different name on each one or slot ID. I want the full functionality of equip_slot[4] for consumable items.I turned the console on and did a little logic testing and the game cannot differentiate between the same 2 duplicated slot id. It will only match the logic to one of the slots as equip_slot[4]. Slot 2 Slot 1 Slot 3 Slot 4 Slot 4 (labeled as slot 5 or the ability to give a custom name on the slot) Slot 4 (labeled as slot 5 or the ability to give a custom name on the slot) or Is there logic to say.. if an actor has any consumable items attached, then enable command. If not, disable command. Is this available? I can take a look myself... inside the engine. Edit: I have threw a little logic together below that I know is technically not correct. But, it gives the general idea what I am trying to achieve (If the above cant be done with slot name or id change). Ideally, for the if condition to check if the item is consumable. I think checking if it is just an item (No armor, weapon), is a good start, but if it is consumable would be key as that is how I am checking for my command. If any consumable items are attached to the actor. item = item.is_a?(RPG::Item) if @actor.equips.include?(item) add_command("items", :item) else add_command("items", :item, disabled) end
  12. I am adding additional slots to the default VX Ace engine past 4. My new equip slot numbers will be 5 and 6. So my equip_slots currently look like this [2,1,3,4,5,6,0]. I am achieving this with Yanfly Ace Equip Engine script. I am wanting to use the additional equip slot 5 and 6 to add consumable items for my actors to carry in battle and be used with the Actor Inventory script. Currently, I can do this with only equip_slot[4] and want to extend this out to equip_slot[5] and equip_slot[6]. Any help would be greatly appreciated! Yanfly Engine Ace - Ace Equip Engine Link: https://github.com/Archeia/YEARepo/blob/master/Gameplay/Ace_Equip_Engine.rb Kread-EX - Actor Inventory: Link: https://raw.githubusercontent.com/Archeia/RMVXA-Script-Repository/master/Kread-Ex/RGSS3 Scripts/Gameplay Scripts/Actor_Inventory.rb *Yes I could just make my equip_slots [2,1,3,4,5,6,0] to [2,1,3,4,4,4,0] instead, but I have some other logic going on with some scripts hence why I need the slots to have different ID's. or Is there a way to duplicate the equip_slots[4] to represent different slot names instead of going after an .id. So, my example is currently... Extra: Potion Extra: Water Extra: Hi-Potion I want it to look like the below as an example. A way to distinguish the slots from each other (Different slot names). Extra: Potion Extra 1: Water Extra 2: Hi-Potion Edit 2: I have resolved the issue "technically". Due to other scripts with Kread-EX Actor Inventory, my consumption of items were not being removed from the slot. It was just showing disabled after usage. Same went for item charges from Selchar Item Charges. I dug through the ruby code for removing equipment and found "discard_equip" command and my solution is below. This is under the "use_item" in Scene_Battle. But, I am still needing a way of identifying if any items are attached to the accessory slots... because I want to disable the party command in battle for the actor items if nothing is attached. But, since the accessory equip slot is #4... it will only read one slot as 4 and the other two as blank.
×