Jump to content


Photo

CSCA Currency System

csca currency system currencies multiple

  • Please log in to reply
31 replies to this topic

#1 casper667

casper667

    Advanced Member

  • Member
  • 548 posts
  • RM Skill - Jack of All Trades

Posted 04 March 2013 - 10:44 AM

CSCA Currency System

By: Casper Gaming (Casper667)
Last Update: March 15, 2013
Latest version: 1.0.3

Introduction

Allows you to easily create any number of different currencies. Many customizable options, such as an icon and color for each currency, as well as the max and starting amount of that currency. Because this script heavily modifies the way the default gold is handled, it likely will not be completely compatible with scripts that do anything money related unless they provide a patch for this script.

 

Screenshots
Inside the new item: a money pouch for all your currencies!
cspouch.png
You can also change the current currency in use through the money pouch:
cspouchchange.png
The gold window also shows icon and color now:
csmenuk.png

Shops can sell items of all currencies:

csshop.png

Or you can force shops to use just 1 currency (values are automatically calculated for the new currency from the items base currency):

csshopsamecur.png


How to Use
Place in your materials section. Setup required. Instructions in script.

Script
Text file is found here(copy and paste everything into your script editor in the materials section): LINK

NOTE! Some CSCA Scripts may not work nicely or at all with this script right now. I will be working on patching them over the next few days/weeks.

 

Updates

version 1.0.1

- Added support for CSCA Extra Stats

 

version 1.0.2

- Fixed bug with the gold window not updating currency when called from message window.

 
version 1.0.3
- Added support for CSCA Difficulty System


Credit
Casper Gaming

Terms
http://www.caspergam...rms_of_use.html


Edited by casper667, 15 March 2013 - 11:11 AM.


#2 esrann

esrann

    Advanced Member

  • Member
  • 34 posts
  • LocationFinland
  • RM Skill - Designer

Posted 05 March 2013 - 05:55 AM

Fantastic! This is exactly what i've been looking for! Thanks!

 

However, I get a "Can't convert symbol into integer" error when I try to go to shop or when I win a battle.

In a shop, the error points to line 641:

color = get_currency_used(item)[:color]

After battle the line is 185:

text = sprintf(Vocab::ObtainGold, amount, currency[:name])

 

I've set up two currencies:

- For index [0] the symbol is :cr

- For index [1] the symbol is :cm

 

Notetag for enemies:

<csca_currency: :cm>

 

Notetag for items:

<csca_currency: :cr>

 

In the shop event, before the actual shop processing, I have the following commands:

ControlVariables: [0021:ForceCurrencyID] = 0

ControlVariables: [0022:ForceCurrencySellID] = 0

ControlVariables: [0023:SellRate%] = 75

 

Am I doing something wrong here?

Did I understand correctly that every item/enemy must have a notetag?



#3 casper667

casper667

    Advanced Member

  • Member
  • 548 posts
  • RM Skill - Jack of All Trades

Posted 05 March 2013 - 07:57 AM

@esrann First of all, you don't need the extra : in the notetag (though that shouldn't cause any problems). Also, ForceCurrencyID and ForceCurrencySellID should both be less than 0, otherwise it will force the shop to use index 0 (unless that is the intended results?)


As for the error, you don't seem to be doing anything wrong. Every item and enemy has the currency note tag? The only other thing I could think of is another custom script conflicting with this. Are you using any? If not, could you please PM me a link to download an unencrypted example of the error?



#4 esrann

esrann

    Advanced Member

  • Member
  • 34 posts
  • LocationFinland
  • RM Skill - Designer

Posted 06 March 2013 - 07:44 AM

Ah, it was the extra colon in front of the currency symbol!

Which means I have to change notetags on every single item & enemy... :P

Everything else is fine and working.

 

Thanks for the reply!



#5 VagrantEnchanter

VagrantEnchanter

    Advanced Member

  • Member
  • 31 posts
  • RM Skill - Designer

Posted 06 March 2013 - 12:43 PM

Edit: No, I was wrong. That was an entirely different shop.

I made a fresh demo with the error and my edits to the script if you'd like to see it for reference.


Edited by VagrantEnchanter, 07 March 2013 - 07:39 PM.


#6 esrann

esrann

    Advanced Member

  • Member
  • 34 posts
  • LocationFinland
  • RM Skill - Designer

Posted 12 March 2013 - 01:57 PM

I noticed on small detail:

 

When I use the \$ control character in an event message to show the gold window next to the message, the gold window does not obey the 'switch_currency(currency)' script call, but always uses the default currency.

 

Is there a way to fix this?



#7 casper667

casper667

    Advanced Member

  • Member
  • 548 posts
  • RM Skill - Jack of All Trades

Posted 14 March 2013 - 06:16 AM

I noticed on small detail:

 

When I use the \$ control character in an event message to show the gold window next to the message, the gold window does not obey the 'switch_currency(currency)' script call, but always uses the default currency.

 

Is there a way to fix this?

Script has been updated to fix this.



#8 casper667

casper667

    Advanced Member

  • Member
  • 548 posts
  • RM Skill - Jack of All Trades

Posted 15 March 2013 - 11:12 AM

