Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Tax Script

Tax Script
Version: 2.0

Introduction

This Script allows the user to add a sales tax to items that are sold in a shop.
In addition, the user may use negative taxes, for discount shops.
The user can easily change the tax rate using call script.

Screenshots

http://img163.imageshack.us/img163/7595/taxezmo2.png[/img]

Script

http://falcon.rmrk.net/tax.txt

Instructions

Place this above main, below everything else and it should work fine :)
To use the sales tax:
call script:
$game_system.tax = TAXRATE

then it should work

FAQ

N/A

Compatibility

Should work with all custom shop systems, however the window that displays the tax/discount rate will probably not appear.

Credits and Thanks

Thanks to Mega Flare for requesting this, and thanks to SephirothSpawn for helping me with an error!

Special thanks goes to Blizzard, who motivated me to write version 2.0

Author's Notes

This should be my final update.
 
This would work well with a popularity script or something, heh, is it just me or is RMXP on a baby boom with scripts lately
 
Nice work, The_Darklord, its always nice to see new scripts being posted :D

A few things I saw while I took a look at yuor script

1)
Incompatible with SDK as I rewrite too many methods XD

Actually It is compatible with SDK since it doesn't split any methods in Scene_Shop, this script would be incompatible with other Shop Systems.

2)
Set variable one to X before shop processing, then it should add X% tax.
If you want to use a different variable change:
$game_variables[1] to $game_variables[VARIABLE GO HERE!]
then it should work
Try and use as few of the in-game variables as possible, it would be easier if you added a new variable to Game_System or Game_Temp for the tax and well It would be easier to use tax as decimal numbers, and then the user can change the tax rate through a call script command

3) Many of the methods you rewrote could have been aliased for compatibility: Window_ShopBuy#draw_item Scene_Shop#update_buy and Scene_Shop#update_number to be exact.
 
1) I need to read more about the SDK, whenever I think it's compatible with the SDK, it turns out not to be, and when I dont think it is, it is compatible with the SDK, lol.

2) Next version will use a variable I will add to game_system.

3) I'll alias the next version.

Thanks for the comment!
 
Here is the list of methods that the SDK modifies
Game_Map - setup
Game_Map - update
Game_Character - update
Game_Event - refresh
Game_Player - update
Sprite_Battler - update
Spriteset_Map - initialize
Spriteset_Map - update
Scene_Tile - main
Scene_Map - main
Scene_Map - update
Scene_Save - write_save_data
Scene_Load - read_save_data
Scene_Menu - initialize
Scene_Menu - main
Scene_Menu - update & command input
Scene_Battle - main
Scene_Battle - update
Scene_Battle - update_phase3_basic_command
Scene_Battle - make_basic_action_result

If you need any help aliasing the methods I mentioned feel free to contact me.
 
I may make a SDK version later.

Version 1.1 (Decimal Support) is now out.
You must now use:
$game_system.tax = X
to change tax rate.
Next version I'm going to finish aliasing all the methods.

Thanks for the offer Trickster, but I know how to alias :)
 

Mega Flare

Awesome Bro

Just tested the new version and now its works even better! I mean that decimals make it more realalistic. Also I like to say in your first post you might want to change the Authors Notes
 
Thank god you helped me with the percent error, I would have had to write a huge if statement to round the value -_-

Also, thanks to whichever mod deleted my accidental post.

I'll try to finish aliasing stuff by Sunday.
 
It would be cooler if you could use it with attibutes instead if you put a attribute called 2 for example it adds 2 dollars tax on it. The maximumm is 7 dollars tax get it so 7 attributes numbered 1-7 and each one means different amount of tax. IT would be so much easier.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top