RMMV Life steal, but adds to "user._successfulSteals += 1;" without stealing items.

villko05

Villager
Member
Joined
Jan 14, 2021
Messages
11
Reaction score
3
First Language
Islandic
Primarily Uses
RMMV
Hey,
I have this skill that steals life and I need to set it as a successful steal (value +1) because actors combo attack deals damage to the equivalent number of steals.
The issue is "<Steal>" tag because it also forces me to steal gold and show a message which I don't need.
Can anyone help me to set this skill to add "user._successfulSteals += 1" without stealing actual items/gold/and showing a message about the item steal?
I tried removing "<Steal>" but I guess it breaks entire "<Custom Steal Success Effect>".


Code:
<Steal>







<Custom Steal Success Effect>



// Create the count for the successful steals made.



user._successfulSteals = user._successfulSteals || 0;



// Increase the successful steals count.



user._successfulSteals += 1;



</Custom Steal Success Effect>







<HP Life Steal: 100%>

This is my entire skill notetag. Obviously using yanfly plugins.
Code:
<Cooldown: 10>

<Steal>

<Custom Steal Success Effect>
// Create the count for the successful steals made.
user._successfulSteals = user._successfulSteals || 0;
// Increase the successful steals count.
user._successfulSteals += 1;
</Custom Steal Success Effect>

<HP Life Steal: 100%>

<target action>
animation 1: target
wait: 28
action effect
wait: 28
animation 45: target
wait: 28
action effect
wait: 14
animation 43: target
</target action>

<Critical Rate Formula>
  rate = user.cri + 0.8;
  rate -= 1 - target.cev;
</Critical Rate Formula>

<before eval>
user.addState(31);
</before eval>

<after eval>
user.removeState(31);
</after eval>

This is my steal item skill, but I doubt you need this. Posting just in case.
Code:
<Cooldown: 3>

<Steal>

<Custom Steal Success Effect>
// Create the count for the successful steals made.
user._successfulSteals = user._successfulSteals || 0;
// Increase the successful steals count.
user._successfulSteals += 1;
</Custom Steal Success Effect>

<Before Eval>
var text = '<CENTER>';
if (!target._isItemStolen && target.isEnemy()) {
    var rate = [1.0] + 1 - target.hpRate();
    var items = [];
    for (var i = 0; i < target.enemy().dropItems.length; i++) {
        var dropItem = target.enemy().dropItems[i];
        if (dropItem.kind === 1) {
            items.push($dataItems[dropItem.dataId]);
        } else if (dropItem.kind === 2) {
            items.push($dataWeapons[dropItem.dataId]);
        } else if (dropItem.kind === 3) {
            items.push($dataArmors[dropItem.dataId]);
        }
    }
    if (Math.random() < rate && items.length > 0) {
        target._isItemStolen = true;
        SoundManager.playUseItem();
        var item = items[Math.floor(Math.random() * items.length)];
        $gameParty.gainItem(item);
       // text += 'Stole ' + item.name;
    } else {
       // text += 'Failed to steal';
    }
} else {
   // text += 'Already stolen'
}
// text += ' from ' + target.name() + '!';
//BattleManager.addText(text, 120);
</Before Eval>

<target action>
animation 42: target
wait: 144
action effect
wait: 44
</target action>

Ant this is a combo, also, I don't think you need this.
Code:
<Cooldown: 12>

<Action Cutin>

<Cannot Counter>

<Damage Formula>
// Get the number of successful steals from user.
var steals = user._successfulSteals || 0;
// Calculate the damage dealt.
value = ((steals+1) * ((a.atk + user.agi)*1.25)) / 2;
</Damage Formula>

<target action>
animation 48: target
wait: 28
action effect
</target action>

<Critical Rate Formula>
  rate = user.cri + 0.8;
  rate -= 1 - target.cev;
</Critical Rate Formula>

<before eval>
user.addState(29);
</before eval>

<after eval>
user.removeState(29);
</after eval>

