Brother_Fox

Villager
Member
Joined
Feb 18, 2021
Messages
23
Reaction score
5
First Language
Russian
Primarily Uses
RMMV
yes, use the srpg_teams.js extension plugin
I tried to figure it out but nothing worked.
I did not understand how to use it to make one group of units hostile to actors the enemies of another group of units hostile to actors.
 

Aurawhisperer

Veteran
Veteran
Joined
Jun 10, 2015
Messages
453
Reaction score
23
First Language
English
Primarily Uses
Hi. I have a few questions.

1. Is there a way to setup multiple enemies, such as enemy team red and enemy team blue or is the program solely focused on ally and enemy phases?

2. Is there a way to setup allies or guests, and allow them to auto run?

Thank you.
 

Aurawhisperer

Veteran
Veteran
Joined
Jun 10, 2015
Messages
453
Reaction score
23
First Language
English
Primarily Uses
yes, use the srpg_teams.js extension plugin
Ah I see you mention this plugin. Will check it out.

May also figure out our friend here who isn't able to figure it. May require some extra work heh

Edit: Any idea where this extension is at?

Edit: Found it, though this version looks very old... hmmm. Seems it is script involved too.

Final edit: Have you played with this plugin? Can't seem to figure it out, and the notes is limited.
 
Last edited:

dopan

Veteran
Veteran
Joined
Mar 27, 2020
Messages
1,254
Reaction score
665
First Language
German
Primarily Uses
RMMV
i will try to explain what srpg teams does and what it doesnt..

srpg teams is used to assing units teams, it doesnt change the ai behavior..

here is the github link to the original plugin from drQ:
(there you can read the original plugin info)

SideNote -> about SRPG_UnitCore.js:
-> the unitcore has srpg teams intigrated cose i used team data to know what to do with stolen items, depending if the "stealer" is in the actor team or not..

-> only actor team units will give this stolen item to the gameparty storage..
enemy have no global "group item storage",..

..this team data can be checked via script, and we can use the SRPG_AIControl plugin to build AI behavior based on team usage

in order to decide who a different team unit is targeting as enemy, we use the states
-> like "confusion" or "berserk" would work for example
The states only ask if units are actors or enemys when deciding who is a friend or an opponent..


Screenshot_1.png


the units team can be used to tell the system which unit should get a special state ,so that the state changes the attack behavior

Basicly teams are only identifier_data, to have another option to adress specific units based on their team data
(before that we could just ask if any unit is an "actor" or an "enemy"... now we can ask if a unit is a "team member" of any "specifik team")

DrQ made this plugin , so that we dont need passive states as team "flag"..
(that was my walkaround solution at that time, i added passive states to actors and enemys as unit identifier)

edit

another info: -> about UnitCore stealing behavior
for example if an actor is confused, because the actor was hit by a confusion spell, we could want to change the team data of this actor as long the confusion state is active..

so that if this confused actor is stealing something from a "friend-actor", the stolen item won't be added to the gameparty storage..

edit 2 Script Infos:
here some examples and small scripts related to this topic:
This is a Unitgroup SCRIPT that can adress all Units which are not Dead & Actor or Enemy & Team unit of specific team..
in this example the team is "actor"
JavaScript:
var team = "actor";// add team here, we use "actor" as example
for (var i = 1; i <= $gameMap.events().length; i++) {
     var battler = $gameSystem.EventToUnit([i]);
     var event = $gameMap.event([i]);
     if (battler && event && (battler[0] === 'actor' || battler[0] === 'enemy') && (!battler[1].isDead()) && (battler[1].srpgTeam() == team)) {
         // add stuff here
     }           
}

in the script above following code part have following meanings:
-> all these are used as part of an "If Condition", and they return true or false
In the UnitGroup script above

JavaScript:
battler[0] === 'actor'
unit is an actor

JavaScript:
battler[1].srpgTeam() == team
unit is in this team , team data must be added in the first var of the script

another example with team actor:
JavaScript:
battler[1].srpgTeam() == "actor"
battler is part of team actor

edit 3
i recognized that my UnitCore plugin didnt had any plugin help info for srpg teams added, i already changed that on my github ,now it has the plugin info from srpg teams intigrated..
this will be part of my next demo upate aswell
 
Last edited:

