- Joined
- Jul 1, 2014
- Messages
- 492
- Reaction score
- 154
yes, use the srpg_teams.js extension pluginHello.
I ask you to tell me, is it possible to add a third party to the battle? For each side to be hostile to the other two and attack their units.
yes, use the srpg_teams.js extension pluginHello.
I ask you to tell me, is it possible to add a third party to the battle? For each side to be hostile to the other two and attack their units.
I tried to figure it out but nothing worked.yes, use the srpg_teams.js extension plugin
Ah I see you mention this plugin. Will check it out.yes, use the srpg_teams.js extension plugin
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
}
}
battler[0] === 'actor'
battler[1].srpgTeam() == team
battler[1].srpgTeam() == "actor"
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,..ectSo 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?
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.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.
may i ask for what exactly you want to do this?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?
$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
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.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 useSRPG_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
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.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.
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.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
// 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 "//"
//
}
};
// 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) };
}
};
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
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:
DynamicAction - Versatile Plugins for Creating Beautiful Action Sequence
Introducing credits: Takeshi Sunagawa Hi, fellow game creators. I am really excited to introduce a new plugin that can improve visuals in RPG combat. I call this collection of plugins as DynamicAction. For MZ version please visit this forum. Download: Main Plugins Plugin to control how...forums.rpgmakerweb.com
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..