Boyboy180

Villager
Member
Joined
May 7, 2021
Messages
11
Reaction score
1
First Language
English
Primarily Uses
RMMV
Replace onTurnEnd function in srpgCore.js with the following code:

Code:
    var _SRPG_Game_Battler_onTurnEnd = Game_Battler.prototype.onTurnEnd;
    Game_Battler.prototype.onTurnEnd = function () {
        if ($gameSystem.isSRPGMode() == true) {
            this.regenerateAll();
            this.updateSrpgStateTurns(2);
            this.updateBuffTurns();
            this.removeStatesAuto(2);
            this.removeBuffsAuto();
            this.clearResult();
            this.setSrpgTurnEnd(false);
            //Buff & States Core Fix
            if (Imported.YEP_BuffsStatesCore !== undefined) {
                if (Imported.YEP_BuffsStatesCore) {
                    if (this.meetTurnEndStateEffectsConditions()) this.onTurnEndStateEffects();
                }
            }
        } else {
            return _SRPG_Game_Battler_onTurnEnd.call(this);
        }
    };
Thanks for this but it still doesn't work properly. Do I need to do something special to import buffs and states core (I looked at yanfly's other pluggins to try to understand how importing works but still don't quite get it)

Edit: That's not it. It has imported, I added a console log just before the check for conditions and that runs, it's just the turn end states still don't trigger.
 
Last edited:

Adra

Villager
Member
Joined
Jun 14, 2021
Messages
9
Reaction score
0
First Language
Portugueses
Primarily Uses
RMMV
Whoops
I fixed the problem
I forgot that srpgCore already aliases srpgBattleStart (mapBattle) so my alias to srpgBattleStart makes the game ignore the mapBattle version of srpgBattleStart
I did a proper test and should work now. <mapBattle:true> = normal map battle animation, <mapBattle:false> = regular srpg battle animation and <AoEAnimation> = group battle animation



Replace onTurnEnd function in srpgCore.js with the following code:

Code:
    var _SRPG_Game_Battler_onTurnEnd = Game_Battler.prototype.onTurnEnd;
    Game_Battler.prototype.onTurnEnd = function () {
        if ($gameSystem.isSRPGMode() == true) {
            this.regenerateAll();
            this.updateSrpgStateTurns(2);
            this.updateBuffTurns();
            this.removeStatesAuto(2);
            this.removeBuffsAuto();
            this.clearResult();
            this.setSrpgTurnEnd(false);
            //Buff & States Core Fix
            if (Imported.YEP_BuffsStatesCore !== undefined) {
                if (Imported.YEP_BuffsStatesCore) {
                    if (this.meetTurnEndStateEffectsConditions()) this.onTurnEndStateEffects();
                }
            }
        } else {
            return _SRPG_Game_Battler_onTurnEnd.call(this);
        }
    };




No individual turn orders has not been implemented. I don't plan on making a script for this as it's beyond my scope. It'll require a huge restructure of the flow of srpg_core.js and break quite a few plugins
I tested and work fine.

But if I set mapbattle on and the tag <AoEAnimation> stay in skill tag, the AoEAnimation will run. So, I must create a condition when mapbattle on for the AoEAnimation dont play?
 

siluman

Siluman Soft
Member
Joined
Apr 20, 2019
Messages
19
Reaction score
1
First Language
Malay
Primarily Uses
RMMV
Hello, been quite long not here.
it's quite late but can I ask how to do members placement based on party?
and what is the update in v1.34 of the core script?
 

boomy

Veteran
Veteran
Joined
Jan 6, 2013
Messages
171
Reaction score
142
First Language
English
Primarily Uses
RMMV
Hello, been quite long not here.
it's quite late but can I ask how to do members placement based on party?
and what is the update in v1.34 of the core script?
Check out shoukang's battle prepare script


1.34 update doesn't add any new features but does incorporate other scripts such as Dr Q's map battle and some Japanese scriptures dynamic battle action scripts into the srpg_core
 

NoPiessadface

