llunak Posted November 27, 2014 Share Posted November 27, 2014 (edited) Starting with X:CE 0.31 RC2, it should be possible to add more tilesets to the game. This is still done by a hardcoded list of tilesets, so it's not completely extensible, but there are (as of 0.31RC2) 4 new named normal tilesets (forest, mountains, swamp, tropical), 4 new generic normal tilesets and 4 town (i.e. terror) tilesets (asian and 3 generic). The only difference between named and generic tilesets is only that they do not have a specific name and a mod using any of these generic slots will also have to provide a name in strings.xml (unless it's a terror tileset, which is not named anywhere in the game). A mod implementing a tileset (and maps for it) can be created rather simply. The only speciality is that in order for the tileset world locations to be somewhat extensible, tileset masks (files tilesetmask1.png, tilesetmask2.png and townmask.png in assets/earth/continentmasks/) need to be merged by the game, otherwise tileset masks from one mod would override them for all other mods. This is done by using tilesetmask1-modmerge.png (etc.) files, which will be alpha-blended on the game's tileset masks, and thus should provide only areas for the tileset the mod provides. As an example, there is a tropical tileset mod available. It should be usable and demonstrate how to create another tileset mod (except for the possible strings.xml change, which can be based on a tutorial). The tropical tileset mod can be downloaded here. This tileset is based on the tropical tileset provided here (which appears to be no longer maintained, as the user posting it has not logged in for more than 2 months by now). Given that I'm actually not very interested in mapping as such, if somebody would like to maintain the tileset and/or create more maps for it, that would be very welcome). Edited December 8, 2014 by llunak Quote Link to comment Share on other sites More sharing options...
kabill Posted November 27, 2014 Share Posted November 27, 2014 The only speciality is that in order for the tileset world locations to be somewhat extensible, tileset maps (files tilesetmask1.png, tilesetmask2.png and townmask.png in assets/earth/continentmasks/) should not provide a complete map of all tilesets, but only a map for its own tileset. These maps will be merged (alpha-blended) onto the game's maps. In terms of how the tileset is selected for a mission, will these new overlays stack with existing ones? If I understand the current system correctly, the game currently chooses between two tilesets with each mission based on the tileset masks set in each of the files. If a new tileset was added, would the game then pick between three in the areas where the new tileset is set to work. (I'm assuming the answer is "yes" but wanted to be sure). (if somebody would like to maintain the tileset and/or create more maps for it, that would be very welcome). It's been on my to-do list. There's a much greater chance of it happening with this functionality added (which is awesome, by the way). Quote Link to comment Share on other sites More sharing options...
llunak Posted November 27, 2014 Author Share Posted November 27, 2014 In terms of how the tileset is selected for a mission, will these new overlays stack with existing ones?If I understand the current system correctly, the game currently chooses between two tilesets with each mission based on the tileset masks set in each of the files. If a new tileset was added, would the game then pick between three in the areas where the new tileset is set to work. (I'm assuming the answer is "yes" but wanted to be sure). No. There are still only two tilesets to choose from, provided by the two images (plus there's the third one for town terror missions). And if the two images were handled the normal way the modular system works, the ones from the highest priority mod (that contains them) would specify everything. So if there were two or more mods adding two new tilesets, they wouldn't be able all to specify where the tileset is. Which is why in this case the two final images are created by alpha-blending images from all mods on top of each other. In this specific case of the tropical tileset, it only specifies where tropical areas are (and overwrites what the base game image says about those areas), but doesn't alter anything else, because the rest of its images are transparent. I'd still like to improve this somehow somewhen in the future, as the 50% vs 50% system is not that great, but this should be good enough for now. Quote Link to comment Share on other sites More sharing options...
Khall Posted December 4, 2014 Share Posted December 4, 2014 Given that I'm actually not very interested in mapping as such, if somebody would like to maintain the tileset and/or create more maps for it, that would be very welcome). I'll certainly have a go at it. I had a look at it and while the tiles are there, it's not exactly a complete tileset in regards to damaged/destroyed states, spectres not set up right, very few submaps, etc. I''ve started on editing the tiles to look more vanilla by adding a slight black outline, removing the fade out effect on trees (which while nice, didn't match anything in the base game, plus allows me to match bottom/top portions of trees better) and playing around with contrast/saturation. I'll also have to make damaged/destroyed images as well, but they shouldn't be too difficult. Once the tiles are done, creating maps should be fairly straightforward. Quote Link to comment Share on other sites More sharing options...
Skitso Posted December 4, 2014 Share Posted December 4, 2014 Whoa! Nice stuff Khall! Quote Link to comment Share on other sites More sharing options...
llunak Posted December 4, 2014 Author Share Posted December 4, 2014 I'll certainly have a go at it. I had a look at it and while the tiles are there, it's not exactly a complete tileset in regards to damaged/destroyed states, spectres not set up right, very few submaps, etc. Thanks. Quote Link to comment Share on other sites More sharing options...
llunak Posted December 8, 2014 Author Share Posted December 8, 2014 Updated instructions for 0.31RC3, which changed how tileset masks work. It is now necessary to use -modmerge files which add only the tileset's areas. See the Tropical tileset for an example. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.