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
699
Reaction score
222
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
604
Reaction score
315
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

unknown.png

Making good progress with the second chapter. :)

Still work in progress.

(Real life, it is chronically the fourth chapter that I am making.)
constructionworkconcept.pngezgif-2-0acb620ecf8d.gifezgif-2-afeaf16ebb8d.gif "The Great Wall is great. But, most people can only be the slaves who built it, leaving their bones underneath that wall. They spent their whole life to build that wall and the empire, an empire that enslaves them." :kaoswt2: I'm just going to turn it into a modern-day sad tale.

No edits, just gameplay from one area to the next. Plus all my new shiny interface stuff... And I even remember to bolt down the portal so it won't escape this time. :kaopride:
You guys just freely offer up your Autonomy?
I don't know about you, but today the covid frustration is seriously getting to me. Haven't really seen many of my friends for two years, since i moved towns the year before this all started, and well, i miss them :(
so, here's a cute alpacaraptor sketch to heighten the mood:
W7Fhp9n.png

Forum statistics

Threads
110,660
Messages
1,055,027
Members
143,786
Latest member
Avigayil
Top