Brother_Fox

Villager
Member
Joined
Feb 18, 2021
Messages
12
Reaction score
3
First Language
Russian
Primarily Uses
RMMV
Good day. Can you tell me if there are detailed instructions for use where SRPG_AIControl? The description in the plugin is not enough for me to understand its work. Thank you.
 

e463gx

Veteran
Veteran
Joined
Sep 26, 2013
Messages
48
Reaction score
14
Primarily Uses
What's the script call for the actor level in battle? I'm trying to use Yanfly's enemyparameters to customize the experience table but can't seem to pull the actor's level.

I've tried:
  • $gameParty.battleMembers()[0].level - which keeps returning 1, even if the actor's level is higher
  • $gameParty.highestLevelBattleMembers() - returns 1 as well
  • $gameParty.highestLevelAllMembers() - Returns highest level of all actors (as intended)
  • actor.level - doesn't do anything
  • this._level - which returns the enemy's level
 
Last edited:

boomy

Veteran
Veteran
Joined
Jan 6, 2013
Messages
177
Reaction score
149
First Language
English
Primarily Uses
RMMV
What's the script call for the actor level in battle? I'm trying to use Yanfly's enemyparameters to customize the experience table but can't seem to pull the actor's level.

I've tried:
  • $gameParty.battleMembers()[0].level - which keeps returning 1, even if the actor's level is higher
  • $gameParty.highestLevelBattleMembers() - returns 1 as well
  • $gameParty.highestLevelAllMembers() - Returns highest level of all actors (as intended)
  • actor.level - doesn't do anything
  • this._level - which returns the enemy's level
Does $gameParty.members()[0].level work?
Otherwise it might be because srpg_core.js pulls level data from a notetag (though this only applies to enemies)
 

MetalKing11417

Veteran
Veteran
Joined
Jul 7, 2018
Messages
129
Reaction score
85
First Language
english
Primarily Uses
RMMV
(a.atk - b.def) / (Math.abs($gamePlayer.posX()- b.event().posX()) + Math.abs($gamePlayer.posY() - b.event().posY()))

Try that instead. $gameTemp.showArea() uses $gamePlayer.posX() and posY() functions to determine the center of the AoE
Are there any notetags or plugins I should be aware of that should be inserted into the skill?
Because it is throwing up an infinite damage error.
Damage gradiant error.png
Your distance from caster one on the other hand, works well.
 

boomy

Veteran
Veteran
Joined
Jan 6, 2013
Messages
177
Reaction score
149
First Language
English
Primarily Uses
RMMV
Are there any notetags or plugins I should be aware of that should be inserted into the skill?
Because it is throwing up an infinite damage error.
View attachment 191144
Your distance from caster one on the other hand, works well.

Make sure SRPG_PositionEffects.js is in your plugin library as that grants the user.event() (or target.event()) function
 

Reanimunculus

Villager
Member
Joined
May 9, 2013
Messages
27
Reaction score
4
First Language
English
Primarily Uses
2 things

1) Is there a way to make an AoE attack play its animation only once in sideview instead of replaying on every character within the AoE without using map battle? I'm using yanflys sideview battlers and they arent compatible with the dynamic action plugin, so I can't use map battle.

2) is there a way to set enemy levels to scale to the player levels, i have yanflys enemy levels script but srpg engine uses its own note tags to determine levels since it doesnt use the troop system.
 

NatePlays

Veteran
Veteran
Joined
Dec 12, 2018
Messages
82
Reaction score
49
First Language
English
Primarily Uses
RMMV
2 things

1) Is there a way to make an AoE attack play its animation only once in sideview instead of replaying on every character within the AoE without using map battle? I'm using yanflys sideview battlers and they arent compatible with the dynamic action plugin, so I can't use map battle.