Thank you!
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
661
Reaction score
283
First Language
english
Primarily Uses
RMMV
i assume your using yanfly steal/snatch plugin?
so you want this skill to not actually steal anything and not show any text?

you can remove the text through plugin parameters. just make the battle log parameters empty.
you can make the skill just never actually steal anything with the <Steal: -x%> tag.
but your count is based on steal success....

wouldnt it just be better to use buff/state core + action sequence's <setup action> for the state on any skills that can add to this counter

buff/state core is for
<Custom Confirm Effect>
code
</Custom Confirm Effect>
This effect will run when the battler connects a hit and before damage
execution occurs.

or
<Custom Establish Effect>
code
</Custom Establish Effect>
This effect will run when the battler connects a hit and after damage
execution occurs.
 

villko05

Villager
Member
Joined
Jan 14, 2021
Messages
11
Reaction score
3
First Language
Islandic
Primarily Uses
RMMV
i assume your using yanfly steal/snatch plugin?
so you want this skill to not actually steal anything and not show any text?

you can remove the text through plugin parameters. just make the battle log parameters empty.
you can make the skill just never actually steal anything with the <Steal: -x%> tag.
but your count is based on steal success....

wouldnt it just be better to use buff/state core + action sequence's <setup action> for the state on any skills that can add to this counter

buff/state core is for
<Custom Confirm Effect>
code
</Custom Confirm Effect>
This effect will run when the battler connects a hit and before damage
execution occurs.

or
<Custom Establish Effect>
code
</Custom Establish Effect>
This effect will run when the battler connects a hit and after damage
execution occurs.

<Custom Establish Effect>

// Create the count for the successful steals made.

user._successfulSteals = user._successfulSteals || 0;

// Increase the successful steals count.

user._successfulSteals += 1;

</Custom Establish Effect>

Doesn't add to the count. Am I doing something wrong?
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
661
Reaction score
283
First Language
english
Primarily Uses
RMMV

villko05

Villager
Member
Joined
Jan 14, 2021
Messages
11
Reaction score
3
First Language
Islandic
Primarily Uses
RMMV
im no good with the code parts myself. always need the forums help.

but heres 2 tips and tricks that both sound like what your trying to pull off.
http://www.yanfly.moe/wiki/Thievery_(MV_Plugin_Tips_&_Tricks)
http://www.yanfly.moe/wiki/Combo_Attack_(MV_Plugin_Tips_&_Tricks)

personally im still confused by the whole using steal to build the count up but not wanting it to steal.
It's because a character has 2 skills, one steals an item, another steals HP. The third skills use steal count to deal damage.
The issue is, I don't need Life Steal to steal items, but only to add to value so that combo deals more dmg.
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
661
Reaction score
283
First Language
english
Primarily Uses
RMMV
as said im not good with code. but isnt this part of you combo skill wrong?
<Damage Formula>
// Get the number of successful steals from user.
var steals = user._successfulSteals || 0;
// Calculate the damage dealt.
value = ((steals+1) * ((a.atk + user.agi)*1.25)) / 2;
</Damage Formula>

the var is only called steals not steals+1. dont you need a space there?
 
Last edited:

Latest Threads

Latest Profile Posts

unknown.png

A sketch of a character for an upcoming chapter. I am pre-preparing the heck out of this one and future chapters, don't want to spend time figuring the story out again. :blush:
Today *Fix the game UI
RMMZ maxRows make me tired.
The game supports real-time language switching (really interesting).
8laFKAa.png


jBYDFzZ.png


lYbvPth.png

mY99lgU.png

Swag collecting in the new randomly generated area. Now the mini map also shows the randomly generated features... And even illustrates the whole "bubble" system" that I made to manage memory... Though that part's inadvertent. We'll just call that "the fog of war"... Yes, that's what we'll do. Nobody will be the wiser! :kaopride:
not me being not lazy for 5 seconds and drawing another char portrait (her name is hazel)
its_hazel.png
Been a while since the last time I made a song remix. Had a blast making this

Forum statistics

Threads
110,458
Messages
1,053,473
Members
143,551
Latest member
AmberliaDraw
Top