Giter Site home page Giter Site logo

ecosmarttaxmod's Issues

Payment/Tax Code Visual Bug

I noticed there seems to be a somewhat minor issue, where if you change what is typed in the Tax Code field and then close the editing window, the next time opening it it will still display whatever the original input was when the was law submitted (if brand new, it will always be blank). The same will also happen with a new block is added to the action "Then" block where the text will disappear.

However, this seems to only be a visual issue as submitting the change as a new law will have the action logged under whatever you last entered into the field.

The biggest problem with this is that it can be confusing to the user and can very easily lead to a mistake when you aren't aware of the issue.

outstanding taxes/payments in a government account

we had a situation where lots of money was owed by the state route account, and the states didn't know how much they had to put into it to clear all debts. It would be awesome if /tax govcard would also show outstanding payment and tax totals for this government account. Another use case would be seeing how much wages are owed in total, or how much abandonement tax the federal bank is missing.

Distribute backlogged payments more fairly

Right now if a number of tax cards are due payments from a gov account which can't afford to pay them all, the tax cards with lower ids get priority over the payments. For example:

Gov account: $100
Tax card 1: owed $60
Tax card 2: owed $60
Tax card 3: owed $60

In the above case, the next tax tick will pay tax card 1 the full $60, tax card 2 gets $40 and tax card 3 gets nothing. Ideally it would instead pay each tax card evenly (weighted towards higher debts).

Smart Distribute legal action

It would distribute a currency among an alias, using Smart Pay / Smart Tax mechanisms. Properties:

  • Source Account (Gov Bank Account): where to distribute from
  • Target (Alias): who to distribute among
  • Amount (number): how much to distribute in total
  • Consider Existing Wealth (boolean): citizen's existing wealth will be considered when distributing
  • Allow Tax (boolean): if citizen has more wealth than distribute amount, tax the excess back (only if Consider Existing Wealth is true)
  • Citizen Weight (number expresion w/Citizen context): weight for distribution

feature request: delayed smart tax or "additional tax burden"

with the tax framework, we were able to have the actual tree tax delayed until the next tax framework tick, so you were unaffected by it if you cleaned up your stuff fast enough. Smart Tax is collecting instantly, meaning a citizen will get taxed immediately.
That means we also have to do a "smart pay" instead of a "smart rebate" for giving back the money that was taxed, because otherwise citizens will be taxed their money but not given it back. The government has to actually give out money instead of future tax income.
It would be awesome if there was a way to delay a "smart tax" action without having to resort to the tax framework again, by e.g. saying "trigger 1h afterwards". Alternatively, there could be a counterpiece to the smart rebate to increase the tax burden for you by a certain amount but not collect these taxes immediately.
If the current "smart rebate" can already handle negative numbers (meaning, additional tax debt) then maybe it can be renamed to a "smart tax difference" or something like that to reflect that it can do both positive and negative changes in tax burden

Allow access to other's tax cards

Maybe via an extension to the chat command, e.g. /tax card <user> to view someone else's tax card. Could be useful to help another player understand their taxes if they have a question.

feature request: legal action for transfer from person -> person

Eco currently supports the following transfers of money:
government account -> person(s), which is a payment
person(s) -> government account, which is a tax
private/government account -> private/government account, which is a transfer

An action to send money from a person to another person is currently missing. If a citizen uses more than their personal bank account, the existing "transfer" action does not support tracking that wealth too, it can only be used to transfer an amount of currency from one specified account to another.
To properly support sending money from a citizen to another citizen, we need to do a workaround:

  1. tax into a specified government account
  2. pay from the government account for the receiving citizen
    we tried this workaround this WT run and our "common pot" government account always consumed more money than it took in, probably because of citizens spending money before getting it taxed. A new legal action that directly sends from person to person without needing this in-between step would be great.

Update for Version 10

As expected beta 0.6.1 crashes on startup on version 10 of the server.

