Liquid Enemy Enmity

Liquidize

Caffeine Overload
Developer
Joined
Nov 1, 2015
Messages
466
Reaction score
459
First Language
English
Primarily Uses
RMMV
 

Liquid Enemy Enmity - v1.2
Liquidize


Introduction
This script is a plugin/addon for Yanfly's Battle Engine Core, and Yanfly's Battle AI Core plugins. It extends the two plugins to allow for MMO styled enmity/aggro tables against Actors and Enemies. With this plugin you will be able to have your skills add enmity against the user for the specified target(s). Based off that enmity if you so choose, you are able to use the Core Battle AI plugin to have the enemy target battlers with either the highest enmity or lowest enmity. This makes it so your game can sort of have tank classes, that have more aggro inducing abilities, similar to how some mmorpgs work.

Features
- Adds an enmity table to battlers.
- Adds additional note tags for Yanfly's Battle Engine to give or take enmity when using skills.
- Adds additional note tags for Yanfly's Battle AI Core to have enemies/actors attack targets with the most or least enmity against the battler.

- Adds additional note tags to give bonus enmity, bonus enmity rating, or to completely nullify enmity gain.

- Adds an Enmity Window to show the amount of enmity targets have against whom.

- Able to set the maximum amount of enmity possible.

- Able to set if negative enmity is possible.

How to Use
This plugin requires the user to be using both Yanfly's Battle Engine Core and Battle AI Core plugins. With those plugins install, simply place this plugin with the name Liquid_EnemyEnmity.js in the plugin folder and set the parameters to how you feel. The note tags for how to use the enmity can be found in the plugin help as well as proper usage.

 

Tutorial Video

https://www.youtube.com/watch?v=nsJOA0cq4oI

 

Screen Shots

 

 Enmity Window Explanation


 

 Window Without Explanation :p


Script (Version 1.2)
http://pastebin.com/98mBJQKK

FAQ

Q: What plugins are required for this?
A: Yanfly's BattleCoreEngine and Yanfly's Battle CoreAI. (YEP_BattleEngineCore.js and YEP_BattleAICore.js)

Change Log

 v1.01:

          - Fixed an issue which caused the enmity of a battler to be overwritten if enmity was generated against a battler on the same team.

 v1.1  :

          - Enmity is now reset when a battle ends.

          - No longer overwrites Yanflys functions. :)

          - Added An Enmity window (configurable) to show how much enmity targets have when selected. (Most Enmity (left) to Least Enmity (right))

          - Changed how enmity is stored.

          - Added <Enmity Rating: +/-x> note tag to give additional enmity rating. (Weapons,Items,Armors,Classes,States,Actors)

          - Added <Bonus Enmity: +/-x> note tag to give bonus enmity after calculation. (Weapons,Items,Armors,Classes,States,Actors)

          - Added <Null Enmity Gain> note tag to make it so the target doesn't gain enmity against the attacker. (Weapons,Items,Armors,Classes,States,Actors)

 v1.12:

          - Fixed a bug caused by me trying to not require overwriting some of Yanflys code. Their code still exists don't worry, it's just included in my modified function.

 v1.2  :

          - Fixed a bug that caused negative enmity to not be gained.

          - Added the ability to show or hide the enmity window.

          - Added the ability to /always/ show or hide the enmity window.

Credit and Thanks
- Liquidize
- Yanfly (for creating an awesome battle and ai engine!)

Terms of Use

Feel free to use this in commercial or non-commercial games, credit Liquidize or Liquid Engine please :) !

Notes:

The "Always Show Window" option isn't truly /always/ however it is much more frequently than without, and is only not shown when an actor is doing its actions.

Here is a faceicon set (48x48) for the default actors.

FaceIcons.png
 
Last edited by a moderator:

Liquidize

Caffeine Overload
Developer
Joined
Nov 1, 2015
Messages
466
Reaction score
459
First Language
English
Primarily Uses
RMMV
I've updated the script to version 1.1 (see top post). As well as added some screenshots to show/explain the enmity window that i've added!

Changes:

v1.1  :

          - Enmity is now reset when a battle ends.

          - No longer overwrites Yanflys functions.  :)

          - Added An Enmity window (configurable) to show how much enmity targets have when selected. (Most Enmity (left) to Least Enmity (right))

          - Changed how enmity is stored.

          - Added <Enmity Rating: +/-x> note tag to give additional enmity rating. (Weapons,Items,Armors,Classes,States,Actors)

          - Added <Bonus Enmity: +/-x> note tag to give bonus enmity after calculation. (Weapons,Items,Armors,Classes,States,Actors)

          - Added <Null Enmity Gain> note tag to make it so the target doesn't gain enmity against the attacker. (Weapons,Items,Armors,Classes,States,Actors)
 

Farr

