Jump to content
Klofkac

Tile Attributes RESEARCH: New useful findings!

Recommended Posts

Hello all, most probably you already know something about tile attributes and those TILEATRx.BIN files. Tile attributes are defining the behavior of each tile, i.e. whether vehices and infantry can move on this tile, whether buildings can be placed on that tile, whether your units move slowly etc. Each TILEATRx.BIN file contains 800 entries (one entry for each tile, there are 800 tiles in tileset), each entry has 32 bits. 32 bits means there can be 32 different attributes for each tile (a bit can have two values: 0 or 1, off or on). In the original TILEATRx.BIN files shipped with the game, only 7 out of 32 attributes are used. Which leaves 25 attributes unused.

Because the editor needs some extra information about tiles, which cannot be determined from existing attributes used by game, I decided to use 8 more bits (from those 25 unused bits) to store "Editor Attributes". These extra attributes tell the editor which tiles are sand tiles, rock tiles or dunes tiles, or the respective areas, so some of the features like fill area can work. I was assuming that using those 8 extra bits, which were not used in any of original TILEATRx.BIN files, would not affect the game behavior at all, but still, to be 100% safe, I decided to use two separate versions of same TILEATRx.BIN file: The original one for game, and the modified one (with extra attributes added into it) for the editor.

However, later it turned out, that those extra "editor" attributes, which I thought were not used it game, are in fact used by the game, and are affecting game behavior. So if you take the TILEATRx.BIN file shipped with editor, and copy it into game folder, strange things will start happening, for example your units cannot move on tiles where they should normally be able to move.

So I made some research in order to find out what's going on. And I discovered, that all those extra 25 attributes are game's internal attributes, which are added/removed from tiles by game logic during gameplay. These attributes were not meant by game authors to be used directly in TILEATRx.BIN files, however, you can exploit them to alter game behavior and have more modding possibilities. For example, you can place a real working concrete on you map!

Here is the complete list of all those 32 attributes and their meanings. Attributes marked with * are those 7 attributes which are used in original TILEATRx.BIN files.

01: Building/Unit owner side (bit1)
02: Building/Unit owner side (bit2)
03: Building/Unit owner side (bit3)
04: Occupied by Unit
05: Occupied by Building
06: Occupied by Infantry (middle)
07: Occupied by Infantry (top-right)
08: Occupied by Infantry (down-right)
09: Occupied by Infantry (down-left)
10: Occupied by Infantry (top-left)
11: Wall
12: Concrete
13: Non-buildable
14: * Vehicles can pass
15: * Infantry can pass
16: * Buildings can be placed, Rock craters
17: * Sandworm can pass, Sand craters
18: Concrete owner side (bit 1)
19: Concrete owner side (bit 2)
20: Concrete owner side (bit 3)
21: Spice amount (bit 1)
22: Spice amount (bit 2)
23: Spice amount (bit 3)
24: Unknown/Unused
25: Unknown/Unused
26: Unknown (side bit 1)
27: Unknown (side bit 2)
28: Unknown (side bit 3)
29: Unknown/Unused
30: * Rock (wheeled +10% speed)
31: * Dunes (wheeled -50%, other -20% sp.)
32: * Rough Rock (all -50% speed)

Now let's try to explain them.

05: Occupied by Building: Units cannot move on this tile and buildings cannot be placed. Cursor changes to "select" cursor when moved over this tile, like when cursor moves over a building or unit, but clicking will not do anything. The color of this tile on minimap changes to color of respective side, which this "building" belongs to (blue for Atreides, red for Harkonnen etc). The side who owns this "building" is defined by first three attributes: 01: Building/Unit owner side (bit1), 02: Building/Unit owner side (bit2), 03: Building/Unit owner side (bit3). Set those attributes to following possible combinations (0 = attribute not set, 1 = attribute set):
000 = Atreides
100 = Harkonnen
010 = Ordos
110 = Emperor
001 = Fremen
101 = Smugglers
011 = Mercenaries
111 = Sandworm
If the owner is your side, you can place buildings near this tile, like when there was standing your own building. And same for the other AI players.

