ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Giving the player RPG Attributes?

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.

Giving the player RPG Attributes?

Postby awoltrooper » Mon Jun 03, 2019 11:15 pm

Hey all,

I'm new to posting on these forums but I've been scouring them all day- there's a lot of great info here!

1.) I was curious as to how I could assign Attributes to the player, such as Strength, Charisma, etc. that could be used to more uniquely define how the player approaches tasks in-game and emphasize a set of skills [to be figured out in another forum post, I'm sure].

2.) In addition, is it possible to allow the player to assign a preset number of points to these Attributes at the start of the game or whenever predefined conditions are met [i.e. a "level up"]?

Pouring over the wiki and the forums has made it hard for me to properly identify when to use Variables vs. Properties vs. other keywords in ADRIFT's programming and I would love some help to really nail down when a specific function is used over another.

Thanks in advance,

For what it's worth, these have been some of the forum posts I've looked at previously:
[Dice, Probability and Skill Checks.] viewtopic.php?f=14&t=11430
[Is there a tut about dealing with combat?] viewtopic.php?f=14&t=11505&hilit=skills
[Proof Of Concept: Missions/Tasks System] viewtopic.php?f=14&t=11018&hilit=skills
awoltrooper
 
Posts: 3
Joined: Mon Jun 03, 2019 10:21 pm

Re: Giving the player RPG Attributes?

Postby The0didactus » Tue Jun 04, 2019 4:35 am

There are lots of ways to do this...it's really your preference. I'll tell you my preferred method. I never use properties and just use variables.

Make variables for every "stat".You can just name them after the stat:
Strength
Dexterity
Constitution

(if you're gonna have enemies that have similar stats you can give the variables more specific names: "Player_strength" etc).

Make another variable called roller, and make an event that sets roller equal to RAND (0, 20) (for a standard D&D D20)

You can then create a PAIR of tasks for every action, a success and a failure. Let's say there's a big heavy rock the player needs to lift with a strength check.
make two tasks that trigger when the player types LIFT ROCK
One task has the restriction %roller%+%strength% must be greater than or equal to 15, it says "you lift the rock" and it moves the rock
one task has the restriction %roller%+%strength% must be less than 15. It says "you fail to lift the rock"

boom, a DC15 strength check. When the player types "LIFT ROCK" one of the two tasks will happen.

...now in my example you could just type LIFT ROCK a bunch till you lift the rock...but you get the basic idea.


For your second question, I'd do it like this:
begin the game in a special room...the "start room"
make a variable called "points" set at 20 or whatever

make a set of commands, type 1 (str), 2 (dex), 3 (con), 4, 5, 6, and when the player types that number, the command increases a stat by 1 and decreases the number of "points" by 1. When points equals 0, move the player out of the room to begin the game.

It can be tedious to make a system like this but you really only need six tasks with the exact same restrictions and mostly the same effects...so you can copy and paste them and just change a few things. Remember to make each task have a restriction "Points must be greater than or equal to 1" otherwise players will be able to boost their stats forever.
The0didactus
 
Posts: 179
Joined: Sun Mar 30, 2014 8:20 pm
Points: 30

Re: Giving the player RPG Attributes?

Postby awoltrooper » Tue Jun 04, 2019 4:39 am

Thank you so much for the quick reply!

I know I've got a lot of work ahead of me [I have a tendency to put the cart before the horse], but ADRIFT has so much malleability that I couldn't resist to dive head first into this project.
awoltrooper
 
Posts: 3
Joined: Mon Jun 03, 2019 10:21 pm

Re: Giving the player RPG Attributes?

Postby Denk » Tue Jun 04, 2019 5:23 am

Hi awoltrooper,

I would like to add a few comments:
awoltrooper wrote:Pouring over the wiki and the forums has made it hard for me to properly identify when to use Variables vs. Properties vs. other keywords in ADRIFT's programming and I would love some help to really nail down when a specific function is used over another.
Just want to mention that when you have several NPCs with the same stat, e.g. 10 characters with the attribute Strength, it is much faster to use properties, since you only create the property once and then it has been created for all characters. Moreover, with properties, you can make tasks which can handle several characters at once.

awoltrooper wrote:2.) In addition, is it possible to allow the player to assign a preset number of points to these Attributes at the start of the game or whenever predefined conditions are met [i.e. a "level up"]?
In case you are not aware, you can make a system task and set it to "Immediately" which means that it will run when the game begins. This task can then assign points to the attributes, or call other tasks which does that.
-----------------------------------------------------------------------------------------
Out now: The Royal Puzzle, The Way Home & The Dragon Diamond
-----------------------------------------------------------------------------------------
Denk
 
Posts: 207
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 31

Re: Giving the player RPG Attributes?

Postby awoltrooper » Tue Jun 04, 2019 5:37 am

Thanks Denk, I appreciate the extra info very much!
awoltrooper
 
Posts: 3
Joined: Mon Jun 03, 2019 10:21 pm

Re: Giving the player RPG Attributes?

Postby The0didactus » Tue Jun 04, 2019 1:20 pm

awoltrooper wrote:Thank you so much for the quick reply!

I know I've got a lot of work ahead of me [I have a tendency to put the cart before the horse], but ADRIFT has so much malleability that I couldn't resist to dive head first into this project.


I'm one of those people that can only learn by making an utterly enormous project and failing spectacularly several times. I used ADRIFT for years before actually making something.

denk's right by the way that if you're going to make a huge RPG with lots of enemies and allies that have the same stats, you want to use properties. Properties are also good if you want to make a system where, for example, different weapons do different amounts of damage or there are lots of pieces of armor lying around and they each affect your "armor rating"
The0didactus
 
Posts: 179
Joined: Sun Mar 30, 2014 8:20 pm
Points: 30


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 1 guest

cron