this idea relates to an idea I have that was hatched while remembering old store-running games I used to play when I was a kid, and I thought "Maybe I could create something in this vain in RPG Maker.
The road block I've run into in this ideation process is how I might be able to implement semi-random customers that would order one of the items that the player could have at that point in the game, and come in at different times. Does anyone have any ideas on how I might be able to implement something like this?
in order to ask for *one of the lot*, you have to define the lot first.
and for that you have to gather items (minus quest items which are unusable), weapons and armors.
if you can do that with eventing, you got it.
Declare an array of customer event ids then use an event spawner to randomly pick an index in the array to spawn
you can use the script call:
$gameParty.gainItem($dataItems[$gameVariables.value(X)], Y);
to add the item with the ID equal to the value of variable number X. Y is the amount added.
for example, if you replace X with 1, you can set variable number 1 in the editor to 10 and this script will add item number 10 in the database to your inventory.
to take away items you use:
$gameParty.loseItem($dataItems[$gameVariables.value(X)], Y);
it works in the same way.
you can put this script call in a common event and then make everyhing with just events.
hope that explanation is understandable :/
oh, there's also conditional branch event > script with this:
$gameParty.hasItem($dataItems[$gameVariables.value(X)])
this checks if you have the item with ID equal to the value of variable X.
so if you set variable X to 10 this will check if you have item number 10 in the database.
It will probably come in handy if you're dealing with randomized items.