Zelaron Gaming Forum  
Stats Arcade Portal Forum FAQ Community Calendar Today's Posts Search
Go Back   Zelaron Gaming Forum > Zelaron Gaming > RPGMaker

 
 
Thread Tools Display Modes

 
Reply
Posted 2004-08-23, 07:15 PM in reply to ograx's post starting "Nice work again Bluecube,both ways..."
ograx said:
---New question---
Is it possible to use numbers with decimal values in rpgmaker2003?
ie.(100x1.13)
This would be an example of a tax command for the economy.
So as price can also be controlled by separate tax rates.
The 100 represents the value of the variable which is hte price of the items you bought.

Nope. Do this:

(Make sure Tax is something like 106 (for 106%, obviously)

<> PriceAfterTax = OriginalTax
<> PriceAfterTax = Itself*OriginalPrice
<> PriceAfterTax = Itself/100

-----

Example Usage:

500 value, 6% tax. Tax would then be 106.

Tax = 106
Tax = 106 * 500 = 53000
Tax = 53000 / 100 = 530

-----

I believe that RPGMaker always rounds down when dealing with division. To fix this, you can simply add 50 before you divide by 100 - this will basically translate into an extra 0.5.

1.2 would round down normally, which is good. Adding 0.5 wouldn't change this (it would be 1.7, which still rounds down to 1).

1.6 would also round down, which is NOT good. Adding 0.5 fixes this (2.1 rounds down to 2)

Last edited by BlueCube; 2004-08-23 at 08:10 PM.
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube
 



 

Bookmarks

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules [Forum Rules]
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 08:56 AM.
'Synthesis 2' vBulletin 3.x styles and 'x79' derivative
by WetWired the Unbound and Chruser
Copyright ©2002-2008 zelaron.com
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.