Allow always during map gen

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
Vanderbildt
Engineer
Engineer
Posts: 31
Joined: 24 Feb 2016 16:40

Allow always during map gen

Post by Vanderbildt »

hello
I the king of copy and paste will ask frendly for help.

how can i say: during the map generation or in the scenario editor allow only one industrie of this type on the map

for example

if (economy==XXX)
switch (FEAT_INDUSTRIES, SELF, coal_mine_check_map_gen, industry_count =1) {
1: return CB_RESULT_IND_PROBABILITY_FROM_PROPERTY;
coal_mine_check_availability_param;


i couldn`t find a example so the king is naked

Thank you
vanderbildt
BW89
Engineer
Engineer
Posts: 105
Joined: 10 May 2015 11:42

Re: Allow always during map gen

Post by BW89 »

Set no. of industries to minimal

only one industrie of each type is built
Vanderbildt
Engineer
Engineer
Posts: 31
Joined: 24 Feb 2016 16:40

Re: Allow always during map gen

Post by Vanderbildt »

Yes thats true but not that what i want.

Thank you
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Allow always during map gen

Post by PikkaBird »

Vanderbildt wrote:for example
Sure, but make sure you've provided the correct parameters to industry_count (it needs a grfid), and reflect on what the value of that variable will be when it hasn't built the industry yet.
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 22 guests