Scripted Laws


  • This would be my dream feature: scripted laws

    When looking at my other 2 threads about laws (enact-able laws, player variables) you can see that this relates quite a lot to programming. so why not go a step further and make it so you have the option of scripting a law in Javascript (for example, could also be in Lua perhaps).

    In this script you would write several functions for events related to the law or what the law is about.
    onLawCreate() - this function you implement gets executed when you finish writing up the law
    onLawAccept() - this function gets executed when the law is accepted and put into working. in this function you bind the event handlers to events like vote or place block or accept contract.

    This system would allow players that are able to script to create much more complex laws and even do complicated math to determine the outcome of certain actions.

    This would be a HUGE feature to implement is there is a lot of concern for the voters:
    People who cannot script cannot understand exactly how the law works. they will have to rely on the reasoning provided by the player who created the law (often a reason is not provided I find). So these players will not be able to make an educated decision.
    And on top of that you have the concern of technical security. basically if this feature is not implemented properly it might allow for skilled programmers to created hacks that will grant them free resources for example.


  • 2
    Posts
    97
    Views
    Log in to reply


  • That is a cool idea, and its basically what we do but through a simplified interface of drop downs. Perhaps someday we develop a scripting language for this so you can do that kind of thing. I like it.


2
Posts
97
Views
Log in to reply

Internal error.

Oops! Looks like something went wrong!