Instant Death skill against specific-enemy types / Quest available after specific items were sold?

LucaP

Villager
Member
Joined
Apr 4, 2018
Messages
5
Reaction score
0
First Language
German
Primarily Uses
RMMV
Hello I'm looking for help to get 2 features work in my game:

1.
Is there a way to create a spell that can 'Instant Kill' certain enemy types.
For example a spell that kills all undead enemies?
--

2.
How can I make certain Quests available only after specific items have been sold to merchants?

Thank you very much for any help.
 

JamesRyan

Game Designer
Veteran
Joined
Sep 13, 2014
Messages
704
Reaction score
224
First Language
Vietnamese
Primarily Uses
RMMV
1. If you are used to using plugins, i think using Yanfly Skill Core and NeMW Tag should be good.
- Yanfly's Skill Core: http://yanfly.moe/2015/10/13/yep-8-skill-core/
- NeMW Tag: https://forums.rpgmakerweb.com/index.php?threads/nemv-tags.59536/

NeMW Tag plugin provides you a way to tag an object and make use of it. For your example, a skill which instantly kills an undead.
- Put a note tag on an enemy's note box to tag it as an undead:
Code:
<Tags: Undead>
- In your skill note box, write this:
Code:
<Pre-Damage Eval>
//check if target is has Undead tag, which is an undead
if (target.hasTag("Undead")){
//set its HP to 0 to instantly kill it
target.setHp(0);}
</Pre-Damage Eval>

2. I don't have an answer for your second feature, so maybe someone else can help.
 

Another Fen

Veteran
Veteran
Joined
Jan 23, 2013
Messages
606
Reaction score
318
First Language
German
Primarily Uses
Hi there,

The easiest solution would probably be to write plugins for those features, but apart from that you could also implement them like this:

1.
I'm assuming you want this kind of effect for different types or states, so you can't just give your non-undead enemies a "State Rate: Death 0%" trait to make an undead-killing skill uneffective.
To make a battler type vulnerable to a state only if the battler has a specific trait you can add a layer of temporary help states:
- Create a new state with no icon or text (let's call it "Undead Death Blocker") and give it the "State Rate: Death 0%" trait.
- Make your undead enemies immune to that new state
- Your undead-killing spell can now: "Add State: Undead Death Blocker 1000%" "Add State: Death 100%" "Remove State: Undead Death Blocker"

This should make sure any non-undead enemy can't be affected by death during the Death Blocker window. The only problem is that enemies with at least 901 more LUK than your attacker can still resist the Death Blocker state, so I just hope this doesn't apply to your project. If it does you probably still need a plugin (either for the feature or to change the LUK effect calculation).

Edit: Too slow. Using a plugin should be an easier solution anyways. =)

2.
Assuming your merchants don't sell said item themselves you can always compare how many items your party had before and after the shop menu:
- Save the number of items in a variable
- Open the shop menu
- Subtract the number of items from the variable above
- Add the result to another variable that stores your total sales

Depending on the number of merchants I'd highly recommend using 2 common events for the parts before and after the shop processing in case you want to extend or change it.

If you prefer a plugin for this feature I'd have to see what I can do later today.
 
Last edited:

LucaP

Villager
Member
Joined
Apr 4, 2018
Messages
5
Reaction score
0
First Language
German
Primarily Uses
RMMV
Thank you very much for you answers.
 

BishoujoHelper

Veteran
Veteran
Joined
May 6, 2017
Messages
54
Reaction score
46
First Language
English
Primarily Uses
RMMV
Another possibility for answering #1, as I've done this already with a "Dispel Illusions" spell:
  • Create State #31 (change # in skill below too if yours is different) "IsUndead", doesn't need an icon and has no Restrictions.
  • Create Skill that does HP damage. Make the skill "Hit Type" (Invocation section) be "Certain Hit" and Success be 100% if it always works on this type of enemy. In the damage formula box put
    Code:
    if (b.isStateAffected(31)) {b.die();9999;} else {0;}
    The "b.die()" in the damage formula will kill the enemy but not show any damage (IIRC), so the 9999 makes sure it visibly loses all HP. The other enemies that are immune to this will show a "0" damage when it goes off. I think you could change the killing portion to add the Knockout state instead, but I went with what's shown.
  • In the Troops that include this type of enemy, have a page with Span: Battle so it runs only at the beginning. For each enemy in the Troop that it applies to, add a line like:
    Code:
    Change Enemy State: #1 Skeleton, + IsUndead
    and there's even a way to apply it to all enemies in the troop with one command. It's on the 3rd tab of event commands "Change Enemy State".
 

Latest Threads

Latest Posts

Latest Profile Posts

After gathering, sorting out & reconsidering hundreds of enemy battlers over the last two das, finally my favorite part begins: Inventing names and lore for them all :D
I'm running a sale for Learn RPG Maker MV on Itch.io, can I compete with NSFW games earning goals?
Another Friday and another Zoom call that could have been an email. Working from home is awesome.
Finished with the semester; finally have some time to play around with MV :kaopride:
Started work on the fishing Mini-Game

Forum statistics

Threads
111,361
Messages
1,060,485
Members
144,689
Latest member
Toonfreak
Top