Aurawhisperer

Veteran
Veteran
Joined
Jun 10, 2015
Messages
453
Reaction score
23
First Language
English
Primarily Uses
So I should be using UnitCore instead?

Also, sounds like Teams is just a label me plugin. Probably why in the info it states it changes nothing and how inside JS code there’s only like 30 lines. It didn’t do a thing making the enemy attack another enemy, and AI Control didnt have such options available.
Am I right so far?
 

dopan

Veteran
Veteran
Joined
Mar 27, 2020
Messages
1,254
Reaction score
665
First Language
German
Primarily Uses
RMMV
So I should be using UnitCore instead?

Also, sounds like Teams is just a label me plugin. Probably why in the info it states it changes nothing and how inside JS code there’s only like 30 lines. It didn’t do a thing making the enemy attack another enemy, and AI Control didnt have such options available.
Am I right so far?
if you want but that wont change how srpg team works, the unitcore is used for enemy equip enemy class/lv ,unit item slots , steal/break skills,..ect

like i saied srpg teams give you only the option to identify a unit by its team_data, & to know if any team has no alive units left ect..

To properly use AI Control you need a little bit JS knowledge,..
as you can see on the img below from AI Controll help info, some options require using formulas..
Screenshot_1.png
thats why i posted some script infos to show how to ask about "actor" team for example
....

i planed to build some AI Control behavior (using formulas) into a later version of my demo as better example, but thats currently not the first thing on my todo list..
(my older demos already had them, for example for heal/cure skill usage and other things but the old tutorial demos are not availleble anymore)

edit
you can also search in this thread if you find any older drQ comment, where he explained "SRPG_AIControl" a little bit and gave some examples
 
Last edited:

Aurawhisperer

Veteran
Veteran
Joined
Jun 10, 2015
Messages
453
Reaction score
23
First Language
English
Primarily Uses
I see... seems like it maybe impossible for me to figure this out then. JS isn't my strong suit, and I can't seem to find any decent tutorials or examples explaining how to make your own JS code work with the in game code of RPG Maker MV. Granted, there's the syntax log of examples, but doesn't give me the idea on how to execute it.

I'll try and dabble it a few days before throwing in the towel on making allies and multiple faction groups. Really wish RPG Maker made a SRPG version though haha.
 

xabileug

Veteran
Veteran
Joined
Jul 1, 2014
Messages
492
Reaction score
154
I see... seems like it maybe impossible for me to figure this out then. JS isn't my strong suit, and I can't seem to find any decent tutorials or examples explaining how to make your own JS code work with the in game code of RPG Maker MV. Granted, there's the syntax log of examples, but doesn't give me the idea on how to execute it.

I'll try and dabble it a few days before throwing in the towel on making allies and multiple faction groups. Really wish RPG Maker made a SRPG version though haha.
there's learning java script here in the forums, there's also tutorials on youtube. just edit the js files in notepadd++ or in advance ones like webstorm. there's also the in game console where you can try things.
 

Aurawhisperer

Veteran
Veteran
Joined
Jun 10, 2015
Messages
453
Reaction score
23
First Language
English
Primarily Uses
there's learning java script here in the forums, there's also tutorials on youtube. just edit the js files in notepadd++ or in advance ones like webstorm. there's also the in game console where you can try things.

Yea it's mainly the ingame coding I need to understand. I've taken JS before as a course, but only used it very limited for web applications. Never used it in a game.

I can wait for Dopans demo. It isn't like I need to know right away. I just needed to know if it is possible before going forward because I have a ton of work needing to get done and didn't want to scrap it all to learn that multiple factions fighting on the same map isn't possible haha.
 

ThePsychoBear

