RPG kind Skills

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Aniknk
Regular
Posts: 30
Joined: Fri May 24, 2019 10:57 am
Contact:

RPG kind Skills

#1 Post by Aniknk »

So, I want to create RPG styled skills. I want them to increse while using. I see it like this: You have skill, cleaning for example, and after cleaning room you got +5 to skill level. After you reach 10 points, you advance from Novice cleaner to Basic cleaner, after take 50 points you advance to advance cleaner, and tham after taking 100 points you become skilled cleaner, and after taking next 200 points you become master cleaner. But ok, I have no idea how to manage it. Any advice would be appreciated. The best would be ready code though...
I wish I had an talent to do graphics. Or any other talents. But you know what they talking about people without any talents, they have a big pe***es. No wait. They talk so about people with big feets...

User avatar
XxrenxX
Veteran
Posts: 267
Joined: Tue Oct 02, 2012 2:40 am
Projects: Chasing
Deviantart: bara-ettie
Location: Canada
Contact:

Re: RPG kind Skills

#2 Post by XxrenxX »

Aniknk wrote: Sat Nov 09, 2019 3:39 am
Not a coder so idk if this is accurate but maybe something like this?

For the screen you want the title to appear on. can add a style if needed.

Code: Select all

text "[Title]" xpos 470 ypos 255

init -2 python: #Min and Max of each stat but unsure if needed if you not having progress bar present.
    Title_Points = 0
    Max_Points = 50 
And then for in script, something along these lines: Obviously change to what you need it to be not just title and can make multiple.

Code: Select all

label start:
$ Title = "Novice"
$ Title_Points = 0

"Some time has passed n ya got some points!"
$ Title_Points =+10
if Title_Points = 10:
	$ Title = "Beginner"
else:
	pass

User avatar
Aniknk
Regular
Posts: 30
Joined: Fri May 24, 2019 10:57 am
Contact:

Re: RPG kind Skills

#3 Post by Aniknk »

Hmm... It looks easier than I thought. I'll give it a try. Thanks.
I wish I had an talent to do graphics. Or any other talents. But you know what they talking about people without any talents, they have a big pe***es. No wait. They talk so about people with big feets...

User avatar
Aniknk
Regular
Posts: 30
Joined: Fri May 24, 2019 10:57 am
Contact:

Re: RPG kind Skills

#4 Post by Aniknk »

Next question, how can I make this skills display on screen?
I wish I had an talent to do graphics. Or any other talents. But you know what they talking about people without any talents, they have a big pe***es. No wait. They talk so about people with big feets...

User avatar
XxrenxX
Veteran
Posts: 267
Joined: Tue Oct 02, 2012 2:40 am
Projects: Chasing
Deviantart: bara-ettie
Location: Canada
Contact:

Re: RPG kind Skills

#5 Post by XxrenxX »

Aniknk wrote: Sat Nov 09, 2019 4:59 am Next question, how can I make this skills display on screen?
In what way? like a popup saying they've gained points or on a menu to display all the stats together?

User avatar
XxrenxX
Veteran
Posts: 267
Joined: Tue Oct 02, 2012 2:40 am
Projects: Chasing
Deviantart: bara-ettie
Location: Canada
Contact:

Re: RPG kind Skills

#6 Post by XxrenxX »

Adding this cause realized you probably won't want to write out the parameters each time someone earns a point so I hope this works.

Using a separate label and then calling said label for that skill.

On the screen code for your menu you can hide this, I do this with some code so it's not in the script cluttering it up. Can add and change as needed.

Code: Select all

label cooking_skill_check:
    if cooking_points == 10: #double == is important
        $ CookingTitle = "Novice"
    if cooking_points == 20:
        $ CookingTitle = "Intermediate"
    if cooking_points == 30:
        $ CookingTitle = "Expert"
    #ecetera
    return
    
#Can also use < or > for greater or less than the number so <= or >=
Then at the start of your game you can define the base for each skill's default

Code: Select all

label start:
$ CookingTitle = "Beginner"
$ cooking_points = 0
And finally if you wish to run the skill check you can call it after a set of choices for it to make the proper adjustments. You can make a check for each skill or put it all into a single skill check.

Code: Select all

"Let's get our skills up!"
menu:
    "Cooking":
        $ cooking_points +=10
        "Can also add some dialogue!"
    "Cleaning":
        $ cleaning_points +=10

call cooking_skill_check
"Game resumes with new parameters set."

User avatar
Aniknk
Regular
Posts: 30
Joined: Fri May 24, 2019 10:57 am
Contact:

Re: RPG kind Skills

#7 Post by Aniknk »

OK, I'll try. Thanks.
I wish I had an talent to do graphics. Or any other talents. But you know what they talking about people without any talents, they have a big pe***es. No wait. They talk so about people with big feets...

Post Reply

Who is online

Users browsing this forum: Semrush [Bot]