- Joined
- Nov 19, 2016
- Messages
- 97
- Reaction score
- 12
- First Language
- English
- Primarily Uses
Hey everyone,
Hope you are all well.
I was hoping I can pick your brains.
In my project I have a Staff as one of the weapon types that can be equipped by the mage class. When equipped with a staff the mage will get access to "Staff Skills".
Now that's all quite straight forward but what I am struggling with is the next part.
I would like the "Staff Skills" to be picked from a random pool of skills.
Now I have already done a little research and found that with Yanfly's Item Core Plugin, link to plugin here : http://www.yanfly.moe/wiki/Item_Core_(YEP)
you can create "Independent Items". Those independent items can have this java script function:
<On Creation Eval>
item.price = baseItem.price;
item.price += Math.floor(Random() * 100);
</On Creation Eval>
which allows you to assign traits to the item on creation.
What I am struggling with is to write the JavaScript code as my knowledge is limited I am afraid.
I guess I would have to declare a variable that contains the pool of skills that can be picked from and then choose a random one...
If anybody could point me into the right direction I would be grateful.
Thank you in advance!!
Hope you are all well.
I was hoping I can pick your brains.
In my project I have a Staff as one of the weapon types that can be equipped by the mage class. When equipped with a staff the mage will get access to "Staff Skills".
Now that's all quite straight forward but what I am struggling with is the next part.
I would like the "Staff Skills" to be picked from a random pool of skills.
Now I have already done a little research and found that with Yanfly's Item Core Plugin, link to plugin here : http://www.yanfly.moe/wiki/Item_Core_(YEP)
you can create "Independent Items". Those independent items can have this java script function:
<On Creation Eval>
item.price = baseItem.price;
item.price += Math.floor(Random() * 100);
</On Creation Eval>
which allows you to assign traits to the item on creation.
What I am struggling with is to write the JavaScript code as my knowledge is limited I am afraid.
I guess I would have to declare a variable that contains the pool of skills that can be picked from and then choose a random one...
If anybody could point me into the right direction I would be grateful.
Thank you in advance!!