Stencyl 3.4.0 is now out. Get it now!

RPG Elements

Luyren

  • *
  • Posts: 1348
I've assembled various behaviors from the RPG Platformer Kit, selected the ones that, by themselves, could be useful to introduce RPG elements in other games. Thus, the "RPG Elements" Resource Pack was uploaded on Forge.

It contains:
-Health: to know remaining hit points of an actor.
-Draw Health: draws current health on screen.
-Energy: for use in skills as a cost to use them.
-Draw Energy: draws current energy on screen.
-Damage Type Modifier: to modify the damage received from certain types.
-Experience: experience required for leveling up and character leveling.
-Draw Experience: draws current experience on screen.
-Character Status: attributes of the actor in each level. By default, Strength, Vitality, Inteligence, Wisdom, Luck, Health and Energy.
-Status Condition Poison: damage over time, also a template for other status conditions.
-Equip Weapon: configure your actor's weapons with various parameters, and set wich to equip.
-Equip Armor: configure your actor's armor with various parameters, and set wich to equip.
-Combat Statistics: combine Character Status and Equip Weapon/Armor to set attributes, such as minimum damage and magic defense.
-Inventory: handles adding and removing items for an actor, as well as configuring the amount of items he can carry.
-Save Status: store as many attributes for you actor as you want inside a game attribute list. Automatically saves upon exiting a scene, and loads when entering a scene.
Working.

carroll6

  • Posts: 76
Thank you very much, ever so much Luyren!  I was trying to figure out the inventory behavior.  HOW to get stuff in the inventory.. what to put on the list.  I will study the RPG platfomer.  THANK YOU so much.  Without guidance on here, I wouldn't have a clue.

Luyren

  • *
  • Posts: 1348
Glad to help! If you need help with this resource pack, feel free to ask.
Working.

carroll6

  • Posts: 76
http://www.stencyl.com/game/play/4640.  Here is my WIP game.  It is a RPG.  If you go to the Asylum, then enter, you will start a "top down" phase of the game.  I have your inventory script.. but don't know what to do with it.  Put "Knife" in the listing.. does it have to be the name of a actor?  It has been a couple days since I downloaded it.

I downloaded the kit.  The energy I figured out.. but what about the inventory items?  How do I make the player pick it up or discard it?

Would I make that player bump into "knife"?  Do I have to have a actor called "knife"?  How to populate the fields is eluding me.

« Last Edit: July 09, 2011, 07:52:26 pm by carroll6 »

Luyren

  • *
  • Posts: 1348
http://www.stencyl.com/game/play/4640.  Here is my WIP game.  It is a RPG.  If you go to the Asylum, then enter, you will start a "top down" phase of the game.  I have your inventory script.. but don't know what to do with it.  Put "Knife" in the listing.. does it have to be the name of a actor?  It has been a couple days since I downloaded it.

I downloaded the kit.  The energy I figured out.. but what about the inventory items?  How do I make the player pick it up or discard it?

Would I make that player bump into "knife"?  Do I have to have a actor called "knife"?  How to populate the fields is eluding me.
The Inventory behavior offers a way to customize the amount of items you can carry, setting the inital items the actor is carrying, as well as custom blocks to add, remove and check for items. So if you have an item you want to add to the inventory upon collision, you have to make a behavior for that and use the custom block for it. Likewise, use the custom block to remove an item when you want to discard.