Villager
Member
Joined
Nov 28, 2014
Messages
13
Reaction score
2
First Language
English
Primarily Uses
Is there a way to have a parallel event check which event on the field is a specific actor(I'm using battle prepare), then from there check if the actor has a specific status, then change the sprite of the event corresponding to the specific actor until the status is gone?
 

dopan

Veteran
Veteran
Joined
Mar 27, 2020
Messages
1,254
Reaction score
665
First Language
German
Primarily Uses
RMMV
Is there a way to have a parallel event check which event on the field is a specific actor(I'm using battle prepare), then from there check if the actor has a specific status, then change the sprite of the event corresponding to the specific actor until the status is gone?
may i ask for what exactly you want to do this?
(cose they are several ways to do this and i am not sure which would be the best for your purpose..)

1
-you can use event commands(or their script equivalent) to change event imgs and a common event which works parrallel while srpg battle to check if the actor is state affected & trigger event_Img changes ect....
(probably to much unnessecary eventing but possible)

2
-you can use SRPG_mapbattleMotions.js(newest version is called ->) SRPG_MapviewBattler.js,which is a plugin that changes the event img for the purpose of using motions, but it can also be used for special states
(dr.Q mentioned once that he used it aswell to make "frozen/petryfied"-state)

3
-you can change the eventpage and use another img, based on switch/variable usage,..this needs still a common event to handle the switch/variables based on state affected ect
(probably less eventing than solution 1 but i would preffer using solution 2)

------

for solution 1 & 3:
(solution 2 with SRPG_MapviewBattler.js, probably wont need that)

--> to get the event id based on actor id you can use following script:
JavaScript:
   $gameSystem.ActorToEvent(ActorID);
// return event Id of actorUnit
// (is Part of any default SRPG Core even older Versions)
// Incase the Actor isnt in srpgBattle it will return 0

edit
if your purpose is to visually show states on EventUnits, we have a plugin that can show state icons attached to EventUnits, and another plugin that can enable sv state overlay on map for the EventUnits
 
Last edited:

ThePsychoBear

Villager
Member
Joined
Nov 28, 2014
Messages
13
Reaction score
2
First Language
English
Primarily Uses
may i ask for what exactly you want to do this?
(cose they are several ways to do this and i am not sure which would be the best for your purpose..)

1
-you can use event commands(or their script equivalent) to change event imgs and a common event which works parrallel while srpg battle to check if the actor is state affected & trigger event_Img changes ect....
(probably to much unnessecary eventing but possible)

2
-you can use SRPG_mapbattleMotions.js(newest version is called ->) SRPG_MapviewBattler.js,which is a plugin that changes the event img for the purpose of using motions, but it can also be used for special states
(dr.Q mentioned once that he used it aswell to make "frozen/petryfied"-state)

3
-you can change the eventpage and use another img, based on switch/variable usage,..this needs still a common event to handle the switch/variables based on state affected ect
(probably less eventing than solution 1 but i would preffer using solution 2)

------

for solution 1 & 3:
(solution 2 with SRPG_MapviewBattler.js, probably wont need that)

--> to get the event id based on actor id you can use following script:
JavaScript:
   $gameSystem.ActorToEvent(ActorID);
// return event Id of actorUnit
// (is Part of any default SRPG Core even older Versions)
// Incase the Actor isnt in srpgBattle it will return 0

edit
if your purpose is to visually show states on EventUnits, we have a plugin that can show state icons attached to EventUnits, and another plugin that can enable sv state overlay on map for the EventUnits
Basically I'm trying to make a Buff spell that changes the actor's sprite for as long as the buff state is active. But since the srpg battlers are actually events and not the actors, I've only figured out how to actually change the actor's sprite with a parallel event on the battle map that directly changes the sprite of event 1 if it detects whether the actor has the state. But since I want the party members to be interchangeable, I can't really do it like that, so I'm trying to figure out how to actually make it work.
 

xabileug

Veteran
Veteran
Joined
Jul 1, 2014
Messages
492
Reaction score
154
Basically I'm trying to make a Buff spell that changes the actor's sprite for as long as the buff state is active. But since the srpg battlers are actually events and not the actors, I've only figured out how to actually change the actor's sprite with a parallel event on the battle map that directly changes the sprite of event 1 if it detects whether the actor has the state. But since I want the party members to be interchangeable, I can't really do it like that, so I'm trying to figure out how to actually make it work.
i once tested an srpg in vx, the morph character is attached to the sprite function, so when a state is inflicted or an equip is equipped or remove, the map sprites changes.

maybe use yanfly actor transformation. easiest i guess

try this one FTKR_TransformationState.js
 
Last edited:

ThePsychoBear

Villager
Member
Joined
Nov 28, 2014
Messages
13
Reaction score
2
First Language
English
Primarily Uses
i once tested an srpg in vx, the morph character is attached to the sprite function, so when a state is inflicted or an equip is equipped or remove, the map sprites changes.

maybe use yanfly actor transformation. easiest i guess

try this one FTKR_TransformationState.js
That one seems to be for the battlers. I'm trying to get the map battle sprite to change while my Force Fields state is active. I think I already know how to get the battler and face to change properly.
 

dopan

Veteran
Veteran
Joined
Mar 27, 2020
Messages
1,254
Reaction score
665
First Language
German
Primarily Uses
RMMV
my bad i dont use event commands much lately (using scripts), so i didnt recognized that there is no event command to change event imgs..
However you could have googled: "how to set event imgs with script in rpg mv"..

The script you want is a "Game_CharacterBase" which also applys on "$gameMap.event(id)"

here is the default script:
Screenshot_1.png
thats what it looks like used on "$gameMap.event(id)":

$gameMap.event(eventId).setImage(characterName, characterIndex);

some more infos if needed:#4
(about set eventImages)
--------


Now we need to know if that only works on 1 special actor, or if that should work on any actor that has the State?


- if its 1 special actor, thats easy you dont need a script to check all actor units
- if its for any actor you will need a "groupScript" to check all actors

i explained group scripts a lot in this thread and also made a tutorial here:

However here is the related text & script:
JavaScript:
// Code to ask about All EventUnits with the option to add code if Conditions are "True":
//----------------------------------------------------------------------------------------------------------
// (different Codes that are made out of this,with small edits, can be found in the plugin "SRPG_UnitsGroups")
 
// check all MapEvents , "[i]" is the Event ID
   for (var i = 1; i <= $gameMap.events().length; i++) {
// access to Battler data. In usage its needed to add [0] for the event_Type, or [1] for the event_Unit
// That will look like this -> "battleunit[0]" "battleunit[1]"
// in the following context, [0] or [1] is NOT added,thats to store event ID so that "battleunit"&"eventunit" can be equal
        var battleunit = $gameSystem.EventToUnit([i]);
// access to GameMap event data
        var eventunit = $gameMap.event([i]);
// if the event ID of "Event" and "Battler" are same ,beeing "actor"- or "enemy"- eventType & The Unit is NOTdeath("!" at the beginning means NOT)    
        if (battleunit && eventunit && (battleunit[0] === 'actor' || battleunit[0] === 'enemy') && (!battleunit[1].isDead())) {
// example for executed script after all "if conditions" are "true"
// here i wanna show how "$gameSystem.EventToUnit(eventID)[1]" is replaced by "battleunit[1]"
// this adds a State to all Units that fit to the Conditions above.. its only needed to add the StateID (Replace "addID")      
            battleunit[1].addState(addId);
// Free Room to add more Execution Scripts that are used if all Conditions are "true"      
            //
            // <-insert test code here & remove this help text + those "//"
            //
        }
       
   };
same code without infos:

JavaScript:
// changed to ask if state affected & set img:
   for (var i = 1; i <= $gameMap.events().length; i++) {
        var battleunit = $gameSystem.EventToUnit([i]);
        var eventunit = $gameMap.event([i]);
        if (battleunit && eventunit && (battleunit[0] === 'actor' || battleunit[0] === 'enemy') && (!battleunit[1].isDead())) {      
            if (battleunit[1].isStateAffected(stateId)) { eventunit.setImage(characterName, characterIndex) };
        }
   };

You should probably add an "else" condition to the last part, so if state is not affected set default img..

And dont use a parrallel event to trigger this or this will be triggered all the time:
there is always any actor that is or is not state affected..
You should use "turnEnd" or "after action" as triggger..
You might also want to store data on battlers/event/actor, to know if the actor/event has an img changed or if its using its original img--
-> to not trigger img changes when a unit has its original img and no state affected

=> i can explain this more detailled if you dont figure it out yourself
=> and if you dont use this on enemy units, you can remove the "enemy part":
|| battleunit[0] === 'enemy'

Btw solution 3 would also work in your case

edit
basicly you got 2 options left:


-solution 1 ,which is explained above, but that will require more script to change the img back ect..
..if for any reason using several eventpages is not wanted, you need solution 1
(if you want use solution 1 , i might need to give more detailled info and build script to check&restore the default event img after state was affected and state affection ended)


-solution 3, which requires using several eventpages for each actor Unit, and a common event that enables/disables a unique switch for each possible actor, related to state affected..

-> these Unique switches should be used as event page conditions
-> the common event should be triggered parrallel when srpg battle is active
(that way the switches will always be "up to date" in srpg battle)
-> i would recommend this solution
, cose it doesnt require so much script to change the imgs or to change them back when state is gone, or to check&restore the event default img ect..
-> basicly this solution can be done without script usage, by using event commands instead, to check actors state and to set switches ect
(the img changes will be handled from the different eventpages in these cases)
-------

no matter which solution you choose i can give more detailled infos how to do it if required..
 
Last edited:

Aurawhisperer

Veteran
Veteran
Joined
Jun 10, 2015
Messages
453
Reaction score
23
First Language
English
Primarily Uses
yes you can make battle action sequence, this was among the best, you can check them here
DynamicAction .. oh no, looks like it was updated, but the site is closing? had to use wayback machine

View attachment 245160
View attachment 245161

Been meaning to ask. Seeing that the links are shot and as you said the web is down, do you have an alternative search or copies of the plugin? Would like to experiment and see whether I prefer the Fire Emblem approach or the Final Fantasy Tactics approach (If this enables me to do to Final Fantasy approach...)

On the side, is there a way to shut off battle simulations when it comes to allies vs enemies or enemies vs enemies? Rather have the player actors show the battle simulations in work vs everyone else. Just shows damage counters or misses depending on RNG. (Unless I am able to do the Final Fantasy Tactic approach...)

Ex of what I'm asking.

If player attacks enemy - commence battle back background sequence.
elif ally attacks enemy OR enemy team01 attacks enemy team02 - Turn off battle back background sequence and determine whether it is a hit or miss. If hit, show damage done else show miss
 
Last edited:

Aurawhisperer

Veteran
Veteran
Joined
Jun 10, 2015
Messages
453
Reaction score
23
First Language
English
Primarily Uses
<Ignore this... moved content here to first post... apparently there isn't a delete option.>
 
Last edited:

dopan

Veteran
Veteran
Joined
Mar 27, 2020
Messages
1,254
Reaction score
665
First Language
German
Primarily Uses
RMMV
pls avoid double posting, use the edit function (forum rules)
--

edit
-> dynamicAction plugins are already part of ryans demo aswell as my demo...
-> there is also an extra thread made by ryan for these plugins:


Be aware that these plugins are extremly powerfull, but also extremly complex and hard to understand/use..
(i dont support them tutorial related. because i dont use them much myself)

My demo doesnt use them or give any examples, i just added them into the plugin manager to show the correct plugin order in the manager..
Ryans demo gives a few examples, and there is a
tutorial website for these plugins..
 
Last edited:

Aurawhisperer

Veteran
Veteran
Joined
Jun 10, 2015
Messages
453
Reaction score
23
First Language
English
Primarily Uses
pls avoid double posting, use the edit function (forum rules)
--

edit
-> dynamicAction plugins are already part of ryans demo aswell as my demo...
-> there is also an extra thread made by ryan for these plugins:


Be aware that these plugins are extremly powerfull, but also extremly complex and hard to understand/use..
(i dont support them tutorial related. because i dont use them much myself)

My demo doesnt use them or give any examples, i just added them into the plugin manager to show the correct plugin order in the manager..
Ryans demo gives a few examples, and there is a
tutorial website for these plugins..

Thank you! I'll try and figure out how to use them.
 

Latest Threads

Latest Posts

Latest Profile Posts

Now that I have linklists on large trees and cars, is there any theme that would interest you?
Debugging multiplayer issues... I'm having fun, right?
yay_streaming.jpg

For just starting streaming on the 10th... Definitely not the worst. :LZScheeze:

Granted I need 333.34 hours a month on average to achieve money. So I don't really expect that, but it sure has helped my game dev go much faster.
Proud on how this map turned out.

FnmhDLIXgAAOvIC
I just finally fixed a huge problem that wouldn’t let my game load and would crash it.. I thought that I was gonna have to trash the project and start over lol

Forum statistics

Threads
128,328
Messages
1,193,648
Members
168,813
Latest member
jasper1hu
Top