I use LUK as a "fear" stat, and I'm hoping to control an enemy's action pattern based on its value. So, say there's an enemy with an initial value of 15 for their LUK stat. If LUK stays above 10, they're able to use the spells Water Gun and Bubblebeam. However, if their LUK goes lower than 10, they can only use Defense Curl. Is that possible in MV?
Define an enemy's action pattern based on their current stats
RPG Maker MV Supportit's possible, as LUK is param 7 I believe, so you have to target that start
to see if is >= 10 for attack A else it will be attack B.
I dont know lunatic code, but it's possible.
to see if is >= 10 for attack A else it will be attack B.
I dont know lunatic code, but it's possible.
I'll show you how I incorporated this in a boss battle I recently implemented:
$dataEnemies[409].actions.push({skillId: 906, rating: 5, conditionType: 2, conditionParam1: 0, conditionParam2: 0.5})
This adds to enemy 409's actions skill 906 at rating 5, with a condition of "hp" and values of 0 and 0.5 (0-50%).
The important thing to keep in mind here is that you *need* to remove the added actions afterwards, or they will persist if you load a different save file or restart the game.
If you have the YEP plugins, you should be able to use Battle AI for stuff like this.
$dataEnemies[409].actions.push({skillId: 906, rating: 5, conditionType: 2, conditionParam1: 0, conditionParam2: 0.5})
This adds to enemy 409's actions skill 906 at rating 5, with a condition of "hp" and values of 0 and 0.5 (0-50%).
The important thing to keep in mind here is that you *need* to remove the added actions afterwards, or they will persist if you load a different save file or restart the game.
If you have the YEP plugins, you should be able to use Battle AI for stuff like this.
Thank you!
I do have YEP_BattleAI, but I'm yet to play around with the plugin. I'll give it a go before I try your approach, since it seems more complex than what a YEP plugin would offer. Thank you so much!
Hmm... the gamer in me is wondering if there's some way I could time it perfectly where I reset the game after the actions are added but before they're removed and break the game in some way. 😀
Yeah, that's my natural instinct when I play things.
Original thread: https://forums.rpgmakerweb.com/threads/define-an-enemys-action-pattern-based-on-their-current-stats.167611/