[RMVX ACE] LIMITED NUMBER OF TIMES YOU CAN USE A SKILL (RESOLVED)
Posts
Pages:
1
Hello! :D
I wanted to make skills that the heroes gain via equipping certain equipment, but instead of using MP, they have a set number of uses and then they cannot be used again until you rest at an inn.
I had something similar in a XP project, but given that I knew zero scripting, I just made multiple copies of the same skill, with a different one for each number of uses left, and one that couldn't be used for when uses = zero, and checked it all with common events.
That seems a bit cumbersome, so I'm hoping to find a script or something similar that'll do the same thing. Yanfly's Skill Restrictions, using the <limited uses: x> tag, does basically what I want, except that it refreshes the uses after battle, and I want them to specifically refresh when the party rests.
Does anyone have any ideas how to do this? Could it be done by modifying the Yanfly script or is there a somewhat simple method that could make it work?
Thanks very much in advance! :DDD
I wanted to make skills that the heroes gain via equipping certain equipment, but instead of using MP, they have a set number of uses and then they cannot be used again until you rest at an inn.
I had something similar in a XP project, but given that I knew zero scripting, I just made multiple copies of the same skill, with a different one for each number of uses left, and one that couldn't be used for when uses = zero, and checked it all with common events.
That seems a bit cumbersome, so I'm hoping to find a script or something similar that'll do the same thing. Yanfly's Skill Restrictions, using the <limited uses: x> tag, does basically what I want, except that it refreshes the uses after battle, and I want them to specifically refresh when the party rests.
Does anyone have any ideas how to do this? Could it be done by modifying the Yanfly script or is there a somewhat simple method that could make it work?
Thanks very much in advance! :DDD
def on_battle_end
game_battler_on_battle_end_srs
reset_cooldowns
reset_times_used
end
find this and comment out or delete the reset_times_used line.
then call this at rests (using the in-event script code):
for i in 0..$game_party.members.size
$game_actor[$game_party.members[i]].reset_times_used
end
haven't actually tried this, lemme know if it works. i don't see why it wouldn't =P
author=Crazefind this and comment out or delete the reset_times_used line.
def on_battle_end
game_battler_on_battle_end_srs
reset_cooldowns
reset_times_used
end
then call this at rests (using the in-event script code):
for i in 0..$game_party.members.size
$game_actor[$game_party.members[i]].reset_times_used
end
haven't actually tried this, lemme know if it works. i don't see why it wouldn't =P
oh man this is awesome ... if this works then nothing stops developers from having D&D style times per day skills :D
Sorry to say this after I got help, but I found a better script for what I'm trying to do. Here it is, for anyone interested. It will not only disable the skill after a certain number of uses, but it'll also keep track of how many charges you have left, which is really nice.
Sorry about that ^^;;;;;
Sorry about that ^^;;;;;
author=unity
I had something similar in a XP project, but given that I knew zero scripting, I just made multiple copies of the same skill, with a different one for each number of uses left, and one that couldn't be used for when uses = zero, and checked it all with common events.
That seems a bit cumbersome
I... I would have done it exactly like that... Meh.
But nice to see you found a way to make this actually work better now, unity. It's a really interesting mechanic I always hoped to see more often.
author=NeverSilentauthor=unityI... I would have done it exactly like that... Meh.
I had something similar in a XP project, but given that I knew zero scripting, I just made multiple copies of the same skill, with a different one for each number of uses left, and one that couldn't be used for when uses = zero, and checked it all with common events.
That seems a bit cumbersome
But nice to see you found a way to make this actually work better now, unity. It's a really interesting mechanic I always hoped to see more often.
I know you're super skilled in doing cool things with events, NeverSilent :D In this case, it would have gotten super-complicated, as each skill is only supposed to show up if you have the right piece of equipment equipped, and if I used multiple skills to simulate the limited uses, I'm not sure how I would make both of those elements work together.
In my early XP days (and RPG 2000 days, on anything I worked on after starting Chase for Divinity), I had to get inventive with common events and multiple skills to simulate an effect of just one skill, but if a script can save me hours and hours of time and look better while doing it, I'll take the script ;)
Pages:
1

















