Ramza's State Workshop OPEN (current states: 26 LATEST: Overpower + Darkness Burst)

Discussion in 'Resource Workshops' started by ramza, Aug 2, 2016.

  1. Dankovsky

    Dankovsky Veteran Veteran

    Messages:
    199
    Likes Received:
    137
    First Language:
    RU
    Primarily Uses:
    RMMV
    I don't think it's something that can be coded so easily. I suggest you use SRD Summon Core though, it works like a charm mostly.
     
    Mihe likes this.
  2. Mihe

    Mihe Veteran Veteran

    Messages:
    180
    Likes Received:
    69
    First Language:
    English
    Primarily Uses:
    RMMV
    Thank you, friend. :cutesmile:
     
  3. ramza

    ramza Lunatic Coder Veteran

    Messages:
    473
    Likes Received:
    243
    Location:
    Nova Scotia, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    I actually had a summon state in here all the way back on page 3. It was linked in the OP, but the link doesn't seem to work anymore? Possibly due to the forum changing or something.

    Anyways, not sure what you can make of it, but SRD summon core is definitely the better option here... It didn't exist back then. Just in case though, I have quoted the original summon skill I made below:

     
    Mihe likes this.
  4. Recruit

    Recruit Villager Member

    Messages:
    19
    Likes Received:
    5
    First Language:
    English
    State Name:
    Infected
    State Description:
    A state that can spread the infection if attacked, or when attacking (preferably melee), and every start of a turn, has a chance to apply infection to close by allies maybe 10-25% chance, as well as a 25% chance to attack allies too with a specific skill.
    Plugin Requirement:
    Basic Yanfly + Aura Effects
    Required Compatibility:
    Any Yanfly Battle Systems

    I was gonna use this with some other cool effects like someone burning, but i think infected makes a better name for it.. Hopefully this isnt too challenging, thanks in advance
     
  5. Dobberman

    Dobberman Villager Member

    Messages:
    7
    Likes Received:
    1
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Dear friends, hello there!


    I'm just trying to make a DoT - damage over turn - and HoT - healing over turn - effects that can hit critically, using the critical chance and the critical modifier of the user (and critical resistance from target), but i have no idea where to start.

    State Name: DoT/Regen Critical!
    State Description: when the user use a bleed/poison/regen effect, the effect need a chance do critical hit in every DoT effect/turn. Like World of Warcraft and some other MMOs.
    Plugin Requirement: I'm think you will need the Battle Engine of Yanfly, the buffs and States Cores, Extended Damage over Time and Critical Control.
    Required Compatibility: I'm just using Yanfly's plugins, soo need compatibility with Yanfly plugins in Maker's default battle system.


    Anyone have some idea?
    Hugs.
     
  6. ramza

    ramza Lunatic Coder Veteran

    Messages:
    473
    Likes Received:
    243
    Location:
    Nova Scotia, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    Sorry it took so long to get back to you on this one. I'd hope by now you've found an answer to this, but if not, I will write up a brief explanation which you can modify a bit to fit into whatever state you want.

    So this state has multiple parts, so it will need to be handled in multiple lunatic codes. The first part, being attacked, will be handled in a <Custom React Effect> tag:

    Code:
    <Custom React Effect>
    if (this.isHpEffect() && this.isPhysical()){
     var rnd = VARIANCE VALUE HERE
     var formula = DAMAGE FORMULA HERE
     var total = MULTIPLY FORMULA BY RND
    user.gainHp(-total);
    user.startAnimation(x);
    user.startDamagePopup();
    if (user.isDead())
      {
         user.performCollapse();
      }
    }
    </Custom React Effect>
    
    Likewise, the section where it deals extra damage when the infected target makes a physical attack is handled through a <Custom Confirm Effect>
    Code:
    <Custom Confirm Effect>
    if (this.isHpEffect() && this.isPhysical()){
     var rnd = VARIANCE VALUE HERE
     var formula = DAMAGE FORMULA HERE
     var total = MULTIPLY FORMULA BY RND
    target.gainHp(-total);
    target.startAnimation(x);
    target.startDamagePopup();
    if (target.isDead())
      {
         target.performCollapse();
      }
    }
    </Custom Confirm Effect>
    
    The second half of your request needs to be on a <Custom Turn Start Effect>
    Code:
    <Custom Turn Start Effect>
    var units = user.friendsUnit().aliveMembers()
    for (var i = 0; i < units.length; i++){
     if (Math.randomInt(100) > 25){
     //this unit is infected now
     units[i].addState(stateId)
     units[i].startAnimation(x)
     }
    }
    </Custom Turn Start Effect>
    This checks all alive allies of the infected against a 25% check, and if it fails the check, inflicts them with the infected state, and plays an animation. In this section you could also force an action to use a specific skill on them, but the system doesn't play well with forced actions from inside a state, so showing an animation may be the best you can do here.


    As above, I'm sorry it took so long to get to this request. YEP_X_ExtDot is sort of capable of this on it's own, and I can't think of a better way to pull this off without making an extension to that plugin (which I may do at some point though). Because the damage of the dot state is determined by the note tags on that state, the easiest way to do this is work the critical chance into the original damage formula. INstead of the following:
    Code:
    <Custom DoT Formula>
         value = Math.max(a.mat, a.atk)
         variance = 20;
         element = 10;
    </Custom Dot Formula>
    You would use something more like this:
    Code:
    <Custom DoT Formula>
    if (user.isStateAffected(x)){
        var critchance = Math.max(user.cri - target.cev, 0)
        var critmultiplier = 2.0
        if (Math.random() < critchance){
        //a crit has happened
        value = Math.max(a.mat, a.atk) * critmultiplier
        } else {
        //crit failed
        value = Math.max(a.mat, a.atk)
       }
    } else {
         value = Math.max(a.mat, a.atk)
    }
         variance = 20;
         element = 10;
    </Custom Dot Formula>
    Where the user is checked for the critically enabling dot state first, then his crit rate is checked against the target's cev rate, and then a random check is used to determine if this dot has critically hit, which doubles the damage of the tick.

    Like I said, this could be shorted dramatically by making a change to the actual ExtDot plugin, and I might make one at some point in the future.
     
    Last edited: Oct 12, 2018
    Fireworker, Lnik3500 and Dobberman like this.
  7. Dobberman

    Dobberman Villager Member

    Messages:
    7
    Likes Received:
    1
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Thank you mate!

    With this formula i can made a critical damage occur in every situation, this was a tremendous help.
    But this is a "fake critical", right? because count only for damage proposities and don't count for "if(critical)" checks and another fancy things (colorful numbers, etc...).
    There's a way to make a FORCE CRITICAL like in the Yanfly Action Sequence?

    Anyway, thank you soo much!
    Hugs!
     
  8. ramza

    ramza Lunatic Coder Veteran

    Messages:
    473
    Likes Received:
    243
    Location:
    Nova Scotia, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    That is correct, this is a 'fake' critical.
    Since it isn't an action causing the damage, tags like force critical that work on skills or action sequences have no effect here. I looked briefly at a way to reverse engineer the crit control plugin to see if I couldn't push that in there too, but it needs a bit more of a deep dive than I have time for. I was hoping for a function to call right before the damage popup that denoted a critical hit, which I didn't find.

    On the other hand, you must be using a different plugin entirely if you can change the color of the text of a critical hit, so there might still be a function that can be tweaked a little bit to at least cause the damage popup from these dot effects to look the same as a critical hit, even if it doesn't end up doing any of the other fancy effects.

    The main thing is that it won't work for other states that do effects on action results, like a state that restores your MP if you critically hit, because this isn't an action, and therefore can't trigger action effects. Also, changing it so that it could, would likely lead to causing an endless loop of state effects triggering off each other constantly.
     
    Dobberman likes this.

Share This Page