Hi, Shaz.
Thanks for the quick reply.
No the test message doesn't print to the console and there are no line breaks in the note tags.
That is why I think the script is being interfered with by another.
As for applying it during battle ... No, to test I was just applying the state with a skill outside of battle. The state applies but the note tags don't.
But creating "battle" skills was exactly what I wanted to do with the script.
Example: Focus Attack - Adds +10 to the actors Attack for 3 rounds.
I prefer to add a constant to the parameters instead of percentages through buffs.
So, I guess I'm back to square one.
I wonder if one of the other scripts is completely changing what happens when states are added. You SHOULD at least see the console output. Are you just using the Change Actor State event?
Can you do a global search (control+shift+f) for def add_new_state and see how many scripts redefine it? There should be at least Game_Battler and SHAZ - State Commands. If there are any others, then yes, there may be incompatibilities between the scripts. There could also be incompatibilities if other scripts have changed the methods that previously called Game_Battler.add_new_state to no longer call it. That could certainly explain why NOTHING is happening.
Hi, Shaz
Yea, in the common event I'm just using the Change Actor State event. Which now that your asking I guess I could change the parameter right in the onadd: command, if I can get the script to work. That way it won't need to run a common event during battle processing.
I did a search as you suggested and found that the following 3 scripts have the def add_new state method:
Game_Battler
Yea - Battle Engine
And Your script.
So my guess is the Yea - Battle Engine is messing with it.
This weekend I'll start a test project without the YEA - Battle Engine and I'll bet it works.
Then I just need to figure out how to get your script to point to the def add_new_state in the Yea - Battle Engine script.
Just disable the YEA Battle Engine temporarily, give the state to your actor on the map, and see if it works. If it does, then it's likely something about the battle engine script and mine conflicting.
I need a hand with removing states.
States A and B nullify each other, like this:
When using a skill that applies A.
If B is not applied, add A.
If B is applied, remove both A and B, or directly not add A and delete B.
When using a skill that applies B.
If A is not applied, add B.
If A is applied, remove both B and A, or directly not add B and delete A.
How it's possible to do this?
I was wondering if you could help me out.
What I am trying to do:
After a state wears off of the target a spell is cast damaging the target and its allies. Like a time bomb or something
*Edit:
I got it.
Used onremove: $game_temp.reserve_common_event(x)
and used a force action in the common event for the spell I wanted to cast
I seem to be having the same issue as Zero was earlier. Neither onadd: remove_state(id) or onadd: erase_state(id) seem to do anything... Am I missing something obvious?
Can you zip up your project and load it up somewhere for me to take a look at?
Is there any way to get this to trigger on death? For example, a move where enemy does X if left alone for an amount of turns, Y if they die before that specified turn was met. So far I'm using:
onremove: if hp_rate = 0; $game_temp.reserve_common_event(33); else; $game_temp.reserve_common_event(34); end;However, when the enemy dies, it never calls common event 33, it just continues on.
This script is beyond incredibly useful, by the way. Absolutely excellent.
It probably doesn't happen because the state is not removed on death - is it?
I don't see an option to remove a state on death - does it exist? The closest I can find is damage, but it doesn't let you state how much damage.
I think that'd be a new script, if there's not already a way to do it.
$game_variables[27] += 1
Yes, you can CALL a common event in battle. Common events set to parallel process or autorun will not run in battle.
Strangely enough, it looks like lines 64 and 65 are in the wrong order in the script. The way it currently is, EVERYONE who is trying to use this version of the script to add states would be having issues.
I cannot figure out why I put them in that order. I know there was a problem with resist_states and I may have changed the order to solve that issue, but there's no note in the thread here or in the script comments or revisions to indicate that I ever did that (and I don't recall writing a solution).
So, for the time being, please just swap those two lines around in the script, and let me know if it has any unusual side effects.
I'm about to convert this script to MV, and have been looking through the issues people have mentioned, but I either can't quite understand them, or I can't reproduce them. So if anyone is using this script and it's not behaving correctly (in relation to state_resist, turn duration, or commands not being executed), can you please post again with screenshots of your states, steps to reproduce the problem, and an indication of what you expect to happen and what's really happening? If I can figure out the issues as I port the script, I can also fix the Ace version at the same time.
Yeah, unfortunately I'm not aware of all the other scripts out there that would affect this one, and I don't have time to write compatibility patches. You're very welcome to make a thread in RGSSx Script Support with links to the two scripts, explaining the issue, to see if someone can make a compatibility patch. (and if you do get someone to make it, you're also welcome to post a link to that thread here so others in the same situation can benefit).
Sorry I can't offer much help.
That's interesting about the line numbers - they're 64/65 in my version of the script, and I don't think there's a difference. Maybe there's something in the comments that pushed it down - or maybe I DID start working on the other issue at some point and didn't realize they're not quite the same. At least you knew what I was talking about 🙂
I'll give this a shot, Credit will be given.
No, I'm pretty sure that line has to be there. I think I added it when there was a problem when you equip/unequip armor that has a state resistance.