04: Occupied by UnitUnits cannot move on this tile and buildings cannot be placed. If you place any unit on a tile with this attribute with the Map and Mission Editor, the game will crash with error message "Tile already occupied by unit". Again, use first three attributes to define which side this "unit" belongs to. If the unit belongs to your side, cursor changes to "select" cursor when moved over this tile. Minimap is not affected by this attribute.

06 - 10: Occupied by Infantry: The tile behaves like there was infantry standing on the tile at one the 5 respective positions. I.e. if you use all 5 attributes, infantry is standing on all 5 positions. Again, use first three attributes to define which side the "infantry" belongs to. If the infantry belongs to your side, cursor changes to "select" cursor when moved over this tile. If you do not use all 5 attributes and the owner side is you, you can move your infantry on this tile, but they will be able to stand only on the "free" positions. If the owner side is not you, you cannot move your infantry on this tile even if there are free positions (like you cannot group your and enemy's infantry on same tile), but you can move heavy vehicles on this tile (i.e. tank, harvester etc.), like they were crushing enemy infantry, if the owner side is your enemy. And most importantly, your stealth units will get revealed when standing next to tile with this attribute whose owner is not you.

11: Wall: The tile behaves like a wall or turret. When you place a wall or turret next to a tile with this attribute, it will visually link to that tile, like when there was built a wall (but you can build and move units on this tile).

12: Concrete: The tile behaves like concrete. You cannot build concrete on this tile, but placing other buildings on it, they will not damage over time like they were built on a concrete. The tile is destructible, so when you shoot it, it will turn into rock tile and lose its effect (then you can build concrete on it). The side who owns the "concrete" is defined by these three attributes: 18: Concrete owner side (bit 1), 19: Concrete owner side (bit 2), 20: Concrete owner side (bit 3). Use same combination of values, like for buildings and units. If the concrete belongs to you, you can build on it even if no other your building is near, and you can place buildings near it too.

13: Non-buildable: You cannot place buildings on this tile, even if "Buildings can be placed" attribute is set. Apparently this attribute is internally used on tiles below buildings where you can move units but not place other buildings.

21 - 23: Spice amount: If all three are not set, the tile behaves normally. But if you set any combination of these attributes, the tile will graphically change to thin or thick spice, and will behave like spice, i.e. Harvester can harvest it and it will disappear once fully harvested. Possible combinations:
100 = Thin spice, can be harvested only once, then disappears
010 = Thin spice, can be harvested twice, then disappears
110 = Thick spice, can be harvested only once, then turns into thin spice (can be harvested 3 times total)
001 = Thick spice, can be harvested twice, then turns into thin spice (can be harvested 4 times total)
Other combinations = Thick spice, cannot be harvested

26 - 28: Unknown: To be used with combination with "Occupied by Infantry" attribute. If you run over enemy infantry (meaning tile with "Occupied by Infantry" attribute) with a heavy vehicle, then owner of that infantry becomes the side defined by these three attributes. Meaning, if you are for example Fremen and set attributes 26-28 to combination of 001, and attributes 1-3 are some other value (enemy) and you move your heavy vehicle on this tile, the tile changes its behavior like it was your infantry - you can no longer move heavy units on it but can move infantry on free positions. Other function of these attributes was not discovered yet.

So, here are a few examples what useful things you can do with these attributes:

- Place real working concrete on map, and you can use any tile for it, not necessarily the concrete tiles in tileset. If you do not want you or enemy or other player to be able to build on it or next to it if no other building is near (i.e. the concrete is placed on separated rock area and you must only use MCV to reach it), make Sandworm as owner of the concrete.

- Make some tiles appear on minimap in specific side's color, like it belonged to that side. Useful for some static structures and buildings, which are part of tileset graphics. (not confirmed if it affects AI behavior)

- Make "narrow infantry passage", like a very narrow tunnel where only 1 infantry can walk through. Or make that infantry can stand only on specific positions on specific tile. The big disadvantage is that this works only for one side, who is defined as owner of the infantry attribute.

- Make "heavy vehicle only" passage, exploiting the "Occupied by infantry" behavior

- Place thin spice which can be harvested only once, or thick spice which can be harvested 3 times total

- Make spice you can place buildings on, or after harvesting it (if you combine "Buildings can be placed" and "Spice amount" attributes)

I'm currently working on improved version of "Tile Attributes editor" and integrating it into "Map and Mission editor", so it will no longer be a separate program. Here is a preview incomplete version I'm working on. For example editor attributes are not working yet. After it's fully finished I will release it as Map and Mission editor v1.4. You can use it and play around with the extra attributes, and possibly discover some new things!

Download: https://www90.zippyshare.com/v/IruQNN0N/file.html

lcFrNz5.png

  • Like 1

Share this post


Link to post
Share on other sites

This is insanely useful, Klof! This is a commendable breakthrough. :)

