Okay I'm looking for a script that allows you to change the resource cost of a skill when there is not enough of its normal resource to use (eg instead of costing 4mp when mp drops below 4mp the cost changes to something like 6tp or 6hp)
Change skill cost when MP/TP runs out/low
RGSS3 Script RequestsThis is just a theory.
http://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/skill-cost-manager/
Above, is Yanfly's Skill Cost Manager script. If you scroll down the page a bit, you'll find some tags showing Custom Cost and Custom Cost Perform. These tags rely on eval functions. I wouldn't know what you would type specifically, but hopefully someone with scripting knowledge follows up.
Now if the eval function works the way I hope it does... You could have a conditional branch check how much mp the actor has. If it has less than the required amount, then follow that eval with another string that sets the cost for TP/HP.
Again, this is just a theory. I'm really trying to think outside the box here.
http://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/skill-cost-manager/
Above, is Yanfly's Skill Cost Manager script. If you scroll down the page a bit, you'll find some tags showing Custom Cost and Custom Cost Perform. These tags rely on eval functions. I wouldn't know what you would type specifically, but hopefully someone with scripting knowledge follows up.
Now if the eval function works the way I hope it does... You could have a conditional branch check how much mp the actor has. If it has less than the required amount, then follow that eval with another string that sets the cost for TP/HP.
Again, this is just a theory. I'm really trying to think outside the box here.
What ? Please PM me and write what are you meaning about this.
Maybe i can make a script.
Maybe i can make a script.
What he said was pretty crystal clear. o_o If you didn't understand that then I doubt you could make use of the custom cost eval functions, because it's heavily script-knowledge-based.
Yeah, I'm not sure if I can get much more specific than that without actually showing you in a video. Which isn't going to happen because I'm not even sure how to write most custom evals.
from quick tests not had much luck so far
basically what you want are conditional costs for skills instead of the fixed costs from the database.
Yanfly's skill cost script (linked in post #2) might be able to help you, but you need to convert the condition to a ruby/RGSS sequence and then place that into every skill's notetag, and I don't know if that script processes everything inside the eval as a ruby-script.
Now the question is:
How exactly do you want the costs shifted for every skill? Can you give that as a formula like "If there are not enough MP, I want it costing 150% of the cost in HP"?
If yes, then it might be better to have a script requested than placing conditions into every notetag.
But it won't be easy, because the default engine is programmed toward "Skill unusable if cannot be paid for".
Yanfly's skill cost script (linked in post #2) might be able to help you, but you need to convert the condition to a ruby/RGSS sequence and then place that into every skill's notetag, and I don't know if that script processes everything inside the eval as a ruby-script.
Now the question is:
How exactly do you want the costs shifted for every skill? Can you give that as a formula like "If there are not enough MP, I want it costing 150% of the cost in HP"?
If yes, then it might be better to have a script requested than placing conditions into every notetag.
But it won't be easy, because the default engine is programmed toward "Skill unusable if cannot be paid for".
This may not work as the scripts I'm thinking of may not exist, but if someone wanted to write them, it could be done this way:
First, a script would be needed that can change the displayed amount of MP/TP needed for a skill.
Second, the skill itself would have to use this script to show it requires, say 10 MP, where in the database, it requires 0.
Third, use Yanfly's Follow-up script to use an hp draining skill on the original skill's user if the amount of the first skill was not available.
Finally, use the damage formula of the second skill to drain whatever MP the user had and take the rest as a percentage of HP.
So, if you used a skill that took 10 MP, but only had 5, the first skill would activate, and the second skill would follow, since the condition of not having 10 MP would be met. The 5 MP would be taken and 25% of the user's MHP would be used for the rest. Since it's a different skill, you could even use an effect showing the life being drained!
Just a thought.
Like I said, the MP Display script doesn't exist, as far as I know.
First, a script would be needed that can change the displayed amount of MP/TP needed for a skill.
Second, the skill itself would have to use this script to show it requires, say 10 MP, where in the database, it requires 0.
Third, use Yanfly's Follow-up script to use an hp draining skill on the original skill's user if the amount of the first skill was not available.
Finally, use the damage formula of the second skill to drain whatever MP the user had and take the rest as a percentage of HP.
So, if you used a skill that took 10 MP, but only had 5, the first skill would activate, and the second skill would follow, since the condition of not having 10 MP would be met. The 5 MP would be taken and 25% of the user's MHP would be used for the rest. Since it's a different skill, you could even use an effect showing the life being drained!
Just a thought.
Like I said, the MP Display script doesn't exist, as far as I know.
Original thread: https://forums.rpgmakerweb.com/threads/change-skill-cost-when-mp-tp-runs-out-low.17294/