Hello,
I am using RPG Maker MV.
I am still learn javascript and I do need a lot of work.
But, I have learnt some pieces of code that I have used such as
$gameParty.members()[1].atk to call upon the stats of a party member
$gameActors.actor(1).atk calls upon the actor stat by ID.
Using a formula int he notetag for pretty much any plug in require use of javascript.
value = formula
a.gainMp(x)
With this I can make a skill to target a player and then give mana back (or take mana off if negative) the user. I am not sure if there is another way to take mana off or using a negative number here is the primary way.
Anyway, my question is how would I learn more of these types of code that are specific to RPG Maker MV that calls uopn various things.
I have some specific questions that I would appreciate any answer to, but I would also appreciate any help in finding out how to answer these questions myself.
I would like to use the mana cost (or tp cost) of the skill I am using in the formula. For example I would maybe like a spell to return 50% of the mana cost after it has cast. I'm not sure what the x should be int he following.
a.gainMp(0.5*x)
Another specific question I have is can I target a random enemy with a skill that already has a target and user that is not that enemy. Like I want to heal an actor (b), return mana to the user (a), and then deal damage to a random enemy
I'd create a heal skill and the notetag would use the following to heal an actor for 1,000 HP, the user would gain 50 MP, and a random enemy is dealt 100 HP damage. I know that "randomenemy.gain Hp" is wrong. But, what is the correct way?
[I am able to create a common event that forces the use of a second attack to attack an enemy, but I am not looking to use that workaround - I want to call upon "value" (the amount healed) as a variable in my damage formula]
value = 1000
a.gainMp(50)
randomenemy.gain Hp(-100)
Also I have written some code that I can't seem to get working. If someone could take a look, that would be awesome.
[essentially, I want it to damage to a random enemy by the amount it over heals - but, I don't want it to heal the enemy when it doesn't over heal any]
(if ((value - (target.mhp - target.hp)) >= 0) { (value - (target.mhp - target.hp)); } else { 0;} )
Thanks in advance for any help.
I am using RPG Maker MV.
I am still learn javascript and I do need a lot of work.
But, I have learnt some pieces of code that I have used such as
$gameParty.members()[1].atk to call upon the stats of a party member
$gameActors.actor(1).atk calls upon the actor stat by ID.
Using a formula int he notetag for pretty much any plug in require use of javascript.
value = formula
a.gainMp(x)
With this I can make a skill to target a player and then give mana back (or take mana off if negative) the user. I am not sure if there is another way to take mana off or using a negative number here is the primary way.
Anyway, my question is how would I learn more of these types of code that are specific to RPG Maker MV that calls uopn various things.
I have some specific questions that I would appreciate any answer to, but I would also appreciate any help in finding out how to answer these questions myself.
I would like to use the mana cost (or tp cost) of the skill I am using in the formula. For example I would maybe like a spell to return 50% of the mana cost after it has cast. I'm not sure what the x should be int he following.
a.gainMp(0.5*x)
Another specific question I have is can I target a random enemy with a skill that already has a target and user that is not that enemy. Like I want to heal an actor (b), return mana to the user (a), and then deal damage to a random enemy
I'd create a heal skill and the notetag would use the following to heal an actor for 1,000 HP, the user would gain 50 MP, and a random enemy is dealt 100 HP damage. I know that "randomenemy.gain Hp" is wrong. But, what is the correct way?
[I am able to create a common event that forces the use of a second attack to attack an enemy, but I am not looking to use that workaround - I want to call upon "value" (the amount healed) as a variable in my damage formula]
value = 1000
a.gainMp(50)
randomenemy.gain Hp(-100)
Also I have written some code that I can't seem to get working. If someone could take a look, that would be awesome.
[essentially, I want it to damage to a random enemy by the amount it over heals - but, I don't want it to heal the enemy when it doesn't over heal any]
(if ((value - (target.mhp - target.hp)) >= 0) { (value - (target.mhp - target.hp)); } else { 0;} )
Thanks in advance for any help.