Veteran
Veteran
Joined
Feb 7, 2019
Messages
117
Reaction score
30
First Language
english
Primarily Uses
RMVXA
how can I create different teams ex. team 1, team 2, neutral team
 

fearjunkie

Villager
Member
Joined
Jul 20, 2014
Messages
16
Reaction score
0
First Language
English
Primarily Uses
Forgive me if this question has been asked before, but is there a way to set up a phase before the battle where you can decide where you want your party members to start the battle?
 

boomy

Veteran
Veteran
Joined
Jan 6, 2013
Messages
171
Reaction score
142
First Language
English
Primarily Uses
RMMV
Thanks for this but it still doesn't work properly. Do I need to do something special to import buffs and states core (I looked at yanfly's other pluggins to try to understand how importing works but still don't quite get it)

Edit: That's not it. It has imported, I added a console log just before the check for conditions and that runs, it's just the turn end states still don't trigger.
Hmm... add this edit (replace the function) to Yanfly's Buff and States Core script

Code:
Game_Battler.prototype.meetTurnEndStateEffectsConditions = function() {
    
    //SRPG Edit
    //if (!$gameParty.inBattle()) return false;
    if (!$gameParty.inBattle() && !$gameSystem.isSRPGMode()) return false;
    
    if (Imported.YEP_BattleEngineCore) {
      if (BattleManager.isTurnBased()) {
        return true;
      } else if (BattleManager.isTickBased() && !BattleManager.isTurnEnd()) {
        return true;
      } else {
        return false;
      }
    }
    return true;
};


Forgive me if this question has been asked before, but is there a way to set up a phase before the battle where you can decide where you want your party members to start the battle?
Check Shoukang's scripts; it's in the first post of this topic and discussed the page before...
 

NoPiessadface

Veteran
Veteran
Joined
Feb 7, 2019
Messages
117
Reaction score
30
First Language
english
Primarily Uses
RMVXA
help i dont know how to fix this problem but whenever I select an actor to exchange or remove I always get this Type Error!

Plugins i used:
Screenshot (102).png
Error:

Screenshot (103).png
 
Last edited:

NatePlays

Veteran
Veteran
Joined
Dec 12, 2018
Messages
78
Reaction score
44
First Language
English
Primarily Uses
RMMV
I was making an addon to the core that changes the AgiAtkPlus calculation to use a fixed difference instead of random chance (as in Fire Emblem, if your speed is greater by X, you attack again.) It's simple enough:
1625751796940.png

(Also involves changing some other areas as well, but i'm working on those)

But I noticed I can't just change that part of the code, as AgiAtkPlus is baked in
Scene_Map.prototype.srpgBattleStart instead of being called as a function. I'd need to import the whole BattleStart function but that uses plugin params from SPRG_Core (and it's ugly).
I was thinking of making a plugin to be able to share it (as it seems like an easy change to a common problem), but should I make it just an edit of the Core and share here instead?
 

Shoukang

Veteran
Veteran
Joined
Jan 28, 2021
Messages
58
Reaction score
68
First Language
Chinese
Primarily Uses
RMMV
I was making an addon to the core that changes the AgiAtkPlus calculation to use a fixed difference instead of random chance (as in Fire Emblem, if your speed is greater by X, you attack again.) It's simple enough:
View attachment 194703

(Also involves changing some other areas as well, but i'm working on those)

But I noticed I can't just change that part of the code, as AgiAtkPlus is baked in
Scene_Map.prototype.srpgBattleStart instead of being called as a function. I'd need to import the whole BattleStart function but that uses plugin params from SPRG_Core (and it's ugly).
I was thinking of making a plugin to be able to share it (as it seems like an easy change to a common problem), but should I make it just an edit of the Core and share here instead?
I made a similar change for my game and I also noticed that this agiatk is not called by a function. Which is ugly and should be reconstructed. I will recommend you to make a plugin to reconstruct this Scene_Map.prototype.srpgBattleStart. And in the plugin description, mention that this plugin should stay above the other SRPG plugins except for the core.
It's fine to use plugin params from SRPG_Core. Many plugins do that. (For example SRPG_AoE)
P.S. You can also do a double attack when the agi difference is high to make it more fire emblem.
 