[23:18:06.660] [17] [ Warn] [Eco] Failed to get derived types for 'Eco.World.Blocks.Block' in assembly 'EcoSmartTaxMod, Version=0.6.1.0, Culture=neutral, PublicKeyToken=null' (usually safe to ignore for third party assembly). Error message: Unable to load one or more of the requested types.
Attempted to access a missing method.
Attempted to access a missing method.
Attempted to access a missing method.
 
[23:18:06.798] [4] [ Info] [Eco] Server Initialization                             ... Finished in 5.683 sec
 
[23:18:06.798] [24] [Error] [Eco] Failed to start the server. Exception was Exception: ReflectionTypeLoadException
Message:Unable to load one or more of the requested types.
Attempted to access a missing method.
Attempted to access a missing method.
Attempted to access a missing method.
Source:System.Private.CoreLib

System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Attempted to access a missing method.
Attempted to access a missing method.
Attempted to access a missing method.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Assembly.GetTypes()
   at Eco.Shared.Utils.ReflectionCache.<>c.<GetTypesCached>b__10_0(Assembly a)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Eco.Shared.Utils.ReflectionCache.GetTypesCached(Assembly assembly)
   at Eco.Shared.Utils.ReflectionCache.<>c.<GetGameAssembliesTypes>b__21_0(Assembly assembly)
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at Eco.Core.Serialization.SimpleSerializer.InitializeSerializableTypes()
   at Eco.Core.Serialization.SimpleSerializer..cctor()
System.MissingMethodException: Attempted to access a missing method.
System.MissingMethodException: Attempted to access a missing method.
System.MissingMethodException: Attempted to access a missing method.
Outer Exceptions:
One or more errors occurred. (Exception has been thrown by the target of an invocation.)
Exception has been thrown by the target of an invocation.
One or more errors occurred. (The type initializer for 'Eco.Core.Serialization.SimpleSerializer' threw an exception.)
The type initializer for 'Eco.Core.Serialization.SimpleSerializer' threw an exception.
 
[23:18:11.804] [24] [ Info] [Eco] Shutdown finished
 
[23:18:11.804] [24] [Error] [Eco] Errors report:
Failed to get derived types for 'Eco.World.Blocks.Block' in assembly 'EcoSmartTaxMod, Version=0.6.1.0, Culture=neutral, PublicKeyToken=null' (usually safe to ignore for third party assembly). Error message: Unable to load one or more of the requested types.
Attempted to access a missing method.
Attempted to access a missing method.
Attempted to access a missing method.: 1
Failed to start the server. Exception was Exception: ReflectionTypeLoadException
Message:Unable to load one or more of the requested types.
Attempted to access a missing method.
Attempted to access a missing method.
Attempted to access a missing method.
Source:System.Private.CoreLib

System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Attempted to access a missing method.
Attempted to access a missing method.
Attempted to access a missing method.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Assembly.GetTypes()
   at Eco.Shared.Utils.ReflectionCache.<>c.<GetTypesCached>b__10_0(Assembly a)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Eco.Shared.Utils.ReflectionCache.GetTypesCached(Assembly assembly)
   at Eco.Shared.Utils.ReflectionCache.<>c.<GetGameAssembliesTypes>b__21_0(Assembly assembly)
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at Eco.Core.Serialization.SimpleSerializer.InitializeSerializableTypes()
   at Eco.Core.Serialization.SimpleSerializer..cctor()
System.MissingMethodException: Attempted to access a missing method.
System.MissingMethodException: Attempted to access a missing method.
System.MissingMethodException: Attempted to access a missing method.
Outer Exceptions:
One or more errors occurred. (Exception has been thrown by the target of an invocation.)
Exception has been thrown by the target of an invocation.
One or more errors occurred. (The type initializer for 'Eco.Core.Serialization.SimpleSerializer' threw an exception.)
The type initializer for 'Eco.Core.Serialization.SimpleSerializer' threw an exception.
: 1

Version 10.2.0 crashes client on tax / pay action