Script has been updated again! Now it supports CSCA Difficulty System. Make sure the Difficulty System script is ABOVE the Currency System script in the editor or it will error.



#9 Amber

Amber

    Advanced Member

  • Member
  • 155 posts

Posted 18 May 2013 - 07:09 AM

I think I got "Wrong number of arguments (6 for 5)" when I try to sell an item

 

 

 width = contents_width - 8
    draw_currency_value(@price * @number, @currency_unit, 4, price_y, width, @currency)


#10 casper667

casper667

    Advanced Member

  • Member
  • 548 posts
  • RM Skill - Jack of All Trades

Posted 18 May 2013 - 07:28 AM

I could not get it to reproduce your error. Are you using any custom scripts that affect the shop scene or create their own shop scene?


Edited by casper667, 18 May 2013 - 07:28 AM.


#11 Amber

Amber

    Advanced Member

  • Member
  • 155 posts

Posted 18 May 2013 - 07:32 AM

No. I don't use custom scripts that affect the shop window.



#12 Ookami-sama

Ookami-sama

    Newbie

  • Member
  • 9 posts

Posted 09 July 2013 - 09:56 PM

Um, I might of just missed this but is there a way to turn one currency into another?

 

Example the player has 100 Yen. They talk to an NPC and the NPC converts the yen into 0.77 Euros(or something like that.)



#13 casper667

casper667

    Advanced Member

  • Member
  • 548 posts
  • RM Skill - Jack of All Trades

Posted 09 July 2013 - 10:34 PM

Um, I might of just missed this but is there a way to turn one currency into another?

 

Example the player has 100 Yen. They talk to an NPC and the NPC converts the yen into 0.77 Euros(or something like that.)

 
 
# exchange_currency(currency1, currency2, amount)
# Exchanges the [amount] of [currency1] for [currency2]. Takes into consideration
# currency values. For example if 100 of currency 1 (value of 1), for
# currency 2 (value of 2), the result will be 200 of currency 2 gained.


#14 2BitsLP

2BitsLP

    Advanced Member

  • Member
  • 125 posts
  • LocationTexas
  • RM Skill - Writer

Posted 12 August 2013 - 09:59 PM

I'm getting a "can't convert symbol into color" error.

 

I think it may be conflicting with Tidloc's D-Shop Script, but when I took it out I still got the error. Only other scripts I am using are all CSCA.



#15 casper667

casper667

    Advanced Member

  • Member
  • 548 posts
  • RM Skill - Jack of All Trades

Posted 12 August 2013 - 10:26 PM

At what point in the game are you getting the error? Immediately when it starts, or a certain scene?


Edited by casper667, 12 August 2013 - 10:26 PM.


#16 2BitsLP

2BitsLP

    Advanced Member

  • Member
  • 125 posts
  • LocationTexas
  • RM Skill - Writer

Posted 13 August 2013 - 04:55 PM

I start a new game, get the pouch, go to select a currency, and it gives me the error. Also, when I try to buy at shops. I know my shops are set up correctly, though.



#17 casper667

casper667

    Advanced Member

  • Member
  • 548 posts
  • RM Skill - Jack of All Trades

Posted 14 August 2013 - 07:55 PM

Could you post the full error (and also your currency setup)?


Edited by casper667, 14 August 2013 - 07:55 PM.


#18 2BitsLP

2BitsLP

    Advanced Member

  • Member
  • 125 posts
  • LocationTexas
  • RM Skill - Writer

Posted 16 August 2013 - 02:01 PM

No problem. I am using a few more scripts at the moment, but it's the same error I was getting when I only had the 2 before:

946366_10201660680939856_2092417162_n.jp

 

Let me know if you need further information. Thanks!



#19 Ewaldar

Ewaldar

    Member

  • Member
  • 10 posts
  • RM Skill - Writer

Posted 06 October 2013 - 01:03 PM

Aya_Vectra

 

I passed a few hours to make many many tests, and I know what the problem is for the buy scene : There is a conflict with the Yanfly Core Engine !

 

 

 

EDIT :

 

Everything's ok, but I have a question : How can you do that the play must pay with a currency, or sell item with an other ?

The variables didn't work for that, and the note in notboxe neither.

 

If you set a currency (gold) a value of 100 and a currency (silver) 50, when you have to pay, you don't pay twice, but you sell twice, and I don't

undertsand.

 

Thanks in advance


Edited by Ewaldar, 07 October 2013 - 09:59 AM.


#20 casper667

casper667

    Advanced Member

  • Member
  • 548 posts
  • RM Skill - Jack of All Trades

Posted 10 October 2013 - 03:16 PM

Aya_Vectra

 

I passed a few hours to make many many tests, and I know what the problem is for the buy scene : There is a conflict with the Yanfly Core Engine !

 

 

 

EDIT :

 

Everything's ok, but I have a question : How can you do that the play must pay with a currency, or sell item with an other ?

The variables didn't work for that, and the note in notboxe neither.

 

If you set a currency (gold) a value of 100 and a currency (silver) 50, when you have to pay, you don't pay twice, but you sell twice, and I don't

undertsand.

 

Thanks in advance

I'm not quite sure I understand your problem... Could you show pictures of the problem?







Also tagged with one or more of these keywords: csca, currency, system, currencies, multiple

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users