Advertisement
Drykul

More Item Drops

Jul 31st, 2016
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //=============================================================================
  2. // MoreItemDrops.js v1.0
  3. //=============================================================================
  4. /*:
  5.  * @plugindesc Allows for unlimited item drop rewards from enemies after battle instead of the normal 3 max.
  6.  * <id:More Item Drops>
  7.  * @author Drykul
  8.  *
  9.  * @help
  10.  * Use the first 3 drops for each enemy in the database as normal. For additional
  11.  * drops, use the notetag:
  12.  *
  13.  * <drops>
  14.  * x, y, z
  15.  * x, y, z
  16.  * ...
  17.  * </drops>
  18.  *
  19.  * x = item type (1 is item, 2 is weapon, and 3 is armor)
  20.  * y = item ID in the database
  21.  * z = the denominator of chance (Works the same as normal in the database)
  22.  *
  23.  * You can add as many lines as you want to have an endless number of potential
  24.  * item drops from that particular enemy.
  25.  *
  26.  * If you have any bugs to report, requests, or questions you can contact me
  27.  * at drykul(at)cloud9studios.net. I'm also on www.rpgmakerweb.com and
  28.  * www.rpgmakervxace.net as shaynec1981 as well as www.rpgmakermv.co as drykul.
  29.  *
  30.  * No credit is necessary for use of this script in either free
  31.  * or commercial projects. Just shoot me a line and let me know if it was
  32.  * worth your time! :)
  33.  *
  34.  * Visit us at www.cloud9studios.net to see what game we're working on next
  35.  * and sign up for our newsletter to stay up to date with our goings-on!
  36.  *
  37.  * /~~CHANGE LOG~~/
  38.  *
  39.  * 07-31-16: 1.0 release
  40.  */
  41. ////// Main function
  42. $multiLineTag = '';
  43. var Scene_Title_Alias_Drykul = Scene_Title.prototype.initialize
  44. Scene_Title.prototype.initialize = function () {
  45.     for (i = 1; i < $dataEnemies.length; i++) {
  46.         $multiLineTag = /<drops>([\s\S]*)<\/drops>/.exec($dataEnemies[i].note);
  47.         if ($multiLineTag != null) {
  48.             $multiLineTag = $multiLineTag[1];
  49.             $multiLineTag = $multiLineTag.split('\n');
  50.             $multiLineTag.pop();
  51.             $multiLineTag.shift();
  52.             for (x = 0; x < $multiLineTag.length; x++) {
  53.                 _tempVar = $multiLineTag[x].split(", ");
  54.                 $dataEnemies[i].dropItems[$dataEnemies[i].dropItems.length] = {
  55.                     kind: Number(_tempVar[0])
  56.                     , dataId: Number(_tempVar[1])
  57.                     , denominator: Number(_tempVar[2])
  58.                 };
  59.             };
  60.             $multiLineTag = '';
  61.         };
  62.     };
  63.     Scene_Title_Alias_Drykul.call(this);
  64. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement