Kino

EIS Game Dev
Veteran
Joined
Nov 27, 2015
Messages
562
Reaction score
805
First Language
English
Primarily Uses
RMMV
EIS Random Items


A short script that lets you give items to the player randomly from a list (array) you declare.


This can be good if you want to replicate something like gathering points from Monster Hunter. Or, put a little bit of RNG in the items you wish to give to your player.


Version 1.00


Core Features

  • Random Item Gain



Script:


View attachment EISRandomItems.js


Instructions

  1. Place the script in your plugins folder with the same name EISRandomItem
  2. Place it below the system script.
  3. Enjoy





/*
//=============================================================================
// Functions
//=============================================================================
*
* KR.Helpers.gainRandomItem(array)
* This method takes an array of items that you wish to pool from.
* After that it will return an item to the player.
*
* Example: KR.Helpers.gainRandomItem(['weapon', 1, 'item', 1, 'item', 2]);
* These are case sensitive and refer to the type of item you want the player
* to gain.
*
* KR.Helpers.setItemGainAmount(Number)
* This method takes a number, which is used to set the amount of the item
* you gain from the game.
*
* Example: KR.Helpers.setItemGainAmount(2);
* This would set the gain amount permanently to 2 until the game is restarted.
* If you want to return it to 1, just say KR.Helpers.setItemGainAmount(1);
*
* Tip: You can also set a random Item gain like so:
* KR.Helpers.setItemGainAmount(KR.Helpers.randomNumber(1, 3));
* You'll get 1 - 3 as the number of items gained.
*/






ScreenShots

Screenshots:


EISRandomItem1.png







Credits:


Free for both commercial and non-commercial use.Credit with the name Kino or Endless Illusion Software.


Thanks:
I appreciate you using this script, and I'm glad that it's able to help you.


If there are any bugs/issue, please contact me via message on the forums.


Note:
If you have any ideas, please feel free to mention them here.
 

KrisScythe

Villager
Member
Joined
May 31, 2016
Messages
10
Reaction score
0
First Language
English
Primarily Uses
hmm.. is there no indication as to what is the item that the player have gotten? i find it a little troublesome. if i have 100 items in my inventory and after pressing and getting the items and i ended up not knowing what i have gotten from the gathering point. Or is there any way that i could make the items obtained visible?
 

Latest Threads

Latest Posts

Latest Profile Posts

Took a small break by playing VR. Latest update of these glasses unfortunately caused a little of trouble but it can be fixed with a manual operation.

Until You Fall is freaking awesome.
I am SO HYPED to share this trailer with everyone when its done. I almost want to tear up i had no idea how far i came along with Fallen Feather in these last 3 years.
how it looks from the top
Hike was successful guys! I made it to the top!
Add Film-like Visual Effects During Test-Play, Deploy Games with Electron | RPG Maker News #69

Forum statistics

Threads
112,187
Messages
1,066,466
Members
145,790
Latest member
LiteSilverwind
Top