Jump to content
gerwin

Alternate TFD Terrain Tilemap editor/viewer

Recommended Posts

A very useful tool indeed. Many thanks, gerwin.

Share this post


Link to post
Share on other sites

Thanks Gerwin, I really like the new version, especially the ability to view the movement routes.

Share this post


Link to post
Share on other sites

As Pfunk mentioned in another topic, the exported water_bitmap's were not working like before.

 

The colors were just slightly off, because of unaccurate palette color handling of the allegro library.

 

I rewrote the water_bitmap procedure in v0.89.

 

Edit: Accidentally broke all the other export functions, fixed in v0.89 B.

Edited by gerwin

Share this post


Link to post
Share on other sites

v0.90 is uploaded, it has the following changes:

- As already mentioned: all export functions fixed, including the watermap.

- F12 associates TFD files to TFDtool in windows, so one can open a TFD file by clicking on it in explorer.

- Works when drag and dropping a TFD file on the program file icon

- 1,2,3 keys now reload the current texture, targets and movement files respectively.

- Comes with seperate BMP-2-HFD heightmap converter tool.

- Window close button behaviour fixed.

Edited by gerwin

Share this post


Link to post
Share on other sites

Thank you very much for fixing all other export functions. I'm eager to create new planning maps for my WIP Red Sea terrain.

Share this post


Link to post
Share on other sites

v.091 is up.

 

It allows one to zoom in two additional levels, in order to verify target locations.

The heading of each target is also illustrated now.

The textures and aifields won't be any sharper then before.

 

Note: Setting WxH to 1024x1050 in TFDtool.ini is the minimum required for the maximum zoom level.

post-32175-0-95795500-1382979093_thumb.gif

Edited by gerwin
  • Like 2

Share this post


Link to post
Share on other sites

I assume this is what you men by WxH in the main ini:

 

[Display]

Screen-Width=1024

Screen-Height=1050

Fullscreen=0

Enable_Targets=1

Enable_Movement=1

Enable_Radius=0

Modify_Tags=0

Tile_Scale=2000

 

when I do so, and click the exe to start,  I get a failure message:

 

Unable to set graphics mode

Share this post


Link to post
Share on other sites

I see, Is the computer equipped with a screen which does not allow a vertical resolution in that range?

 

The only way to 'properly' allow maximum zoom for smaller screens is when I rewrite the display routines for seamless scrolling.

Instead I uploaded a quickly modified version which at least shows the max zoom level clipped.

Share this post


Link to post
Share on other sites

apparently, yes. my monitor does NOT support that level.

no real biggie, though!

Share this post


Link to post
Share on other sites

OK, At least it makes sense.

 

I uploaded a newer version v0.91: build date 29th oct.

This one also draws partly visible tiles on the bottom and left. To make better use of any available screen area.

Edited by gerwin

Share this post


Link to post
Share on other sites

Hi Gerwin I'd like to repeat my request for a fill tool that would paste the selected tile to all adjecent same tiles, ie until another tile type is encountered, preferably with random rotation if at all possible. This way we could just place the border textures for our new area and then "fill" it out with a new tile type, to create new larger areas easily. Making small changes with your editor is really fast and intuitive but larger changes are more difficult. 

Or you could allow the import of the tile map bitmap that the TFD editor can export, that way we could just paint in photoshop or whatever and fix the borders in TFD editor.

 

If that is not possible then perhaps we could just have a larger copy-paste area, now you can paste a single tile or 3x3 tiles, maybe a key to rotate the size to copy-paste using the B key, so you can paste 2x2, 3x3, 4x4, 6x6 et cetera.

 

I really hope you can find time for this!

Share this post


Link to post
Share on other sites

Yeah, I guess that is the only user request I have not worked on so far.

 

v0.92 has floodfill and 5x5 paste support.

It has three paste / floodfill rotation modes: sampled, no change, random.

Heightmap mode also has 3x3 and 5x5 paste support.

It also supports two new airfields (7+8) which I will upload later.

 

2x2 / 4x4 / 6x6 pasting... would complicate matters, is it useful enough? 7x7 and 9x9 are easy to add.

 

Maybe floodfill is more useful when one adds a range parameter.

Like default range=0. range=1 would also flood existing tiles with the flooded tile number+1, and flood it with the sampled tile number+1..

 

The bitmap import is practical, though I doubt many users would use such an option, it would look very odd in photoshop.

Edited by gerwin

Share this post


Link to post
Share on other sites

That was fast, thank you, I think the copy paste functions coupled with flood fill is enough.

 

I beg to differ, the photoshop import export would be hugely useful, at least for me  :biggrin: I am positive I can make a decent workflow from it, it will be a bit fiddly and difficult for sure but not impossible, but overall it will be easier to make large changes than going over every single tile in TFD editor, one can always fine tune in TFD editor what is messed up, but you can atleast add large swathes of new land easily, and also stuff like rivers could be easier to place. Also you can do selections from the heightmap to get proper tiles based on height. Lets face it, the thirdwire terrain editor is more or less dead and the new terrain format has not so far proven usable so to make decen new tile based maps we need your editor! What you have given us already has been huge!

Share this post


Link to post
Share on other sites

Also, one idea: would it be possible for the tilemap bitmap export to actually spit out three different bmps instead of one BMP with the tile, rotation and tag in the R G B channels? This way you could have more differentation to ease the workflow, now the color difference is minimal between tiles. This is of course only a minor concern, the import would be really great. I am experimenting now in photoshop with workflows, basically I am copy-pasting the different channels to different documents to ease the workload. Then I resized the heightmap to the same 500x500 size and did selections from there to new channels, so I can have my mountain tiles fall correctly. I have not yet worked out how to make transitions automatically but I'll think of something  :biggrin:

Share this post


Link to post
Share on other sites

OK. I uploaded a newer version (still says v0.92). This one will allow you to read back the data bitmap as if it was a TFD file. So you can at least experiment as much as you like.

You can make the differences in the R channel much more visible by transferring it to a indexed color image and giving it a rainbow palette.

 

The tag value is usually just annoying, but it is advisable to keep it within spec or all zero. I have seen sunken runways because of wrong tag values. If this is difficult I can add a procedure which forces it back to spec for the whole map.

 

The autotiling functions of the TW terrainEditor seem pretty decent, and for all i know they depict the proper way to prepare the rules for each tile first. Never actually used it though.

Share this post


Link to post
Share on other sites

Hey Gerwin, I managed to find some kind of a unknown problem with the TFD to BMP to TFD process:

-I am working on the Iran / Iraq terrain to add more defintion to the mountain areas of iran.

-My plan was to retile it using auto texture in TE, then use photoshop to copy-paste all cities and rivers and roads and stuff that are hand placed into my auto generated terrain.

-It works like a charm in TFD editor but it crashes the game at 100% load.

-My copy-pasted TFD works in TFD Editor, but when I open it in TerrainEditor (loads just fine) and try to for example rotate a single tile, it crashes. 

 

---> Ergo: somewhere there is a error in this frankenstein TFD file, but my know-how stops here on how to look for it. I attached two TFDs for you to compare, maybe you can use somekind of magic programming divination to work out what is wrong with it?

 

Also, thanks for a great tool!

IR TFDs.7z

Share this post


Link to post
Share on other sites

Thanks for the files. The culprit seems to be two 4-byte values in the header of the file which I called TFD_info1 TFD_info2. I don't know what these values mean or do. They are always the same for the stock terrains: 00 00 00 00 and 0040 9F40. I adjusted TFDtool to properly restore these values when loading a Data Bitmap or TFD with all zero. Fixed BMP2HFD in the same way. I don't get the TW Terraineditor crash now.

 

So open the faulty TFD with the latest TFDtool of 11 november, it will notify you, then save the TFD to fix the file.

Share this post


Link to post
Share on other sites

You are an absolute godsend! Thanks to you, the new Iran/Iraq mod will be about 150% prettier! I will be sure to send you the next closed beta!!!

Share this post


Link to post
Share on other sites

I tried the last version... i wanted to flatten some terrain in the Desert Storm map,  so I hit M go to a flat tile, hit C and then either it crashed when I move or it turns black. In the latter I can only toggle back to the tile map. Going back to Heightmap gives me a black map again...  

 

Bug?

 

 

I tried the same on the Libya map and their the colours in the height map just disappear partially...

Edited by slick cowboy

Share this post


Link to post
Share on other sites

You are right, the heightmap copy function obviously got messed up with the last overhaul. It will be fixed soon.

Share this post


Link to post
Share on other sites

The Heightmap copy paste is fixed now. It was bad when I wrote it last week, I don't know why it even worked for me then.

I also noticed the TFD_info2 detection had a typo, which triggered it everytime. This is also fixed.

 

The TFDtool package is now updated to v0.93.

Share this post


Link to post
Share on other sites

Hey Gerwin did you ever take a closer look at those TOD files? I am currently trying to make friends with TE editor, but it is unbeliavble that there is no copy-paste function for placing terrain objects!

Share this post


Link to post
Share on other sites

Hey Gerwin did you ever take a closer look at those TOD files? I am currently trying to make friends with TE editor, but it is unbeliavble that there is no copy-paste function for placing terrain objects!

 

tell me that Centurion! :sick:

 

coping/ grouping objects would be BIG yes especiall for city TODs population

Share this post


Link to post
Share on other sites

When I looked at the TOD files with a hex editor, I understood only half of it. Just (1) the amount of 3D objects and (2) the coordinates of their edges. Every TOD object being stored as an independant and individual bunch of polygons. This info would be enough to draw an overlay on the tiles to show where tod objects are located. But there are sections and bits of data in the tod file which I do not understand, so creating tods may be beyond my ability. One day I will try to draw the overlay I mentioned.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..