Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Apr 27, 2005 2:15:19 GMT -5
Well, I tried learning how the default 'Check MP' script worked, and I think I've got it down, except I have a few questions.
(probably only DW can help)
1) The Advanced FAQ doesn't mention anything about 'System Flag' #284 nor are the lines involving it in the default 'Check MP' script included in the FAQ's 'Check MP' script. From looking at the script in RPGM2 it seems to me as though 'System Flag' #284 determines whether the ability will succeed or fail (On is success and Off is failure). Am I right about this?
2) So if I only needed the 'Check MP' script to check if the instigator has the required amount of MP I would only have to do this for my script, right?
Data: Load Ability Info (am I already on the current Ability?) Battle: Substitute Target Attribute for Variable (already on instigator) Script Branch: Condition: Variable [Magic Points] >= [Ability Cost] Data: Flag [System Flag (#248)] = On Condition: End Script Branch: Condition: Variable [Magic Points] < [Ability Cost] Data: Flag [System Flag (#248)] = Off Condition: End
Thank you VERY MUCH to whomever helps me with this!
|
|
|
Post by Rodak on Apr 27, 2005 12:52:31 GMT -5
Well, this may be useless. And it may do more harm than good. But since noone else has offered a suggestion I can give you a tip from my work with traits (I think you posted in that thread, so you know what I'm talking about). Before I say this let me point out that I am no Dungeon Warden. Few can match his expertise with this system. That said :
Try ignoring the flag.
I was constantly scripting for the trait flag and getting funny results, but when I removed all references to it in my scripts the darn thing worked perfectly!
Of course I am using an only slightly modified battle system. It does not qualify as a Custom system. But if the system flags are handled by bits of the system we cannot address this may work for you. Just script for the MP ratio condition and see what happens!
I really do not expect this to work, but sometimes just trying something fruitless gets the brain moving along directions that yield good results. Especially if you see what happens with the references gone.
Good luck with it.
|
|
|
Post by Dungeon Warden on Apr 27, 2005 12:58:40 GMT -5
What? There is no System Flag 284 or 248. Where did you get this flag from? The flag Check MP uses is Flag 94: Instg Success. As the FAQ says, this flag is used by Game : Direct Effect : Adv : Flow2 : Success Check. If On, then the Success script is run; otherwise, Fail is run.
Striped down, the script should look like this:
000- Data: Load Ability Info 001- Data Flag: (Stat Check Type)On 002- Data: Substitute Attribute for Variable 003- Script Branch Condition:Variable(MP)=> Ability: Cost 004- Data Flag: (Instg Success)Off 005- Script Condition End 006- Script Branch Condition:Variable(MP)< Ability: Cost 007- Data Flag: (Instg Success)On 008- Script Condition End 009- Data: Flag: (Stat Check Type)Off
The flag instg Success is used internally by the Direct effect and doesn't do anything by itself. It is used to determine which script the effect will run next (Success or Fail)
I hope that answers your question. If not, please let me know what it is you are trying to do.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Apr 27, 2005 15:43:10 GMT -5
I think that'll do it. THank you DW! I meant flag #284, 'System Flag'. For some reason the default script does use it. The 'Inst Success' is what I was looking for. Thank you!
And thank you too rodak.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Apr 27, 2005 21:00:40 GMT -5
Alright, I figured this out. I'll post my exact scripts soon but for now I'll just tell you guys what I learned: The 'Check Fail' slot (in Adv tab of direct effects) is only to display a failure message. Hence the default script I was looking in didn't actually check the conditions. Fortunately, I made my own script to check if the instigator had enough MP, and learned to put it in the 'Check Start' slot instead of the 'Check Fail' slot. The other thing is this: the 'Check Start' slot's script uses the 'Inst No Action' flag, where as the 'Success Check' slot's script uses the 'Inst Success' flag. The 'Check Start' slot's script runs before MP is deducted(and before visual is displayed), while the 'Success Check' slot's script runs after MP is deducted (and after visual is displayed). RPGM2 had some quirks I had to figure out, so I'll post the full scripts here soon. I got it working perfectly though, so I'm happy.
|
|
|
Post by Dungeon Warden on Apr 28, 2005 16:43:08 GMT -5
I'm pretty sure that's what I said in my FAQ, but if you repeating it here helps people better understand Direct Effects that's fine. Check the Direct and Indirect Effect sections of my FAQ for other flags that these databases use.
|
|