Sign in to follow this  
m0nkfish

Crafting

Recommended Posts

Hi I am sketching out a few preliminary ideas for an upcoming project, and I have decided that one of the elements I would like to include is crafting, or combining several objects to create one. Ideally I'd have a few base items that could be combined in several different ways to create different weapons, or perhaps tools. For instance: Rope, Stick, Blade, Ball Stick & Blade = Scythe Stick & Rope & Stick = Nunchuk Stick & Ball = Mace Stick & Rope & Ball = Flail Stick & Rope & Ball & Blade = Spiked Flail Stick & Stick = Boomerang etc. The different components (as well as some sort of crafting skill) would determine the speed, accuracy and damage of the weapon. Are there any well-established, intuitive ways of doing this? I know Diablo II has a crafting system but that seems to revolve more around magic than common sense. I'd like some sort of interactive process if possible, like attaching different parts to each other - but that doesn't seem particularly feasible. I'm also thinking that perhaps particular weapons could double as tools - for example, a staff could let you pole vault, or a whip could let you grab something indiana-jones style. I've an idea of how this could be implemented in my system, but I'm unsure as to whether it's too complicated a concept. Your comments would be appreciated!

Share this post


Link to post
Share on other sites
I might be speaking non-sense here, but here it goes...
this is the way i'd try to achieve this, don't know if this will work....
im not really an oop expert, just an idea.

You said you already have a base class for your objects and all objects inherit from it.
So i believe that you have these "resulting objects" defined and also inheriting from the base class. So on these objects maybe you could create an object holder of your base class type with fixed size, so you can keep track if "requirements" for the new object are met. Then you could release all the resources for those old objects and start use the new one.

Regarding the different functionality for each one maybe you could use an interface for all the particular actions.

it was just a brain storm i guess :P hope it helps you in someway.

Regards.

Share this post


Link to post
Share on other sites
Sorry, perhaps I should clarify - currently I'm not looking for code patterns or methodologies, just the general way in which this system might work in terms of the user's interactions with the system. I'm treating the code itself as a little black box at the moment, something that I'll come to at a stage when the concept is fully formed.

Share this post


Link to post
Share on other sites
If there's a finite and relatively small number of combinations, then you could just have a list of them. The player could either pick what they wanted to craft from this catalog, or could start dragging items from their inventory to ingredient slots or an ingredient bin on a workbench, and the game could display a reduced catalog of only items that include those ingredients, or if you want to be more secretive about it, just inform the player whether the current combo was valid or invalid.

Share this post


Link to post
Share on other sites
When it comes to crafting systems, there's always going to have to be a base resource all other items are crafted from, sort of a base for players to expand upon.

So, for boomerangs, that would be wood.

For swords, metal.

For guns, pipes and tubes.

You know, attribute a weaponry class to a particular material so people don't accidentally go and farm a resource they can't actually use.

Share this post


Link to post
Share on other sites
Pipes and tubes are made of metal...
Also, what you mine is ore. You need to refine it. Metalworking is an art.
And making a blade is not so simple as plugging a bit of metal. Blacksmithing is an art by itself too.

Share this post


Link to post
Share on other sites
OK, I'll give a more explicit example behind my idea:

During gameplay, you find a nice, sturdy stick lying around. Let's say it's a broom-handle.
You also find a nice, sharp blade. Let's say it's an elephant tusk.

You combine the two to produce a weapon.

I want to give the user the impression that they can 'customise' this weapon somehow, and that their customisations have an impact on its performance. Obviously material can be built-in, but that's not relying on the user's interaction with the object. I want them to be able to see that if they attach the tusk to the end of the broom-handle, it's a much more effective weapon than if they were to attach it to the middle of the broom handle.

Again, it seems to me slightly unfeasible in a small-production game, and I'm just throwing it out there in the hope that someone's implemented or considered a vaguely similar concept before.

Share this post


Link to post
Share on other sites
Quote:
I want them to be able to see that if they attach the tusk to the end of the broom-handle, it's a much more effective weapon than if they were to attach it to the middle of the broom handle.


one way you could do that is have a set of rules that you can use to evaluate the perfomance of certain attributes of the weapon, but even with a small number of base items the potential amount of rules you could employ could be huge.

Share this post


Link to post
Share on other sites
Quote:
Original post by Wardyahh
Quote:
I want them to be able to see that if they attach the tusk to the end of the broom-handle, it's a much more effective weapon than if they were to attach it to the middle of the broom handle.


one way you could do that is have a set of rules that you can use to evaluate the perfomance of certain attributes of the weapon, but even with a small number of base items the potential amount of rules you could employ could be huge.


Yup. What I was thinking is to literally have around 3 or 4 base items. Define a few customisable attributes for each type and a few properties of the materials used for each type of base, then let the combination algorithm work out the properties of the final weapon.

I've had a little time to mull it over so I'll try to 'refactor' my initial post..

You have three basic elements: Rope, Blade and Stick.
They have 'connection points', where you can join two components together.
* Sticks have 3 connection points - One at each end, one in the middle
* Ropes have 2 connection points - One at each end
* Blades have 1 connection point - One at the friendly end

You define the connection point where the player holds the weapon, and this dictates how the weapon is used. There are 4 possible places:
* Stick end (scythe-like action)
* Stick middle (staff-like action)
* Rope end (whip-like action)
* Blade end (dagger-like action)

