Hello!
I'm making a State that, unlike others in the game, remains after the end of a battle, and its turn counter would decrease more and more for every tot steps taken by the player. I thought i could you use the default "remove after tot steps" option given by the editor, but sadly it immediately removes the State after that tot steps has been taken. Is there a way i can do this? Thanks in advance!
I thought i could you use the default "remove after tot steps" option given by the editor, but sadly it immediately removes the State after that tot steps has been taken.
I'm not quite understanding you here - if it says "remove after total steps", and you check it and it removes after that number of steps, isn't it doing what it's saying? What are you expecting it to do that it's not?
I'm not quite understanding you here - if it says "remove after total steps", and you check it and it removes after that number of steps, isn't it doing what it's saying? What are you expecting it to do that it's not?
I'll explain myself better. Let's say that this State has 3 turns left before it expires. What i would want is that, for example, after 50 steps the State's turn counter drops to 2, after other 50 steps it drops to 1, and after other 50 steps the State expires. That's what i would want to achieve.
But from what you're saying the turns can't be affected that way.
It is possible to dynamically change how many steps you must take before the state expires then?
EDIT: I think i figured something out!
Code:
target._stateSteps[x] = target._stateTurns[x] * 50;
//Yes, i'm using Yanfly's BuffStatesCore to apply this
This way i can decide based on how many turns the State has how many steps you have to take before it's removed. Only thing is that the Turn counter will remain the same, but oh well. Thanks anyway!
EDIT2: Ok, to specify, the code above is to be put in a "Custom Victory Effect" and "Custom Escape Effect" tags, this way it immediately calculates the number of steps to be taken for the State to expire using the remaining turns for that State. Second, for this to work you need your status in the Database to be set that it doesn't disappear at the end of battle, and you have to toggle on "Remove after steps", or else the game won't register your number of steps.
Last thing, i made a script that counts off the turns from the State as you walk in the game. This scripts works only for the first 4 party members in your party as i wrote it, but it can register as many States for member as you want:
JavaScript:
//These are the States you want to persist after battle and of which you want the turn counter to drop down as you walk
$gameSystem.statusesRemainAfterBattle = $gameSystem.statusesRemainAfterBattle || [4, 16, 18, 22];
//These are your 4 party members. You can make it count more party members if you want by adding a ",[]" inside it. This variable will work as list for each party member, containing the States in "$gameSystem.statusesRemainAfterBattle" they're currently affected from.
$gameSystem.memberAfflictedRemain = [[],[],[],[]];
for(var i = 0; i < $gameSystem.memberAfflictedRemain.length; i++)
{
for(var j = 0; j < $gameSystem.statusesRemainAfterBattle.length; j++)
{
//If the party member you're checking exists, if he's afflicted by one of the States in "$gameSystem.statusesRemainAfterBattle" and if the Turn counter for that State hasn't already reached 0, that State will be added in the Party Member's list
if($gameParty.members()[i] != null && $gameParty.members()[i].isStateAffected($gameSystem.statusesRemainAfterBattle[j]))
{
if($gameParty.members()[i]._stateTurns[$gameSystem.statusesRemainAfterBattle[j]] > 0)
{
$gameSystem.memberAfflictedRemain[i].push($gameSystem.statusesRemainAfterBattle[j]);
}
else
{
//If the turn counter for this State has reached 0, the State is removed from the Party member
$gameParty.members()[i].removeState($gameSystem.statusesRemainAfterBattle[j]);
}
}
}
}
for(var j = 0; j < $gameSystem.memberAfflictedRemain.length; j++)
{
for(var i = 0; i < $gameSystem.memberAfflictedRemain[j].length; i++)
{
//Here it checks the States in the Party Member's list. For each of them, the game sets the remaining turns using the remaining steps to be taken to make it expire.
//In this case, for each 50 steps you take, the State's Turn Counter will drop down by 1
$gameParty.members()[j]._stateTurns[$gameSystem.memberAfflictedRemain[j][i]] = Math.floor($gameParty.members()[j]._stateSteps[$gameSystem.memberAfflictedRemain[j][i]] / 50);
}
}
Put this in a Common Event set in Parallel and you're golden.
Hope this can be of help!
On my journey of character rework: I had this character, she was meant to be just a princess that joins your party. And at long term she was just uninteresting... So I tweaked her to be a rebel agaisn't the royalty before meeting up with the party.
Quick tip for any other ametuer pixel artists! When trying to create a colour palette, enabling Antialiasing can speed up the process of creating different shades! Just place your lightest colour and your darkest colour next to each other, select both pixels, and stretch it out!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.