FreeCol: FreeCol is a turn-based strategy game based on the old game Colonization, and similar to Civilization. The objective of the game is to create an independent nation.
GNU General Public License v2.0
585
stars
170
forks
source link
markovoss mod breaks the generation of forested tiles #70
When generating a new map, each landed tile can be forested with a chance of MapGeneratorOptions.FOREST_NUMBER. The mod introduces several land tile types that do not have a forested version. It breaks the code when such tile needs to be forested.
This can be fixed either by changing the code to allow some land tile types to never be forested (technically breaking the forest coverage percentage) or by adding forested versions for each new land tile type (this may not work properly with the "plant forest" mod)
java.lang.RuntimeException: No TileType for forested==true
at net.sf.freecol.server.generator.TerrainGenerator.getRandomTileType(TerrainGenerator.java:278)
at net.sf.freecol.server.generator.TerrainGenerator.getRandomLandTileType(TerrainGenerator.java:131)
at net.sf.freecol.server.generator.TerrainGenerator.lambda$generateMap$7(TerrainGenerator.java:876)
at net.sf.freecol.common.model.Map.populateTiles(Map.java:877)
at net.sf.freecol.server.generator.TerrainGenerator.generateMap(TerrainGenerator.java:853)
at net.sf.freecol.server.generator.SimpleMapGenerator.generateMap(SimpleMapGenerator.java:1079)
at net.sf.freecol.server.FreeColServer.generateMap(FreeColServer.java:1238)
at net.sf.freecol.server.FreeColServer.buildGame(FreeColServer.java:1171)
at net.sf.freecol.server.FreeColServer.startGame(FreeColServer.java:736)
at net.sf.freecol.server.control.PreGameController.requestLaunch(PreGameController.java:148)
at net.sf.freecol.common.networking.RequestLaunchMessage.serverHandler(RequestLaunchMessage.java:67)
at net.sf.freecol.server.control.ServerInputHandler.handle(ServerInputHandler.java:75)
at net.sf.freecol.common.networking.Connection.handle(Connection.java:514)
at net.sf.freecol.common.networking.ReceivingThread$UpdateThread.run(ReceivingThread.java:134)
----------------------------
Should be fixed in git.0cbd2b4. I simply disallowed forested tiles where no suitable tile type is found, as this is least likely to cause unpleasant interactions with other mods, as you wisely noted.
Bug reports here are more likely to be acted upon promptly.
When generating a new map, each landed tile can be forested with a chance of
MapGeneratorOptions.FOREST_NUMBER
. The mod introduces several land tile types that do not have a forested version. It breaks the code when such tile needs to be forested.This can be fixed either by changing the code to allow some land tile types to never be forested (technically breaking the forest coverage percentage) or by adding forested versions for each new land tile type (this may not work properly with the "plant forest" mod)