Skill Buy System (Skill Trees possible)

skelhat

Warper
Member
Joined
Jun 4, 2020
Messages
3
Reaction score
1
First Language
Portuguese
Primarily Uses
RMMV
Maliki, I liked the plugin, but I think it would be interesting to have a requirement system, precisely for the same control, so that it avoids the player getting the strongest skills right at the beginning, in my project for example I wanted to create books containing some sealed magic, and this book would be used as a requirement in the plugin. But if it is not possible, there is no problem.
 

Fomar0153

Arkz
Restaff
Joined
Mar 13, 2012
Messages
1,326
Reaction score
462
First Language
English
Primarily Uses
RMMZ
Maliki, I liked the plugin, but I think it would be interesting to have a requirement system, precisely for the same control, so that it avoids the player getting the strongest skills right at the beginning, in my project for example I wanted to create books containing some sealed magic, and this book would be used as a requirement in the plugin. But if it is not possible, there is no problem.
This is a feature of the plugin already:
To make a skill require others skills to be learned before it can be learned:
<buyreq:x,y,z>
Seperate the skill ids with commas.
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
762
Reaction score
325
First Language
English
Primarily Uses
N/A
@skelhat This was exactly why I made the addBuyableSkills script call.
Most likely, you would have an Event grant your "forbidden" spellbook to the party.
So, as I have it set up, the item itself does nothing.
In the Event that gives the party the book, add the script call:


$gameActors.addBuyableSkillsAll(x, y, z);

adding as many skill Ids as you need.
If it's a random drop, you can have it run the call via a common event when the item is used.

Finally, if you want it to be a consumable, you can use the below call in the damage formula itself:

b.addBuyableSkills(x, y, z); 0

(You can event put the tag on monster moves to learn skills via their attacks!
Blue Magic system is a go!)

While @Fomar0153 's <buyreq> tag is good, I'd prefer the skills not be visible at all until they are available to be learned.

Note that there was a tiny bug which allowed multiple versions of the same skill to be visible for learning (even tho you could only learn one of the copies). I have corrected that bug and will provide it with the planned update I'm working on. Should hopefully have something ready in the next few hours.
 

Fomar0153

Arkz
Restaff
Joined
Mar 13, 2012
Messages
1,326
Reaction score
462
First Language
English
Primarily Uses
RMMZ
While @Fomar0153 's <buyreq> tag is good, I'd prefer the skills not be visible at all until they are available to be learned.
Then turn off:
Show All Unlearnt Skills
in the plugin settings and then it won't display them until all their requirements have been met.
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
762
Reaction score
325
First Language
English
Primarily Uses
N/A
Here's the updated edits I made.
removed

Added:
Item requirements have been added (No plans for weapon/armor types. Items only)
Correction to code to disallow multiple copies of the same skill on the list.
 
Last edited:

Luckysince97

Veteran
Veteran
Joined
Feb 6, 2018
Messages
101
Reaction score
26
First Language
French
Primarily Uses
RMMZ
@Maliki79 even better:ewat: big big ty now i can spilt it in 4 layer if below 25 if below 50 if below 75 and if below 100 , but the use of 100 aint sure yet im gonna have to calculate so that evrything doesnt pass the given limit, dont worrry illl just adapt the code , i can read the code but i dont speak the code yet...
<skillBuyEvals: if(actor.level <= 10) actor._paramPlus[0] += 50;
if(actor.level > 10) actor._paramPlus[0] += 450;
if(!actor.hpLevel)actor.hpLevel=0;
actor.hpLevel++;
if(actor.hpLevel!=100) actor.forgetSkill(301)>>>

