Help creating this skill please?

JtheDuelist

Your Friendly Nieghborhood Stygian Zinogre
Veteran
Joined
Dec 9, 2017
Messages
1,185
Reaction score
1,440
First Language
English
Primarily Uses
Other
I am wanting to recreate Devoted Sacrifice from Unison League which is
You receive the damage inflicted on all allies for 5 seconds. Only you will take damage from both all-party and multiple-unit attacks, but damage received will increase with the number of targets the attacks are originally intended to hit. While this is in effect, your HP will not be reduced to 0.
To translate into RM words:
Only the user takes all the damage (including that of attacks that hit multiple allies) that would be received by all allies for this turn only. While this is in effect, the user's HP cannot drop below 1.
My question is how can I create this in MV?
 

Sauteed_Onion

Mmm Tasty
Veteran
Joined
Dec 13, 2017
Messages
554
Reaction score
3,665
First Language
English
Primarily Uses
RMMV
Hmm, it seems like Yanfly Taunt plug-in would be used, to give you a taunt skill that provokes enemy attacks onto the user, but you'd have to inflict a state on your that gives you immortality pretty much. Have that state last however long you want, then on the last turn it is effective, maybe heal 1 hp, just in case you did go to 0 hp? I dunno, probably not the most elegant way to handle that, but it's a start to get the gears turning.
 

JtheDuelist

Your Friendly Nieghborhood Stygian Zinogre
Veteran
Joined
Dec 9, 2017
Messages
1,185
Reaction score
1,440
First Language
English
Primarily Uses
Other
@Sauteed_Onion @gambitben @Fernyfer775 Thanks. Also, a few more skill-related questions:
*Is it possible to make a skill that gives the rest of the party the same buffs that the user currently has? (This is a attempt to recreate White Charm from Unison League)
*How do I randomize the number of times the effect of a skill hits in a single use (ie: using a skill that deals its damage formula between 2 to 5 times at random in a single use)?
*How do I make a skill that randomly deals either a physical (a.atk * 4 - b.def * 2) or magical (a.mat * 4 - b.MDF * 2) damage formula when used?
 

Fernyfer775

Veteran
Veteran
Joined
Oct 6, 2013
Messages
1,317
Reaction score
818
First Language
English
For the sharing buffs on the user, I believe this is how you'd do it:
You need Yanfly's Skill Core.
In the var spread = [ ] section is where you put the State ID's and change the X in this section to the animation ID you want to play when it happens targ.startAnimation(X);
<Post-Damage Eval>
var spread = [1, 2, 3, 4, 5, 6];
spread = target.states().filter(function(state) {
return spread.indexOf(state.id) > -1;
});
if (spread.length > 0) {
var group = target.friendsUnit().members();
while (spread.length > 0) {
var state = spread.shift();
group.forEach(function(targ) {
targ.startAnimation(X);
targ.addState(state.id);
});
}
}
</Post-Damage Eval>
EDIT: dohhh, this is for STATES, not buffs... :/
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,089
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
Also, a few more skill-related questions:
*Is it possible to make a skill that gives the rest of the party the same buffs that the user currently has? (This is a attempt to recreate White Charm from Unison League)
I'm not familiar with Unison League, so let's go with an example to clarify what you're seeking. Say Harold and Therese are adventuring toegther. Harold has 1 x atk buff, 2 x def buff, and 1 x luk debuff, while Therese has 1 x atk buff, 1 x def debuff, and 1 x agi buff. If Harold uses this skill, do you expect Therese to end up with:
  • 1 x atk buff, 2 x def buff, 1 x luk debuff (new buffs override old ones)
  • 2 x atk buff, 1 x def buff, 1 x agi buff, 1 x luk debuff (new buffs add to old ones)
  • Something else?
*How do I randomize the number of times the effect of a skill hits in a single use (ie: using a skill that deals its damage formula between 2 to 5 times at random in a single use)?
I think you'd need a plugin. This one looks worth a try: https://forums.rpgmakerweb.com/index.php?threads/random-repeats.49476/
*How do I make a skill that randomly deals either a physical (a.atk * 4 - b.def * 2) or magical (a.mat * 4 - b.MDF * 2) damage formula when used?
Try putting this for the skill's damage formula:
Code:
Math.randomInt(2) === 0 ? a.atk * 4 - b.def * 2 : a.mat * 4 - b.mdf * 2
Math.randomInt(2) returns a random integer from 0 to 1, i.e. 0 or 1. Note that the skill's hit type has nothing to do with the damage formula, though. If you want a true "random skill" setup maybe try the workaround mentioned here: https://forums.rpgmakerweb.com/index.php?threads/skill-that-make-user-cast-random-skill.75529/
 

