bear with me here, I am tired but I will try to communicate my needs here. I will be more than happy to define my needs further when necessary.
Recently I received help from Lummox JR concerning a problem I was having with a crafting system, with his help I shaved a possible 1000 lines off my pitifully limited code and now I need some more help.
i have a 15 metal system for my smithing system, at the present I would have to define certain things (minimum smithing or minskill for each alloy) i need a way to batch this for every metal and item.
a new metal is introduced every 15 skill points ie;
metal 1 0
metal 2 15
metal 3 30
...
metal 15 210
and within each metal are items that are like this
item1 +0 from metal minskill or introduction skill
item2 +5 from metal minskill
...
itemx +20 from metal minskill
what I want is an equation that;
a) recognizes what metal you are using (/obj/ingots/X)
by matching root name?
and with that knowledge multiplies the ore (in order of its introduction 1-15) by (the skill lapse in between their introduction which happens to be 15) and adds the minskill of that item to it so that;
instead of entering the minskill required for each item and each alloy, (and the ingot cost) for each, I can just add the ingot tax(or requirement) into a variable on the item as well as the minimum inherent skill (and depending on the alloy calculate what is needed to craft that item) making expansion quick easy and cheap on coding.
presently I would have to copy (x) amount of items for each alloy and boost the minskill by 15 per alloy, which means there will be 15 unecessary duplicates of most of that information.
please help! I recently realized that 95% of the stress and time consumption isn't really a requirement it usually is ignorance, ie people carrying things before the wheel. having the right tools and commands will increase my knowledge so that I don't make these same mistakes again.
My first coding language is DM, so I don't have the content rich history or college degree that would enable me to know all of the shortcuts I could have or should have taken.
Thank you in advance,
-Richard Shannon
ID:265717
Mar 22 2007, 5:37 pm
|
|
Mar 23 2007, 6:43 am
|
|
Problem resolved, with all of my describing of the problem, I figured out exactly what i needed and just did it!
|
In response to Perilous Knight
|
|
Perilous Knight wrote:
Problem resolved, with all of my describing of the problem, I figured out exactly what i needed and just did it! Yep, that's the thing about programming. A good chunk of what a programmer does is describing the problem. Usually if you have it laid out that clearly, then as long as you know the language you'll be using, you can write an algorithm for it. Lummox JR |
In response to Perilous Knight
|
|
That's what they say, anyway... programming is really just communication, and when you communicate your ideas out loud in plain English, it helps every aspect of your programming!
Keep at it, and if it helps, post things related to your game development regularly to your BYOND blog! |