You can use a maximum of 3 elements per weapon. Properties of the elements define the damage, speed, range and general effectiveness of the weapon.

The principle needs refining but I think the concept is pretty sound. Thoughts?

Share this post


Link to post
Share on other sites
Quote:
Original post by m0nkfish
I want them to be able to see that if they attach the tusk to the end of the broom-handle, it's a much more effective weapon than if they were to attach it to the middle of the broom handle.


This is not a good idea. The problem is that you do not give your player viable choices. Once they figure out that there is absolutely no advantage to putting it in the middle, they will never do it again, and it's as if you'd never coded that feature at all.

What Diablo II did to fix this problem is give different advantages based on where you inserted a gem. If it was in a weapon, it might increase damage or attack rating, in a helm, it might help you find magical items. I'm not suggesting you implement it in that way specifically, but you can see that depending on which effect seems more desirable to the player at that point in time, they may have different viable options, and thus make a choice which actually makes their gameplay more interesting, not just easier or harder.

No option you give a player should be strictly worse than another. These are just frustrating and make your game less streamlined.

Your instinct to provide more interactivity is a good one, but you should do so in a way that either provides more of your fundamental gameplay (a la Disgaea's Item World), or allows you to make MEANINGFUL customizations that will alter your fundamental gameplay (a la Diablo II, or even Final Fantasy VII's materia system).

Share this post


Link to post
Share on other sites
Quote:
Original post by loufoque
Pipes and tubes are made of metal...
Also, what you mine is ore. You need to refine it. Metalworking is an art.
And making a blade is not so simple as plugging a bit of metal. Blacksmithing is an art by itself too.


I find it funny you're making an argument about something entirely irrelevant.
He was talking about picked up items, not a long, arduous and boring, repetitive thing like refining iron to make steel. So that you can then melt it into a cast, bash it with a hammer and stick it in a bit of wood and call it 'art'.

Share this post


Link to post
Share on other sites
Back on topic please.

Quote:
Original post by feminista
Quote:
Original post by m0nkfish
I want them to be able to see that if they attach the tusk to the end of the broom-handle, it's a much more effective weapon than if they were to attach it to the middle of the broom handle.


This is not a good idea. The problem is that you do not give your player viable choices. Once they figure out that there is absolutely no advantage to putting it in the middle, they will never do it again, and it's as if you'd never coded that feature at all.

What Diablo II did to fix this problem is give different advantages based on where you inserted a gem. If it was in a weapon, it might increase damage or attack rating, in a helm, it might help you find magical items. I'm not suggesting you implement it in that way specifically, but you can see that depending on which effect seems more desirable to the player at that point in time, they may have different viable options, and thus make a choice which actually makes their gameplay more interesting, not just easier or harder.

No option you give a player should be strictly worse than another. These are just frustrating and make your game less streamlined.

Your instinct to provide more interactivity is a good one, but you should do so in a way that either provides more of your fundamental gameplay (a la Disgaea's Item World), or allows you to make MEANINGFUL customizations that will alter your fundamental gameplay (a la Diablo II, or even Final Fantasy VII's materia system).


I understand exactly what you're saying, and this is what I want to achieve. For example, attaching a blade to a long stick would give you more range but less accuracy and attack speed than using just the blade. Attaching a blade to a rope would give you greater attack speed at the cost of accuracy. Defining a few key aspects of combat would help, I think - the usual ones seem to be based on:
Damage; Speed; Range; Accuracy

I just want to figure out a way to incorporate this into the base components themselves without having to explicitly define the properties of every combination. I'm a huge fan of emergent gameplay, I like creating an environment rather than a system.

Share this post


Link to post
Share on other sites
What about a 4 way averaging system of the weapon attributes, I'm sure it has a proper name. Where the four values are on scale of say -1.0 to 1.0, and where the natural state of the weapon is zero, each movement on a particular scale is offset by an inverse movement in one or all of the other scales to maintain a value of zero; should allow for easier balancing as well, you just have weight each scale according to advantage of each attribute.

There is maybe a nice bit of sugar you could add to this where by players can add some sort of unique ability to the weapon eg, adding the Blood Ruby of Arkanon increases gory death value by 6 :).

Share this post


Link to post
Share on other sites
Quote:
Original post by Guthur
What about a 4 way averaging system of the weapon attributes, I'm sure it has a proper name. Where the four values are on scale of say -1.0 to 1.0, and where the natural state of the weapon is zero, each movement on a particular scale is offset by an inverse movement in one or all of the other scales to maintain a value of zero; should allow for easier balancing as well, you just have weight each scale according to advantage of each attribute.

There is maybe a nice bit of sugar you could add to this where by players can add some sort of unique ability to the weapon eg, adding the Blood Ruby of Arkanon increases gory death value by 6 :).


I'm unsure as to how I'd balance weapon range in terms of your first suggestion - it's cumulative, not averaged. The default would be 0 and you can't have a negative range. I suppose I could just use a -1.0 offset, but that still doesn't solve the additive nature of weapon range.

Yeah, I'll sprinkle some sugar on top once the basic system is in place :)

Share this post


Link to post
Share on other sites
The shortest range would be -1.0 longest possible would be 1.0, 0.0 would be something like a sword where as -1.0 would be a set of brass knuckles.

The scales are just abstract values that represent the effectiveness/ineffectiveness of each attribute; actually as I type I realise this just describes a balancing mechanism and nothing more, sorry probably not much help, well no harm in trying I suppose :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this