Flare Currency Download

Below is the Readme file for the script. You can also get the script by clicking the download link which will inturn take you to github.

All credit must be given to me: Adam Balan.

Scripts may be used in comercial games

Flare currency

Image Of Currency Window

Image of Currency Item Information

Image Of Menu

Image of Yanfly Patch

Image of Currency Shop

Image of Currency Shop Selling

Flare Currency allows you to add up to 10 currencies to your game via the options menu when setting up a script.

ATTN!

You will need to have installed, if you are using yanfly aftermath extension:

Flare Yanfly Aftermath Update which will either show or not show the currency reward window based on the troop's enemies and if any of them give a currency reward or not.

When a currency is added you can add the following tags in enemy note tags, not troops.

<currencyToGain name:"Name", amount: 10 chance: 90>

Currencies with out a percentage default to 100%. When you set the percentage you have to set 0-100 as an integer.

ATTN!

amount can be a string in the form of: "1 ~ x" where the first value should always be a 1. and x can be what ever value you want. This allows you to have random currencies rewarded after a battle is finished.

ATTN!

Currency Name must be present or we will not draw the currency information to the screen.

Shops

Shops are easy to build in Flare Currencies. It's quite amazing too.

So how do we make a shop? The first thing to do is to set up some items with the following tag:

<currencyShop belongsTo: "Sample Name" andCosts: 76>

That should read like english. We are saying this item belongs to a currency shop and a currency of: "Sample Name."

We also state that the it costs x of that currency.

So lets read it together: For the currency shop this item belongs to sample name and costs 76 of sample name.

The next things, for the currency information section is to then do in a comment for the event that calls the script call: FlareCurrencies.openShop("Currency Name", boolean) is:

<currencyShopEvent belongsTo: "currency Name">

Which creates:

Image example

This window is accessed by opening currencies from the menu, selecting a currency and hitting enter.

As you can see we have an extra line: "There is a currency shop selling this item."

This tells the player that: hey, there is a currency shop on this map.

So now that you went through your weapons, armors and items and added tags to stipulate which items belong to what currencies and how much they cost, how do you open said shop?

You create an event: FlareCurrencies.openShop("Sample Name", boolean) (as stated above)

ATTN!

You will want this script call and the comment tag in the same event in order for the player to see that A) this currency has said items associated with it and B) there is a currency shop on this map.

ATTN!

If the currency in question doesn't have items associated with it we will not show you or open the window to see what items are associated with said currency. The help text of "hit enter to see more info .." Will also not be present.

You have essentially opened a shop that is either purchase only (the boolean) or allows the user to sell items.

Selling items only works for items that belong to that currency shop. Items may have multiple different Currencies but currency shops only take items that belong to the specific currency you specified.

You cannot have multi currency based shops.

ATTN Developers

This shop is designed to be completely backwards compatible with your shop scripts. How ever if there is an issue Please file a bug report.

ATTN Users

This shop will be blank if the currency doesn't exist or no items have that currency.

Additional Information

You must keep the name and the description short. If you make them too long then they will go off the window and it will look broken.

Amount is not capped, you can have over 9,999 of any currency, but you cannot have any thing less then 0. any negative value that that takes the currency amount below 0 will cause your currency to default to 0.

Public API

Example:

FlareCurrencies.addAmount('Demon Teeth', 56);

// Or:

FlareCurrencies.addAmount('Demon Teeth', -56);

Example:

FlareCurrencies.openShop('Demon Teeth');

// Or:

FlareCurrencies.openShop('Demon Teeth', true); // Purchase only

example:

// variable id 5 has an amount of 650
FlareCurrencies.setAmountBasedOnVariableId('Demon Teeth', 5);

// Demon Teeth currency now has a value of 650

Yanfly Victory Aftermath Script

To see currencies spit out as "battle spoils" add the following to the option, "victory order": currency.

It can come in what ever order you want, how ever it must be present. For example:

exp custom drops currency

Once added, battles will have an additional battle spoils window showing the currencies you gained.

Yanfly Menu Manger

You don't need to do anything, currencies just work as expected.

For Developers

I have a special treat for you.

You can mess around with currencies in your own scripts via: flareCurrency which is a global object. You can do the following with it:

[
    {
      name:         currency["Currency One Name"],
      description:  currency["Currency One Description"],
      icon:         currency["Currency One Icon Index"],
      amount:       0
    },
    {
      name:         currency["Currency Two Name"],
      description:  currency["Currency Two Description"],
      icon:         currency["Currency Two Icon Index"],
      amount:       0
    },
    {
      name:         currency["Currency Three Name"],
      description:  currency["Currency Three Description"],
      icon:         currency["Currency Three Icon Index"],
      amount:       0
    },
    {
      name:         currency["Currency Four Name"],
      description:  currency["Currency Four Description"],
      icon:         currency["Currency Four Icon Index"],
      amount:       0
    },
    {
      name:         currency["Currency Five Name"],
      description:  currency["Currency Five Description"],
      icon:         currency["Currency Five Icon Index"],
      amount:       0
    },
];

Regarding Enemies

We add two new keys on to enemy objects.

Not Public.

This class is not meant to be given to the end user as a public api. It is for developers. End users have FlareCurrencies as a public class they can access for events.