In a similar vein to the secret Credit Card item in the original Kid Icarus, it would be nice to have a secret/late-game item that allows you to buy anything as long as, rather than having enough gold to buy it, you have any non-negative Gold value. Alternatively, perhaps a Credit Card system where the card has a limit to how far below 0 you can go, and maybe raise your limit after accruing and paying off a certain amount of total debt.
Theoretically, the first version of the suggestion would be the easiest to do: just check to see if a certain item is in the party's inventory, have it do the normal gold check if it's not, or have it check to see if the gold value is greater than or equal to 0 if it is.
Credit Card system
● ARCHIVED · READ-ONLY
-
-
So you can buy anything up to the amount of gold you have, but you just don't pay for it?
You don't need a plugin for that.
Even if it keeps track of how much "credit" you've accumulated, and only lets you buy things as long as the price plus the credit you've already used is less than the amount of gold you currently have. You can still do it with just a couple of variables. -
You have to involve Common Events (CE from now on).
For sure one CE will be called every time you wanna buy something.
Thus you might need to make evented shops than the premade regular system.
So a CE to call to handle the credit card, lets name it CCS (Credit Card System)
and a CE where the logic of the shop resides.
This might become very complicated though.
So instead of that approach, you should let the system handle the shop and make a way to use an ATM.
So a CE to call to handle the credit card, lets name it CCS (Credit Card System)
and an CE to call that works as ATM let's name it ATMS
That way you can draw money from ATMs until you reach a negative value.
You can also deposit money there to cover any debts and even add interest but this is up to you really.
You will need a variable named Balance for sure.
If the limits are fixed, you can hardcode them, meaning you can do your Conditional Branches comparing Balance with constant literal values.
Like: Balance >= -25000
But if you want to give the player a privilege of a loan that can increase through time, starting from small amounts, let's say..
Loan = level * 1000
Then you need a dynamic BalanceLimit, that needs to be a variable.
and it will equal to Loan * (-1)
Hope these all gave you an idea on what you can do with Eventing.
As @Shaz said, it is possible. -
It's more like...in the first case, you can buy anything regardless of the price as long as your Gold value is at least 0. But once it goes into the negatives, you can't buy anything else to until you get enough gold to set it to at least 0.So you can buy anything up to the amount of gold you have, but you just don't pay for it?
You don't need a plugin for that.
Even if it keeps track of how much "credit" you've accumulated, and only lets you buy things as long as the price plus the credit you've already used is less than the amount of gold you currently have. You can still do it with just a couple of variables.
In the second case, you can spend up to your current Gold amount plus either the sum of your credit card limits, or the limit of the highest-limit card in your possession.
In the third case, you can spend up to your current Gold amount plus your credit limit. Every Gold gained when your current value is below 0 will be added to a variable, and at certain payback intervals, the credit limit increases.
I...think I follow...though the point of a credit card is to allow you to pay for things when you're in a pinch, don't have the money, and need something right away, so I'm not sure an ATM system would be quite what I'm going for? It would make for a good Loan system, though. Also, yeah, an evented shop system would be a bit too complicated for me.You have to involve Common Events (CE from now on).
For sure one CE will be called every time you wanna buy something.
Thus you might need to make evented shops than the premade regular system.
So a CE to call to handle the credit card, lets name it CCS (Credit Card System)
and a CE where the logic of the shop resides.
This might become very complicated though.
So instead of that approach, you should let the system handle the shop and make a way to use an ATM.
So a CE to call to handle the credit card, lets name it CCS (Credit Card System)
and an CE to call that works as ATM let's name it ATMS
That way you can draw money from ATMs until you reach a negative value.
You can also deposit money there to cover any debts and even add interest but this is up to you really.
You will need a variable named Balance for sure.
If the limits are fixed, you can hardcode them, meaning you can do your Conditional Branches comparing Balance with constant literal values.
Like: Balance >= -25000
But if you want to give the player a privilege of a loan that can increase through time, starting from small amounts, let's say..
Loan = level * 1000
Then you need a dynamic BalanceLimit, that needs to be a variable.
and it will equal to Loan * (-1)
Hope these all gave you an idea on what you can do with Eventing.
As @Shaz said, it is possible. -
Also, yeah, an evented shop system would be a bit too complicated for me.
Plugin is the only way then. -
It doesn't have to be fully evented. You can sandwich the default shop processing between "before" and "after" events. E.g. let's say you have two variables: credit and gold. Something like this, for instance:
[Edit: I realise I've prioritised spending from credit before gold here, but you get the idea. :kaoswt:]
The above is just for example purposes, I'd still recommend putting this stuff in common events if it's going to be used in more than one situation. I imagine you could elaborate on it with other stuff like a third variable for overdraft, etc. =)SpoilerCode:◆If:Self Switch A is OFF ◆Comment:Freebies! ◆Text:Actor3(2), Window, Bottom : :Here's 10 000 credit, what d'ye want? ◆Control Variables:#0007 credit = 10000 ◆Control Self Switch:A = ON ◆ :Else ◆Text:Actor3(2), Window, Bottom : :What d'ye want? ◆ :End ◆Comment:Give credit to spend ◆Change Gold:+ {credit} ◆Comment:Remember initial cash + credit ◆Control Variables:#0006 money = Gold ◆Shop Processing:Potion : :Magic Water : :Dispel Herb : :Stimulant ◆Comment:Get cash + credit spent ◆Control Variables:#0006 money -= Gold ◆Comment:Separate cash from credit ◆If:money > 0 ◆Comment:Money was spent ◆If:money ≤ credit ◆Comment:Deduct from credit ◆Control Variables:#0007 credit -= money ◆ :Else ◆Comment:Null credit ◆Control Variables:#0007 credit = 0 ◆ :End ◆ :End ◆Text:Actor3(2), Window, Bottom : :Yer credit now stands at \v[7]\G. ◆Comment:Remove "credit" gold ◆Change Gold:- {credit}
Alternatively, Yanfly has a couple of plugins that could be useful: More Currencies and its requisite Shop Menu Core. The former directly offers an option to use a variable as a currency, which might be much easier~! -
Thanks for the advice! I'll piddle around with the code and see if I can figure something out. In the meantime, I've set up a prototype of what I kinda had in mind over on Codepen, here.
-
Thank you for the advice