MV Custom Loot

I've tried using ThreeSixNine's Custom Loot Pool plugin

(https://forums.rpgmakerweb.com/index.php?threads/custom-loot-pools.156962/)

I have the appropriate note tags on the various armor/weapons that I'd like to award, but the notetags for enemies and the script calls don't allow me to award loot.

Does anyone have any suggestions?

Does anyone know any script calls to pull loot without needing a plugin?

I have also tried following this video:

It instructs you to use an event with the following lines:

Control Variables: #0001 "Variable Name" = Random 1....100
Script: var item = $gameVariables.value(0001);
$gameParty.gainItem($dataItems[item], 1)

In order to set a variable to a random number between the beginning and ending of the section of the weapons list that you want to pull from, and then award that item. However, it will not award anything. It seems to be giving me states instead of pieces of armor. Then you're supposed to use the following to announce it:

Text: None, Window, Bottom
You've obtained a \ii[\v[96]].

However, this only ever tells me the number that was rolled, not the name of the item awarded.
I have the appropriate note tags on the various armor/weapons that I'd like to award, but the notetags for enemies and the script calls don't allow me to award loot.
What does this mean? There's a notetag right in the instructions for awarding loot.

Enemy Drops​

You can add loot pools to enemy drops. When added to enemy drops, the loot pools work similarly to the script call. Upon defeat an enemy with a loot pool attached as a drop, will have a chance to drop a random item from the attached loot pool.

Add a loot pool to an enemy drop using the following notetag format in the enemy's note box:

<Loot Drops>
potions: 100%
</Loot Drops>

  • Replace lootPool with the name of a custom loot pool attached to your items.
  • Replace X% with the percent chance to call the random drop upon defeating the enemy.

As well as a JavaScript function call for it, if you wanted to put it in a chest or something:
You can then use the following script call to award a random element from your newly created pool:
JavaScript:
ThreeSixNine.CLP.gainRandomLoot('lootPool', X);
  • Replace "lootPool" with the name of the loot pool you wish to draw from.
  • Quotation marks ARE required around the loot pool name.
  • Replace "X" with the quantity of that item to drop.
  • A default quantity of 1 will be used if no quantity is provided.



Control Variables: #0001 "Variable Name" = Random 1....100
Script: var item = $gameVariables.value(0001);
$gameParty.gainItem($dataItems[item], 1)
That's incorrect code, you should never use leading zeros. It's just value(1)

Then you're supposed to use the following to announce it:

Text: None, Window, Bottom
You've obtained a \ii[\v[96]].

However, this only ever tells me the number that was rolled, not the name of the item awarded.
Right. You can hover over the Show Text window (or read MV's instructions) for a list of escape codes, there's no \ii. I'm not going to sit through a Driftwood video to see if he says what plugin you need for that to work, but it's in Yanfly's Message Core or one of its extensions.
I've placed all the appropriate note tags that the ThreeSixNine's plugin instructs you to place. On the items, and on the enemies. I have also used the proper JavaScript calls for awarding loot out of a chest, and neither seem to work.

I did get the code fixed, and now I can award random pieces of armor. I took the \ii out of the last text box, and now it just displays the current value of the variable which I rolled in order to pick the random armor. How do I make it give the name of the armor instead of its number?
I've placed all the appropriate note tags that the ThreeSixNine's plugin instructs you to place. On the items, and on the enemies. I have also used the proper JavaScript calls for awarding loot out of a chest, and neither seem to work.
Did you ask in the plugin thread for help?

I did get the code fixed, and now I can award random pieces of armor. I took the \ii out of the last text box, and now it just displays the current value of the variable which I rolled in order to pick the random armor. How do I make it give the name of the armor instead of its number?
Presuming you're still using variable 1:
Control Variables -> 1 -> Script -> $dataArmors[$gameVariables.value(1)].name

Then the variable will have the name instead of the ID.

Original thread: https://forums.rpgmakerweb.com/threads/custom-loot.159495/