2) is there a way to set enemy levels to scale to the player levels, i have yanflys enemy levels script but srpg engine uses its own note tags to determine levels since it doesnt use the troop system.
1) Don't think so, as even the map battle calls the 'action' to every enemy (as seen by the camera pan and by each enemy dying separately), even if the animation only plays once.
I don't think it is very clear either, as it would only pick the first enemy to show counterattack animations, skipping others (if your unit was killed by a counter from an enemy that wasn't animated, it would feel cheap).
There's a reason Fire Emblem doesn't have AoEs in the 'real battle'.
(also, both Hime and Victor have plugins for sideview enemies, if you still want those to show up with Dynamic plugins)

I'm waiting on 2) as well; There's no reason for unit.srpgLevel to be a dummy; I'd personally change it to unit.level in the core plugin as to be compatible with every other plugin using enemy levels, and will eventually do so whenever I tackle huds (will take a long while).



Still on the topic of enemy levels, I'm figuring out what mechanics I can and can't do with this plugin (writing a design doc), and so I ask: can I spawn (or change right before player phase 1) enemies with predetermined levels without making separate enemy entries?

For example, on easy difficulty (set in variable), I want some level 1-3 mercenaries, a level 4 knight and two level 3 cavaliers; On hard difficulty, I want those to be level 3-5 mercenaries, a level 6 knight and two level 4 cavaliers.

As the <level> tag is a dummy, can I change the actual levels with script calls? The rest of the logic, like difficulty and getting the party level, can be left to events/scripts from myself.
 

MetalKing11417

Veteran
Veteran
Joined
Jul 7, 2018
Messages
129
Reaction score
85
First Language
english
Primarily Uses
RMMV
1) Don't think so, as even the map battle calls the 'action' to every enemy (as seen by the camera pan and by each enemy dying separately), even if the animation only plays once.
I don't think it is very clear either, as it would only pick the first enemy to show counterattack animations, skipping others (if your unit was killed by a counter from an enemy that wasn't animated, it would feel cheap).
There's a reason Fire Emblem doesn't have AoEs in the 'real battle'.
(also, both Hime and Victor have plugins for sideview enemies, if you still want those to show up with Dynamic plugins)

I'm waiting on 2) as well; There's no reason for unit.srpgLevel to be a dummy; I'd personally change it to unit.level in the core plugin as to be compatible with every other plugin using enemy levels, and will eventually do so whenever I tackle huds (will take a long while).



Still on the topic of enemy levels, I'm figuring out what mechanics I can and can't do with this plugin (writing a design doc), and so I ask: can I spawn (or change right before player phase 1) enemies with predetermined levels without making separate enemy entries?

For example, on easy difficulty (set in variable), I want some level 1-3 mercenaries, a level 4 knight and two level 3 cavaliers; On hard difficulty, I want those to be level 3-5 mercenaries, a level 6 knight and two level 4 cavaliers.

As the <level> tag is a dummy, can I change the actual levels with script calls? The rest of the logic, like difficulty and getting the party level, can be left to events/scripts from myself.
On the AOE thing- I personally think it would be a good idea to make it so that when an AOE skill occurs, all units involved (or at least as many as are allowed before a new instance is needed) are brought into a battle instance at once at predetermined locations on screen to save time.
 
Last edited:

Shoukang

Veteran
Veteran
Joined
Jan 28, 2021
Messages
64
Reaction score
77
First Language
Chinese
Primarily Uses
RMMV
Are there any notetags or plugins I should be aware of that should be inserted into the skill?
Because it is throwing up an infinite damage error.
View attachment 191144
Your distance from caster one on the other hand, works well.
If your Aoe center and target overlap, the distance wil lbe 0. Divide somthing by 0 will give an infinite number
 

Reanimunculus

