[SCRIPT HELP]
Posts
Pages:
1
Engine in use: RPG Maker VX
EDIT: Sorry! I forgot to include the name of the Thread... DX It is called Skill Point Currency System, thanks for understanding...
OK, this is difficult for me to explain so if you don't understand, I'm sorry, I will try to explain better for you and provide images if I can:
I am looking for a way to get Skill Points earned instead of EXP points earned in my game... Think of Final Fantasy X, I suppose is the easiest way to explain it to you. Example provided below:
http://i45.photobucket.com/albums/f54/wali...fantasy-x-4.jpg
I have attempted to create this script myself, and have even attempted going through all of my scripts in the system and adding the code into them, but to no avail... I think I messed up my scripts to be honest... Luckily, I had a back-up though...
Example of what I am looking to have in there:
Normal for Gold:
#--------------------------------------------------------------------------
# * Get Gold
#--------------------------------------------------------------------------
def gold
return enemy.gold
end
Now this is what I have placed in there for collecting my skill points (called Dias Points - DPs - in my game):
#--------------------------------------------------------------------------
# * Get Dias Point
#--------------------------------------------------------------------------
def diaspoint
return enemy.diaspoint
end
It is stuff like this that I have gone and added throughout all of my scripts, figuring the SP's would be counted the same way as Gold, since it is a form of "currency" I suppose, instead of spending it at NPC's, you spend it on the Skill Map:
http://rpgmaker.net/users/kitten2021/locke...GridImg0031.png <-- Still WIP mind you...
Currently, I am using Variables to add or subtract the SPs, however, I have no way for you to gain them in battles, or to see how many you have or to track them and use them apart from making Conditional Branches using the Greater Than or Equal To option in there and just adding it to the player on my own...
Its nice and I like this, but I still need a way for the players to 'see' how much SPs they have earned... I would like for whenever they enter the Skill grid, it automatically pops up for them, but I would also like to see it show up in the menu. If possible, could someone explain to me how to get it compatible with the script: Status Window Display RGSS2 by DAIpage ? Possibly even show up by turning them on or off on the field? I don't know... I'm open to anything anyone can suggest really... Just as long as it can either be explained to me in simple terms, or have instructions in 'extremely' simple terms if someone makes it for me instead.
Thank you SO very much!
(P.S: If there IS a script for this already, please point me to it and then I will request this thread closed. Thanks again!)
EDIT: Sorry! I forgot to include the name of the Thread... DX It is called Skill Point Currency System, thanks for understanding...
OK, this is difficult for me to explain so if you don't understand, I'm sorry, I will try to explain better for you and provide images if I can:
I am looking for a way to get Skill Points earned instead of EXP points earned in my game... Think of Final Fantasy X, I suppose is the easiest way to explain it to you. Example provided below:
http://i45.photobucket.com/albums/f54/wali...fantasy-x-4.jpg
I have attempted to create this script myself, and have even attempted going through all of my scripts in the system and adding the code into them, but to no avail... I think I messed up my scripts to be honest... Luckily, I had a back-up though...
Example of what I am looking to have in there:
Normal for Gold:
#--------------------------------------------------------------------------
# * Get Gold
#--------------------------------------------------------------------------
def gold
return enemy.gold
end
Now this is what I have placed in there for collecting my skill points (called Dias Points - DPs - in my game):
#--------------------------------------------------------------------------
# * Get Dias Point
#--------------------------------------------------------------------------
def diaspoint
return enemy.diaspoint
end
It is stuff like this that I have gone and added throughout all of my scripts, figuring the SP's would be counted the same way as Gold, since it is a form of "currency" I suppose, instead of spending it at NPC's, you spend it on the Skill Map:
http://rpgmaker.net/users/kitten2021/locke...GridImg0031.png <-- Still WIP mind you...
Currently, I am using Variables to add or subtract the SPs, however, I have no way for you to gain them in battles, or to see how many you have or to track them and use them apart from making Conditional Branches using the Greater Than or Equal To option in there and just adding it to the player on my own...
Its nice and I like this, but I still need a way for the players to 'see' how much SPs they have earned... I would like for whenever they enter the Skill grid, it automatically pops up for them, but I would also like to see it show up in the menu. If possible, could someone explain to me how to get it compatible with the script: Status Window Display RGSS2 by DAIpage ? Possibly even show up by turning them on or off on the field? I don't know... I'm open to anything anyone can suggest really... Just as long as it can either be explained to me in simple terms, or have instructions in 'extremely' simple terms if someone makes it for me instead.
Thank you SO very much!
(P.S: If there IS a script for this already, please point me to it and then I will request this thread closed. Thanks again!)
If I understand correctly you just need to display the variable? If you have a window you want to add it to already you can just do something like this:
@sp = $game_variables(0)
@msg = "Total SP : " + @sp.to_s
self.contents.draw_text(0, 0, 150, 32, @msg, 1)
My Ruby is so rusty so that might not work as is, and that may not be what you're asking in the first place. Anyway what it does is creates a variable @sp and pulls the data out of the first game variable. Then it creates a second variable with some text and takes that SP variable and converts it to text and tacks it on the end. Then the very last part it's simply drawing that text into the window.
Ccoa had some excellent tutorials on RRR about creating windows that were really easy to follow. Making a whole Window_SP class you could basically just call it with one line of code whenever you wanted - end of battle, in the menu, on the map, through an event, etc.
@sp = $game_variables(0)
@msg = "Total SP : " + @sp.to_s
self.contents.draw_text(0, 0, 150, 32, @msg, 1)
My Ruby is so rusty so that might not work as is, and that may not be what you're asking in the first place. Anyway what it does is creates a variable @sp and pulls the data out of the first game variable. Then it creates a second variable with some text and takes that SP variable and converts it to text and tacks it on the end. Then the very last part it's simply drawing that text into the window.
Ccoa had some excellent tutorials on RRR about creating windows that were really easy to follow. Making a whole Window_SP class you could basically just call it with one line of code whenever you wanted - end of battle, in the menu, on the map, through an event, etc.
Hmm... I've looked everywhere on RRR in the script list and all, but I don't see this in there. Any chance you could link it for me? ... Maybe I'm just missing it... :(
EDIT: Oh, and I tried that scripting that you recommended, but I keep getting a syntax error each time I run the game:
http://rpgmaker.net/users/kitten2021/locker/SyntaxError1.png
This is what I have in the script under Window_Gold (which is the box I am trying to get this into if possible):
http://rpgmaker.net/users/kitten2021/locker/Scripting_Widnow_Gold_Added_VBLine2.png
Do you know why this might be happening?
EDIT: Oh, and I tried that scripting that you recommended, but I keep getting a syntax error each time I run the game:
http://rpgmaker.net/users/kitten2021/locker/SyntaxError1.png
This is what I have in the script under Window_Gold (which is the box I am trying to get this into if possible):
http://rpgmaker.net/users/kitten2021/locker/Scripting_Widnow_Gold_Added_VBLine2.png
Do you know why this might be happening?
@GRS: Ah, I see where I made the error... Ok thank you.
@Chaos: Thanks!
Hmm... I placed that coding in there, and then got in the game and added the variables via-event interaction but once I entered the menu, they were still not showing up...
@Chaos: Thanks!
Hmm... I placed that coding in there, and then got in the game and added the variables via-event interaction but once I entered the menu, they were still not showing up...
Try this. Insert it above main like any other custom script. Increasing game variables 1 with an event should increase it. Probably is easy enough for you to tinker with and format it how you like.
Your code is close - instead of putting it on initialize it needs to go in the refresh block after the self.contents.clear (that way it updates). Also I assumed Game_Variables started with an index of 0 (been javascripting lately) - it actually correlates directly with the number in the editor so starts at 1. It'd need a tad more formatting too though, as the gold window is rather small.
Your code is close - instead of putting it on initialize it needs to go in the refresh block after the self.contents.clear (that way it updates). Also I assumed Game_Variables started with an index of 0 (been javascripting lately) - it actually correlates directly with the number in the editor so starts at 1. It'd need a tad more formatting too though, as the gold window is rather small.
post=114662
- it actually correlates directly with the number in the editor so starts at 1. It'd need a tad more formatting too though, as the gold window is rather small.
Oooh... Huh... I thought I had read that somewhere also... Wasn't too sure. Thanks statistic. :)
EDIT: BTW, did you script that yourself!? Holy... wow... I envy you peeps so much... :3
Pages:
1















