I am getting this when trying to add a generator

Hannu

Mythras Guru
CL Add-on Dev
#1
Cannot add/update generator.

Generator is valid JSON according to jsonformatter.curiousconcept.com
 

JochenL

CL Byte Sprite
Staff member
CL Add-on Dev
#2
I am finding this in the logs:

Coin Glorantha (Line: 131, Col: 16, Idx: 7812) - (Line: 131, Col: 19, Idx: 7815): Exception during deserialization ---> System.OverflowException: Arithmetic operation resulted in an overflow.
 

Hannu

Mythras Guru
CL Add-on Dev
#4
Hmmm. I have these as preliminary sizes (trying out things)

{
"name": "CoinAmount",
"entries": [
{
"m": 300,
"v": "{dice:2d6}"
},
{
"m": 200,
"v": "{dice:3d60}"
},
{
"m": 100,
"v": "{dice:5d100}"
},
{
"m": 2,
"v": "{dice:10d600}"
},
{
"m": 1,
"v": "{dice:5d18000}"
},
{
"m": 1,
"v": "{dice:6d60000}"
}
]
},
{
"name": "CoinPreciousAmount",
"entries": [
{
"m": 300,
"v": "{dice:2d6}"
},
{
"m": 50,
"v": "{dice:2d60}"
},
{
"m": 1,
"v": "{dice:4d60}"
}
]
},
 

Hannu

Mythras Guru
CL Add-on Dev
#6
Not that I would give any of the higher amounts. Small tens of thousands are likely the max I would share.
 

JochenL

CL Byte Sprite
Staff member
CL Add-on Dev
#13
No. Chaining like this does not work. But you can do:
Code:
{
    "resultPattern": "{var:roll}",
    "variables": {
        "roll": "{dice:{dice:2d6}d100}"
    }
}
 

ELF

Generator Sage
Staff member
CL Add-on Dev
#14
Sadly this does not work:
Code:
{math:{dice:1L/2d10}*100000}
The output is just:
{math:6*100000}
So currently you have to randomize city populations using an intermediate step:
Code:
export:
      roll: "{dice:1L/2d10}"
      population: "{math:{g:roll}*100}, 000"
I also have to have a space in the output in order to make the comma visible.

Edit: How the output mixes numeric output with a string is admittedly ugly, but since there are no numeric variables anyway, it probably does not matter.
 
Last edited:
Top