Villager
Member
Joined
May 9, 2013
Messages
27
Reaction score
4
First Language
English
Primarily Uses
1) Don't think so, as even the map battle calls the 'action' to every enemy (as seen by the camera pan and by each enemy dying separately), even if the animation only plays once.
I don't think it is very clear either, as it would only pick the first enemy to show counterattack animations, skipping others (if your unit was killed by a counter from an enemy that wasn't animated, it would feel cheap).
There's a reason Fire Emblem doesn't have AoEs in the 'real battle'.
(also, both Hime and Victor have plugins for sideview enemies, if you still want those to show up with Dynamic plugins)

I'm waiting on 2) as well; There's no reason for unit.srpgLevel to be a dummy; I'd personally change it to unit.level in the core plugin as to be compatible with every other plugin using enemy levels, and will eventually do so whenever I tackle huds (will take a long while).



Still on the topic of enemy levels, I'm figuring out what mechanics I can and can't do with this plugin (writing a design doc), and so I ask: can I spawn (or change right before player phase 1) enemies with predetermined levels without making separate enemy entries?

For example, on easy difficulty (set in variable), I want some level 1-3 mercenaries, a level 4 knight and two level 3 cavaliers; On hard difficulty, I want those to be level 3-5 mercenaries, a level 6 knight and two level 4 cavaliers.

As the <level> tag is a dummy, can I change the actual levels with script calls? The rest of the logic, like difficulty and getting the party level, can be left to events/scripts from myself.
Does Hime or Victor's work with dynamic motion and yanflys action sequence? For some reason yanfly's throws an error with the NRP Dynamic Motion plugins, I posted it earlier but didnt get a response so I just turned off all the Dynamic motion plugins.
 

NatePlays

Veteran
Veteran
Joined
Dec 12, 2018
Messages
82
Reaction score
49
First Language
English
Primarily Uses
RMMV
Does Hime or Victor's work with dynamic motion and yanflys action sequence? For some reason yanfly's throws an error with the NRP Dynamic Motion plugins, I posted it earlier but didnt get a response so I just turned off all the Dynamic motion plugins.
(I experimented with Hime's and, although it was working, characters weren't facing the right way after an attack, the origin points were broken; If you want to use it, you need EquipSlotCore, EnemyEquip, AnimatedSVEnemy and AnimatedSVEnemyWeapons)

Ok, I found an alternative. It seems Sunagawa (the one behind DAction) has made a plugin to use Rexal's animated enemies in Dynamic Motions; tested and they work fine enough. I'll attach both here, you should use them below all DAction plugins
 

Attachments

  • plugins.zip
    10 KB · Views: 11

Reanimunculus

Villager
Member
Joined
May 9, 2013
Messages
27
Reaction score
4
First Language
English
Primarily Uses
(I experimented with Hime's and, although it was working, characters weren't facing the right way after an attack, the origin points were broken; If you want to use it, you need EquipSlotCore, EnemyEquip, AnimatedSVEnemy and AnimatedSVEnemyWeapons)

Ok, I found an alternative. It seems Sunagawa (the one behind DAction) has made a plugin to use Rexal's animated enemies in Dynamic Motions; tested and they work fine enough. I'll attach both here, you should use them below all DAction plugins
sweet, thanks for going through the trouble, friend.
 

MetalKing11417

Veteran
Veteran
Joined
Jul 7, 2018
Messages
129
Reaction score
85
First Language
english
Primarily Uses
RMMV
If your Aoe center and target overlap, the distance wil lbe 0. Divide somthing by 0 will give an infinite number
So he forgot to put a + 1 at the end?
So this:
(a.atk - b.def) / (Math.abs($gamePlayer.posX()- b.event().posX()) + Math.abs($gamePlayer.posY() - b.event().posY()) + 1)
OK that works.
 

boomy