Example:
Add item on collision
when collided, add 1 knife for the inventory of [last collided actor, kill self.
Working.

carroll6

  • Posts: 76
I attached to the actor.. the player actor.  Hmm.. this is designed to be used with a HUD of some sort?

Luyren

  • *
  • Posts: 1348
I attached to the actor.. the player actor.  Hmm.. this is designed to be used with a HUD of some sort?
That's up to you. There are blocks to find an item, as well as one to find the item on a index, so you have to go from there.
Working.

Luyren

  • *
  • Posts: 1348
The resource pack has been updated:

Character Status now have an attribute cap, plus a separated cap for health and energy (for example, in the Final Fantasy series you have an attribute cap of 255, HP 9999 and MP 999)

Combat Statistics now has a parameter for Critical Rate. It's a percentage of the current luck attribute and the attribute cap plus a weapon bonus. Also, parameters now won't go below 0.

Health was updated to display a different font when receiving a critical hit. The inflict damage custom block now has a critical hit boolean parameter.

Equip Weapon now has a parameter to increase/decrease critical rate.

It's already reuploaded.
Working.

Aether Knight

  • Posts: 4
If I did a little tweaking with the stats, damage formulas, etc, could I possibly be able to make a D&D style stat system instead of the standard JRPG stat system? When I say "D&D style," what I mean is having low stat values that don't increase when you level up (I might not even put leveling up in my game), and where small differences in those stat values are more important than in a JRPG. I might also want to have a slightly different set of stats than you provide.

For example, a character in my game might have a 19 on her Intellect stat, while another character might have a 13 on his, and the girl with the 19 Intellect would be doing massively better spell damage; as opposed to those same two characters in a Final Fantasy type of stat system, where that six point difference would be far less significant.

If it's possible, how difficult would it be, and how would I go about doing it?

Luyren

  • *
  • Posts: 1348
If I did a little tweaking with the stats, damage formulas, etc, could I possibly be able to make a D&D style stat system instead of the standard JRPG stat system? When I say "D&D style," what I mean is having low stat values that don't increase when you level up (I might not even put leveling up in my game), and where small differences in those stat values are more important than in a JRPG. I might also want to have a slightly different set of stats than you provide.

For example, a character in my game might have a 19 on her Intellect stat, while another character might have a 13 on his, and the girl with the 19 Intellect would be doing massively better spell damage; as opposed to those same two characters in a Final Fantasy type of stat system, where that six point difference would be far less significant.

If it's possible, how difficult would it be, and how would I go about doing it?

It uses lists to configure the base value of an attribute at each level. So if you want an attribute only to increase every 4 levels, you can have the same value for 3 levels, and then add 1 in the next level;

Example, Inteligence Progression list: index 0=14, index 1=14, index 2=14, index3=14, index4=15
Considering you start at level 1 (index 1), you'll only increase the attribute at level 4.

To change the formulas, I suggest you change the formulas in the Combat Statistics behavior, and for your other behaviors, get the values from there.

To add character attributes, this might be a little tricky. You have to follow the patern I made for the default attributes, as well as adding them to the message blocks. You can create the equivalent behavior attributes for your character attribute, copy how it's done in Strength, of rexample, and replace with the new behavior attributes. Does that make sense? If not, I can provide some screen shots to make things clearer.
Working.

Aether Knight

  • Posts: 4
I also do not want HP as a separate attribute, how could I instead make it so it's based off some formula related to Vitality.

Thanks.

« Last Edit: July 11, 2011, 05:58:27 am by Aether Knight »

Luyren

  • *
  • Posts: 1348
I also do not want HP as a separate attribute, how could I instead make it so it's based off some formula related to Vitality.

Thanks.
Check the first attached image. It's from the "Get" message block inside the Health behavior. You'll replace the content of the red rectangles with "Combat Statistics".

In the combat statistics behavior, create a number attribute called "Max Health". Now the Health behavior will get the Max Health form the combat statistics behavior, if the actor has that behavior.

Now, place a setter for Max Health in the always wrapper, and make your formula there.

Example:
Always
Set Max Health to [[Vitaliy]*2]

Hope that helps.

Working.

Luyren

  • *
  • Posts: 1348
For those of you who had problems with some behaviors not working (due to the recent SW update), I've reuploaded the resource pack. I also added a new behavior: a status condition template, to create your own status condition (like paralyze, confusion), and still interact with the provided custom blocks.
Working.

Puffdot

  • Posts: 44
Wow, this is going to help tremendously! Thanks!

However, it would be nice if you included some instructions.
I have no idea how to make a UI for the inventory stuff :(
And I need a way to separate stuff like equipment and other stuff in different inventories.

lol I'm such a n00b at this 8)

« Last Edit: August 12, 2011, 04:38:06 pm by Puffdot »

Luyren

  • *
  • Posts: 1348
Wow, this is going to help tremendously! Thanks!

However, it would be nice if you included some instructions.
I'm have no idea how to make a UI for the inventory stuff :(
And I need a way to separate stuff like equipment and other stuff in different inventories.

lol I'm such a n00b at this 8)
Well, this is intended for thos who have some experience with StencylWorks, as by themselves they are nearly useless.

More people requested proper documentation. Sadly, I have other things I must do before I can think about documentation. I tried to make the behaviors and attribute descriptions clear, but I agree that some stuff there require instructions. I'll see what I can do.
Working.