Hello,
I'm testing the 10.2.0 update and when I take a action that would result in a tax or payment action my client crashes.

This is what is in the server log.

[11:39:16] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Eco.Shared.Networking.RPCManager.Invoke(INetClient client, RPCInvocation invocation, Boolean notifyOnPermissionFail)
   at Eco.Shared.Networking.RPCManager.InvokeOn(INetClient client, BSONObject bson, Object target, String methodName)
   at Eco.Shared.Networking.RPCManager.HandleReceiveRPC(INetClient client, BSONObject bson)
   at Eco.Plugins.Networking.NetworkServer.Eco.Shared.Networking.INetworkEventHandler.ReceiveEvent(INetClient client, NetworkEvent netEvent, BSONValue bsonValue)
   at Eco.Plugins.Networking.Client.<.ctor>b__78_4()
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Eco.Shared.Networking.RPCManager.Invoke(INetClient client, RPCInvocation invocation, Boolean notifyOnPermissionFail)
   at Eco.Core.Controller.ControllerManager.HandleViewRPC(INetClient client, Int32 universalID, String methodIdOrName, BSONObject bson)
   at InvokeStub_Client.ViewRPC(Object, Object, IntPtr*)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
System.MissingMethodException: Attempted to access a missing method.
   at Eco.Mods.SmartTax.Jurisdiction.FromContext(IContextObject context, Settlement settlement)
   at Eco.Mods.SmartTax.SmartTax_LegalAction.Do(LocString description, IContextObject context, Settlement jurisdictionSettlement)
   at Eco.Mods.SmartTax.SmartTax_LegalAction.Perform(Law law, GameAction action, AccountChangeSet acc)
   at Eco.Gameplay.Civics.LegalAction.PerformAndProcessResult(Law law, GameAction action, AccountChangeSet acc)
   at Eco.Gameplay.Civics.IfThenBlock.TryPerform(Law law, GameAction action, AccountChangeSet acc, LawSection section, Int32 index, LocStringBuilder sbDebug)
   at Eco.Gameplay.Civics.Laws.LawSection.CheckConditionsAndApplyEffects(Law law, GameAction action, AccountChangeSet acc)
   at Eco.Gameplay.Civics.Laws.LawSection.InternalPerform(Law law, GameAction action, AccountChangeSet acc)
   at Eco.Gameplay.Civics.Laws.LawSection.Perform(Law law, GameAction action, AccountChangeSet acc)
   at Eco.Gameplay.Civics.Laws.Law.TryPerform(GameAction action, AccountChangeSet acc)
   at Eco.Gameplay.Civics.Laws.LawManager.Perform(GameAction action, AccountChangeSet acc)
   at Eco.Gameplay.GameActions.GameActionManager.TryPerformActions(PackFlags flags, List`1 actions, IEnumerable`1 preTests, IEnumerable`1 postEffects, AccountChangeSet acc)
   at Eco.Gameplay.GameActions.GameActionManager.GetResultWithLock(GameActionPack pack)
   at Eco.Gameplay.GameActions.GameActionManager.TryPerformActions(User userToNotify, GameActionPack actionPack)
   at Eco.Mods.TechTree.AxeItem.Chop(Player player, InteractionTriggerInfo triggerInfo, InteractionTarget target) in D:\Eco1020Server\Mods\UserCode\Tools\AxeItem.override.cs:line 115
   at InvokeStub_AxeItem.Chop(Object, Object, IntPtr*)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)

Thank you

Game value to query tax paid / payment received

The query would be similar to query custom stat in that you can specify the time period to query in, or leave it at 0 to query lifetime. This would be helpful for accounting and refunding purposes (e.g. issue an exec action to refund everyone for all taxes of "Sales Tax" code in the last 24hrs, but not other tax codes).

Possibly also another set of game values for the government side, e.g. query how much revenue a particular tax has generated for a given gov account.

Maybe we want to add some view of this data to the tax card or tax log too so the player can view their aggregate stats at a glance?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.