Page 1 of 1

RPG kind Skills

Posted: Sat Nov 09, 2019 3:39 am
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...

Re: RPG kind Skills

Posted: Sat Nov 09, 2019 4:05 am
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

Re: RPG kind Skills

Posted: Sat Nov 09, 2019 4:10 am
by Aniknk
Hmm... It looks easier than I thought. I'll give it a try. Thanks.

Re: RPG kind Skills

Posted: Sat Nov 09, 2019 4:59 am
by Aniknk
Next question, how can I make this skills display on screen?

Re: RPG kind Skills

Posted: Sat Nov 09, 2019 3:28 pm
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?

Re: RPG kind Skills

Posted: Sat Nov 09, 2019 5:25 pm
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."

Re: RPG kind Skills

Posted: Mon Nov 11, 2019 7:23 pm
by Aniknk
OK, I'll try. Thanks.