Page 1 of 1

Trouble Modifying follower robot count tech

Posted: Mon Aug 31, 2020 2:19 am
by DRT99
I am attempting to modify the follower robot count bonus from the repeatable techs, using

Code: Select all

data.raw["technology"]['follower-robot-count-1'].effects = {type = "maximum-following-robots-count", modifier = 2}
and getting the error

Code: Select all

error while loading technology prototype "follower-robot-count-1". Value must be a dictionary in property tree at ROOT.technology.follower-robot-count-1
Based on my (admittedly, very limited) knowledge, follower-robot-count techs for levels 1-6 are generated via a function, but they seem to be output as "follower-robot-count-[level]", so I would assume it is available as such for any mod loaded after base (but, again, very limited knowledge)

I am unsure where my error is, could someone point me in the right direction?

Re: Trouble Modifying follower robot count tech

Posted: Mon Aug 31, 2020 5:17 am
by DaveMcW
Effects is a dictionary. Each individual effect is also a dictionary. So you need two dictionaries.

Code: Select all

data.raw["technology"]['follower-robot-count-1'].effects = {{type = "maximum-following-robots-count", modifier = 2}}