I'm a bit lost on this.
are you suggesting that I use this script instead of Skill Restrictions or as well as that one?
And I am utterly lost about how these note tags come in. I hadn't intended having anything other than normal skill costs. The only thing out of the ordinary would be that the number of uses are limited. I'm afraid I can't follow what those tags are doing.
Sorry to be such a script idiot, it is my natural condition.
Sorry about the confusion. 😛
Yea for what you are doing I would probably recommend the script in the link I posted. Reason for this is I think it would be the easiest solution to what you are doing (I have something similar in the game I am working on). All the note tags posted above would be placed in the skills note box.
The first note tag:
<custom cost requirement>$game_variables[n] >= 1</custom cost requirement>This is telling the skill that if the $game_variable n is >= 1 you can use the skill.
The next note tag:
<custom cost perform>$game_variables[n] -= 1</custom cost perform>This is telling the skill that after use lower $game_variable n by 1.
The last note tag (assuming it works I haven't tested it like this which is why I also mentioned that you may need a script to allow \v[n] in skill names):
<custom cost: $game_variables[n]>This would (hopefully) show you how many more times you can use the said skill. So "Skill name 5" for example in the skill selection window. Might be able to format it like this:
<custom cost: "x #{$game_variables[n]}">So it would then look like "Skill name x 5"
I am very sorry, but I am still a little confused.
1) I assume from this that every skill which is affected by this will need its own unique variable switch.
2) Those variables would have to be set up and activated at the beginning of the game.
3) The first 3 note tags are put into the skill note box.
4) You then tell me to format the skill selection box with the next, small note. What do you mean by the skill selection box. Do you mean the skill name in the data base? Or something else?
5) How does it know when to reset these? Are you saying that every inn event is going to have to reset all the variable switches? (Sounds a bit of a nightmare, and wide open to error, so I'm hoping you mean something else.)
I do apologize for these questions, but I really can't work this out.
Perfectly all right.
1 and 2) not necessarily you can use a multi dimensional array (an array inside of an array). So you could have something like this $game_variables[n] = [5, 3 , 8] in a starting parallel event (numbers are example amount of times a skill may be used before you would need to rest at an inn). Then you would call this in the note tags like so:
<custom cost requirement>$game_variables[n][0] >= 1 #this would be the first index in the above array which in this #case would be the number 5</custom cost requirement>3) Yes.
4) Sorry meant that when you are in battle and viewing skills or viewing skills in the menu the skill listed in the skill selection window would be formatted using the 4th note tag I posted. If the said note tag didn't work then you would probably use \v[n] (like you would use in a message window) in the skill name box in the database so your players will know how many more uses they have left.
5) This will be the complicated one, easiest method I know of would be to actually use two $game_variables with the same data one to be read by your skills and the other as a limit for increasing them back to their appropriate amounts. I will be able to post a correct loop for doing this in about an hour (dinner is calling). I will try and give more information shortly.
Use the script call Rest_Skills.rest inside your inn events to return the skill use amount back to normal:
place this snippet in a new script slot above main and below materials.
#Script call Rest_Skills.restmodule Resting#replace V1 with the id you are using for the variable in the skill note tags#replace V2 with the id you are using for the variable that is holding the limitsV1 = 301V2 = 302endclass Rest_Skillsinclude Restingdef self.rest ($game_variables[V2].size - 1).times do |i| while $game_variables[V1] < $game_variables[V2] $game_variables[V1] += 1 end endendendSo In short use two $game_variables (currently using 301 and 302)
Set them in a starting parallel event like so:
Both should have the same values.
$game_variables[301] = [number1, number2, number3, etc, etc]
$game_variables[302] = [number1, number2, number3, etc, etc]
Then you can use them in note tags by doing the second variable should not be used (as it is just for returning the numbers back to default once you rest at an Inn):
$game_variables[301][0]
#indexes starts at 0 and ends one number short of the length of your array if you want to find the length use:
puts $game_variables[301].size - 1
Okay don't use the 4th note tag then I'll see if I can't find something that will work for that instead. For the MP part line 228 is
MP_COST_SUFFIX = "%sMP" #remove the %sMP keep the ""There is also one for TP which you can do the same too.
Great, I've removed the MP and TP.
When I remove the 4th tag, the skill name is still being overwritten, but it's less messy, so I think it's only being overwritten once, not twice, It looks like it's the
$game_variables[18]
This is from the third tag because when I remove that, the skill name is no longer overwritten. What there is now is
Skill name 035
35 is the MP cost, so I am assuming that the zero is the result of the first 2 tags showing up. The variable has been set to 3 uses.
We're nearly there.
As instructed the 3rd tag was amended.
The message code reads x\vv[18][3]
I set variable 18 to 3, then taught the skill to the character. In the skill list it shows up as
Skill name x0 35
The skill works, but it stays as x0
EDIT
Done it!
I changed x\vv[18][3] to a simple x\V[18] and the correct number showed up. I used the skill once, and the number reduced to 2.
I'm falling over with tiredness now, as it is late in my time zone. So if you have any further thoughts, I'll pick them up in the morning.
Thank you so much for this. I am extremely grateful.
Thanks for the further explanation, and for the demo.
When I run the demo, however, the inn event doesn't quite work. The first skill (strong attack id 80) resets, but the second skill (cleave id 81) does not, and i cannot see why.
#Script call Rest_Skills.rest#Fixed bug with some skills not returning to normal when script is called.module Resting#replace V1 with the id you are using for the variable in the skill note tags#replace V2 with the id you are using for the variable that is holding the limitsV1 = 1V2 = 2endclass Rest_Skillsinclude Restingdef self.rest ($game_variables[V2].size).times do |i| while $game_variables[V1] < $game_variables[V2] $game_variables[V1] += 1 end endendendReplace the Resting Skills script with this one.
All is now well, and running as expected.
Once again, thank you very much for this. I do appreciate your time and expertise.
You are most welcome 😀
I just wish I knew about doing it this way a year ago lol would have helped me so much.
I know the feeling. There have been a couple of things I've found months too late to be useful.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.