I wanted to know if anyone else knew exactly how to use the <JS Crafting Effect> notetag to make more than one item per usage of the Item Crafting System.
For example, let's say I had 1 wood and 1 stone to craft one stone axe, and let's suppose that I wanted to make it craft 2 axes instead of one per use.
I want to make sure that it works to add extra items for each instance of crafting because I've tried a Common Event before to add in extra items, and the problem with that if you select multiples, let's say, you were creating 5 stone axes at once, then the common event only creates 1 extra stone axe for the entire batch (for a total of 6 instead of the target of 10). I would need to use the <JS Crafting Effect> to make it add one axe for each instance of crafting.
<JS Crafting Effect>
code
code
code
</JS Crafting Effect>
- Used for: Item, Weapon, Armor Notetags
- Replace 'code' with JavaScript code to determine what kinds of effects you
want to occur upon crafting this item.
- The 'item' variable represents the item being crafted.
- The 'number' variable represents the number of items being crafted.
So, obviously, I would have to insert some code that represents 'number' that would alter the number of items received with each instance of crafting. The problem is that I don't know what to put there.
Is there anyone who might have a suggestion? I appreciate any advice, thank you.
For example, let's say I had 1 wood and 1 stone to craft one stone axe, and let's suppose that I wanted to make it craft 2 axes instead of one per use.
I want to make sure that it works to add extra items for each instance of crafting because I've tried a Common Event before to add in extra items, and the problem with that if you select multiples, let's say, you were creating 5 stone axes at once, then the common event only creates 1 extra stone axe for the entire batch (for a total of 6 instead of the target of 10). I would need to use the <JS Crafting Effect> to make it add one axe for each instance of crafting.
<JS Crafting Effect>
code
code
code
</JS Crafting Effect>
- Used for: Item, Weapon, Armor Notetags
- Replace 'code' with JavaScript code to determine what kinds of effects you
want to occur upon crafting this item.
- The 'item' variable represents the item being crafted.
- The 'number' variable represents the number of items being crafted.
So, obviously, I would have to insert some code that represents 'number' that would alter the number of items received with each instance of crafting. The problem is that I don't know what to put there.
Is there anyone who might have a suggestion? I appreciate any advice, thank you.