Crafting

C++, C#, Java, PHP, ect...
Post Reply
User avatar
Perry
Posts: 409
Joined: Tue Jun 23, 2009 4:26 pm

Crafting

Post by Perry »

Hey everyone. Been awhile since I posted but I've been watching halls tutorials and they are great.

In the Urban Realms videos I want to work on the crafting system. Right now the recipes need specific items. I want to make it to where you follow a recipe but more open. Like instead of needing acorns and chocolate. Maybe you would need nuts(acorns, almonds, peanuts) and something else. Each of the items could add something different. How would I start something like that?

Thanks and its great to be back. :D
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Crafting

Post by Jackolantern »

When you add the master list of items to the database (not where they are stored when the player owns them), just add a "category" field, and decide ahead of time what item categories you want. When players are crafting, query the database to see if the player has an item that has the required category. Then do whatever crafting processes you need to do, and take away the item. Or maybe for security it may be better to take away the item first, but your call.
The indelible lord of tl;dr
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Crafting

Post by hallsofvallhalla »

exactly what i was thinking, Like make a cattype field that is the category, nuts for instance, then you just call where cattype = "nuts"
User avatar
Perry
Posts: 409
Joined: Tue Jun 23, 2009 4:26 pm

Re: Crafting

Post by Perry »

That is a good idea. Thanks for the help I will let you guys know how it goes.
Post Reply

Return to “Coding”