Veteran
Veteran
Joined
Jan 6, 2013
Messages
177
Reaction score
149
First Language
English
Primarily Uses
RMMV
1) Don't think so, as even the map battle calls the 'action' to every enemy (as seen by the camera pan and by each enemy dying separately), even if the animation only plays once.
I don't think it is very clear either, as it would only pick the first enemy to show counterattack animations, skipping others (if your unit was killed by a counter from an enemy that wasn't animated, it would feel cheap).
There's a reason Fire Emblem doesn't have AoEs in the 'real battle'.
(also, both Hime and Victor have plugins for sideview enemies, if you still want those to show up with Dynamic plugins)

I'm waiting on 2) as well; There's no reason for unit.srpgLevel to be a dummy; I'd personally change it to unit.level in the core plugin as to be compatible with every other plugin using enemy levels, and will eventually do so whenever I tackle huds (will take a long while).



Still on the topic of enemy levels, I'm figuring out what mechanics I can and can't do with this plugin (writing a design doc), and so I ask: can I spawn (or change right before player phase 1) enemies with predetermined levels without making separate enemy entries?

For example, on easy difficulty (set in variable), I want some level 1-3 mercenaries, a level 4 knight and two level 3 cavaliers; On hard difficulty, I want those to be level 3-5 mercenaries, a level 6 knight and two level 4 cavaliers.

As the <level> tag is a dummy, can I change the actual levels with script calls? The rest of the logic, like difficulty and getting the party level, can be left to events/scripts from myself.
Right after a SRPGBattle Start plugin command you could use the following script code:

Code:
var i;
var array = [];
for (i = 0; i < $gameSystem._EventToUnit.length; i++) {
    if (typeof $gameSystem._EventToUnit[i] !== 'undefined') {
        if ($gameSystem._EventToUnit[i] !== null) {
            if ($gameSystem._EventToUnit[i][0] == "enemy") {
                array.push($gameSystem._EventToUnit[i][1]);
            }
        }
    }
}
for (var j = 0; j < array.length; j++) {
    array[j].changeLevel(4 + Math.floor(Math.random() * 2));
}

Assumes Yanfly enemy level script is present + base param control
This will set ALL enemy levels to 4 - 5
 

Brother_Fox

Villager
Member
Joined
Feb 18, 2021
Messages
12
Reaction score
3
First Language
Russian
Primarily Uses
RMMV
Good day. I'm trying to figure out how SRPG_AIControl works. The script contains target formulas and move formulas. If everything is clear with the first ones, then I cannot figure out the move formulas.
Tell me with an example, what am I doing wrong?

the formula itself is in the enemy's comment:
<aiMove: a.hpRate ()> 0.5? nearestOpponent: nearestFlag ['heal']>

<aiFlag: heal> - is in the comment of the event.

In theory, as soon as the enemy takes more than 50% of the damage, he should run back to the flag, but he does not run away. What am I doing wrong?
 

boomy

Veteran
Veteran
Joined
Jan 6, 2013
Messages
177
Reaction score
149
First Language
English
Primarily Uses
RMMV
2 things

1) Is there a way to make an AoE attack play its animation only once in sideview instead of replaying on every character within the AoE without using map battle? I'm using yanflys sideview battlers and they arent compatible with the dynamic action plugin, so I can't use map battle.

2) is there a way to set enemy levels to scale to the player levels, i have yanflys enemy levels script but srpg engine uses its own note tags to determine levels since it doesnt use the troop system.
I decided to make a script to encorporate AoE attacks into the game with sideview battles (fire emblem style) and so far this is the result:
WIP.gif

