- Joined
- Jan 13, 2017
- Messages
- 89
- Reaction score
- 12
- First Language
- French
- Primarily Uses
@Warilized Thanks for the help. Fixing the parentheses worked, and you gave me more tools to fiddle with in the future.
<Custom Execution>
var group = $gameTroop.aliveMembers()[Math.floor($gameTroop.aliveMembers().length)];
if (group === 4){
target.addState(87);
target.addState(89);
target.addState(92);
target.addState(45);
} else if (group === 3){
target.addState(89);
target.addState(92);
target.addState(45);
} else if (group === 2){
target.addState(92);
target.addState(45);
} else if (group === 1){
target.addState(45);
}
</Custom Execution>
<Post-Damage Eval>
var group = $gameTroop.aliveMembers().length;
if (group >= 1) {target.addState(45);}
if (group >= 2) {target.addState(92);}
if (group >= 3) {target.addState(89);}
if (group >= 4) {target.addState(87);}
</Post-Damage Eval>
<Custom Conclude Effect>
if (target.hpRate() <= 0) {
if (user.isActor()) {
targetsFriendly = $gameParty.aliveMembers();
targetsEnemy = $gameTroop.aliveMembers();
} else {
targetsFriendly = $gameTroop.aliveMembers();
targetsEnemy = $gameParty.aliveMembers();
}
for (var i=0; i<targetsFriendly.length; i++) {targetsFriendly[i].gainMp(5);}
for (var i=0; i<targetsEnemy.length; i++) {targetsEnemy[i].gainMp(-5);}
}
</Custom Conclude Effect>
@Willibab
Not sure if this is the most efficient solution, but it does the trick for me:
Edit: wait hold on I forgot about the lose MP part, give me a second.
Edit2: Okay I fixed it, try this one:
JavaScript:<Custom Conclude Effect> if (target.hpRate() <= 0) { if (user.isActor()) { targetsFriendly = $gameParty.aliveMembers(); targetsEnemy = $gameTroop.aliveMembers(); } else { targetsFriendly = $gameTroop.aliveMembers(); targetsEnemy = $gameParty.aliveMembers(); } for (var i=0; i<targetsFriendly.length; i++) {targetsFriendly[i].gainMp(5);} for (var i=0; i<targetsEnemy.length; i++) {targetsEnemy[i].gainMp(-5);} } </Custom Conclude Effect> >
Open up the plugin and go to line 776 (it should say 'delete' in a few places). At the beginning of the line, type // to comment it out, save the plugin, refresh it in your plugin manager, and save your project.Hi there,
I'm wondering how I would go about implementing a cancel option in Yanfly's Save Core plugin to replace the delete option as I don't want to have a delete option there.
Game_BattlerBase.prototype.stateIcons = function() {
return this.states().map(function(state) {
if (!state.meta.hideIcon) return state.iconIndex;
}).filter(function(iconIndex) {
return iconIndex > 0;
});
};
That is the correct line to comment out to change that behavior - it works in my game.What line or line in rpg_scenes.js do I comment out to get the music not to fade out but to keep playing in Scene_Title when the player selects 'New Game'?
I've got deja vu asking this (like, maybe I asked twice before and kinda forgot?), and very weirdly I seem to have been able to do this on an older project by commenting out line 512 but this exact same approach isn't working on my newest project. Now of course the projects have totally different plugins in plugin orders but none of the plugins SHOULD be overwriting anything about how Scene_Title behaves. Thanks!
TryHow do I hide certain states only when I'm in scene main menu, and not in scene equip menu or battle?
Code:Game_BattlerBase.prototype.stateIcons = function() { return this.states().map(function(state) { if (!state.meta.hideIcon) return state.iconIndex; }).filter(function(iconIndex) { return iconIndex > 0; }); };
if (!state.meta.hideIcon || !(SceneManager._scene instanceof Scene_Menu))
This is really not the right place for that question, as it is not about using JavaScript innately. Also, the answer is in the plugin documentation. The very first notetags listed are:Is there any way to customize the actor portraits in the turn order row thingy in Yanfly's CTB battle system? The default look really clash with the look of my game. I ask as someone who can't really code.
<CTB Icon: x>
<CTB Border Color: x>
<CTB Background Color: x>
Note that this just stops it from fading, it creates a much more obnoxious sudden stop just before the music for your first map starts to play...but that's up to you to get working the way you want.
What is going wrong? Are you getting a fade even with that command commented out? Do you have the first map either set to the same BGM or having no BGM? (I think having the same would be more likely to work)Yeah, 'keep playing onto the first map' is what I'm shooting for, and that is how it behaves on this older project with that line commented out. I haven't heard the obnoxious sudden stop behavior yet. Really freaking weird. Again, the projects don't have the same exact plugins in the same order, but they do have like 90% of the same plugins in a logical order and none of those plugins should be overwriting anything in scene_title. Clearly there's something I'm misisng, but what?
Bizarre. I'll keep poking at it occasionally, it's definitely a minor annoyance, but mainly it's such a minor thing I've gotta keep working and ignore it for now.