Jay's Dual Tech system

● ARCHIVED · READ-ONLY
Started by HeroicJay 329 posts Page 6 of 17 View original ↗
  1. So I was just testing around with the order. 

    SkillCooldown doesn't seem to affect the display.

    But the LimitSkillUse and SkillCostItem extensions do break it. (In different ways)


    LimitSkillUse (if placed after your plugin) will have the extra information under the text/icon (or not even at all) If placed before your plugin, will offset the text/icon.

    This is when your plugin is OFF.  1.png


    This one is when it is on:Above.png


    Albiet if I didn't add the Limit Use tags for the Spark Ability... It actually doesn't display at all like this. (This is similar to when also using SkillCostItem tags. It displays the character icon as intended... but doesn't allow wont display the other costs. 2.png


    Because the cost should look like this. (without having to add a Limit Use for Spark) (With your plugin OFF)


    3.png


    And this is how the screen looks when I have your plugin ON AND placed under all the YEP plugins.Under.png



    The last image was the original reason, I tried reaching out to you. 
  2. I haven't looked into the plugins yet (and excuse my absence, I had a power outage today), but I suspect the problem is not in my own plugin, just because I'm familiar enough with how these plugins work. But okay, I'll take a look at it nonetheless.


    EDIT: Sorry if it looks like I'm throwing him under the bus, but this is on Yanfly, not me. He forgot the return value from DrawSkillCost in Limited Skill Uses.


    This is what needs to be done to fix it. All of this must be done in LimitedSkillUses (I've already alerted Yanfly.)


    1. Change this function:


    Yanfly.LSU.Window_SkillList_drawSkillCost =
    Window_SkillList.prototype.drawSkillCost;
    Window_SkillList.prototype.drawSkillCost = function(skill, wx, wy, width) {
    if (skill && this._actor.isSkillLimitedEmpty(skill)) {
    return this.drawSkillLimitEmpty(skill, wx, wy, width);
    }
    Yanfly.LSU.Window_SkillList_drawSkillCost.call(this, skill, wx, wy, width);
    };


    to this:


    Yanfly.LSU.Window_SkillList_drawSkillCost =
    Window_SkillList.prototype.drawSkillCost;
    Window_SkillList.prototype.drawSkillCost = function(skill, wx, wy, width) {
    if (skill && this._actor.isSkillLimitedEmpty(skill)) {
    return this.drawSkillLimitEmpty(skill, wx, wy, width);
    }
    return Yanfly.LSU.Window_SkillList_drawSkillCost.call(this, skill, wx, wy, width);
    };


    2. Change this function:


    Window_SkillList.prototype.drawSkillLimitEmpty = function(skill, wx, wy, ww) {
    if (Yanfly.Icon.LimitedEmpty > 0) {
    var iw = wx + ww - Window_Base._iconWidth;
    this.drawIcon(Yanfly.Icon.LimitedEmpty, iw, wy + 2);
    ww -= Window_Base._iconWidth + 2;
    }
    this.contents.fontSize = Yanfly.Param.LSUFontSize;
    this.changeTextColor(this.textColor(Yanfly.Param.LSUTextColor));
    var text = Yanfly.Param.LSUEmpty;
    this.drawText(text, wx, wy, ww, 'right');
    this.resetTextColor();
    this.resetFontSettings();
    };


    to this:


    Window_SkillList.prototype.drawSkillLimitEmpty = function(skill, wx, wy, ww) {
    if (Yanfly.Icon.LimitedEmpty > 0) {
    var iw = wx + ww - Window_Base._iconWidth;
    this.drawIcon(Yanfly.Icon.LimitedEmpty, iw, wy + 2);
    ww -= Window_Base._iconWidth + 2;
    }
    this.contents.fontSize = Yanfly.Param.LSUFontSize;
    this.changeTextColor(this.textColor(Yanfly.Param.LSUTextColor));
    var text = Yanfly.Param.LSUEmpty;
    var dw = this.drawText(text, wx, wy, ww, 'right');
    this.resetTextColor();
    this.resetFontSettings();
    return dw;
    };


    3. Change this function:


    Window_SkillList.prototype.drawLimitedSkillUses = function(skill, wx, wy, dw) {
    if (!this._actor.isSkillLimitedUse(skill)) return dw;
    if (Yanfly.Param.LSUFormat === '') return dw;
    if (Yanfly.Icon.LimitedUse > 0) {
    var iw = wx + dw - Window_Base._iconWidth;
    this.drawIcon(Yanfly.Icon.LimitedUse, iw, wy + 2);
    dw -= Window_Base._iconWidth + 2;
    }
    this.contents.fontSize = Yanfly.Param.LSUFontSize;
    this.changeTextColor(this.textColor(Yanfly.Param.LSUTextColor));
    var fmt = Yanfly.Param.LSUFormat;
    var current = this._actor.skillLimitedUseCurrent(skill.id);
    current = Yanfly.Util.toGroup(current);
    var max = this._actor.skillLimitedUseMax(skill.id);
    max = Yanfly.Util.toGroup(max);
    var text = fmt.format(current, max);
    this.contents.fontSize = Yanfly.Param.LSUFontSize;
    this.drawText(text, wx, wy, dw, 'right');
    var returnWidth = dw - this.textWidth(text) - Yanfly.Param.SCCCostPadding;
    this.resetTextColor();
    this.resetFontSettings();
    return dw;
    };


    to this:

    Code:
    Window_SkillList.prototype.drawLimitedSkillUses = function(skill, wx, wy, dw) {
        if (!this._actor.isSkillLimitedUse(skill)) return dw;
        if (Yanfly.Param.LSUFormat === '') return dw;
        if (Yanfly.Icon.LimitedUse > 0) {
          var iw = wx + dw - Window_Base._iconWidth;
          this.drawIcon(Yanfly.Icon.LimitedUse, iw, wy + 2);
          dw -= Window_Base._iconWidth + 2;
        }
        this.contents.fontSize = Yanfly.Param.LSUFontSize;
        this.changeTextColor(this.textColor(Yanfly.Param.LSUTextColor));
        var fmt = Yanfly.Param.LSUFormat;
        var current = this._actor.skillLimitedUseCurrent(skill.id);
        current = Yanfly.Util.toGroup(current);
        var max = this._actor.skillLimitedUseMax(skill.id);
        max = Yanfly.Util.toGroup(max);
        var text = fmt.format(current, max);
        this.contents.fontSize = Yanfly.Param.LSUFontSize;
        this.drawText(text, wx, wy, dw, 'right');
        dw -= this.textWidth(text) - Yanfly.Param.SCCCostPadding;
        this.resetTextColor();
        this.resetFontSettings();
        return dw;
    };
  3. AWESOME! 

    I didn't expect you to get a fix so fast! :)


    I'll be adding the codes now.

    Hope all is well, that sucks you got a power outage. 
    But keep up the good work. Thank you so much. 


    EDIT: Heya. So I just tried out the codes. For the most part it works. Dual Skills + Item Costs still don't work. And for some reason Dual Skills that have limited use require the skills for the dual skill to also have limited use. For the most part, I think for my usage, I can work around that... but just a heads up. I tried sharing the problem with Yanfly on his youtube. Glad you contacted him too. Thanks so much. 


    EDIT 2: One more thing. When one of the required skills has a limited use. that limited use also applies to the dual skill. But as I said, the reverse (having only the dual skill have limited use) does not work. 
  4. Item costs: No repro. Works fine for me. What exactly is not working for you? (Note that you should NOT EVER give more than one member of a dualtech the same sort of universal cost. Example: items. If both characters spend a Potion in their component skills for a dualtech, then the skill will give incorrect behavior if you have exactly one Potion.)


    Limited use: That's correct behavior. Costs associated with a dualtech skill come from the components, not the skill itself (RESTRICTIONS of the dualtech skill itself still apply though.) The exceptions are when the skill is set as a triple tech (because the third member doesn't have a component skill) or the skill is set as a component to itself (which isn't a full exception.)


    The workarounds are either to make a hidden dummy skill component or, for at least one member of the tech, set the skill as a component to itself (but don't do that for both characters if universal costs are involved!!)


    And believe me, that's the way to do it. For example, if the limited use was tied directly to the skill (and it's not a component to itself), then which character loses the skill usage when you use the dualtech (assume for a second that both characters can access the dualtech)? The one who used the skill? So character A uses the skill and that doesn't stop character B from using it later on? Or both of them? Logical, but there's no specific mechanism in place to remove a "charge" from both of them, since my plugin and the Limited Usage plugin were not made to know the inner workings of each other. The dualtech plugin knows how to call the "cost" routine, and Limited Usage factors that into the cost, so they can work together, but character A's "dual strike" doesn't have any way to know it needs to remove a charge from character B's.


    UPDATE: Yanfly updated Limited Use now, so feel free to use the newest one off the website. Still would like more information on your item costs not working in dualtechs.
  5. @HeroicJay


    Sorry. I haven't tested. ItemCosts in a bit. I've been struggling with a couple other plugins as of late. Bahahaha. 


    But from what I'm reading from you. I think I understand my misconception of how the dual tech costs work and it makes sense.


    I'll be testing your method with making one of the dual tech skills a component of itself. 
    But I think everything is working fine. Because my last tests with ItemCosts was before you explained how the dual tech actually 


    takes its costs from its components and not itself. 
  6. @HeroicJay


    Are you still intending to release an extension for compatibility with Yanfly's CTB battle system?
  7. It's not incompatible with Yanfly's CTB, but in the long term, yes, I do plan on looking into the idea of turn skipping in Yanfly's battle systems. However, my focus has been drawn to other things at present; for one thing, I made the declaration that I'd release a demo of my main project in early April.
  8. It can ensure that there are skills that require 3 or 4 characters ???
  9. 3 yes. 4 no.


    For a triple tech, you need to design the skill as a dualtech and define two characters, but actually teach the skill to a third character. The third character must be the one to use it, and will have to pay all the costs built into the skill itself, since they don't have a component skill. If you want all three characters to be able to call the triple tech, you'll need to create the skill three times over (not necessary for dualtechs.)
  10. HeroicJay said:
    For a triple tech, you need to design the skill as a dualtech and define two characters, but actually teach the skill to a third character. The third character must be the one to use it, and will have to pay all the costs built into the skill itself, since they don't have a component skill. If you want all three characters to be able to call the triple tech, you'll need to create the skill three times over (not necessary for dualtechs.)



    Ah ... for example ???
  11. So this is how I have understood this script. If you want to learn a technique based on a condition such as:


    Actor 1 has a sword


    Actor 2 has fire


    Actor 1 and 2 are in the party


    Actor 1 and/or 2 learn flame sword


    This would be a basic representation of the script. The characters still act independently of the other and therefore can still act on there own turn. If you wanted to add a 3rd character you would do this:


    Actor 1 has a sword


    Actor 2 has fire


    Actor 3 has tornado


    Actor 1, 2, and 3 are in the party


    Actor 3 learned Devastation


    This again will allow others in the party to continue actions on their own turn. If you are looking for a linked system, where as, when the conditions are met all actors included cast the spell then that is a different script. I don't want to step on HeroicJay's script, but if you need a linked system DoubleX has ported his VXAce script to MV called Unison Item. I will list the link below. I hope this helps.


    http://www.rpgmakervxace.net/topic/36448-doublex-rmmv-unison-item/
  12. The whole "linked turn" thing is still something I plan to do - and can do with Ellye's ATB (it was out before Yanfly's) - but I've been focused on other things, and that's actually not a feature I wanted implemented in my own game, so it's on the backburner.


    And honestly, it's my turn to apologize for stepping on someone's script, but I don't really... get... how DoubleX's plugin is supposed to work. At all. He's really light on the examples. Does it allow different actors to pay different costs? (That's functionality that I, personally, need, and the truth is, all my plugins are made for my own use first.) Does it display everyone's costs if so? Can you use the stats of all the actors involved for determining damage?
  13. He allows for plugin editing through script calls. This would be for script writers like yourself that need to modify it to your needs. The cost is taken from all involved parties through default. This means if you want the total for the spell to be 100 MP then it will take 100MP from all involved or you can put the cost to 50MP and each will pay 50MP. Another thing is that if one of the characters is unable to pay the cost the spell is made inactive. This system is like the double and triple attacks in Crono Trigger.
  14. HeroicJay said:
    And honestly, it's my turn to apologize for stepping on someone's script, but I don't really... get... how DoubleX's plugin is supposed to work. At all. He's really light on the examples. Does it allow different actors to pay different costs? (That's functionality that I, personally, need, and the truth is, all my plugins are made for my own use first.) Does it display everyone's costs if so? Can you use the stats of all the actors involved for determining damage?

    It's 100% my fault for anyone not getting how any of my plugins' supposed to work at all :)


    Just FYI, I've just upgraded my unison item plugin to support letting different unison actor(actor needed for the unison skill/item) paying different mp/tp costs :D

    HeroicJay said:
    The whole "linked turn" thing is still something I plan to do - and can do with Ellye's ATB (it was out before Yanfly's) - but I've been focused on other things, and that's actually not a feature I wanted implemented in my own game, so it's on the backburner.

    I don't want to sound cruel or rude, but as long as Ellye's ATB isn't upgraded to let the ATB continue to run even when players can input actions, I don't think it'll even be possible. It's because the unison skills/items are defined to be usable only when all actors needed can input actions at the time those skills/items are to be inputted. In the current Ellye's ATB setting, however, this can only be the case when all those actors become having full ATB at the exact same frame, as the only way for actors to become having full ATB is to let the ATB to continue to run, which is disabled when there are actors already having full ATB.


    So if you plan to do this, you'll either have to wait Mellye to upgrade his/her ATB that way, or you'll have to redefine the "linked turn" thing in his/her ATB ;)
  15. I don't think I define it the same way you do in the first place. My ultimate aim when I upgrade for Yanfly is how it worked in Final Fantasy IV: The After Years, which doesn't care how many actors can input at the exact moment, and instead just delays the move until everyone is ready.
  16. HeroicJay said:
    I don't think I define it the same way you do in the first place. My ultimate aim when I upgrade for Yanfly is how it worked in Final Fantasy IV: The After Years, which doesn't care how many actors can input at the exact moment, and instead just delays the move until everyone is ready.

    I've briefly thought about that can came up with this:


    1. Uses a special unison actor queue for an unison skill/item to mark all its unison actors


    2. The most up front actor in the queue will always be the unison invoker


    3. Right after an actor finish inputting an unison skill/item, that actor will be placed at the end of the unison actor queue of that unison skill/item


    4. A new command will be added to let players cancel actors' inputted actions


    5. As long as not all unison actors are collected for an unison skill/item, those actors will continue to wait(but not charge) until all such actors are collected(then they'll start to charge the unison skill/item together)


    6. If an unison actor cancels the inputted unison skill/item, that actor will be removed from the unison actor queue of the unison skill/item(Then 2nd point will apply to that queue) and become inputable again


    Using this setup would mean the need for the Ellye's ATB to let players cancels the inputted actions, otherwise there can be cases where the unison actors can never be fully collected and those already inputted unison skills/items will be forced to wait infinitely :)
  17. would this work with 3 party members or more? o:
  18. ScytheX said:
    would this work with 3 party members or more? o:

    3 Yes, more no. (I remember Jay said that earlier, I wonder how close I was to quoting him? I'll check in a sec)
  19. Perhaps I should have added a triple tech example in the pictures of the first post, given people keep asking...
  20. Kloe said:
    3 Yes, more no. (I remember Jay said that earlier, I wonder how close I was to quoting him? I'll check in a sec)

    ah  ok thanks c: