KGC_ComposeItem Modifcation
November 25, 2008
Ok. I love this script. However, I'm having one seriously difficult time getting my game to be fluid while a player can create both the weakest weapon in the game and the strongest given their materials to create them. I'm hoping [more like praying] that someone could take this translated KGC script and implement a simple 'Check Level' and 'Gain EXP' system into it.
It is very very similar to how Runescape is set up as my game does have a lot of parallels to that game.
Here's my personal dilema here.
If you know how this script works, then you know that it runs off a normal shop event command converted into a synthesis shop controlled by a switch activation.Here's the problem:[Player has 3 Iron bars and 3 Logs.]
[The smithing list say includes an Iron Sword and an Iron Axe.]
[To make the Sword, it requires 3 Iron bars and 3 Logs.]
[To make the Axe, it requires 3 Iron bars and 3 Logs too.]
[However, the Axe is a better weapon in stats.]
So obviously the player will skip smithing the sword and just make the Axe.
I'd like the Level Requirements so that all options can be listed but cannot be created until their level is at the required level to create it, so that instead of making perhaps a lvl 2. Axe, they would have to make the lvl 1 Sword a few times to level up to make the Axe and pursue the everlasting quest of creating the perfect weapon.
I'd hope that in making an object (or in this case technically 'buying' an object) would support the increased value of a specific variable. That variable is tracking the player's EXP of certain professions.
Here's a basic layout in the script to make and item:
RECIPE_TYPE[ItemID] = [Cost, "Type:ID, Quantity"]
Type: "ITEM", "WEAPON", or "ARMOR"
ItemID: The ID of the object that is going to be created (the goal).
Cost: How much it costs to synthesize (In my case, this is always 0 with all the raw materials)
Type:ID :: The type of objects required to make the goal and the ID of that type specifically. Like "I:5" means to make the goal, you need 1 item that is listed as 5 in the item database, same goes for "W:9" which is the weapon listed in the weapon database.
Quanity: How many of that kind of material needed to make the goal.What I'd hope to set it up as is SOMETHING like this.
RECIPE_TYPE[ItemID] = [Cost, "Type:ID, Quantity", Variable[n], X, Y]
For this, the same applies as the original, however I'd hope to implement the Variable, X, and Y.
Variable[n]: n being the variable in the database to tracking the 'EXP' for this profession.
X: x being the amount of 'EXP' to add to variable n.
Y: y being the REQUIRED amount of 'EXP' that variable n must have in order to create the goal otherwise the option is 'grayed' out.I'll delve deeper into details about the Variable though I may have explained it enough. This may be redundant for those who 'get' what I'm talking about.
Basically:
I'll set variables 1, 2 and 3.
[1] will be the Alchemy profession
[2] Smelting
[3] SmithingSo lets say we have the Iron Sword again.
Per se, ID4 weapon database is an Iron Sword, ID3 item database is an iron bar, and ID4 item database is a Log.
RECIPE_WEAPON[4] = [0, "I:3, 3", "I:4, 3", Variable[3], 15, 0]
This says that:
At a cost of 0gold, combining 3 Iron bars and 3 Logs will create an Iron Sword and yield 15 EXP.
(In lamen's terms, +15 to Variable[3])
Now let's say I wanted to make that Iron Axe now.
Per se, ID5 weapon database is an Iron Axe, ID3 item database is an iron bar, and ID4 item database is a Log.
RECIPE_WEAPON[5] = [0, "I:3, 3", "I:4, 3", Variable[3], 20, 30]
This says that:
At a cost of 0gold, combining 3 Iron bars and 3 Logs will create an Iron Sword IF variable[3] is equal to or greater than 30, then will yield another 20 EXP. (As you can see, the player would have to have had made the Iron Sword 2 times to have the required amount of EXP to create this axe.)
In Conclusion:
Now I realize that this is a rather OVER STATED and lengthy explanation for something that is in my opinion fairly small. However, this is at the least, extremely important to the fluidity of gameplay and also and AMAZING addition to an already awesome script. You'll also have your lovely name along side the KGC in credits.
Now now, I do know there is a script by cmsp2000 or something like that, however, his is OVER done for what I need. Simple is sweet here. I'd be spending more time disabling a TON of things in his script than just adding two things to this one.
Also, the script is attached to end of this topic post.
THANK YOU FOR READING THIS MUCH! REALLY!