Advance law making

  • Sorry for messy post

    So i have 4 feedback parts.

    • One is that i want more stats from players.

    • Two i want variables in the law making. (Laws can be a hurt for the eyes when you need to select the same group of items over and over again.)

    • Three i want JSON support, so we can easy import and export laws into the law editor.

    • Four, as stated from other posts, i also want advance law making, support for a script language, LUA is better for Unity but JavaScript is better for web-browser, either would work for me anyway (Python would work too or just hack a own).

    When i use the calculate part of the law i want to have stats from players.
    So i can get the current money (and other stats) they have and use that to set laws for those who control the most money. (Example below).

    And set variables and/or programming in JavaScript (because its a web-browser) for more advance stuff.

    And/or just make a json file for export and import (Download/Upload laws).
    json files are good because they are easy to modify and my guess is that the law system already is in a json variable when you post it to the server(?) so converting it to a downloadable file on the server should be no problem (Also unity have JsonUtility class in C#).

    Example of advance law:

    const trees = ["Birch", "Fir", "Oak", "Cedar"];
    this.harvest(function(world, action){
        const totalTrees = world.getPopulation(trees);
        /* YOU beeing a global const value of "you player" */
        const player = world.getPlayer(YOU);
        if(totalTrees < 5)
        else if(totalTrees < 500)
            const playerCurrencyRatio = (player.getCurrency("Dollar") / world.getCurrency("Dollar"));
            var taxBase = 5;
            if(playerCurrencyRatio >= 0.75)
                taxBase = 25;
            else if(playerCurrencyRatio >= 0.5)
                taxBase = 15;
            else if(playerCurrencyRatio >= 0.25)
                taxBase = 10;
  "Dollar", (500 / totalTrees) * taxBase);
    }, trees);

  • 1
    Log in to reply

Internal error.

Oops! Looks like something went wrong!