Veteran
Veteran
Joined
Feb 16, 2014
Messages
247
Reaction score
92
First Language
Portuguese
MV scripts just keep getting better and better!

I love aggro on MMOs.
 

Liquidize

Caffeine Overload
Developer
Joined
Nov 1, 2015
Messages
466
Reaction score
459
First Language
English
Primarily Uses
RMMV
MV scripts just keep getting better and better!

I love aggro on MMOs.
If you happen to use it, and have any suggestions or request I'll what I can do :) .
 

Black Noise

Veteran
Veteran
Joined
Aug 23, 2012
Messages
94
Reaction score
18
First Language
English
Primarily Uses
RMMV
Hey. I got a problem.

While testing out your plug-in, the game got an error during battle which says

"Failed to load: img/system/faceicons.png"

Was it a file I should've had but somehow didn't or is it something I should custom make?

Edit: No wait! I checked out the plug-in and found the file can be designated in the parameters and the

default just happened to be "faceicons".

But scripting-wise, how does it work exactly? Does it correlate each face in the png file with each actor down the database's list or something?

And how do I tweak it?

Thanks.
 
Last edited by a moderator:

gokuby

Veteran
Veteran
Joined
Nov 2, 2015
Messages
96
Reaction score
14
First Language
German
Primarily Uses
N/A
Like this script, really cool aggro system!

Just got a problem with the face-icons.

I scaled the faces down, but somehow just the first one is listed for every party member...

faceicons.png
 
Last edited by a moderator:

Liquidize

Caffeine Overload
Developer
Joined
Nov 1, 2015
Messages
466
Reaction score
459
First Language
English
Primarily Uses
RMMV
Hey. I got a problem.

While testing out your plug-in, the game got an error during battle which says

"Failed to load: img/system/faceicons.png"

Was it a file I should've had but somehow didn't or is it something I should custom make?

Edit: No wait! I checked out the plug-in and found the file can be designated in the parameters and the

default just happened to be "faceicons".

But scripting-wise, how does it work exactly? Does it correlate each face in the png file with each actor down the database's list or something?

And how do I tweak it?

Thanks.
The faceicons file is just the default name, the one I have it set to for my own project. Because I personally found that the default size for icons of 32x32 to be a bit, blurry and undetailed. What it does is look for whatever file you name it, and then whatever the size of the Face Icons Width and Face Icons Height parameter are, will obtain that part of the icon sheet to use based off what you have the <battleIcon: x> notetag set too in the actors notes area. So for example,if the actor "Harold" has a battleIcon note tag value of 1, (<battleIcon:1>) it will open the icon sheet (again by default the file is system/faceicons.png) and will select the region of the file from 48 pixels in. It uses some algebra to figure out where to begin and where to end getting the icon. If you put <battleIcon:0> for example, it will start from the top left coordinate (0,0) of the icon sheet. The default Icon sheet can be found attached to this post (it uses custom faces from my game though not the default actors in the database) so you can play around with it and see how it works.  Sorry if it sounds confusing, I'll try to explain it better another time if need be.

Here is an image also explaining what I mean, each little box is 48x48 pixels (again; you can make yours larger or smaller). Then based off that the number inside is the ID you would use. 

http://puu.sh/lbGZO.png

How it works though is rather more simple, the notetag that you set is just the default face it uses, you can use events to change it by doing the following plugin command.

EnmityFace actorid faceidWhere actorid is the id of the actor in the database, and faceid is the id of the icon you want to use on the icon sheet (see above).

Hope that helps.

Edit: The reason it doesn't correlate down the database as you said (Nice idea though!) is because this way you can have a bit more control over it, instead of having to redo the iconsheet whenever you changed the actors up a bit.

@gokuby: We must've been typing at the same time haha, see this post for explanation.

I would leave the box for 0 blank, because the script uses "0" if no battleIcon is set. So it may get weird to have a different face for the actor than is intended. :p
 
Last edited by a moderator:

gokuby

Veteran
Veteran
Joined
Nov 2, 2015
Messages
96
Reaction score
14
First Language
German
Primarily Uses
N/A
ah, ok, could you write that in the help file as well, please, would prevent many questions, I guess^^

I got confused, too, cause I didn´t know what layout the alorithm is using and I haven't seen the notetag "<battleIcon:X>" either.
 

Liquidize

Caffeine Overload
Developer
Joined
Nov 1, 2015
Messages
466
Reaction score
459
First Language
English
Primarily Uses
RMMV
Ah yeah I see I did miss that in there, thanks for pointing it out!
 

Sol Rising

Veteran
Veteran
Joined
Oct 25, 2015
Messages
162
Reaction score
21
First Language
English
Will this work with Ellys tab plugin and yanfly provoke plugin?
 

gokuby

