Jump to content

Recommended Posts

CSCA Skill Shop v1.0

By: Casper Gaming (Casper667)

Last Update: May 24th, 2012

 

Introduction

This script will allow you to easily create shops that sell skills.

 

Features

- Easily create shops that sell skills.

- Set skill price through notetags.

- Limit which skills an actor can learn through the shop in the actor note tags.

 

Screenshots

 

skillshop.jpg

 

How to Use

Place in your materials section. Script is Plug n Play. Instructions on how to use the note tags and script calls is in script.

 

Demo

Not needed.

 

Script

Text file is found here(copy and paste everything into your script editor in the materials section): LINK

 

FAQ

None yet.

 

Credit

Casper Gaming

 

Terms

http://caspergaming.com/terms-of-use/

Edited by casper667
Update link URLs
  • Like 2

Share this post


Link to post
Share on other sites

Are level limits applied as well?

For example if I can only learn a skill at lv 10.

Share this post


Link to post
Share on other sites

Not currently. Maybe I'll add it in a future version, though one would hope the skill shop in the starting town wouldn't sell the ultimate skill so this shouldn't be too much of a problem, or if it was you could just not sell that skill altogether if the player's level wasn't high enough through conditional branches. :P

Share this post


Link to post
Share on other sites

Can I modify this script for my purposes? For instance I'd like to have any actor learn skill by default (as opposed to current setting when it cannot learn by default) and blacklist skills that certain people can't learn (I know how to do this and only asking for permission).

 

//edit: Fixed typos.

Edited by Darkhog

Share this post


Link to post
Share on other sites

Yes, you can modify it as long as I am credited. The script should only list members of your current party already? And actors can only learn skills through the shop that are specifically set by you so if you don't want them to learn a skill just don't put it in their notebox.

Share this post


Link to post
Share on other sites

Yeah, but in case of my game, blacklist will work better as my characters can learn basically ANY skill, except few that are class- or character-specific. But as I said, it's just matter of changing few ifs and I know how to do this.

 

Thanks for permission, and you'll be credited for sure!

Edited by Darkhog

Share this post


Link to post
Share on other sites

For those of us who may not have as much RGSS knowledge here, how might one edit the script so that, by default, all actors can learn all skills? As it stands, I've found that listing several dozen numbers in the notebox has the undesired effect of not letting an actor learn any skills. Since, for my purposes anyhow, I'm aiming for a class-less system where any actor can be customized and thus can learn any skill, it seems that editing the script so that all actors can, hypothetically, learn all skills seems to be the preferred route I'd like to take.

 

Thank you for your time.

Share this post


Link to post
Share on other sites

I think you just have to give the actor the respective skill type abilities then, not the class. But I don't know how you want to achieve a classless system. You'll probably end up with the actors having a blank default class then, and if this class doesn't allow any skill types it could become a little difficult to work around this.

Share this post


Link to post
Share on other sites

For those of us who may not have as much RGSS knowledge here, how might one edit the script so that, by default, all actors can learn all skills? As it stands, I've found that listing several dozen numbers in the notebox has the undesired effect of not letting an actor learn any skills. Since, for my purposes anyhow, I'm aiming for a class-less system where any actor can be customized and thus can learn any skill, it seems that editing the script so that all actors can, hypothetically, learn all skills seems to be the preferred route I'd like to take.

 

Thank you for your time.

 

 

Replace this code:

def enable?(actor)
   for i in 0...actor.skills.size
  if actor.skills[i] == @skill
    return false
  end
   end
   for i in 0...actor.csca_learnable_skills.size
  unless @skill.nil?
    if actor.csca_learnable_skills[i] == @skill.id
	  return true
    end
  end
   end
   return false
 end

 

with this code:

def enable?(actor)
   for i in 0...actor.skills.size
  if actor.skills[i] == @skill
    return false
  end
   end
   return true
 end

Share this post


Link to post
Share on other sites

 

 

Replace this code:

def enable?(actor)
for i in 0...actor.skills.size
  if actor.skills[i] == @skill
	return false
  end
end
for i in 0...actor.csca_learnable_skills.size
  unless @skill.nil?
	if actor.csca_learnable_skills[i] == @skill.id
	  return true
	end
  end
end
return false
 end

 

with this code:

def enable?(actor)
for i in 0...actor.skills.size
  if actor.skills[i] == @skill
	return false
  end
end
return true
 end

 

 

Huzzah! Thank you!

Share this post


Link to post
Share on other sites

For some reason, I can't get my characters to "learn" the skills I'm selling. The script seems to work fine and I followed the instruction in it, but something is not working. I'm using a japanese sideview script (Witch I can't tell you the name because I can't read it ) and I don't know if that could cause a compatibility issue.

Shop is selling skills at the price that I set, my characters can buy it ( I'm using the modified script so that all skills can be learned by all actors) but when I go in the menu after buying my skills, the skill menu is empty. Can someone help out with this?

Thanks

Share this post


Link to post
Share on other sites

First of all, make sure you have set the actors to be able to use the skill type you're trying to sell them: If you sell an actor that can only use "Special" skills a "Magic" skill, they won't be able to see it in the skills menu.

 

If that is not the problem, please either verify that it is in fact the sideview script causing conflicts and link me to the sideview script or upload your compressed project somewhere so I can download and take a look at it.

Share this post


Link to post
Share on other sites

Thanks for the answer casper667. What I did is that I started a brand new project with no script aside from yours. But for some reason it still doesn't word. I know i'm not very good in scripting but your's is by far the best ans easiest to understand. I must be doing something wrong (actually, I'm almost sure I'm forgetting something)

 

In my actor's tab, in the note section I wrote: <csca_ss_skills: 3>  For test purpose I choose the skill number 3 to be learned

I also selected Add Skill type both Special and Magic in the Actors features tab

 

In skills I wrote <cscaprice: 50>   for the price of the 3rd skill. Witch is Dual Attack

 

And to finish I created a Shop with the following script call: goods = [3]
                                                                                            SceneManager.call(CSCA_Scene_Skill_Shop)

 

When I start the playtest, I talk to the shopkeeper who's selling the skill that I want for 50G, then I open my menu and go in my skill menu. I have Special and magic in there. But the skill that I purchased is not there.

 

Thanks in advance.
                                                                                            SceneManager.scene.prepare(goods)

Share this post


Link to post
Share on other sites

By default, Dual Attack's skill type is "none". Did you change that? Otherwise, skills with no skill type won't show up I believe.

Share this post


Link to post
Share on other sites

Casper667, you are a genius! I looked everywhere but there!

It works like a charm.

Thank you !!!

Share this post


Link to post
Share on other sites

Is there any way to set the whitelist to classes instead of actors? I would like to have some actors be able to learn a skill if they are of a certain class but not if they are of a certain other class.

 

Edit: Sorry, I guess this is a necropost. But there doesn't seem to be active discussion going on anywhere for this script so maybe someone here can help me out.

Edited by Amendment50

Share this post


Link to post
Share on other sites

Is it possible that an edit to this script can be made to make the learnable skills determined by classes instead of actors?

Share this post


Link to post
Share on other sites

Hi, am I able to attach learning skills to items? I can do so without this script however I don't know how to limit the item to multiple characters in the same class.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted