The proper way to add new tilesets into the game
The proper way to add new tilesets into the game
I need to add tilesets to the game and there's 2 ways to do this. Make a completely new set - tertilesc4hw which requires modifying source and this is a little bit beyond my scope.
The other way is to simply append the tiles to an existing set but I can't get them imported into FlaMe. FlaMe doesn't see the new tiles, presumably because the .ttp file needs regeneration or something.
In the screenshot below it shows tiles 80+ not showing in FlaMe for the Urban tile set and I added many tiles after 80+
I have no problems replacing existing tilesets (that's how I made custom maps before) but I could never figure out how to get additional tiles to appear correctly in FlaMe. Anyone know how to solve this?
I'll make a custom campaign 4 with various new tilesets if someone can figure out the best way of adding new tilesets. I already have the tilesets, I just need to figure out if we should make a tertilesc4hw or append to existing. Are there any limits on the number of tiles per set? What if Arizona had 200 tiles? What are the implications.
EDIT: I got the tiles to appear correctly up to 95 but I don't understand where this 95 limit is defined. It's not in the .radar file or .ttp. So where is it?
The other way is to simply append the tiles to an existing set but I can't get them imported into FlaMe. FlaMe doesn't see the new tiles, presumably because the .ttp file needs regeneration or something.
In the screenshot below it shows tiles 80+ not showing in FlaMe for the Urban tile set and I added many tiles after 80+
I have no problems replacing existing tilesets (that's how I made custom maps before) but I could never figure out how to get additional tiles to appear correctly in FlaMe. Anyone know how to solve this?
I'll make a custom campaign 4 with various new tilesets if someone can figure out the best way of adding new tilesets. I already have the tilesets, I just need to figure out if we should make a tertilesc4hw or append to existing. Are there any limits on the number of tiles per set? What if Arizona had 200 tiles? What are the implications.
EDIT: I got the tiles to appear correctly up to 95 but I don't understand where this 95 limit is defined. It's not in the .radar file or .ttp. So where is it?
- Attachments
-
- test_data.zip
- Urban tileset containing 126 tiles
- (2 MiB) Downloaded 294 times
Re: The proper way to add new tilesets into the game
It might be hard coded in flame?
I can add new textures to warzone without code change.
I also think you might be better to look at a new tile set maybe it can be added easier then adding more tiles to existing tile sets.
/data/base/tileset see the text files
/data/base/wrf see vidmem#.wrf
just some places to look for adding textures
Fore structure texture the wrf defines was deleted by per a long time back now each texture is define in the pie files.
I can add new textures to warzone without code change.
I also think you might be better to look at a new tile set maybe it can be added easier then adding more tiles to existing tile sets.
/data/base/tileset see the text files
/data/base/wrf see vidmem#.wrf
just some places to look for adding textures
Fore structure texture the wrf defines was deleted by per a long time back now each texture is define in the pie files.
Re: The proper way to add new tilesets into the game
I think this limit is hardcoded in FlaME. I use 1.28. I've long sought to figure out this limit because I can't make additional tilesets without it. I can only replace existing tiles but not add them.
Adding a new tileset is not as easy as just creating a tertilesc4hw folder. A search of "tertilesc3hw" shows that it's referenced in map.cpp and qtscript so it requires recompiling. Also there is only 3 options in FlaMe for texture types, arizona, rocky and urban. There wouldn't even be a way to select a 4th tileset in Flame.
But does anyone know what is the preferred method of adding a new tileset? Add more tiles to an existing set or create a tertilesc4hw? I don't know the performance and memory implications so I don't know which is preferred. I'd much rather just append to existing tilesets, seems like a lot less hassle.
Adding a new tileset is not as easy as just creating a tertilesc4hw folder. A search of "tertilesc3hw" shows that it's referenced in map.cpp and qtscript so it requires recompiling. Also there is only 3 options in FlaMe for texture types, arizona, rocky and urban. There wouldn't even be a way to select a 4th tileset in Flame.
But does anyone know what is the preferred method of adding a new tileset? Add more tiles to an existing set or create a tertilesc4hw? I don't know the performance and memory implications so I don't know which is preferred. I'd much rather just append to existing tilesets, seems like a lot less hassle.
Re: The proper way to add new tilesets into the game
I'm pretty sure i managed to make use of the black tiles successfully on some of my map-mods, eg. Berg's wide roads on Academy and Inversion. See also the wiki.
As for tileset4, i guess i'd rather have someone finish my now-old work on the "new map format" (plan and an unfinished attempt on implementation in #4291).
As for tileset4, i guess i'd rather have someone finish my now-old work on the "new map format" (plan and an unfinished attempt on implementation in #4291).
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: The proper way to add new tilesets into the game
Unfortunately those maps you linked only go up to tiles 93. FlaMe has a limit of 95 (see my screenshot).NoQ wrote: ↑23 Jul 2019, 19:46 I'm pretty sure i managed to make use of the black tiles successfully on some of my map-mods, eg. Berg's wide roads on Academy and Inversion. See also the wiki.
As for tileset4, i guess i'd rather have someone finish my now-old work on the "new map format" (plan and an unfinished attempt on implementation in #4291).
This is a blocker for making a new campaign/tile set until someone knows how to load more than 95 tiles in FlaMe.
I have attached a sample tileset in the OP containing 120 tiles if anyone wants to try
I'm not interested in working on new map stuff so I guess we'll leave this discussion here.
- Berserk Cyborg
- Code contributor
- Posts: 938
- Joined: 26 Sep 2016, 19:56
Re: The proper way to add new tilesets into the game
Apparently it's read from the .ttp files? Don't know, Flame is a bewildering piece of work, nor do I know Visual Basic (or want to). I'd try sharpflame if only it had a installer still on github.
At worst you'll have to release the new campaign as an addendum mod to your EB-mod.
At worst you'll have to release the new campaign as an addendum mod to your EB-mod.
Re: The proper way to add new tilesets into the game
Cant you have the new campaign without mods?
Re: The proper way to add new tilesets into the game
Is there any way to rename a folder and reload a mod from within a WZ script?
We could have tileset folders 4, 5, 6, 7 etc... and then have a function that renames/swaps tilesets 1-3 with some other set.
From within a campaign script we could call swapTileset(existing, new)
swapTileset(1,5);
or maybe just activeTilesets(1,5,3);
I'll leave the idea here.
We could have tileset folders 4, 5, 6, 7 etc... and then have a function that renames/swaps tilesets 1-3 with some other set.
From within a campaign script we could call swapTileset(existing, new)
swapTileset(1,5);
or maybe just activeTilesets(1,5,3);
I'll leave the idea here.
- Berserk Cyborg
- Code contributor
- Posts: 938
- Joined: 26 Sep 2016, 19:56
Re: The proper way to add new tilesets into the game
Heh, I was thinking something similar but it was very convoluted. Berg was right though and it's not as hard as we thought. One should be able to create a campaign 4 by doing these steps:
- Add tertilesc4hw- folders, and radar file, into the base/texpages directory.
- Create a vidmem4.wrf and cam4.wrf file in the wrf directory.
- Append more data into gamedesc.lev.
- Make a new campaign JSON file in base/campaigns.
- Create new files for base/tileset.
- Account for the new tileset in mapLoadGroundTypes() and init_tileNames() and define a new tileset name in map.cpp (which rules.js will then need to be updated for).
The result is below (I copied gamma-1 and note the mission name: cam-4a). Then it should be a matter of adding new data into a wrf/camX. I'd create a small test map first if you want to attempt this.
- Add tertilesc4hw- folders, and radar file, into the base/texpages directory.
- Create a vidmem4.wrf and cam4.wrf file in the wrf directory.
- Append more data into gamedesc.lev.
- Make a new campaign JSON file in base/campaigns.
- Create new files for base/tileset.
- Account for the new tileset in mapLoadGroundTypes() and init_tileNames() and define a new tileset name in map.cpp (which rules.js will then need to be updated for).
The result is below (I copied gamma-1 and note the mission name: cam-4a). Then it should be a matter of adding new data into a wrf/camX. I'd create a small test map first if you want to attempt this.
Re: The proper way to add new tilesets into the game
I like being right.
I do note you have not defined the edge tiles also make sure you have the text file for edge tiles.
See you cliff tiles Sharpe edges
Well done Berserk Cyborg.