Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Bug #767003

mapgen.c's mountain_pct may decrease as steepness highly increases

Added by Akechi . about 3 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Low
Category:
Server
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

It maybe a small? problem when do make_island and map generator is island or fair.
e.g. In classic ruleset with default server settings except minplayer = 0 and generator = island (54x72 map, steepness stays 30), mountain_pct is 19% (desert, forest, jungle, swamp_pct is 7, 17, 2, 6).
When steepness = 61, mountain_pct is 26% (desert, forest, jungle, swamp_pct is lowered to 4, 12, 1, 4, because value factor is lowered).
When steepness = 100, mountain_pct is 15% (desert, forest, jungle, swamp_pct is 1, 4, 0, 1, so grassland / plains / tundra is placed instead).

(server/generator/mapgen.c adjust_terrain_param)

  int polar = 2 * ICE_BASE_LEVEL * game.map.server.landpercent / MAX_COLATITUDE;
  float factor = (100.0 - polar - game.map.server.steepness * 0.8 ) / 10000;

  mountain_pct = factor * game.map.server.steepness * 90;

History

#1 Updated by Jacob Nevins almost 2 years ago

  • Sprint/Milestone changed from 2.6.1 to 2.6.2

#2 Updated by Marko Lindqvist almost 2 years ago

So, ignoring 'polar' and constant factors, it's (100 - 0.8 * s) * s -> (100 * s) - (0.8 * s^2). Definitely not healthy looking formula!

#4 Updated by Marko Lindqvist almost 2 years ago

  • Status changed from Resolved to In Progress

The reduction from 'factor' should be divided by 10000.

#7 Updated by Marko Lindqvist almost 2 years ago

Undecided about targeting this to S2_6. Fixing it for the steepness setting to work more logically would be good for new users, but do we want to disrupt it for those users who have already found suitable value for themselves?

#8 Updated by Marko Lindqvist almost 2 years ago

  • Status changed from Resolved to In Progress

I will rework the patch to reduce amount of integer math rounding.

#9 Updated by Marko Lindqvist almost 2 years ago

Marko Lindqvist wrote:

I will rework the patch to reduce amount of integer math rounding.

S2_6 version

#11 Updated by Marko Lindqvist almost 2 years ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist

Also available in: Atom PDF