lordvalinar

Lord of the Damned
Veteran
Joined
Mar 31, 2013
Messages
305
Reaction score
175
First Language
English
Primarily Uses
RMMZ
Economic Trinity
v1.2 / v1.6 / v1.0
UPDATED (08/09/2021):
LvMZ_Economy (v1.6) - Fixed the lack of accountability on a null/invalid item ($gameParty.numItems()) when checking for the .stolen property.

UPDATED (07/4/2021):
LvMZ_Economy (v1.5) - Fixed the logStolenItem() function: The method of checking arrays didn't work so I implemented a function so it WILL work.

UPDATED (06/14/2021):
LvMZ_Economy (v1.4) - made it so demand names are actually case-insensitive (as instructed), fixed it so multiple <Demand: name> categories can be placed on an item for various regions (Warning: Because of the search behavior, if you have the exact same number of demands in the region as you do on the item, it will ONLY return the first found). Lastly - added in an adjustment rate for demands (fixed value) that can stack with - or be used independently of - the percentage rate!

LvMZ_Factions (v1.2) - Fixed small error with event conditions (wouldn't read the default ones if faction conditions were mixed in)
* Also Updating Demo (thieves guild hideout -> list of names (page 3 priority was "below character"; changed to "Same")

UPDATED (05/26/2021):
LvMZ_Factions (v1.1) - Included gender options (also configurable like everything else)
LVMZ_Economy (v1.3) - Lots of stuff, including:
* Individual shop funds (so they don't share the same startup if configured)
* Stores party inventory multiple times (if caught) instead of overriding each other! When retrieving gear, it returns the last stored gear set, until the array is empty.
* Can run an event when the shop is completely out of stock!
* Fixed the supplyCheck() method (wasn't calculating correctly)
* economicBuyPrice() and economicSellPrice() now take into account gender settings from LvMZ_Factions (if setup)

Come one, come all and liven up your worlds! I introduce to you a set of 3 plugins.
Plugin Order (github links for individual downloads):
- LvMZ_Factions
- LvMZ_Economy
- LvMZ_Currencies

The Demo (google drive link): Download Demo

Factions:
Introduce factions, races, relations, and titles to your world. This plugin provides a library of plugin commands and script calls for you to use to spice up your world. Want NPCs that react differently to you if you're of a different race or faction? Do you want to build up a relation with an NPC before you're able to... WooHoo?

This provides all of that! Of course, it only gives you the tools, you'll still have to do something with them.

Economy:
This plugin changes up shops, giving them a limited inventory, money, and adjusts prices based on "Regions" (not to be confused with RegionIDs) - districts, kingdoms, states, and so on with their own tax rates and "Demand" categories for items, weapons, and armors. If Factions is also included, it will adjust prices based on the parameters you set in there.

In addition, you can also steal items, sell stolen items, go to jail (have your equipment stored somewhere - like an evidence locker thematically, but really just stored on the party separately); restore or leave stolen items back where you found them, and more!

Currencies:
Inspired by the world's "Greatest Role-playing Game", you can create a currency set (Gold Pieces -> Silver Pieces -> Copper Pieces, or real world money, or anything really!) to use instead of the standard RPG Maker default currency unit. Of course this is optional.

There is also "Alternate Currencies" - variables, items, weapons, armors that you can use in substitution to buy something with, or to sell something for.

Screenshots:
StolenItems.pngHiddenFactions.pngRomance.pngShop.png

Usage:
It's better to follow the plugin instructions, as that would be too long to type out here.. In short however, Notetags..

Credits:
If you use LvMZ_Currencies, you must credit Yanfly as well (YEP_X_MoreCurrencies was used as a reference point for the structure of this plugin).

Terms of Use:
* Free to use and modify for commercial and noncommercial games, with credit.
* Do NOT remove my name from the Author of this plugin
* Do NOT reupload this plugin (modified or otherwise) anywhere other than these forums
 

Attachments

  • LvMZ_Currencies.js
    39.6 KB · Views: 31
  • LvMZ_Factions.js
    75 KB · Views: 23
  • LvMZ_Economy.js
    59.6 KB · Views: 17
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,283
Reaction score
758
First Language
English
Primarily Uses
RMVXA
The economy link goes to the currencies plugin.
Thanks for making them.
 

lordvalinar

Lord of the Damned
Veteran
Joined
Mar 31, 2013
Messages
305
Reaction score
175
First Language
English
Primarily Uses
RMMZ
Now updated LvMZ_Factions and LvMZ_Economy with some new features and fixes.
 
Last edited:

Kentaro_

Veteran
Veteran
Joined
Apr 28, 2016
Messages
86
Reaction score
100
First Language
German, English
Can I change the sell price for diffrent Items? Like in Region A I get for Meat more Gold as in Region B?.
 

lordvalinar

Lord of the Damned
Veteran
Joined
Mar 31, 2013
Messages
305
Reaction score
175
First Language
English
Primarily Uses
RMMZ
Can I change the sell price for diffrent Items? Like in Region A I get for Meat more Gold as in Region B?.
Yes and no. You can setup a "Demand" in certain regions like "Meat", and then in the item notetag have:
<Demand: Meat>, then adjust its price percentage (1-100) to have it cost more.

You could do it with some JS (script call) - something that clones the item and then adjusts the cloned item like:

JavaScript:
const item = JSON.parse(JSON.stringify($dataItems[id]));
item.price = // new price

That will leave the original database item alone and creates a working clone. Then make another script call to add the item to the shop goods after initialization. Like:
JavaScript:
this.shop().addGoods(item, amount);
in the event command list
Note: To get a random amount of items you can use an array:
JavaScript:
this.shop().addGoods(item, [2, 12]);

However, can't really change Alternate Currencies without extra work. Those are in the notetags, and I wouldn't recommend going into that mess lol
 

lordvalinar

Lord of the Damned
Veteran
Joined
Mar 31, 2013
Messages
305
Reaction score
175
First Language
English
Primarily Uses
RMMZ
@Kentaro_
Good news. Had some things to fix anyways, so I added a demand adjustment (fixed rate) for items by region demands :p (What you were asking for basically). Now you just put in the fixed adjustment in the parameters and ensure the item has that <Demand: name> tag!
 

Willibab

The Lord of Whackery
Veteran
Joined
Jun 22, 2017
Messages
247
Reaction score
811
First Language
Norwegian
Primarily Uses
RMMZ
This is the kind of plugin where I dont need it for my current project, but i want to make a whole new game just to use it xD
 

lordvalinar

Lord of the Damned
Veteran
Joined
Mar 31, 2013
Messages
305
Reaction score
175
First Language
English
Primarily Uses
RMMZ
This is the kind of plugin where I dont need it for my current project, but i want to make a whole new game just to use it xD
Or perhaps it's the kind of plugin(s) that you do need, but never knew that you needed it :D
 

Willibab

The Lord of Whackery
Veteran
Joined
Jun 22, 2017
Messages
247
Reaction score
811
First Language
Norwegian
Primarily Uses
RMMZ
Dont tempt me xD Trying to keep things simple! Its harder then i imagined it would be ^^
 

lordvalinar

Lord of the Damned
Veteran
Joined
Mar 31, 2013
Messages
305
Reaction score
175
First Language
English
Primarily Uses
RMMZ
Well either way... should hold off from downloading them in the next hour or so anyways. I keep finding mistakes, or things to fix (like the removeTitle() function was not removing the proper title.) *sighs* I think this is the last fix though. Then the Demo and all plugins should be properly updated (Except Currencies... that one seems fine) lol
 

TrentL111

Archmage
Veteran
Joined
Oct 13, 2018
Messages
72
Reaction score
32
First Language
English
Primarily Uses
RMMZ
Love that you can set a max number of items to buy. That's super cool
 

BeanCanDev

Can of Beans
Member
Joined
May 12, 2020
Messages
24
Reaction score
7
First Language
English
Primarily Uses
RMMZ
So I got this error when unequipping, an item.

The only other plugins I'm using are Viz Core and Items and Equips.

TypeError: Cannot read property 'stolen' of null
at Game_Party.numItems (LvMZ_Economy.js:917)
at Game_Party.<computed> (VisuMZ_1_ItemsEquipsCore.js:2912)
at Game_Party.gainItem (LvMZ_Economy.js:923)
at Game_Party.gainItem (LvMZ_Currencies.js:325)
at Game_Party.loseItem (rmmz_objects.js:5640)
at Game_Actor.tradeItemWithParty (rmmz_objects.js:4266)
at Game_Actor.<computed> [as tradeItemWithParty] (VisuMZ_1_ItemsEquipsCore.js:2912)
at Game_Actor.changeEquip (rmmz_objects.js:4247)
at Game_Actor.<computed>.<computed> [as changeEquip] (VisuMZ_1_ItemsEquipsCore.js:2912)
at Scene_Equip.executeEquipChange (rmmz_scenes.js:1933)
 

lordvalinar

Lord of the Damned
Veteran
Joined
Mar 31, 2013
Messages
305
Reaction score
175
First Language
English
Primarily Uses
RMMZ
So I got this error when unequipping, an item.

The only other plugins I'm using are Viz Core and Items and Equips.

TypeError: Cannot read property 'stolen' of null
at Game_Party.numItems (LvMZ_Economy.js:917)
at Game_Party.<computed> (VisuMZ_1_ItemsEquipsCore.js:2912)
at Game_Party.gainItem (LvMZ_Economy.js:923)
at Game_Party.gainItem (LvMZ_Currencies.js:325)
at Game_Party.loseItem (rmmz_objects.js:5640)
at Game_Actor.tradeItemWithParty (rmmz_objects.js:4266)
at Game_Actor.<computed> [as tradeItemWithParty] (VisuMZ_1_ItemsEquipsCore.js:2912)
at Game_Actor.changeEquip (rmmz_objects.js:4247)
at Game_Actor.<computed>.<computed> [as changeEquip] (VisuMZ_1_ItemsEquipsCore.js:2912)
at Scene_Equip.executeEquipChange (rmmz_scenes.js:1933)
Turns out I forgot to account for a null/invalid item (when searching for the stolen property) For an instant fix, add:
JavaScript:
if (!item) return 0;
right above the "const num = gameParty_numItems.call(this, item);" line (913-914 or so).

I'll have the script updated and uploaded momentarily
 

pf111

Veteran
Veteran
Joined
Jun 1, 2021
Messages
32
Reaction score
2
First Language
English
Primarily Uses
RMMZ
Hi, this looks neat, could the faction plugin be used for tracking variables kinda like a reputation system for the factions?
 

BeanCanDev

Can of Beans
Member
Joined
May 12, 2020
Messages
24
Reaction score
7
First Language
English
Primarily Uses
RMMZ
Hi, this looks neat, could the faction plugin be used for tracking variables kinda like a reputation system for the factions?

For what I’ve seen, yes it can. It might not be as straightforward as you describe, but I think it could work with the relationship system in the faction plug-in.
 

Latest Threads

Latest Posts

Latest Profile Posts

Finally got my website fixed and the security sorted so it's been a productive day. Can I go to sleep now? I mean... I don't need to work right?
It's always a good idea to refresh yourself on what your plugins do. I'm working on a map with opening walls, and I was about to tear my hair out over how much image editing and hand-constructing of autotiles I'd have to do, when I looked again and saw @Shaz 's Tile Changer could copy areas from another map.
"sorry it took me so long to respond" - can we please agree not to say that anymore unless it actually took a long time?! (Like 36hrs at least) I mean, I'm running out of funny responses here xD
Ugh... 4:53AM over here and I can't sleep so why not just game make.
I just love the MV feature that allows you to create your own animations!

Forum statistics

Threads
115,919
Messages
1,094,016
Members
151,174
Latest member
sardin
Top