Hi, I am trying to create a script where I can create "Zero"-sized villages, because I want to avoid to create a town and delete most of the buildings just to have a little village. When I try in the Console it is possible, and without errors. In the Console I can write this:
local t = api.type.TownInfo.new(); t.name = "My Village"; t.position.x = 0; t.position.y = 0; t.initialLandUseCapacities = { [1] = 0, [2] = 0, [3] = 0, }; api.cmd.sendCommand(api.cmd.make.createTowns({t})
and the village is created. But using it in a script I get an assertion error crash I guess it is because the capacities are below 50, as it works when I up it to 50 and above.
So my question is if anyone know or can figure out an idea how to run it without it causing a crash in the script?