Page 1 of 1

[0.17.51] resource_autoplace_settings changing errors

Posted: Mon Jun 24, 2019 1:59 pm
by Linver
Hi all, i have this code that work in version <= 0.17.50, now don't start, how have I to change it for make it work in 0.17.51?

Code: Select all

	
data.raw["resource"]["crude-oil"].autoplace = resource_autoplace.resource_autoplace_settings
{
	name = "crude-oil",
	order = "c", -- Other resources are "b"; oil won't get placed if something else is already there.
	base_density = 8.2,
	base_spots_per_km2 = 1.8,
	random_probability = 1/48,
	random_spot_size_minimum = 1,
	random_spot_size_maximum = 1, -- don't randomize spot size
	additional_richness = 75000, -- this increases the total everywhere, so base_density needs to be decreased to compensate
	has_starting_area_placement = false,
	resource_index = resource_autoplace.resource_indexes["crude-oil"],
	regular_rq_factor_multiplier = 1
}
The game give me an error on line "resource_index = resource_autoplace.resource_indexes["crude-oil"]," but I haven't understand the feedbeck that game give back.

Thanks to all for future answer in advance!

Re: [0.17.51] resource_autoplace_settings changing errors

Posted: Mon Jun 24, 2019 2:44 pm
by Bilka
You can simply remove the line.