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

But tax is with percentage, not a pre-defined number. But, if you used attributes, you couldn't change tax in game (Could you?)


Question ~ Can you do negative percent with this? Like, if you wanted to add a discount system instead?
 
Attributes sound kinda stupid to me. It's not very easy to assign an attribute to EVERY item you want to tax. Having a variable which you can change with a call script command sound a lot easier to me. Besides, if you want an item to permanetly increase in price, you can change its price instead of an attribute.

If I understood Mega Flare correctly (I think he said it works with -%) then discount systems should work. I'll test it out right now and edit this post.
EDIT: Discount shops work.
 

Mega Flare

Awesome Bro

Yeah it works. I tried it. Its nice thing. So if you like saved a town you can make it -7%. So that would make items in that town cheaper
 
Now I get it. Sorry for my dumby post at Request Script section, I just realized it now. To make a tax different for each town, I would just have to make an event which Calls Script to change tax rates whenever I want it to. Am I right?

I'm definitely using this script. Thanks!
 
I thought of an improvement. When you set a negative tax rate, it will display it as a subsidy instead. It won't affect the way it works, but it will make it look more professional.

Replace the following (lines 207-209)
Code:
self.contents.draw_text(4, 0, 200, 86, "Current Tax Rate")
self.contents.font.color = normal_color
self.contents.draw_text(172, 0, 64, 86, $game_system.tax.to_s + "%", 2)
with this
Code:
if $game_system.tax >= 0
  self.contents.draw_text(4, 0, 200, 86, "Current Tax Rate")
else
  self.contents.draw_text(4, 0, 200, 86, "Current Subsidy")
end
self.contents.font.color = normal_color
if $game_system.tax >= 0
  self.contents.draw_text(172, 0, 64, 86, $game_system.tax.to_s + "%", 2)
else
  self.contents.draw_text(172, 0, 64, 86, ($game_system.tax * -1).to_s + "%", 2)
end
 
Very sweet. This'll make things fun. I always like to aggrivate the player.
"Oh, well you can buy it here" (sounds like a lot) "You chose not to, and now you have to buy it here for a higher price"
lol Very nice. I haven't seen any other scripts you've done, but keep up the good work!
 
Version 1.2 is out, nothing has changed, except when tax is 0, the tax rate won't display :) and for discount stores, instead of tax rate, Discount rate will be displayed.
 

RnLGG

Member

Yeah, I'm writing this on my psp so I will make it quick. Is the 'call script' a thing in an event or what? I will so use this script in my game if I find that out. This script would help if items get more exspensive/cheaper later in a game!
 

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