It's super hacky at the moment with a few limitations that I probably won't be able to fix:
1. counter attacks only occur with the "primary target" so I recommend AoE skills be <uncounterable>
2. The battle HUD is weird and will probably be removed for the target party
3. Requires srpg_core.js modification (aka Dopan's version) that allows enemies to be moved based on their index

I'm running a modified version of srpg_core.js so I will have to rewrite a lot of things to make it work as a standalone script.
 

NatePlays

Veteran
Veteran
Joined
Dec 12, 2018
Messages
82
Reaction score
49
First Language
English
Primarily Uses
RMMV
Right after a SRPGBattle Start plugin command you could use the following script code:

Code:
var i;
var array = [];
for (i = 0; i < $gameSystem._EventToUnit.length; i++) {
    if (typeof $gameSystem._EventToUnit[i] !== 'undefined') {
        if ($gameSystem._EventToUnit[i] !== null) {
            if ($gameSystem._EventToUnit[i][0] == "enemy") {
                array.push($gameSystem._EventToUnit[i][1]);
            }
        }
    }
}
for (var j = 0; j < array.length; j++) {
    array[j].changeLevel(4 + Math.floor(Math.random() * 2));
}

Assumes Yanfly enemy level script is present + base param control
This will set ALL enemy levels to 4 - 5
Thanks! I see you took precautions to only add Enemy events, so it works perfectly.
I did some experiments in the console and it seems I have access to a lot of fields from these enemies, so I tried to write my own layout for the stage, on the <battleStart> event:
JavaScript:
var i; var j; var array = [];
for (i = 0; i < $gameSystem._EventToUnit.length; i++) {
    if (typeof $gameSystem._EventToUnit[i] !== 'undefined') {
        if ($gameSystem._EventToUnit[i] !== null) {
            if ($gameSystem._EventToUnit[i][0] == "enemy") {
                array.push($gameSystem._EventToUnit[i][1]);
            }}}}
for (j = 0; j < array.length; j++) {
    if (array[j]._enemyId == 6) array[j].changeLevel(1);
    if (array[j]._enemyId == 5) array[j].changeLevel(2);
}
1622918761960.png
Works flawlessly!
 

MetalKing11417

Veteran
Veteran
Joined
Jul 7, 2018
Messages
129
Reaction score
85
First Language
english
Primarily Uses
RMMV
I decided to make a script to encorporate AoE attacks into the game with sideview battles (fire emblem style) and so far this is the result:
WIP.gif

It's super hacky at the moment with a few limitations that I probably won't be able to fix:
1. counter attacks only occur with the "primary target" so I recommend AoE skills be <uncounterable>
2. The battle HUD is weird and will probably be removed for the target party
3. Requires srpg_core.js modification (aka Dopan's version) that allows enemies to be moved based on their index

I'm running a modified version of srpg_core.js so I will have to rewrite a lot of things to make it work as a standalone script.
On the counter attacks only work with the primary target, that might make a good setting- only one target can make a counter attack with an aoe skill. If the main target can do so, it will, however if it cannot, the skill will roll off based on proximity to both the center and caster. Should the two be equal, it will go based on the event number.
 

boomy

Veteran
Veteran
Joined
Jan 6, 2013
Messages
177
Reaction score
149
First Language
English
Primarily Uses
RMMV
On the counter attacks only work with the primary target, that might make a good setting- only one target can make a counter attack with an aoe skill. If the main target can do so, it will, however if it cannot, the skill will roll off based on proximity to both the center and caster. Should the two be equal, it will go based on the event number.
@Reanimunculus

I made a script for 1 vs Many AoE animations for side-view battles
Ready for testing
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

I want to learn Javascript to create a custom menu, but I don't really know where to start.
One uncomfortable truth that has withstood the test of time, is how most people will stand by while they see a crime happening, unless it's illegal to stand by. We probably wouldn't have stories about "special heroes" or games about heroes if the "everyday common folk" were largely capable of being heroes. Heroes face dangers that most people are not willing to.
I'm having toooo much fun designing the new MP (Mental Psyche) system. I've only worked it out for enemies so far, but it's fun to stun them, then go after their MP and delete them instead to farm for better item drops.
anyone know of a place I can promote my game? sorta like game awards but for indie devs, like a place where I can drop a trailer and like stir up some hype
Doing RPG Maker News for 17th October 2021

Forum statistics

Threads
115,882
Messages
1,093,696
Members
151,126
Latest member
LAB00M
Top