Activate Equipment

● ARCHIVED · READ-ONLY
Started by ATT_Turan 34 posts Page 2 of 2 View original ↗
  1. Maliki79 said:
    Good point on the charges, but if the dev isn't using independent items, it'll be challenging to do. How do you handle the once per battle use?
    I push the item to an array stored on the actor for the duration of the battle. So for the default engine this works perfectly, unless one dual wields the same weapon, in which case activating a weapon counts for both.

    I suppose I could track it on the actor by equipment slot, which would help with the dual wielding scenario (and now that I say that I think I should do it :stickytongue:). But it really wouldn't help in terms of multiple charges tracked between battles because there's no way to keep track of an item once it's unequipped.

    I welcome any suggestions you have for a different way to implement it. But I'm also okay with just saying "These features are dependent on independent items."
  2. I'll give it some thought and see what I can contribute once I get in front of my PC.
  3. ATT_Turan said:
    I suppose I could track it on the actor by equipment slot, which would help with the dual wielding scenario (and now that I say that I think I should do it :stickytongue:). But it really wouldn't help in terms of multiple charges tracked between battles because there's no way to keep track of an item once it's unequipped.
    There may be something in how Formar handles the AP tracking of equipment by Actor that could help?:

    Fomars Learn Skill From Equipment
  4. Puppet Knight said:
    There may be something in how Formar handles the AP tracking of equipment by Actor that could help?:
    In that case, there's no data that's specific to a particular item. If a Short Sword teaches you Slash, then you'll gain AP towards Slash while you're wielding any Short Sword. That's easily stored on the actor.

    And if you got some AP toward Slash, unequipped your Short Sword, put it on another Actor, bought another Short Sword (to make sure it's not the same one) and equipped it, you'll still be at the same number of AP already earned. It's not specific to the item.

    Similarly, if you wanted to have one Short Sword that gave you 2 AP toward Slash every turn and another Short Sword that gave you 3, it couldn't do that with the default item system. And you can see that in Formar's learnrate parameter - it will apply to all instances of that item.
  5. It seems all these additions would require Independent Items.
    So I'd say either decide whether you will do your plugin with Ind Items as a dependency, leave it as-is, or consider a extension plugin that can give functionality the regular plugin doesn't provide so devs can choose.

    Making it so item charges carry over between battles is not possible without Ind Items. And linking charges to the character can work IF there's no way to switch equips mid-battle AND the charges refresh after battle.

    Ultimately up to you, of course.
  6. Might I suggest making a state notetag that allows you to disable being able to make use of activate equipment? maybe even on a per-slot or per-id basis? Also seconded on the user.activating being useful (didnt know that was a thing but ill have to look into that later).
    I was thinking that with those features, a dev could make it so that using the skill through their equipment adds a hidden state (infinite duration, bypasses death removal, removed at battle's end) to the user that increments a counter on the actor on use. then when that counter hits whatever limit is its max, reset the counter and add a state to prevent using the activate equip skill of that weapon slot/id for the rest of the fight alongside a victory effect to clear the counter. something like:

    SKILL - Fire
    JavaScript:
    <After Eval>
    if (user.activating) // i have no idea how its used
        user.addState(X);
    </After Eval>

    STATE X - tracks usage count
    JavaScript:
    <Category: Bypass Death Removal>
    
    <Custom Apply Effect>
    user._fireUsage = user._fireUsage + 1 || 1;
    if(user._fireUsage >= [max])
        user._fireUsage = undefined;
        user.addState(Y);
    </Custom Apply Effect>
    
    <Custom Victory Effect>
    user._fireUsage = undefined;
    </Custom Victory Effect>

    STATE Y - seals activate equipment use
    JavaScript:
    <activateEquipSeal: [weapon/armor] ID>

    this is feasable, right?
  7. @ATT_Turan I know I said this already, but I really didn't expect my query to lead to you creating a plugin just like that. That's some awesome work.

    I do have a minor request though. The crack function is neat, but would there be a way to have a version that completely destroys an item? I'd love to be able to properly set up Prayer Rings from DQ, which have a 33.3% chance of breaking after use. No repairs possible.
  8. Sword_of_Dusk said:
    @ATT_Turan I know I said this already, but I really didn't expect my query to lead to you creating a plugin just like that. That's some awesome work.

    I do have a minor request though. The crack function is neat, but would there be a way to have a version that completely destroys an item? I'd love to be able to properly set up Prayer Rings from DQ, which have a 33.3% chance of breaking after use. No repairs possible.
    This was exactly why I wanted to integrate the durability plugin. Doable with a little tweaking.
  9. @Robro33 Can you clarify the intent/point of that? The way you describe your intended usage, it seems like a hack to make limited charges on an item...but if you're going to be using a Yanfly plugin to be stacking the state counters and applying the state category, you might as well just have the Item Core. I'm not sure I see the point.

    @Sword_of_Dusk Yes, that shouldn't be hard to add.
  10. ATT_Turan said:
    Can you clarify the intent/point of that?
    Ah, my bad. I should have been clearer. I was asking if it were possible to add a note tag to disable being able to activate equipment skills. I had used the limited skills thing as a somewhat relevant and possible use case of it since its not yet in implemented feature that it could be used for, but then just forgot to explain it.
    Essentially, just asking if additional ways to limit being able to use activated equipment skills other than "you used x item and it cracked" was feasable. With a state you could add effects that enemies could use to be able to suppress their usage, or make a requirement for the gear to be used being that you need to *not* have a certain state active as some additional examples.
    Activated equipment skills' only requirement is to have the gear equipped and I cant immediately think of a way to add mechanics to silence these skills without disabling the ability to use items as a whole, or removing the gear from the slot mid fight (which sounds like a disaster waiting to happen).
  11. @ATT_Turan , it works beautifully now! I just have to place it after Galv_ActorEquipItems to work.

    There is a small issue, where the default text for an empty slot is replaced with a blank text (basically, I have "------" for empty slots in Galv's plugin, but this overrides it with " "). It's a small issue though, with no effect on gameplay anyway, so I doubt a fix here is needed.
  12. @Robro33 I understand what you're saying. I'll keep it in mind.

    @zelanius I actually noticed that during my testing, but I wasn't super sure why it was happening. Making the listing of items compatible with Galv's plugin makes the drawing of the text bounce between two or three functions, so one of them isn't ending up where we expect it to. As you say, it doesn't affect the gameplay, but I have it in my head to see if I can sort it better at some point.

    @Sword_of_Dusk Breaking has been added. You can set it at a percent chance and you can give items a custom message to display when they break.

    @Maliki79 @Puppet Knight Charges have been added. You can use a notetag to specify whether items recharge between battles. Plugin commands and script calls are provided to recharge items. Yanfly's Item Core with independent items is required for this functionality.
  13. Will do some MZ compatibility testing for this bad boy today.


    Something to note for folks using Battle Core VS that I noticed:

    YEP Item Core should be placed above Battle Core VS, to avoid a crash when entering the item menu for an actor that doesnt have a note tagged weapon/armor equipped.


    So far so good though. Haven't run into any problems with the base functionality. Testing the new charges function in a few specific cases to make sure it doesn't break in MZ.


    A quick question regarding the `RechargeItem(item)` plugin command:

    How do we specify the ID of equipment exactly it is if we the functionality is grounded in Independent Items, which creates new IDs for the newly acquired equipment?