Limyx826 wrote: 20 Jul 2020 08:29
I'm thinking forking 600mm narrow gauge to match this NewGRF but this is the first time I'm doing something of this so help please?
I don't understand what you mean. That train set should be fully compatible and able to carry all the cargos used by this industry set. Or did you mean something else?
supermop wrote: 20 Jul 2020 12:56
Not sure if this is a known issue, but i started a game to test this out, and 3-years in, i still have zero industries:
I can't find some of the NewGRFs in that save to test it myself, but is that a 128x512 map? Unfortunately, industries don't currently generate when either side of the map is less than 256. In 1.2.0 I've added an error that tells you this when generating a map which is too small.
The reason for this is code which manually selects the number of industries of each type, scaled to a "normal" 256x256 map. This is necessary to introduce industries over time, since the game tries to maintain a certain number of industries based on the selected industry density and map size, and will fill the map with whatever is available, leaving no allowance for industries which haven't been invented yet.
That said, I don't understand why this limitation exists, since 0 should always be less than whatever decimal is calculated by the algorithm. Here's the relevant code. Does anyone know if NML switch code rejects decimal numbers?
Code: Select all
/* Slot Reservations - all industries */
// Compare how many industries are currently on the map with the target number, scaled to the map size from a "normal" 256 x 256 map. If less than the target number, proceed to town distance checks, otherwise disallow construction.
switch (FEAT_INDUSTRIES, SELF, switch_oil_wells_density_high,
industry_count(industry_oil_wells, -1) < 12 * (map_x_edge / 256) * (map_y_edge / 256))
{1: switch_oil_wells_location_check_1; return CB_RESULT_LOCATION_DISALLOW;}
switch (FEAT_INDUSTRIES, SELF, switch_oil_wells_density_normal,
industry_count(industry_oil_wells, -1) < 8 * (map_x_edge / 256) * (map_y_edge / 256))
{1: switch_oil_wells_location_check_1; return CB_RESULT_LOCATION_DISALLOW;}
switch (FEAT_INDUSTRIES, SELF, switch_oil_wells_density_low,
industry_count(industry_oil_wells, -1) < 4 * (map_x_edge / 256) * (map_y_edge / 256))
{1: switch_oil_wells_location_check_1; return CB_RESULT_LOCATION_DISALLOW;}
switch (FEAT_INDUSTRIES, SELF, switch_oil_wells_density_verylow,
industry_count(industry_oil_wells, -1) < 1 * (map_x_edge / 256) * (map_y_edge / 256))
{1: switch_oil_wells_location_check_1; return CB_RESULT_LOCATION_DISALLOW;}
// Get the selected industry density from parameter and redirect to the appropriate switch
switch (FEAT_INDUSTRIES, SELF, switch_oil_wells_density_selector, param_industry_density) {
0: switch_oil_wells_density_verylow;
1: switch_oil_wells_density_low;
2: switch_oil_wells_density_normal;
3: switch_oil_wells_density_high;
}
/*
Industry Totals on 256 x 256 map:
Industry Very Low (10) Low (25) Normal (55) High (80)
Oil Wells 1 4 8 12
Farm 1 5 12 12
Lumber Camp 1 3 8 12
Coal Mine 1 3 6 12
Iron Mine 1 3 6 12
Steel Mill 1 1 2 3
Factory 1 3 6 7
Paper Mill 1 1 2 3
Oil Refinery 1 1 2 3
Power Plant 1 1 3 4
*/