Share this post


Link to post
Share on other sites

That's even more options I though of (and more complicated too), but it really shows lot of stuff that anybody's ideas can think of.

It should be needed to do some intense testing in game not just to try all this, but to see if the game works as intended, not just crashes but all the stuff that already happen in the game.

Question; This has something to do with the "unknows" that can be seen on the vanilla maps? maybe westwood didn't full implement the attributes, but they were already programing the map to use some of them.

Edited by Cm_blast

Share this post


Link to post
Share on other sites
7 hours ago, Cm_blast said:

Question; This has something to do with the "unknows" that can be seen on the vanilla maps?

Actually the "unknowns" on vanilla maps are something completely different, not related to tile attributes. These are special values defined on the map itself (special value tells which building or unit should spawn on that tile when the map starts). But tile attributes are tied to tileset and are defined in TILEATRx.BIN tiles.

7 hours ago, Cm_blast said:

maybe westwood didn't full implement the attributes, but they were already programing the map to use some of them.

Well, maybe. I don't know. We can only speculate.

Share this post


Link to post
Share on other sites

Wow, that is an amazing find! I am quite amazed about how many possibilities this opens. And now it totally makes sense why my tileatr didnt work few months ago when i used editor attributes.

Share this post


Link to post
Share on other sites
On 1/25/2020 at 1:42 PM, FedaYkin said:

Wow, that is an amazing find! I am quite amazed about how many possibilities this opens. And now it totally makes sense why my tileatr didnt work few months ago when i used editor attributes.

Wow, you are still around FedaYkin! I thought you're not active anymore, so nice to see you again.

The Dune 2000 modding community is not so strong as it used to be, I feel I'm doing new version of editor for less people than there are fingers on a hand. I hope these new possibilities will be somehow utilized in interesting ways. The main goal of new version of the editor is easier creation of custom tilesets.

Share this post


Link to post
Share on other sites
Posted (edited)
On 1/28/2020 at 6:10 PM, Klofkac said:

Wow, you are still around FedaYkin! I thought you're not active anymore, so nice to see you again.

The Dune 2000 modding community is not so strong as it used to be, I feel I'm doing new version of editor for less people than there are fingers on a hand. I hope these new possibilities will be somehow utilized in interesting ways. The main goal of new version of the editor is easier creation of custom tilesets.

Hey man, yea I kinda am. Although not as active as years ago, I still have a huge ass campaign pack in development that I need to finish. Besides this, I also want to update the mission launcher from FunkyFr3sh as I got permission, thinking to add automatic mod file installation and some other stuff.

 

I saw your updated editor, I will definitely be using it. It's cool that you're still working on it, given how small the community has become. It's quite motivational :)

 

Yea I know, a very late response, but I never realized you actually replied here :D lol

Edited by FedaYkin

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...