can i erase the second line thougth so that it can only give 50 before 10
and what is the meaning of the 3 line ( doest it check actor level or hp

in any case ill test it out, ty to you 3! you almost got the perfect leveling system imo!


YAHOO! line 2 is out i test if level = 3( use ) and skill become unavailable so that great!
but now it mean i only use the countdown without increment so waht happen if im level 10 but got less than 3 use...
line 1 now have no use but is a check so ill leave it as is...(yesterday_)


(this morning) ok so i felt inspired this morning and came up with few idea so it could be perfect

<skillBuyEvals: if(actor.level <= 10) actor._paramPlus[0] += 50;
if(actor.level > 10) actor._paramPlus[0] += 450;
if(!actor.hpLevel)actor.hpLevel=0;
actor.hpLevel++;
if(actor.hpLevel!=1) actor.forgetSkill(301);

soluce A: if (actor.hplevel!=1 actor.learnSkill(302)>>> Bip (while there no error, nothing happen)
soluceB: if (actor.forgetSkill(301)actor.learnSkill(302)>>> Bip( dont remember if there was en error)

so reading the above maybe i should use

soluce C : common event if hp is = 50 then $gameActors.addBuyableSkillsAll(302);
pls tell me where i got wrong...

and again ill test that and come back later with result @Fomar0153 @Maliki79

so even with soluce c it doesnt work maybe there is just no way to hide skill...yet...

oh and i see you got a new version gonna have to check what i can do with it.... ok later..
 
Last edited:

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
762
Reaction score
325
First Language
English
Primarily Uses
N/A
@Luckysince97 Hmmm....

Perhaps if I break down each line, it will help you understand what I did and why.
So....

if(actor.level <= 10) actor._paramPlus[0] += 50; This checks if the actor's level is below or equal to 10 and if so, raises param[0] (hp from here on) by 50.

if(actor.level > 10) actor._paramPlus[0] += 450; This checks if the actor's lever is above 10 and if so, raises hp by 450.

if(!actor.hpLevel)actor.hpLevel=0; This line checks to see if the hidden counter "hpLevel" exist on the actor and if not, creates it and sets it to 0. This counter exists ONLY to keep track of the number of times this specific actor raised thier hp with this skill.

actor.hpLevel++; This line raises the above counter by 1. (you could also do actor.hpLevel += 1; )

if(actor.hpLevel!=100) actor.forgetSkill(301) Finally, this line checks to see if the hpLevel has reached 100, and if not, forgets the skill 301 so it can be learned again. This serves as a hard stop for using this skill to raise hp.

So basically, this is a system to raise stats as well as limit how many times the actor can reuse this skill.
I am personally using this method (minus the level checks) in my game and I needed a hard stop so that the stats cannot be pushed too far.
As a plugin maker, I cannot tell you how to make your game, but I don't think the level checking way is a good one as is. If it were me, I'd just refrain from using it until I was level 10 then spam it as much as I could for the increased gains (assuming I figured out how it worked). It would make the game harder, true, but from a player perspective, I think it would only serve to frustrate them.

So I'd ask you to think carefully about what you'd like the stat boosts to do and when and then figure out how you'd like this system to help you accomplish it.

Feel free to ask if you need any more help.


~Mal
 

Luckysince97

Veteran
Veteran
Joined
Feb 6, 2018
Messages
101
Reaction score
26
First Language
French
Primarily Uses
RMMZ
@Luckysince97 Hmmm....

Perhaps if I break down each line, it will help you understand what I did and why.
So....

if(actor.level <= 10) actor._paramPlus[0] += 50; This checks if the actor's level is below or equal to 10 and if so, raises param[0] (hp from here on) by 50.

if(actor.level > 10) actor._paramPlus[0] += 450; This checks if the actor's lever is above 10 and if so, raises hp by 450.

if(!actor.hpLevel)actor.hpLevel=0; This line checks to see if the hidden counter "hpLevel" exist on the actor and if not, creates it and sets it to 0. This counter exists ONLY to keep track of the number of times this specific actor raised thier hp with this skill.

actor.hpLevel++; This line raises the above counter by 1. (you could also do actor.hpLevel += 1; )

if(actor.hpLevel!=100) actor.forgetSkill(301) Finally, this line checks to see if the hpLevel has reached 100, and if not, forgets the skill 301 so it can be learned again. This serves as a hard stop for using this skill to raise hp.

So basically, this is a system to raise stats as well as limit how many times the actor can reuse this skill.
I am personally using this method (minus the level checks) in my game and I needed a hard stop so that the stats cannot be pushed too far.
As a plugin maker, I cannot tell you how to make your game, but I don't think the level checking way is a good one as is. If it were me, I'd just refrain from using it until I was level 10 then spam it as much as I could for the increased gains (assuming I figured out how it worked). It would make the game harder, true, but from a player perspective, I think it would only serve to frustrate them.

So I'd ask you to think carefully about what you'd like the stat boosts to do and when and then figure out how you'd like this system to help you accomplish it.

Feel free to ask if you need any more help.


~Mal
well after lot of test i came up with what i wanted , erase the line 2 because i didnt wnat to geive 450 after level 10 but i gotta say i got hp+50 hp+100 hp+ 150 and hp+250 now i set limit to lvl 100 because i only needed a limit of use, and that great but my biggest problem was to make the hp+50 desappear after use limit which for a reason i didnt get on first red of the plugin desc...

so now with unlearnt show set as false , when hp+50 as been spam (limit use) it just desappear from skill learn menu and that what i wanted

so Big ty for the explanation i figured that out , i was hoping for maybe more a quick check on my soluce but it appreciated anyway!!
 

Luckysince97

Veteran
Veteran
Joined
Feb 6, 2018
Messages
101
Reaction score
26
First Language
French
Primarily Uses
RMMZ
ok so after couple other test the line 4 seem to affect all other limit so i was asking myself if
if(!actor.hpLevel)actor.hpLevel=0 this line had to be change to

if(!actor.mp.level)actor.mpLevel=0
actor.mpLevel++;

if(actor.mpLevel!=20) actor.forgetSkill(301)

and so on for each param

if (!actor.atk.level)actor.level=0

so what is happening right now is let say (sid1) skill got limit of 2 (sid2) got limit of 5 and (sid3) got limit of 20

what is happening (skill 1) unlearnt after 2 spam (skill 2) unlearnt after 3 spam (5-2) and (skill 3) is unlearn after 15spam (20-5)15 and if limit of skill 4 is 21 he is learn after 1 spam now problem is if it get 1< it get no limit...

maybe need an other update...@Maliki79
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
762
Reaction score
325
First Language
English
Primarily Uses
N/A
@Luckysince97 , gonna move this to PM as I think it will be more helpful. If anyone else needed help with the evals etc. Let me know and I'll bring the discussion back to this post.
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
762
Reaction score
325
First Language
English
Primarily Uses
N/A
Hello All!

Here's what will likely be my last shared edit to this awesome plugin.
removed

Added: An eval for skills.
Now you can use switches and variables to show learned skills!
Finally, made skill learn catergories in the menu.
You can split learnable skills like physical, magical, stat boosting, etc.
Check the help file for details.

And last but not least, the subject of giving credit was brought up.
General use and distribution of this version of Fomar's plugin are to match Fomar's rules.
If you use my edits, I ask that that credit to both @Fomar0153 and myself.

As always, if anyone has any question or issues with my version, feel free to ask me.

Good luck and happy game making!
 
Last edited:

Knightmare

Knight of the Night
Veteran
Joined
Mar 14, 2012
Messages
1,207
Reaction score
285
First Language
English
Primarily Uses
RMMV
Weird bug since version 3 (could possibly be also version 2) of @Maliki79 edits.

I go into the skill menu to use my heal skill to heal one of my party members and it's processing like I'm trying to buy the skill and the AP will start to get into the negatives and it will keep going negative more and more each time I try to use it but it will never prompt me to select a character to heal or anything.

If this is not happening to anyone else then it might be some clash with other plugins I'm using but I haven't really added any plugins and I don't think version 1 (and maybe version 2) had this issue.
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
762
Reaction score
325
First Language
English
Primarily Uses
N/A
I haven't had that issue. It's possible that you configured something incorrectly. Maybe you can post a ss of the skill and the notes for it.
 

Knightmare

Knight of the Night
Veteran
Joined
Mar 14, 2012
Messages
1,207
Reaction score
285
First Language
English
Primarily Uses
RMMV
I haven't had that issue. It's possible that you configured something incorrectly. Maybe you can post a ss of the skill and the notes for it.
I'm on a quick break from work but I will play with the configs a little when I have time at home later and if it keeps happening after that then I will ss it and post it here. Thanks for the reply.
 

Celestrium

Adventurer
Member
Joined
Mar 3, 2020
Messages
29
Reaction score
20
First Language
English
Primarily Uses
RMMZ
Fomar0153, just wanted to say thank you for the plug-in! Your stuff is awesome and I appreciate your work!
 

nemeanDragon

Villager
Member
Joined
Sep 12, 2020
Messages
14
Reaction score
2
First Language
English
Primarily Uses
RMMZ
I'm so excited for this plugin! But I am running into errors, and I think it may be an issue with my VS plugins. Was wondering if you had any ideas as to how I could fix this, because I have been wanting to use this plugin of yours so badly. I screenshotted and attached the error I get when I try to open up the skills window from the main menu.
errorScreenshot.png
errorScreenshot2.png
listOfPlugins.png

I also tried running it in a blank new project without any other plugins and I was getting this error too.
blankProjectError.png
 

Attachments

Last edited:

Knightmare

Knight of the Night
Veteran
Joined
Mar 14, 2012
Messages
1,207
Reaction score
285
First Language
English
Primarily Uses
RMMV
I'm so excited for this plugin! But I am running into errors, and I think it may be an issue with my VS plugins. Was wondering if you had any ideas as to how I could fix this, because I have been wanting to use this plugin of yours so badly. I screenshotted and attached the error I get when I try to open up the skills window from the main menu.

I also tried running it in a blank new project without any other plugins and I was getting this error too.
blankProjectError.png
I think I got those errors when I tried using both the Equipment Skills Plugin AND the Skill Buy Plugin. I think you can only use one or the other.
 

nemeanDragon

Villager
Member
Joined
Sep 12, 2020
Messages
14
Reaction score
2
First Language
English
Primarily Uses
RMMZ
I think I got those errors when I tried using both the Equipment Skills Plugin AND the Skill Buy Plugin. I think you can only use one or the other.
I don't think that's the problem for me--I only have the AP plugin and the skillbuy plugin. what does the name of the skillbuy plugin need to be?
 

Knightmare

Knight of the Night
Veteran
Joined
Mar 14, 2012
Messages
1,207
Reaction score
285
First Language
English
Primarily Uses
RMMV
I have it as Fomar0153_SkillBuy.js That has to be the problem because I noticed your name is not that. It has to be exact or it won't work.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Say, does anyone know any other indie game development forums? Progress on my uni survey has been a little slow, so I wanna look into posting it around a bit more.
Due to the bullies' resurgence on Facebook and Twitter against my friend (and I since I defend), we've decided to move over to tumblr to try to obscure our presence, where we might finally be at peace working on games. If anyone wants my/our game's tumblrs to follow lmk. :kaojoy:
Is there anyone need help with anything except art and music?
is Gotcha Gotcha Games Inc. = KADOKAWA CORPORATION? I haven't found this topic yet, Want to know for credits on my game. Thanks.

Forum statistics

Threads
104,301
Messages
1,005,398
Members
135,825
Latest member
uniteditcare
Top