D&D-esque currencies
#1
D&D-esque currencies
by Jimmie
Mar 24 2007

This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


Introduction

Ever found it strange that you're carrying 9999999 gold pieces?
With this system, that's cut down to, say, 9 platinums, 99 gold marks, 99 silver coins and 99 copper pieces. That's like a decrease in coin from 9'999'999 to 306.
The rates are easily changeable, and you can add your own coin types with very little work.

History
23 July 2009
  • Patched Stagecoach to 1.21 (Fixed stupid typo and lack of arguments in the method call below it)
22 July 2009
  • Updated Coin Values to 1.1 (Now detects font color and draws coins icons and amounts in a disabled fashion if appropriate. Default shop modified to use coin icons)
  • Updated Stagecoach to 1.2 (Uses a fainter color for routes which are too expensive)
  • Updated Item and gold notification to 2.5 (Worked out bugs, more options)
Screenshots
Are included in the description of each script.

Intructions
First copy the selected scripts to your game. Note that all of the "extra" scripts will also work without the coin values script!

Coin values
[Image: th_goldwindowscreenie.jpg][Image: th_shopscreenie.jpg][Image: th_shopscreenie3.jpg]
If you use the coin values script, you'll need icons for your coins. I used these for the examples (but I'm not a graphical artist):
[Image: copper.png][Image: silver.png][Image: gold.png][Image: platinum.png]
They go in your Icons folder.

Stagecoach
[Image: th_stagecoachscreenie.jpg][Image: th_stagecoachscreenie2.jpg]
If you use the stagecoach script, see inside the script for information on how to set locations up.
Here's an example though:
Code:
$SC_Places['AllV'] = StageCoach_Place.new('Alluria Village', 7, 10, 5, [['Ex2', 10],['Ex1', 15]])


This would create a location called Allure Village. When setting up routes, you'd call it 'AllV'. When traveling to Alluria, the player would end up at X10, Y5 on map #7. Traveling to the area with code 'Ex1' would cost 15 G, travelling to 'Ex2' would cost 10 G.
For this to work, you would naturally have to define Ex1 and Ex2 as well...

Code:
$SC_Places['Ex1'] = StageCoach_Place.new('Example 1', 5, 2, 8, [['Ex2', 10], ['AllV', 20]])
$SC_Places['Ex2'] = StageCoach_Place.new('Example 2', 6, 5, 2, [['Ex1', 10], ['AllV', 30]])


As you can see, the rates don't have to be the same both ways. Going to Example 1 from Alluria costs 15 G, while the other way costs 20 G.
You can still use the old way of setting routes up, so upgrading does not mean that you have to redo the configuration - you just have to copy/paste it into the new script.

Now, to call the menu.
Code:
$scene = Scene_StageCoach.new(location)


Where 'location' is the either the call name of the place the player is supposedly located in, or the place itself (as found in the $SC_Places hash).

You can also add, change and remove routes at run-time; Check the script for information.

Item and gold notification window
[Image: th_gainscreenie.jpg][Image: th_gainscreenie2.jpg]
Whenever you want to give the player items or gold, use this syntax:

Code:
$scene.item_gain([type 1, id 1, amount 1], [type 2, id 2, amount 2], [etc], money)


Types are the types of the items: 0 for items, 1 for weapons and 2 for armors.
Id's are the database id of the items - starting with 1 as in the database.
Amounts are of course, the amount of the item the player should receive.
Money is the amount of money to add.
So, for example. Adding 1 Hi-Potion, 1 Bronze Sword, 2 Mithril Shields and 1025 G:

Code:
$scene.item_gain([0,2,1],[1,1,1],[2,4,2],1025)


The first item is type 0, meaning a useable item.
It's ID is 2, meaning the second useable item: A Hi-potion (or whatever you call it)
The amount is 1, meaning the player only gets one.
Types are 0 for items, 1 for weapons, 2 for armors.

If you don't want to add gold, just leave it out. There's no need to put 0 there or something.
Likewise, you don't have to put any empty arrays there if you're not adding any items at all.

Battle results
[Image: th_battleresultscreenie.jpg]
This modifies Ragnarok Rob's old battle results screen to use the coin value system. The original topic is here, but this works without the coin value system just like everything else here.

Scripts
Coin values:

.txt   Coin_values_1.1.txt (Size: 10.91 KB / Downloads: 3)

Stagecoach:

.txt   Stagecoach_1.21.txt (Size: 15.83 KB / Downloads: 3)

Notification:

.txt   Item_and_gold_gained_2.5.txt (Size: 6.51 KB / Downloads: 4)

Battle results:

.txt   Battle_results_1.1.txt (Size: 4.22 KB / Downloads: 2)



Other supporting scripts
Hawk-McKain's Star Ocean shop


//Jimmie
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  Multiple Currencies mudgolem 0 2,412 03-16-2006, 01:00 PM
Last Post: mudgolem



Users browsing this thread: 1 Guest(s)