Last edited:

NatePlays

Veteran
Veteran
Joined
Dec 12, 2018
Messages
78
Reaction score
44
First Language
English
Primarily Uses
RMMV
I made a similar change for my game and I also noticed that this agiatk is not called by a function. Which is ugly and should be reconstructed. I will recommend you to make a plugin to reconstruct this Scene_Map.prototype.srpgBattleStart. And in the plugin description, mention that this plugin should stay above the other SRPG plugins except for the core.

So I got to doing that before posting, and tried again but... something very strange is happening.
1625767405848.png
This is the default code for deciding to add an extra attack or not (on sideview battle only), and I blindly decided to copy that onto my .js, only to see my attacker doing 2 attacks before a counter.
Then I noticed. In line 3, the function is calling itself, which appends the code from SRPG_Core to the default MV function. If I call the function again, i'll have the new attack logic happen twice, and if I don't call it at all, I override the default MV logic.

So, unless I patched the core itself, that can't really be changed. And by the way, changing the formula inside the core works as I intended, and I may do that if no other option works.
It's fine to use plugin params from SRPG_Core. Many plugins do that. (For example SRPG_AoE)
Just learned how to do that, lol. Really helpful for addons.
P.S. You can also do a double attack when the agi difference is high to make it more fire emblem.
1625768053982.png
This is my implementation. It uses the logic already there for AgiAtkPlus and only changes what's necessary. It's also based on a plugin param so it can be edited to personal taste.
 

Shoukang

Veteran
Veteran
Joined
Jan 28, 2021
Messages
58
Reaction score
68
First Language
Chinese
Primarily Uses
RMMV
So I got to doing that before posting, and tried again but... something very strange is happening.
View attachment 194735
This is the default code for deciding to add an extra attack or not (on sideview battle only), and I blindly decided to copy that onto my .js, only to see my attacker doing 2 attacks before a counter.
Then I noticed. In line 3, the function is calling itself, which appends the code from SRPG_Core to the default MV function. If I call the function again, i'll have the new attack logic happen twice, and if I don't call it at all, I override the default MV logic.

So, unless I patched the core itself, that can't really be changed. And by the way, changing the formula inside the core works as I intended, and I may do that if no other option works.

Just learned how to do that, lol. Really helpful for addons.

View attachment 194739
This is my implementation. It uses the logic already there for AgiAtkPlus and only changes what's necessary. It's also based on a plugin param so it can be edited to personal taste.
I see... seems like the only way to write a plugin for this is to also grab the original(default MV logic) BattleManager.makeActionOrders in your plugin...... this should work although some compatibility issue could happen. Looks like there is no good way to do this. Either patch the core or write instructions for replacing the code is fine.
Anyway, I'm glad you go into the code, and I'm sure you can create useful plugins in the future ^ ^

Hi @Shoukang, your plugins for the engine are great! Just a question:
for BattlePrepare, is there a way to skip the Battle Preparation Phase entirely?

The plugin command "DisableSRPGPrepare" only disables the Prepare command in the menu, and it'd be cool if there are battles where you can't prepare- Tutorial battles, for example.

Thanks for your work on the plugins nonetheless! :)
Sorry for the late reply. Somehow I tested my plugin in the demo and it works well. When I use the DisableSRPGPrepare command, the battle prepare phase doesn't show up at all.
I tried to repeat your situation and I guess you use the DisableSRPGPrepare command after the SRPGBattleStart command. You will need to disable battle preparation before you start the battle.
 

Shoukang

Veteran
Veteran
Joined
Jan 28, 2021
Messages
58
Reaction score
68
First Language
Chinese
Primarily Uses
RMMV
help i dont know how to fix this problem but whenever I select an actor to exchange or remove I always get this Type Error!

Plugins i used:
View attachment 194594
Error:

View attachment 194595
Please hit F8 to open the console to get more information.I think this happens because some functions are missing.
Also, you can try to add Dr.Q's range control, AoE, and AI control plugin. These are very essential plugins that are considered official and may have the functions missed.
 

Nezugi