Veteran
Veteran
Joined
Nov 2, 2015
Messages
96
Reaction score
14
First Language
German
Primarily Uses
N/A
By the way, is it possible to set enmity based on the dmg dealt to the targets?

Maybe as an optional feature, if some like it the previous way.

So the highest dmg dealer gets the aggro, unless the tank "provokes" them?

That way it's easier for the player to figure out, who will have enmity, since he/she doesn't know the values of the skills.
 

Liquidize

Caffeine Overload
Developer
Joined
Nov 1, 2015
Messages
466
Reaction score
459
First Language
English
Primarily Uses
RMMV
By the way, is it possible to set enmity based on the dmg dealt to the targets?

Maybe as an optional feature, if some like it the previous way.

So the highest dmg dealer gets the aggro, unless the tank "provokes" them?

That way it's easier for the player to figure out, who will have enmity, since he/she doesn't know the values of the skills.
Do you mean just by the raw damage? So say if an actor does 1000 damage on a target, their Emnity is increased by 1000?
 

gokuby

Veteran
Veteran
Joined
Nov 2, 2015
Messages
96
Reaction score
14
First Language
German
Primarily Uses
N/A
yup, exactly.

These values should be influenced by <Enmity Rate: +/-X>.

Lets say, Magus casts Fireball and is dealing 1000 damage, but has the notetag <Enmity Rate: -0.8>, so he creates an enmity of 800.

Just a quick thought, would this calculate every damage?

I have a lot of action made with yanflys battle sequences, which deal like 2 times single targed dmg and the last strike is multitarged.

Don't know if that gets to complicated, tho...
 

Liquidize

Caffeine Overload
Developer
Joined
Nov 1, 2015
Messages
466
Reaction score
459
First Language
English
Primarily Uses
RMMV
It would calculate them If I did go a head and make this a feature yes, I can do this but it will be a day or two since I'm working on another plugin at the moment.
 

Roguedeus

It's never too late to procrastinate...
Veteran
Joined
Mar 19, 2013
Messages
532
Reaction score
107
First Language
English
Primarily Uses
N/A
This script looks like it will prove really useful. I was planning to write something similar with VXAce.

A few points of feedback:

- The plugin notes do not indicate how to setup the face images nor what note tags to use. (I had to double check here and find the references)

- In battle, the enemies target order does not appear until you switch the players current selected enemy somehow. (Anyone else experiencing this?)

I have not tested it in any complex party scenarios yet so I may have more feedback in the future. But I like what I am seeing so far!

Great job.
 

MakeAndCreate

Veteran
Veteran
Joined
Jul 3, 2014
Messages
39
Reaction score
3
First Language
English
Primarily Uses
Still not sure how this works.  So does the enmity cause the target to have enmity to the the one that afflicted them with it, or anyone with with the same level of enmity?  

Also my games don't use face icons.  Will that be a problem?  
 
Last edited by a moderator:

Liquidize

Caffeine Overload
Developer
Joined
Nov 1, 2015
Messages
466
Reaction score
459
First Language
English
Primarily Uses
RMMV
A few points of feedback:

- In battle, the enemies target order does not appear until you switch the players current selected enemy somehow. (Anyone else experiencing this?)
This will be fixed next update, I knew about it prior to releasing but figured the script was in a state where it was usable anyway. Thank you for reminding me though :)

 

Still not sure how this works.  So does the enmity cause the target to have enmity to the the one that afflicted them with it, or anyone with with the same level of enmity?  
 The enmity causes the one who uses the skill to have enmity gained against them. For example:

Actor 1 uses Spark on Enemy A.

Enemy A now gains enmity (IF the Skill has the Enmity tag, or the Actor has a Bonus Enmity tag on an equipment,state,etc) against them. And then depending on how you configure the enemies AI tags, will be more likely,or always likely to attack Actor 1.
 
Last edited by a moderator:

Sol Rising

Veteran
Veteran
Joined
Oct 25, 2015
Messages
162
Reaction score
21
First Language
English
This will be awesome if you can increase enemity based off of attacks skills/ damage and healing amount /skills
 

MakeAndCreate

Veteran
Veteran
Joined
Jul 3, 2014
Messages
39
Reaction score
3
First Language
English
Primarily Uses
Okay, but still want to be sure about the face icon question.  
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Hi, there.
I'm Creta Park, as Software engineer and Indie game developer.

Profile : creft.me/cretapark
GitHub : github.com/creta5164
Blog : creta5164.tumblr.com


My stuff

Who shares/sells their scripts/plugins on itch.io? Can I pick your brain?
If you ever need fantasy names and you're bored, make a fictional alphabet. Switch around the letters and see what you get :p
I JUST GOT PROMOTED TO 9TH GRADE BOIS!

Forum statistics

Threads
98,168
Messages
949,923
Members
129,455
Latest member
DeathByPiercing
Top