The International Simutrans Forum

Development => Extension Requests => Topic started by: Leartin on April 24, 2014, 11:14:20 AM

Title: Climate-dependant graphics in one object
Post by: Leartin on April 24, 2014, 11:14:20 AM
Obviously, you can already assign which object can be in which climate zone, and for buildings and trees, this works. However, there are two drawbacks:
1) Anything the player builds is climate independant. For example, a depot, station extensions, but also ways. If you want to have different streets in a desert than in mountains, you'd have to provide them as seperate objects, making the menu more clunky.
2) When you change climate, all the climate dependent stuff is still there, allowing for cacti in mountains as well as flower meadows in a desert.

My suggestion is to have one object with different graphics, depending on the climate it is placed in, somewhat similar to the loaded graphics of vehicles. Additionally to the normal code, the DAT-File would have something like "[ 0 ]climateimage..." and "climate [ 0 ] = desert, tropic" or something similar. In a non-climate specific context, like buildings preview in the map editor, the standard graphics would be used, while on the field the climate graphics are rendered.
Some things where this could be useful:


In further speculation, maybe this could enable even more Multi-graphic-objects. Eg. instead of 20 different rocks in a climate, you might want to have one rock object which gets a random number at spawn, showing the correct rock image by that number. Or, if extended to ways, you could have a tiny bit of road with skid marks, gully, dead toad, zebra,... at a low chance.