StrangeLoopGames / EcoSuggestions

Repo for storing Eco game suggestions, separate from EcoIssues
34 stars 1 forks source link

sending money by law does not trigger the "transfer currency" trigger #1575

Open DanielKispert opened 2 years ago

DanielKispert commented 2 years ago

When you make a law that acts on the "transfer currency" trigger and transfers currency itself (e.g. "if you receive money, transfer 50% to another person") and then create another law, e.g. "if a person with a specific title receives money, tax 20% of it", then the transfer that is caused by the first law not trigger the 2nd "transfer currency" trigger.

D3nnis3n commented 2 years ago

I suggest adding a specific checkable option that enables this, if the reason we blocked this was to avoid loops.

Daniel-Magulado commented 2 years ago

This is by design. This is to prevent loops. The outcome or result of one law will never work as a trigger for another law. Meaning, laws with end result that fits exactly as a trigger for another law will not work. Closing as this is not a bug.

D3nnis3n commented 2 years ago

Moving to suggestions and creating internal ticket after Daniel has posted usecase.

DanielKispert commented 2 years ago

Usecase:

On White Tiger, we have an income tax that applies to all income on companies. A company is represented ingame by a citizen that has a specific title. For the tax, we use the "transfer currency" trigger so the law applies as soon as possible.

We wanted to add another convenience law which automatically transfers all income of employees of a company to the company citizen. These are mutually exclusive, you cannot be both an employee of a company and "the company".

We found that the convenience law transfer does not trigger the company income tax. It would be awesome if the loop protection could either be shut off by the server owner ("I know the risks, let me proceed") or changed to prevent loops by checking how many times a law has been triggered by an "original" action that came from a person, and not from another law.

This of course opens up many other difficulties about "which law triggers first" and "what values does each resulting law get" that don't need to be considered now but it would make the law system a lot more powerful and convenient for people that want to accept the risks that come with unlocking it.