MV - SRPG Engine MV - Plugins for creating Tactical Battle System

● ARCHIVED · READ-ONLY
Started by RyanBram 3313 posts Page 128 of 166 View original ↗
  1. Is it possible to use an actor class as an enemy. I want to use the side-view battleview for a Fire Emblem feel, but I don't want to have the enemies use a static image and more of a battler so I can have battle animations for skills.

    I'm also getting an issue when just using YEP's Equip Core. Just having it turned on generates the following error and I'm not sure how to fix it. Been messing with it for a couple hours. My project doesn't have any errors when I turn off the Equip Core plugin.
  2. Any way I can go about moving the actor status window to the very left or right of the screen? And decrease the size of the width, so there's not a huge empty gap between the bars and the right side of the window?
  3. @XerxesSchneider
    which demo and which srpg core do you use?
    (and did you add any other plugins which where not part of your demo version?)

    @RK DracoRoy
    yes you can edit that (size, position ect)..
    The functions that you are looking for are called :
    "Window_SrpgActorCommandStatus.prototype"
    and can be found in the srpg-core

    i tested a bit and thats what i changed to get following result:

    Screenshot_4.png

    for the window size i changed this: ( - 520 instead of - 240 )
    Screenshot_3.png
    (Window_SrpgActorCommandStatus.prototype.windowWidth)
    This number (- 520) might perhaps also depend on your project_screen resolution i am not sure, so if it doesnt work,and you dont have the same like me, you might need to test a bit with different numbers till it fits..
    ---------------

    for the window position , i had to go to the scene where the window is created:

    Screenshot_5.png
    (Scene_Map.prototype.createSrpgActorCommandStatusWindow)
    here i used "X = 0" instead of 120
    ---------------
    you can also disable the whole window (by disabling the last line of that 2nd function with "//" at the beginning) and use moghunter actor hud instead, but that requires a bit more work on the actor hud itself and when or when not it should be displayed ..
    ( i did that in an older project, might do it again later in a tutorial demo )
  4. I have a question regarding skills, their animations and YEP action sequence plugins:
    Is it possible to make a simple skill that joins at least two different animations: for example a simple punch and an elemental effect in continuity? That would make the developing easier... but i wanted to ask if it works with srpg
  5. PARCB said:
    I have a question regarding skills, their animations and YEP action sequence plugins:
    Is it possible to make a simple skill that joins at least two different animations: for example a simple punch and an elemental effect in continuity? That would make the developing easier... but i wanted to ask if it works with srpg
    if setting the correct param in some plugins ,you can use the yep action seq normaly. Thats the "srpg core" param & if using it the "dynamic animation" param.
    img info
    Screenshot_3.png

    Screenshot_2.png
    (i would recommend to read a thread about yep seq in order to see what can be done with it.. im no expert on this)
    The "dynamic action" plugins should be able to do even more..
    (but i am no expert with that aswell^^.. you can find examples in ryans demo and infos on the tutorial-website for Dynamic action plugins..)
    -------
    with the force action plugin you can add a skill to another..
    (that does 2 animations aswell but also 2x dmg output)
    -------
    and you could aswell use a skill common event and use script in it to request animation..
    more detailed
    ( the script code is different depending if its on map or sv )
    on sv its:
    battler.startAnimation(animation_id)
    on map its:
    battler.event().requestAnimation(animation_id)

    in SRPG "battler" is: (thats the EventBattlerUnit)
    $gameSystem.EventToUnit(eventId)[1]


    -> if we dont know the event id, we could also use the event id of "active event" ..thats:
    JavaScript:
     $gameTemp.activeEvent().eventId();

    However lets say the event id of battler "raven" is 9
    (like in my demo)

    that would mean:
    sv:
    JavaScript:
    $gameSystem.EventToUnit(9)[1].startAnimation(animation_id);
    // animation_id should be the Number id of the animation
    map:
    JavaScript:
    $gameSystem.EventToUnit(9)[1].event().requestAnimation(animation_id);
    // animation_id should be the Number id of the animation

    (detailed info)
    sidenote: "requestAnimation(id)" is the code that triggers events to start an animation so basicly on map its the event itself that calls the animation.. and thats why the code says "battler.event()" ,cos we use the event from the battleEventUnit
    ..
    while "startAnimation(animation_id)" is for sv battle ,the system uses the default code for rpg mv battles which let the "battler" call the animation..
    ---
    here is an example from my edited version of autolife plugin:
    ( its a gamebattler function so "this" means "battler" in that case )
    Screenshot_1.png
    if using "!" before script that means NOT..
    ( so the first if conditions says "if NOT using mapbattle".. and the second says "if using mapbattle" )
    .. I had to make sure that the "autolife"plugin works for both battlemodes.. therefor i made this edit
    (its basicly for "reraise skill" known from final fantasy tactics)

    edit.
    Sidenote:
    with srpg we can do incredible much stuff and my current demo does not even show any of it yet^^..
    Also it depends on how much JS knowledge you have, thats why i recommend to learn atleast enough to be able to read the most part of the srpg core..
    ( i am no JS expert myself , my coding style is pretty simple and most stuff i know ,came from reading plugins and tryal & error )
  6. I wonder could the Direction Selection mouse hover / touch could be made into a plugin parameter option if one wants to enable / disable the feature. Thought it'd be a nice idea for the plugin. I currently got all traces of the mouse over / touch commented out, and no issues came about.
  7. RK DracoRoy said:
    I wonder could the Direction Selection mouse hover / touch could be made into a plugin parameter option if one wants to enable / disable the feature. Thought it'd be a nice idea for the plugin. I currently got all traces of the mouse over / touch commented out, and no issues came about.
    boomys version aswell as the version i am working on(almost done), has a $gameSwitch which can be used to enable or disable the usage..
    (for example if you dont want it while playtesting but want it in the final game.. or if you want the gamer give the option to enable or disable it)

    Also if somebody doesnt want to use it at all, the plugin dont has to be used..
    (its not required for anything else except its pourpose)

    Ther $gameSwitch only disables the main trigger not the whole code, but at the moment i dont think that my edited plugin code will break anything .
    (using the after action trigger made a lot of stuff easier, atleast from my point of view)
    ---
    sidenote:
    I consider the edited version from "direction selection" also as bugfix.. cose the original has problems with mapbattle skills ect.
    Thats cose its not triggered with after action.. and map/sv battle usage have difference in timing..
    (sv has its beginning at "action.apply" mostly, while mapbattle is focused on "battlestart" & triggers the "action.apply" a bit later after the mapSkill_List allready knows which skills&counters are used)
    ----
    ----
    another topic
    About PreAction Phase on MapSkills:
    I cant say it often enough ,but the original srpg_core, has a broken pre-action phase on mapbattleSkills
    .
    That is fixed in my edited core.. this fix was never added to any original core version.
    more detailled
    The means the original srpg_core works this way on mapbattleSkills:
    Action -> preAction -> afterAction
    But my edited core works same as default sv Skills:
    preAction -> Action -> afterAction

    This Fix can be added to every original core aswell even if it uses agiatt+ ect.. It only needs some edits in the mapbattle part of the srpg core.
    (And i cant speak jap, and wasnt able to tell it the original core creator, other fixes where ignored aswell out of this reason)

    more detailled: (about the bug and why it happens)

    the original is buged because "sceneMap functions" only happen one after the other..
    And drQ had to much code in the "sceneMap.BattlleStart function", which was not cuted into several "sceneMap functions", after it calls the "preAction" which is a "sceneMap function" aswell..
    That way the other code happens before the preAction, which wasnt supposed to happen in the first place..
    Its a little bug drQ didnt recognized before the mapbattle plugin was added into the srpg_core..
    I did recognize it later, because i made the preAction phase visible for testing purposes with huds in my tutorial demo back then..
    I am not sure cose i cant&wont test it myself, but it could be that "original core version users" get bugs with my edited version of "direction selection", because of this..
    (i dont think so,but if that happens pls let me know!)
  8. Ah. I meant I'm only turning around with just the press of keys due to commenting out the touch / mouse hovering part. Commenting those out, I can now use the plugin with just directional keys without the hovering in the way. And if one wanted to use the touch / mouse controls to turn around, they could have it as an option to enable.

    (My project is more suited to not having touch / mouse control features and even hides the mouse cursor).
  9. RK DracoRoy said:
    Ah. I meant I'm only turning around with just the press of keys due to commenting out the touch / mouse hovering part. Commenting those out, I can now use the plugin with just directional keys with nothing in the way. And if one wanted to use touch / mouse control to turn around, they could have it as an option to enable.

    (My project is more suited to not having touch / mouse control features and even hides the mouse cursor).
    (ok now i understand what you meand)
    so your game only works with gamepad or keyboard??

    Well i will think about making such an option into the plugin param..but i dont promise anything
    (perhaps another $gameSwitch usage on this would be better than param usage, so people could let the gamer decide if not using touch/mouse control features)
  10. PARCB said:
    I have a question regarding skills, their animations and YEP action sequence plugins:
    Is it possible to make a simple skill that joins at least two different animations: for example a simple punch and an elemental effect in continuity? That would make the developing easier... but i wanted to ask if it works with srpg
    In your action sequence (Yanfly) use the following code:
    eval: BattleManager.actionAnimation(i, ["target"]);

    You can replace target with user (if you want the animation to play on user)
    replace i with the id of the animation
    Insert some WAIT: X as well

    So an example would be:
    <target action>
    eval: BattleManager.actionAnimation(32, ["target"]);
    WAIT: 24
    eval: BattleManager.actionAnimation(33, ["target"]);
    WAIT: 24
    </target action>

    If you are allergic to javascript then Yanfly does offer the notetag:
    ANIMATION X: target, (mirror)
    You should check out the Yanfly wiki
    XerxesSchneider said:
    Is it possible to use an actor class as an enemy. I want to use the side-view battleview for a Fire Emblem feel, but I don't want to have the enemies use a static image and more of a battler so I can have battle animations for skills.

    I'm also getting an issue when just using YEP's Equip Core. Just having it turned on generates the following error and I'm not sure how to fix it. Been messing with it for a couple hours. My project doesn't have any errors when I turn off the Equip Core plugin.
    You are trying to call the function "currentClass" on an enemy. Yanfly only provides Game_Actor with the currentClass function (why would Yanfly add classes to enemies when they are by default not allocated classes?). Either add the EnemyBaseParam plugin (also from Yanfly but I think it costs a pretty penny) or add the following function to anywhere in your srpg code:

    //New Yanfly function (to allow draw class to work with enemies) #Boomy
    Game_Enemy.prototype.currentClass = function () {
    if (Imported.YEP_X_EnemyBaseParam) {
    return $dataClasses[this.enemy().classId];
    } else {
    return this.enemy().meta.srpgClass;
    }
    };
  11. How do I handle an Ally Phase event or would that require a plugin like Shoukang's BattlePrepare where the ally phase takes place after player turn event but before enemy? (I have a feeling the latter is likely)

    I'm wanting to check if all player-controlled units finished their turn on an event and only if there are any actors with the auto battle trait (excluding the auto battle command trigger which adds a state), I can event around things like "Ally Phase" in the same way as player / enemy phase events and change music when it is their turn.
  12. RK DracoRoy said:
    How do I handle an Ally Phase event or would that require a plugin like Shoukang's BattlePrepare where the ally phase takes place after player turn event but before enemy? (I have a feeling the latter is likely)

    I'm wanting to check if all player-controlled units finished their turn on an event and only if there are any actors with the auto battle trait (excluding the auto battle command trigger which adds a state), I can event around things like "Ally Phase" in the same way as player / enemy phase events and change music when it is their turn.
    about Phases ect:
    Spoiler
    the phases regarding actors/autoactors and enemys are working like this:
    -> assuming that you dont use plugins that change this default
    (Turn starts from left to right)
    actor -> autoActor -> (auto)Enemy -> endTurn ->(nextTurn)
    ---
    (excluding the auto battle command trigger which adds a state),
    i think phases related it doesnt matter how the actor was set into autobattle mode..
    We also have battle & subbattle -phases that run, related to whats happening..
    --------
    the plugin srpgPhaseSwitches,
    has added switches to all default phases. This was made to use them in hudMaker and to use phases as triggers with the help of $gameSwitches.
    (that could also be used to change music ect, but with huds you will see how fast some of them changes ect)
    -> such huds will also implemented in my demo ,but later..
    Screenshot_1.png
    ---
    ---
    Another Topic:

    Regarding Shoukangs "srpgMoveAfterAction"
    Spoiler
    i recoginzed an issue in my demo can someone tell if that happen in other projects aswell??
    -> If using "wait command" on a "chest-unitEvent" with 2 actors in the same turn, no matter if its the same chest or 2 different chests..
    => The second actors "moveAfterAction" is broken
    (first actors "moveAfterAction" works fine at that point)
    ----
    I thought this is because of my demo or my edited version of "direction selection plugin", but this also happen without "direction selection plugin"..

    edit2.
    i figured it out , that only happens if the second actor is the last "gamer controlled actor" & actorphase ends, so that enemy turn gets triggered..
    (this seems to bug the after action move from that last actor, not sure if thats on purpose or not)
    edit3
    i think this is related to how actorPhase gets instand ended on last active actor usage..
    ..And that shoukangs plugin changes/removes the Actors-turn_end afterwards instead of preventing it to happen.
    (cose if that happens on last actor that triggers the autoPhases, which prevents the MoveAfterAction of that last actor)
    -> this is not only wait command related
    edit4
    ok i found an easy Fix for this, ill show it in spoiler, and add that fixed plugin version( "srpgMoveAfterAction") to my next demo version aswell.
    (its easy enough to do it yourself if interressted)

    Fix showcase srpgMoveAfterAction
    Screenshot_2.png

    in the Plugin "srpgMoveAfterAction"
    step 1

    search for => Scene_Map.prototype.srpgAfterAction
    add following function =>
    JavaScript:
        // dopan fix START, prevent "this._srpgTurnEnd = flag;" if actor can still move after action
        Game_BattlerBase.prototype.setSrpgTurnEnd = function(flag) {
            if (!this.SrpgRemainingMove()) this._srpgTurnEnd = flag;
        };
    just put it above Scene_Map.prototype.srpgAfterAction like shown on the img
    step 2
    add
    JavaScript:
     !== true
    like shown on the img
    step 3
    add
    JavaScript:
    //
    like shown on the img
    --------
    --------

    this will prevent turn end if actor can still move & make the required changes in the "Scene_Map.prototype.srpgAfterAction"-function in order to fix the issue explained above in this posting
    edit5
    i recoginzed that my fix , broke aoe compatibletly, i fixed that aswell in my demo, but didnt added that fix to this post yet
    AOE fix
    Screenshot_2.png
    I will upload this fixed version soon anyway, ..
  13. One way I attempted the Ally Phase was having it take place on the after-action event, and I used these conditions:
    Code:
    $gameSystem.isBattlePhase() === 'auto_actor_phase' && $gameSystem.isBattlePhase() !== 'enemy_phase' && $gameSwitches.value(6) == false
    Ally.PNG

    Here, I can show "Ally Phase" when it gets on the phase, play a different map bgm, turn on the switch to prevent the sequence from playing again on another actor's turn and enemy turn. Switch turns off on player turn.

    However, I'm trying to figure how to only play this part if I have at least 1 actor / event present that has an auto battle trait or perhaps a meta tag or check the next actor / events? (I admit this is tricky since pressing Auto Battle menu command will have every actor in an Auto Battle state, thus starting the auto actor battle part.)

    Like if there's no npc allies present in the map or maybe none with a custom meta tag, it'll skip the whole Ally Phase code and move straight to Enemy Phase.
  14. if you want to seperate "auto actors -trait affected" from "auto actors -state affeted",..
    - you could ask for actors that "have the autobattle special flag trait"
    rpg object autoactorTrait
    Screenshot_1.png
    - you could ask for actors that are state affected with auto state
    I am currently not sure if the actors that get activated with the autobattle command get the trait flag, or only the state or both.. best would be to test that in console F8 on that Unit:
    => $gameSystem.EventToUnit(eventID)[1];

    (all data related to that Unit is stored inthere)

    - If you know the actors that are always "auto allies", you can use their actor id as identyfier or even better you could put them in a "team" and make a "team" related script.
    SRPG_Teams is part of the SRPG_UnitCore, it also exist as one of drQs plugins as solo(original) plugin.
    - of course you can also always invent your own "actor meta", and put it on those "auto allies".. as own identyfier

    The 3 phases regarding this are:
    - $gameSystem.isBattlePhase() === 'actor_phase'
    - $gameSystem.isBattlePhase() === 'auto_actor_phase'
    - $gameSystem.isBattlePhase() === 'enemy_phase'

    The SRPG_UnitGroups plugin has scriptcalls to call groups of Units and the first function is a nearly blank function that can be used to build yout ownUnitGroup related script
    script info
    JavaScript:
                    //0U_Add Test: THIS IF FOR TESTING NEW FUNCTIONS "this.allUxTest();"
                    Game_Interpreter.prototype.allUxTest = function() {
                        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())) {
                            // <-insert test code here
                        }
         
                        }
                        return true;
                    };
    i showed this Unitscript example here: (link where some basic srpg scripts are explained, not as plugin usage! its only stored on github as tutorial)
    Srpg-plugins/ScriptCallList_SRPG.js at main · DopanPlugins/Srpg-plugins ----------

    i am not sure what you want to archieve and why, the simplest way would be to start actorMusic at actorPhase-event & change musik to enemyMusic at enemyPhase-event.
    -> endTurn-event (when both actors end enemys are done) can be used to stop all musik.

    (you can make it more complicated if you want, but that will be more difficult aswell)
  15. I don't think the <srpgWRangePlus:X> notetag is working correctly. I couldn't get it to work even in the demo, as either a state or armor notetag. Which is weird, because the very similar <srpgMovePlus:X> works perfectly fine.
    Does it work for anybody else?
  16. dopan said:
    @XerxesSchneider
    which demo and which srpg core do you use?
    (and did you add any other plugins which where not part of your demo version?)

    I'm using SRPG Core 1.34. The demo I used for reference is the one on the first page here, I think its 1.32, but I am making my own project. I've been adding in Plugins 1 at a time to make sure nothing was going to break. Then I added YEP's Equip Core and my test battle breaks now. with the error message in the picture from my first post.
  17. I see that the auto battle state needs the trait itself in order to function. Hmm.. Yeah.

    Now that you mentioned that, I now tried out his SRPG_Teams plugin and included a custom team check in the script condition, and got that one part taken care of. <SrpgTeam:Ally Unit> for any actor that has the Auto Battle trait in actor database.

    I'll have to keep in mind that the actor turns on auto battle probably start from the lowest event Id. So for any units that will play the role, I'll add them after the player-controlled events are made and set.
    ----------------------------------
    It seems I can only check if team size is > 0 or defeated. And I was thinking maybe I'd check if the whole player-controlled team (that isn't Ally Unit) used their turn up with "$gameSystem.teamSize("Player").srpgTurnEnd == true" as another script condition in the post action event, but no avail as something like that would solve the other part if I selected the auto battle command.
    ----------------------------------

    My Player Phase event plays its default music as soon as the map starts then changes it at Enemy Phase and repeats the process. (When allied units are present and all player-controlled actors end their turn, their music plays before Enemy Phase like in Fire Emblem).

    Turn End event will play a different bgm only if there are a few remaining enemies left and same with After Action (when on the player actor phase).
  18. @ XerxesSchneider

    boomy looked into your issue here #2,550
    by default enemys have no equip or classes, this can be changed with the srpg_unitCore or perhaps aswell with other "non srpg plugins"..
    That means by default you cant trigger code on enemys that asks about the enemy class , which is what "battler.currentClass()" does.
    (i hope that solves your question.. and i am not sure why/how you trigger "currentClass" on enemys)
    -----

    @ Borglor

    i think thats related to different plugins, and one plugin overwrites the option of the other..
    (if i remember correctly)
    pls use the script from

    "SRPG_RangeControl" -> <srpgMovePlus:X>
    --------
    @ RK DracoRoy
    $gameSystem.teamSize("Player").srpgTurnEnd == true
    doesnt exist (and it makes no sence)


    - $gameSystem.teamSize("Player") ;// is a function
    (returns number of team size)
    - _srpgTurnEnd == true; // is a data that is part of the "actor/enemy/battlerUnit" function which is known as:
    - $gameSystem.EventToUnit(eventId)[1];
    -> the corrrect code to read " _srpgTurnEnd " is :
    => $gameSystem.EventToUnit(eventId)[1]._srpgTurnEnd;
    (returns true or false)

    If you wanna check all units on map, with conditions which team they are or if actor/enemy ect..
    You need to built a script that can trigger/check several events, i showed you the necesserary infos
    (srpg_unitGroups has lot of examples in its code, aswell as the example on the tutorial github link which i showed)
    edit. tutorial Example (modificated code from a srpg_UnitGroups Scriptcall)
    => set $gameSwitch id 99 to "true" if atleast 1 team member of team "actor" on battleMap,

    has not its Turn used ..
    JavaScript:
    // example with Team "actor" & $gameswitch ID 99
    var team = "actor";$gameSwitches.setValue(99,false); // set team and reset Switch
    for (var i = 1; i <= $gameMap.events().length; i++) { // use MapEvents Lenght to check all units
         var battleunit = $gameSystem.EventToUnit([i]); // check all battlers
         var eventunit = $gameMap.event([i]);           // check all events
     // if battler & event have the same event id "i" & battler is an Actor & battler is NOT death & battler is team member of team "actor"
         if (battleunit && eventunit && (battleunit[0] === 'actor') && (!battleunit[1].isDead()) && (battleunit[1].srpgTeam() == team)) {
            if (battleunit[1]._srpgTurnEnd === false) { // if battler has NOT its turn ended
                $gameSwitches.setValue(99,true); // set switch true
            };
         };
    
    };
    // This will ask every Unit on Map & if atleast one(or more) meets all Conditions, Switch 99 will be set to "true"..
    // Else Switch 99 will be "false" , that happens at the beginning.Only use this if "srpg battle" is ON.
  19. dopan said:

    That is indeed what was going on. Thank you very much.​

  20. @ Borglor

    sry i missunderstood..

    <srpgWRangePlus:X> // is the notetag that changes WeaponRange
    <srpgMovePlus:X>
    // is the notetag that changes MovementRange
    (srpgMovePlus was upgraded with the plugin "srpg_RangeControll" for more usage options)


    -> srpg_RangeControll-plugin overwrites a few functions, it could be that this disables <srpgWRangePlus:X>

    i am not sure why drQ did not reUsed this tag, instead he builded 2 tags that are used for changing weapon range:
    <srpgRangePlus:X> // actor, class, enemy, weapon, armor, state, and skill note tag
    # increases or decreases variable ranges by X

    <srpgVariableRange> // skill / item notetag
    # range will be affected by srpgRangePlus tags


    It seems that, they must be used in combination.. a bit confusing i might look into that later in order to figure out if it makes sence to make <srpgWRangePlus:X> work again..
    srpg_RangeControll-plugin
    Screenshot_1.png
    ------------------------------------------------------

    @ XerxesSchneider

    well i looked into your error img again, ..
    like bommy sayd, your issue is related to the yep plugin trying to call enemy class..
    Thats probably to draw the class name in the status window.
    By default the srpg_core has a dummy class for enemys which can also be added with notetag.
    (this dummy class is no real class it just stores the required class name for the enemy)
    -> perhaps you dont have a notetag added? or set the core param (img in spoiler)
    Spoiler
    Screenshot_2.png
    ----
    but like mentioned before you could also add real enemy classes with other plugins,
    or you could try boomys solution..