Warper
Member
Joined
Jul 8, 2021
Messages
2
Reaction score
1
First Language
Deutsch
Primarily Uses
RMMV
Hi Everyone

where can i change the color of the distance indicator tiles (blue an red by default) ?
Cant find it anywhere.

distance.png

Thx in advance.

Greetings,
 

Shoukang

Veteran
Veteran
Joined
Jan 28, 2021
Messages
58
Reaction score
68
First Language
Chinese
Primarily Uses
RMMV
Hi Everyone

where can i change the color of the distance indicator tiles (blue an red by default) ?
Cant find it anywhere.

View attachment 194885

Thx in advance.

Greetings,
Search for the key words: "blue", 'blue', "red", 'red' (not sure they use single or double quote) in the core plugin, and replace them with other valid color names.
Some other plugins might override the colors so if it doesn't work check these keywords in Battle UI plugin or my showAoERange plugin.
 

NoPiessadface

Veteran
Veteran
Joined
Feb 7, 2019
Messages
117
Reaction score
30
First Language
english
Primarily Uses
RMVXA
Please hit F8 to open the console to get more information.I think this happens because some functions are missing.
Also, you can try to add Dr.Q's range control, AoE, and AI control plugin. These are very essential plugins that are considered official and may have the functions missed.
Screenshot (105).png
This happens literally every single time no matter what I do It just won't let me change the actor. I also can't understand and read the code because have no experience with javascript. Is it a bug or am I missing something?
 

Attachments

  • Screenshot (104).png
    Screenshot (104).png
    360.9 KB · Views: 13
Last edited:

NatePlays

Veteran
Veteran
Joined
Dec 12, 2018
Messages
78
Reaction score
44
First Language
English
Primarily Uses
RMMV
View attachment 195094
This happens literally every single time no matter what I do It just won't let me change the actor. I also can't understand and read the code because have no experience with javascript. Is it a bug or am I missing something?
That screen doesn't help much. Most I can get is that there's something happening with Shoukang's Battle Prepare.
We ask that you show the console (press F8) as that shows exactly what functions are giving errors (the ones in red), so Shou can help you.
 

Shoukang

Veteran
Veteran
Joined
Jan 28, 2021
Messages
58
Reaction score
68
First Language
Chinese
Primarily Uses
RMMV
View attachment 195097
This happens literally every single time no matter what I do It just won't let me change the actor. I also can't understand and read the code because have no experience with javascript. Is it a bug or am I missing something?
Thanks for your information. Sadly, I still can't understand what causes this issue. both includes() and push() are built-in array methods in JS...... Does it have something to do with the library? If anyone knows what's the cause please help...

P.S. I noticed that includes() is added in ES6 version of Js in 2016. Try to replace line 491
if (!actorlist.includes(this._actors[i])) list.push(this._actors[i]);
with
if (actorlist.indexOf(this._actors[i]) < 0) list.push(this._actors[i]);
 
Last edited:

NoPiessadface

Veteran
Veteran
Joined
Feb 7, 2019
Messages
117
Reaction score
30
First Language
english
Primarily Uses
RMVXA
Thanks for your information. Sadly, I still can't understand what causes this issue. both includes() and push() are built-in array methods in JS...... Does it have something to do with the library? If anyone knows what's the cause please help...

P.S. I noticed that includes() is added in ES6 version of Js in 2016. Try to replace line 491
if (!actorlist.includes(this._actors[i])) list.push(this._actors[i]);
with
if (actorlist.indexOf(this._actors[i]) < 0) list.push(this._actors[i]);
thnnxxxx it literally works!
 

Latest Threads

Latest Posts

Latest Profile Posts

I THINK I have a slightly better grasp on drawing my maps now... sorta. I still need to figure out how to draw a city of sorts. I've only got the abstract going so far.
One day, I'll not have this lingering cough and we'll have another make a game stream.
A music I create while practicing E Major scale. :D
Too bad the Boss Battle Build Bout isn't also for VXAce.

Forum statistics

Threads
115,180
Messages
1,087,898
Members
149,746
Latest member
Nesutokung
Top