Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1075929 Posts in 44152 Topics- by 36119 Members - Latest Member: Royalhandstudios

December 29, 2014, 04:01:10 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)Systems for generating RPG-style items
Pages: [1]
Print
Author Topic: Systems for generating RPG-style items  (Read 384 times)
jquave
Level 0
***



View Profile Email
« on: May 07, 2013, 06:03:07 AM »

I currently am working on a project that involves having lots of randomly generated items. I want to do the kind of thing that most MMOs do where there is a base version of the item, then modifiers that can be applied, along with combinations.

For example I want to be able to populate a database with a name like "Sword" and some adjectives and eventually have it randomly generate and item like "Broad Sword of Justice" that has attributes like, "each swing heals x health" and picks some randomized values for attack power.

I went ahead and did my best to build this system but I feel it is limited. I was wondering what kind of architecture other devs have used to make custom items like this?

The way my current system works:
A list of adjectives is prepared with a set of stats that it modifies with a min/max value for each stat.
The same is done for a list of nouns, and then for something that can end with "of _____"

This basically works but limits me to having each word associated with a stat type (AP/HP/MP/etc), but really it should be able to understand thing like "Broken" being an adjective that actually just modifies the other values in the noun, like AP for a Broken Sword should lower than just a Sword. But, it should also produce a lower Defense value for a Broken Shield.

Additionally I'd like to be able to combine items. So for example two broken shields may make a regular Shield. Combing a Broad Sword and a Rusted Sword may produce a Crafted Sword which has some unique stats, etc.

How are these systems typically built? Any examples?



Logged
2DArray
Level 0
**


View Profile Email
« Reply #1 on: May 07, 2013, 08:03:01 AM »

If you want your Descriptors to support generalized stuff like the "broken" adjective you mention, your Item class just needs an extra property to track which one of its stats is the most functionally important.  Then you can mark the Descriptor class to target either a specific stat or whichever stat is primary.  I'd also recommend allowing stat changes to allow both multiplication and addition - that way you can have +1 to damage or -30% magic defense.  With that primary stat hooked up, you can start making Descriptors that only apply to certain types of items, like "Deadly" for items whose primary stat is damage.

Crafting is a bit trickier and there are a hundred ways to go about it, but one option is to look through all of the involved Descriptors and search through a list of combinations with specified outcomes.

For instance, "Broken" + "Broken" = [ empty list ], so you can repair stuff in the way you mentioned.  Once you've checked for all of these possible matches, you can just pick a few of the remaining ones - maybe higher crafting skill would make you more likely to retain the positive traits.  In cases like this it'd also be helpful to allow Descriptors to be hidden, so their effect applies without having to lengthen the name of the item.
Logged
Gimym JIMBERT
Level 10
*****


NOTGAMER ludophile


View Profile Email
« Reply #2 on: May 07, 2013, 08:34:14 AM »

You are basically designing a small design language specialized in your game. The first only question is not what's possible but what are the boundaries of the experience, aka define the limit and function of each items. Define what's each elements attribute are and how it translate into a grammatical structure (adjective name attribute: description).

Are health potion just health potion (restore x HP)? or can they do complex stuff (trigger expression or method)? Does the potion is a consumable? or is an item that can be refilled? If it's an item can its property be changed?

What is the complexity of HP? Does it allow %restoring, is there special case for full and empty, does it have a restoration velocity? does it keep track of previous HP state? Does it allow for momentary boost? Does it allow modification of min/max limit? Does it have a toxicity level modifier? Does the HP visualization could have different data than the internal HP? Does the HP hold states?

Replace HP for any stat and ask yourself, do I need all this shit? what it is the target experience of my game?

More ontopic, for crafting you can simply match property to a level, broken might be level durability, mixing this and another level give you a higher level shield and the number would reference the correct level and name.

You might need a component kind of object to do complex stuff. If you smart, you can let it generate all potential item by passing the list of attributes and generate all possible type of potion or any items just based on the permutation of attribute and the abstract description of each items. Once you have a description for potion of HP, what's would be the difference with potion of MP? it would be just a pointer to a new stat. That mean you can dynamically change the stat there is in your game and still have all potions dynamically generated for those stat.
Logged


ILLOGICAL, random guy on internet, do not trust (lelebĉcülo dum borobürükiss) ! GЮЯЦ TФ ДЯSTӨTZҚД!
sonic the heidegger (Überall Geschwindigkeit)
jquave
Level 0
***



View Profile Email
« Reply #3 on: May 07, 2013, 08:45:11 AM »

Thanks for the feedback so far, it mostly sounds like I'm on the right track but just need to add a few more things to get it all working like I need.

The game I am building is a very crafting-centric game so another thing that may be important is generating the recipes for crafting completely new items. I think I'm just a little nervous about my approach because I think I'll probably end up re-writing it 4 or 5 times before I settle on something that works for all the scenarios I need.

To give a little more insight on the game:

Sword, shield, and the other examples I used are just examples that are easy to understand. The actual goal of the game is to combine, find, mix and match items to build components of a robot that is upgradeable/equippable with these items. For example if you find extendo-matic arms you can attach them to your main robot by using duct tape, bolts, or by welding (with varying levels of durability)

Most of the game is based on this crafting system, and then there are small missions where you can go out and roll around as the robot, collect items, etc. The challenge is to try and build a robot capable of reaching the needed areas, so a player may retry a mission 5 or 6 times using different items before they can reach everything.

One thing I'd love to see is an open source game with a complex crafting system so I can see how others do it.
Logged
Gimym JIMBERT
Level 10
*****


NOTGAMER ludophile


View Profile Email
« Reply #4 on: May 07, 2013, 08:47:48 AM »

You might need to look at rawbot as an exemple
Logged


ILLOGICAL, random guy on internet, do not trust (lelebĉcülo dum borobürükiss) ! GЮЯЦ TФ ДЯSTӨTZҚД!
sonic the heidegger (Überall Geschwindigkeit)
jquave
Level 0
***



View Profile Email
« Reply #5 on: May 07, 2013, 09:57:27 AM »

You might need to look at rawbot as an exemple

Yeah I saw them on kickstarter recently, the project looks great. The game I'm building is more of a 2D mobile game that focuses much more on player economy, and is ultimately simpler, but I am looking forward to Rawbots.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic