Making enemies who will attack each other can be done using SRPG_AIControl and SRPG_PositionEffects, by giving them skills with <anyTarget> and not setting the AI to ignore or avoid allies with their skills. It might be easiest to model the neutral units as actors set to auto-battle instead of enemies- that way enemies will fight them by default, and the player can choose to fight them, since all their skills are set to target whoever.
The downside of this approach is that it devolves into a free-for all rather than a team battle- the plugin is built around RPGMaker's standard two teams: The actors in the player's party, and the enemies you encounter. Faking a third faction will involve quite a bit of scripting or eventing, probably.
Some other thoughts: Assigning each team a specific "state", and having the AI check if the characters have matching states to decide if they should target them with their anyTarget moves? Could get complicated quickly.
[EDIT]
After sleeping on it, I realized a way to address neutral entities, pseudo-death states, and an easy way to make battles with specific "VIP" units to protect / kill. A new plugin, SRPG_Teams.
In short, it lets you tag a battler (via actor, class, enemy, or state) as part of a "team." This doesn't do anything by itself, but the plugin allows you to get the character's team, check if two battlers are on the same team (for use in AI and damage formulas), and count the remaining members of a team (for win/lose conditions).
For example, I can set my win condition to $gameSystem.isTeamDead("enemy"), so I win when everyone on the "enemy" team is dead. If make an immobile, destructible gate as enemy with the <srpgTeam:environment> tag, they're no longer part of the "enemy" team, so the battle can end even if they haven't been defeated yet.
Similarly, if I set my lose condition to $gameSystem.isTeamDead("actor"), I get a game over when everyone on the "actor" team is dead. But I can also tag non-essential NPCs with <srpgTeam:ally>, marking them as a different team, so them being alive won't stop me from getting a game over. I can also make a pseudo-death state by giving the state an <srpgTeam:dead> tag, so that actors in a psuedo-death state won't count as part of the living "actor" team to stop a game over.
I didnt tested the new Plugin yet,but i looked into the JS code and i asume that the new plugin
SRPG_Teams , should be compatible with the
Updated-SRPG_Demo. As far i understand it the Plugin checks the Meta data of the Units and provides some extra Scriptcalls/NoteTags for team usage.
In the Past ,i mostly used the State-Setup in order to let Units attack "friends"(=Confusion) or "all other units"(Enrage).
But this new plugin can probably make things easier,its a good Idea! Perhaps i will try to edit some of my plugins later,like
"SRPG_Unitgroups.js"&
"SRPG_Aura" for example
, in order to also work for specific teams only.
I am still stucked on trying to Fix the last Issue (=loading data Issue) on
SRPG_MapForceAction.js ,but i will take some Time to add
SRPG_Teams.js to the
Updated-SRPG_Demo. I will also test if they are some Compatiblety Issues with other Plugins ,but i dont think there should be any Problems.
=> When i add this Plugin to the demo under "functional" is there any preffered place where it has to be or should i just place it at the end of the "functional" Plugins?
(in the PluginManager)
About my SRPG_MapForceAction.js Issue:
- The only new thing,i found out is,that if the plugin does the "first action on Map",than this "dataInput" will last till the game is Closed and Opened again
.
That means till then, the plugin will work correctly,but as soon the Game was Closed and Opened again,it is needed to make another "first action on Map" with a Plugin Scripcall, in order to make the "dataInput" again and in order to make the Plugin work correctly
.
If this "dataInput" doesnt happen atFirst all kind of weard Stuff can happen when using the Plugin Scriptcalls later,things like
"no action triggered" or
"multiple extra actions added" ect ..
It depends on
how much other "normal" Actions
happen before and if the Actions are
Mapbattle"true" or
Mapbattle"false".
Any idea how i could do that "dataInput" without triggerring an Action(with a Plugin Scripcall) could be helpfull.
(there are still a lot of Things on JS which i dont understand..)