RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[RM2K/3] "Demi" Skill

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 84
puking up frothing vitriolic sarcastic spittle
To make this type of skill you are going to need:

- A "fake condition" that actually does nothing.
- A skill named "Demi" (rename it if you wish) that has a unique MP cost.
- Two variables ("Current MP" and "Dummy MP").

First, create a "fake condition" that can be inflicted on the enemy. This "fake condition" doesn't do anything to the enemy, runs out after one turn and doesn't have a name, giving the illusion that nothing was actually done. This "fake condition" allows us to determine which enemy is being targeted without having to change any of their stats - it is unnoticeable.

Secondly, create a skill that inflicts the "fake condition" on the enemy. Make a note of what "type" you set this skill up to be and make sure it is not set up to be "normal"-type as this will stop the skill working.

For the purpose of this tutorial, the "type" will be called "Active".

What is more important than the "type" is that the skill has a unique MP cost that no other skill uses as this MP change will be used to trigger the battle-events. I cannot overstate how important this is - no other skill can have this MP cost and no skill can decrease the hero's MP by this amount or else the skill will trigger when it hasn't actually been used!

For the purpose of this tutorial, the MP cost will be 7.

After setting up the skill, you need to create a battle-event that triggers on the very first turn of the battle. This event will be used to "zero" the MP variables we're going to be using. This event should be set up like this:



As you can see, the hero in this example is called Cheska. Swap this for the hero you are going to have casting the "Demi" spell in your game. Make sure you do not set the variables to the hero's maximum MP as this will prevent the skill from working - it has to be set to current MP.

The next battle-event you need to create will be triggered by the hero using the skill-type "Demi" is filed under. Remember how I said that "Demi" will be filed under "Active" for the purpose of this tutorial? Well, here is where this becomes important. This battle-event should look like this:



This basically does the same thing that the initial event does. It "zeroes" the variables that are used. The difference is that this triggers directly before the "Demi" skill will be cast, making sure that nothing should go wrong.

The final battle-event is the part that does damage. It needs to be set up to trigger when the hero's HP is between 1-100%. Why? Because this trigger is checked straight after a skill/attack is used and hence retains information on which enemy is being targeted. We need to know the target so we need the event to trigger at this time. This battle-event should look like this:



What is happening in this battle-event?

1) The "Dummy MP" value is set to whatever it is at the end of the character's turn.
2) If the "Dummy MP" value has changed it will be different to "Current MP" as that is still at the same value it was before the turn started. We can therefore check "Dummy MP" against "Current MP" to find out if a skill has been used.
3) If MP has changed, "Dummy MP" is subtracted from "Current MP". This will make "Current MP" equal the MP cost of the skill that was used.
4) If this MP cost is 7 (the cost of the "Demi" skill in this tutorial) then the targeted enemy is damaged by 50% of their current HP.
5) Both "Dummy MP" and "Current HP" are reset to the hero's current MP to prevent the damage being dealt repeatedly.

Make sense? Obviously, in this case there are only two enemy's present, you need to expand that to encompass all enemies in each enemy group. If you want to make it so bosses are invulnerable to "Demi" or take lesser damage then just change the 50% to something else when you come around to dealing damage to them.

Happy eventing!