Skip to main content
Billable Resource
Update the tax rate for your instance. The tax rate determines how much wealth is collected from Agent NPCs during tax collection events. The tax rate is a percentage value that affects the economic behavior of your Agent NPCs. Higher tax rates will generate more revenue for your instance but may impact the happiness of your Agent NPCs.
// Set the new tax rate (percentage between 0 and 100)
double newTaxRate = 10.0;

// Update the instance's tax rate
Instance updatedInstance = PixocracySDK.InstanceManager().updateTaxRate(instance, newTaxRate);

// Access the updated tax rate
double currentTaxRate = updatedInstance.getTaxRate();