Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Resource icon

MV Random Loot Awarder 1.2

No permission to download

Run

Towns Guard
Xy$
0.00
Run submitted a new resource:

MV Random Loot Awarder - Allows for random loot to be awarded to the player.

This plugin is For Commercial Use.
Link backs and crediting are not necessary but would be appreciated.

RandomLoot Plugin
Provides functionality for giving the player a random piece of loot.

Parameters:
Name:
item_range_minimum
Description: The lowest id to use in the range of items from the Items database.
Default value: 1

Name: item_range_maximum
Description: The highest id to use in the range of items from the Items database....
Read more about this resource...
 

Deezil907

Villager
Xy$
0.00
Think one thing you may want to add, should you continue to expand on this. Would be the option to exclude items from selection. I know you can put in a range, but if a person already has items within the range included, but may not wish for them to ever drop. The exclusion tag would be helpful.
 

Run

Towns Guard
Xy$
0.00
@Deezil907 Thank you for the feedback.
I will implement the exclusion tag, it will be in the notes as tm_loot_exclude.
I also plan to implement a "category" feature.
Using the category feature, the game developer will be able to add the tag: tm_lootc_category
to an item's notes.
The category part can be anything, e.g. tm_lootc_healing, tm_lootc_rare, tm_lootc_expensive
They can then can call the plugin command: tm_loot category
e.g. tm_loot healing, tm_loot rare, tm_loot expensive

This will allow the creation of sets of items that the player can be given one of at random.
 

Run

Towns Guard
Xy$
0.00
Run updated MV Random Loot Awarder with a new update entry:

MV Random Loot Awarder V1.1

Item Notes:
Adding the following lines to the notes of an item in the database, will make their effects active for that item.

tm_loot_exclude
Excludes this item from the random loot range.

tm_lootc_category
The category can be replace with anything,
e.g. tm_lootc_healing, tm_lootc_rare, tm_lootc_expensive
This category can then be used with the tm_loot plugin command as a type:
e.g. tm_loot...
Read the rest of this update entry...
 

Deezil907

Villager
Xy$
0.00
Awesome, hope more people come to use it =), look forward to more updates!
[doublepost=1454380596,1452584383][/doublepost]Was thinking possible some cosmetic upgrade to this, maybe displaying the icon of the item looted?

Also could there be a random gold plugin command added (i.e. tm_lootgold_x) with x = to max amount of gold awarded randomly, as of right now the chest when looted will not report any gold gains (although gold was awarded).

Well, anyway still look forward to any future updates.
 
  • Like
Reactions: Run

Run

Towns Guard
Xy$
0.00
@Deezil907
Though both are good ideas, I sadly won't be able to work on this for a few weeks.

So for now I would suggest awarding random gold by creating an event as follows.

Use the control variables event and set a variable of your choice to a random number between two numbers, eg. between 1 and 1000.
Then call the change gold event with increase selected, and select the variable you chose previously as the value.
Next call a show text event containing \V[20]G found!
In this case 20 was the number of the variable I chose, replace that 20 with ID number of the variable you chose at the beginning.


Once again, thanks for the feedback, I'll apply the updates as soon as I am able.
 

Deezil907

Villager
Xy$
0.00
@Deezil907
Though both are good ideas, I sadly won't be able to work on this for a few weeks.

So for now I would suggest awarding random gold by creating an event as follows.

Use the control variables event and set a variable of your choice to a random number between two numbers, eg. between 1 and 1000.
Then call the change gold event with increase selected, and select the variable you chose previously as the value.
Next call a show text event containing \V[20]G found!
In this case 20 was the number of the variable I chose, replace that 20 with ID number of the variable you chose at the beginning.


Once again, thanks for the feedback, I'll apply the updates as soon as I am able.
Yeah, that is how I do it currently. Just that pressing enter to push the dialog forward seems a tad tedious =)
No need to rush, just thought I'd put out the ideas.
 
I also think adding a command for gold would be great. For the simple reason that the gold will then be displayed in the same message box as the items, not an extra one.

It's relatively easy to do tho. Just add the following code to the plugin.
First search for the following lines

Game_Interpreter.prototype.pluginCommand = function(command, args){
aliasPluginCommand.call(this,command, args);

And add this code below:

if(command == "tm_gold"){
var argument = parseInt(args[0]);
var giveGold = Math.floor(Math.random()*argument)+1
randomGold(giveGold);
}


Then add the following code to the end of the document:

function randomGold(amountGold){
$gameParty.gainGold(amountGold);
$gameMessage.setBackground(0);
$gameMessage.setPositionType(1);
$gameMessage.add("Obtained " + amountGold + $dataSystem.currencyUnit + ".");
}


If you now enter tm_gold value
as a plugin command, you will receive a random number of gold between 1 and value.
For example
tm_gold 10
will award you with a random value between 1 and 10.
 
Last edited:

Run

Towns Guard
Xy$
0.00
Run updated MV Random Loot Awarder with a new update entry:

Gold and Messages Update

New Parameters:

Name:
gold_received_message
Description: The message displayed when the player receives gold.
Default value: Obtained

Name: gold_lost_message
Description: The message displayed when the player loses gold.
Default value: Lost

Name: no_gold_message
Description: The message displayed when the player does not receive any gold.
Default value: You didn't find any

Name: item_obtained_message...
Read the rest of this update entry...
 
Top