JtheDuelist

Your Friendly Nieghborhood Stygian Zinogre
Veteran
Joined
Dec 9, 2017
Messages
1,185
Reaction score
1,440
First Language
English
Primarily Uses
Other
@caethyril White Charm does not transfer debuffs, only buffs, so it is more like this:
Harold has atk buff x3 and def buff x4, Therese has atk buff x1, def buff x1, and agi buff x2. After Harold uses White Charm, Therese ends up with atk buff x4, def buff x5, agi buff x2.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,089
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
OK...I'm not entirely certain, but after a bit of testing with a skill set to target all allies the following notetag seemed to work. :kaoswt2:

This requires Yanfly's Skill Core plugin:
Code:
<Post-Damage Eval>
for (var p = 0; p < user.buffLength(); p++) {
  if (!user.isBuffAffected(p)) continue;
  if (target.buff(p) >= user.buff(p)) continue;
  var t = Math.max(target._buffTurns[p], user._buffTurns[p]);
  for (var n = (user.buff(p) - target.buff(p)); n >= 0; n--) {
    target.addBuff(p, t);
  }
}
</Post-Damage Eval>
A line-by-line explanation:
  • Loop over all buffable parameters p;
  • If this param is not buffed for the skill user, skip to next param;
  • If target has an equal or higher buff on this param compared to skill user, skip to next param;
  • Set turns remaining on applied buff, t, equal to that of the user's/target's current buff on this param, whichever is larger (you may want to change this?);
  • Do this next bit once per level of difference between user and target buffs on this param;
  • Apply 1 buff level to param p, with duration t turns.
:kaophew:
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,089
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
Sorry for the delay! Just tested again to be sure and it looks like it's working for me with no plugins other than YEP_SkillCore. Buffs on the user are transferred to all living allies.

In what way does it not work for you? E.g. maybe nothing seems to happen, or the wrong thing happens, or the game crashes? :kaoswt2:
  • If you're using battle-test for this, be sure to save your project just beforehand, otherwise changes to your plugins may not be seen during the test.
  • If you're using play-test, be sure to test from a new game rather than continuing from a save.
It's a good idea to make sure your Yanfly plugins are in the order recommended on http://yanfly.moe/yep/

Failing that, maybe list which plugins you're using? :kaoswt:
 

JtheDuelist

Your Friendly Nieghborhood Stygian Zinogre
Veteran
Joined
Dec 9, 2017
Messages
1,185
Reaction score
1,440
First Language
English
Primarily Uses
Other
@caethyril It just plays the animation as if it worked, but the buffs did not transfer. I have all my YEP plugins in the right order. and I haven't added new plugins (as all of the ones you said I needed I already had in the project). And when play testing, I always start from new save. And I always save before battle tests. I'm starting to wonder if I was supposed to replace the p's with something.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,089
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
@JtheDuelist ...OK, just realised that this was my fault, I somehow gave you something completely different to what you asked for. >_<

Try this one instead:
Code:
<Post-Damage Eval>
for (var p = 0; p < user.buffLength(); p++) {
  if (!user.isBuffAffected(p)) continue;
  if (user == target) continue;
  var t = Math.max(target._buffTurns[p], user._buffTurns[p]);
  for (var n = user.buff(p); n > 0; n--) {
    target.addBuff(p, t);
  }
}
</Post-Damage Eval>
This one ought to add the buffs as you wanted. The previous one made the target's buffs equal the user's buffs for some reason...sorry about that. :kaoslp:

Edit: oh, and you shouldn't need to replace anything, just copy+paste. :kaoswt:

Edit2: added a line to prevent the user from buffing themselves!
 
Last edited:

JtheDuelist

Your Friendly Nieghborhood Stygian Zinogre
Veteran
Joined
Dec 9, 2017
Messages
1,185
Reaction score
1,440
First Language
English
Primarily Uses
Other
@caethyril The skill still doesn't do as it should, even with the new notetags.
Here are my plugins.
Plugins1.png
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,089
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
Oh. Sorry, I'm not sure what might be going wrong then. I suspect it's a conflict somewhere, but I had a search through both Skill Core and Mog's plugins for relevant terms and couldn't find any likely-looking culprits. .-.

Unless someone has a better idea, my only suggestion at this point would be to try turning off various plugins to see if you can find which one is conflicting...
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,070
Members
137,577
Latest member
SadaSoda
Top