Here is a list of possible materials and actions.
- add metal (1)
- add wood (2)
- add stone (3)
- add feathers (4)
- add leather (5)
- add woll (6)
- (heat up) (7)
- (cool down) (8 )
- (hammer it) (9)
- (carve it) (10)
- (sharp it) (11)
- I'm finished!
Receipt 1: Creation of a knife (1)
- (heat up)
- add metal
- (hammer it)
- (cool down)
Receipt 2: Creation of a dagger (1)
- (heat up)
- add metal
- (hammer it)
- (cool down)
- (sharp it)
Receipt 3: Creation of basic arrows (100)
- add wood
- (carve it)
- add feathers
Receipt 4: Creation of better arrows (100)
- add stone
- (hammer it)
- add wood
- (carve it)
- add feathers
Info
If the player is using items in a wrong order or is using the false material all the used materials get lost. Action like "heat up" requires SP Points... So the players have to recover a bit. The creation of better items requires more materials and more steps.
NPC Example:
- Hello, what would you like to do?
- - Sword
- - - Step 1
- - - - (heat up)
- - - Step 2
- - - - add metal
- - - Step 3
- - - - (hammer it)
- - - Step 4
- - - - (cool down)
- - - Step 5
- - - - I'm finished!
- - - - You got a knife...
- - Arrows
- - Armor
How the player can get materials?
Currently I've been thinking of two possibilities:
1. "<Materialname> NPC". That's could a NPC with NO human graphic (-> a tree, a stone, ...). It should be just talk able to get (free!) materials if you own a saw/pickaxe/... Getting material decrease SP a bit...
2. Drop of monsters... of course, rare materials should be just dropped by monsters.
To prevent the usage of macros to get a lot of crafting materials we can increase the material weight of "one unit of metal" to 5000 or something heavy. wood=2000,... that must be balanced and I've not been thinking about that.
Why increasing the weight to a high number? - Because the player should not be able to get 100 units of material to craft 100 daggers... That also prevents the crafting of super strong weapons... because the total of weight is more than the player can carry to the crafting NPC.
Scripting
First of all I though it would be impossible to do that in the tmw scripting language because it would be very complex... multiple goto's for every receipt, step and material... Fortunately I managed to get it very short. As you will see, the list of possible materials and actions includes Numbers.
Every material and action symbolise a digit from 0 to 99.
Code: Select all
// Init
UNIQUENUMER = 0;
MULTIPLICATOR = 1;
// every time you do something
UNIQUENUMER = UNIQUENUMER + MULTIPLICATOR * ITEMNUMBER; // add the Itemnumber with an offset to the Number
MULTIPLICATOR = MULTIPLICATOR * 100; // increse the multiplicator for the next digits
Possible problem: I don't know how big the number in the script can be???
Receipt 1: Creation of a knife -> 08090107
Receipt 2: Creation of a dagger -> 1108090107
Receipt 3: Creation of basic arrows -> 100204
Receipt 4: Creation of better arrows -> 1002040903
Script
I have never done a script for tmw before and its only tested on a piece of paper .
Info: heal 0, -10; should decrease SP but I don't know if its allowed to put a negative number in that function... I even don't know if the calculations are working THAT way.
Feel free to modify and use the script
EDIT: see topic below...