[RMMV] ANY "TALK" COMMAND PLUGINS?

Posts

Pages: 1
I think the title is kinda self-explanatory.

I'm wondering if there are any plugins that allow for you to talk to the enemy in battle instead of fighting them, I imagine talking to them and winning peacefully wouldn't give you as much EXP, but it could give you other rewards, like more money, a better item or, if you're really successful at negotiating with the enemy, they'd join you and grant new skills, a la Persona 5.

There probably isn't a plugin that does specifically all that, but I don't exactly know JavaScript (or any programming, for that matter) so I'd say I'm in a situation of "any port in a storm", like, I'll use the closest there is, if there's not exactly what I want.
Have you considered doing this with skills and common events?

You've probably seen the default database has skill types "Special" and "Magic".
You could add "Talk" as another category, and a "skill" for each approach you might take. (For the sake of argument: persuade, intimidate, charm and fast-talk).

Each of those skills can call a common event that displays speech windows or whatever you want. If the approach is successful, use the "end battle" event command to immediately end the fight.
I mean, sure, but then there's the issue that I maybe want different enemies to have, like, different traits and ways of talking, not one unique to every single enemy, that'd be way too ambitious even for me.

Okay, so, maybe not a plugin that makes it simpler to add a talk command or that just does the work (the latter is probably impossible) how about this instead:
A plugin that allows you to add a notetag to an enemy and make it a specific type of enemy, like, for example, a "Beast" enemy or a "Gentle" enemy, and then you could use a plugin command or script call with a conditional branch to check for what type that enemy has, and thus give you unique dialogue and options that can lead to you getting the rewards, from money to a new pseudo-party-member*

I.E.: A Beast enemy would like it if you weren't a wuss and acted tough like them, while a Gentle enemy would prefer it if you asked nicely for whatever you want.

That's probably still a bit complex and specific, but it's a step somewhere, i'd say, whether that somewhere is backwards or forwards is debatable, I guess

*"pseudo" because they wouldn't be an actor, I had a different idea for how the monster recruiting would work, involving a unique armor type
MV does basic notetags for you, if you were to write <type:beast>, then scripts can access that as object.meta.type (press F12 in test play and look around in the javascript console)

You might be designing a "social combat", where you're simply attacking a different type of hit points through talking. You could ~maybe~ use elemental resistances to setup how susceptible each enemy is to different approaches in that case.
Have a look at Yanfly's battle plugins, I know there's a "barrier points" one, and might be there is one for defining your own health bars.

If your game doesn't use MP for enemies, you could just use MP as the hit points to attack with social combat. Change the name to "resolve" or "morale" or something that makes sense for your game.

You would need to check in your skill's common event or a battle event whether to eliminate an enemy by MP exhaustion.

Alternatively if you wanted a dice roll chance of success, common events could do it.

Damage formulas in skills are actually tiny scripts, so you can do funky things there.
a.atk - (b.meta.type=="beast" ? 1 : 4) * b.def
(disclaimer: not tested)
I had absolutely no idea that was, like, a default thing.
Oops

But how would I use a script call to check for the "object.meta.type"? Like I said, I'm no good with JavaScript or any programming language, so, I need this sort of basic help
I've prototyped some of this using Yanfly's "skill core" plugin.

First let's look at our basic social combat skill "Intimidate".
The damage formula is "a.mat * 2 - b.mdf", which is one of the default settings.
The Type is "MP damage", and the element is "Intimidate"
(This way, enemies can be made more or less resistant by setting their element rate, the same as fire resistance in ordinary combat)

In the notes, I have these tags:
<Post-Damage Eval>

v[1]=Math.floor(100*b.mp/b.mmp);
if(b.mp <= 0) {
b.addState(b.deathStateId())
}
</After Eval>


What does this do?
The "post-damage eval" gets run after applying damage.
First set variable number 1 to the enemy's percentage of remaining MP. This will be used in the skill's common event to choose a response to show.
Then defeat the enemy by adding their death state if they have no MP remaining.

The common event part:
◆If:#0001 ≥ 80
◆Text:None, Window, Top
: :Keep talking, fool\.\>
◆Exit Event Processing

:End
◆If:#0001 ≥ 50
◆Text:None, Window, Top
: :More than me jobsworth, mate\.\>
◆Exit Event Processing

:End
◆If:#0001 ≥ 25
◆Text:None, Window, Top
: :I see where you're coming from, but\.\>
◆Exit Event Processing

:End
◆If:#0001 ≥ 1
◆Text:None, Window, Top
: :You have a good point\.\>
◆Exit Event Processing

:End

This just shows a message window with a different message depending on the remaining MP (from variable #1)

Next, a skill that uses notetags on the enemy.
This one is called "A favour", and only works on guards. Perhaps it could be a consumable item instead.

The skill note tags are the same as Intimidate.
The damage formula is changes to be this mini script:
b.isEnemy() && b.enemy().meta.type == "guard" ? 9999 : 0


If b (the target) is an enemy (in battle everything is either an Actor or an Enemy)
AND b (the target)'s enemy() object in the database has "type" metadata equal to the string "guard"
THEN do 9999 damage
ELSE do 0 damage

In the database, all guards have <type:guard> in their notetag.

All right, understood.
With all that out of the way, I'd need a way to do the enemy recruiting, and I intended on doing that by having a special armor type called, let's say, "Monster"

There would be a "Monster" equip for basically every non-boss enemy and all of them would grant you a different set of skills. For example, if you wanted to go into an ice dungeon prepared, you'd equip a monster that has ice resistance and fire-based skills, and if the dungeon is full of ghosts, you'd get a monster that allows you to resist a state called, I dunno, "Haunted" so that you have less trouble.

So, using these methods, how would the pacifist rewards be given to the player?
Also, I mentioned "less EXP" earlier, but I don't think that's possible, so, skipping that one entirely, I suppose.
For this, you want some kind of conditional loot plugin.
e.g. http://yanfly.moe/2015/12/19/yep-47-extra-enemy-drops/

(You could use the "change armors" event command, but that would mean writing loads of conditional branches)

Adjusting the EXP reward would be possible with a plugin too.
Pages: 1