Jump to content

Battle Plugin - Enemy Name Text Color Based on Difficulty

Recommended Posts

I wasn't able to find this anywhere else or via Google. If I missed it, please let me know with the link. 

I think it will be something that everyone could use in their game. Basically, the idea would be to change the text color of the enemy name in battle based on their difficulty, whether it be based on level difference (as in Xenoblade Chronicles X, see below image) or another custom difficulty range. Because of how my game is set up, I have some enemies with say, level 39, but HP over 300,000. If I were to base difficulty on difference of player level vs. enemy level, it wouldn't match up due to HP and other stats. So i would need something where i can adjust each of the color ranges to identify, basically, the odds of survival for the player against any enemy. 

The scale would run from white (easiest) to red (extremely dangerous), again based on custom ranges that would be allowed through the plugin options, as well as color of each range. I think that this would be very useful to other game makers looking to distinguish battles from default ones and would also add an element of skill to the game. While I'm not too sure on programming, I feel that this would be doable. 

I know that HimeWorks has a Enemy Level plugin http://himeworks.com/2015/11/enemy-levels-mv/ and allows you to change the name color based on level only and does not adjust for varying degrees (static color). Yanfly has one as well http://yanfly.moe/2016/01/29/yep-64-enemy-levels/ . I'm using the Yanfly one, but what I'm looking for is a way to set up difficulty ranges and have corresponding enemy name colors. I have a formula that I am using to rate my enemies based on Level, HP, MP, ATK, DEF, etc, multiplied by a ratio of player level divided by 100. This could be adjustable depending on the values a creator would like to use. 

The plugin options would look something like this with 7 levels)

Easiest Difficulty Threshold (min value and max value, white color text)
Easy Difficulty Threshold
Dangerous Threshold

Easiest Name Color
Dangerous Color

Sample Pic from XBCX manual

If more detail is needed, please let me know. 

Thanks in advance.


Share this post

Link to post
Share on other sites

I'll make this simpler as I was reconsidering this system. All I need is a way to change the enemy name text color when selecting an enemy. I tried Victor's Control Text and it caused a severe lag with my system, even without using Yanfly's Core, Battle Core, and Message Core. Any help would be greatly appreciated. If you need a demo, please let me know. 

Share this post

Link to post
Share on other sites
12 hours ago, Shiggy said:

Thanks! The code makes sense to me, as far as I can tell with my very limited knowledge, however, it appears to be not working. I set the parameters in the plugin, along with the default formula, but the text color is not changing. In the screenshot below, the player is a level 1, while the enemy is at level 25. I should mention, and I apologize, that I am not using the DBS; I have it removing the enemy selection window, only the targeting text. Am I doing something wrong? 





Share this post

Link to post
Share on other sites

Sorry there was some error in the plugin, it wasn't reading parameters properly.
I fixed the script but it only works for the default enemy selection window. 
I amy be able to modify it for another pluging if you tell me which one makes the ennemy name appear.

Share this post

Link to post
Share on other sites

i want to say it's Yanfly's Battle Engine Core. Would a demo be helpful? One other thing. If possible, would it be feasible/easier to use notetags in the enemies' note section to set a specific difficulty value and have the color based on the value. For example, I have one enemy that has high HP, but only level 50. If the player were 99, then the enemy would be flagged as "easiest" (white) on the scale when in fact their difficulty value would be something like 10 or 11 (red). 

Edited by dragonx777

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.