 |
|  |
 |
|  |
 |
|
Martin the Dane
|
 |
Aarhus, Denmark
Feb 2000 time: 06:15
|
|
Just spent som time playing with the last block. At first it seemd prommising. I saved a full ocean map, with one large patch of plains, exited CTP2 changed the last block and reloaded the map, this resulted in different placements of the different plains tiles.
Then just to se what would happen I loaded the map, without altering the .til file, and got a different combination of plains tiles. I then did a couple of maploads without exiting CTP2 and got the same result.
I then deleted all the last blocks from the tile-file, and repeated the multiple mapload, and again I got different combinations of plains tiles.
Finaly I painted large swaths of all the different terrains, and they all used a number of different tiles.
My conclusion is: The last-block might or might not have something to do with the distribution of the different versions of the same terrain.
I also did a quick check of the last blocks in the tile-file there are 13 of them and they all follow the same pattern:
(Number of sets : patern)
5 : 02 ## 01 ##
5 : 03 ## 02 ##
5 : 03 ## 02 ##
4 : 03 ## 02 ##
3 : 04 ## 02 ##
3 : 04 ## 02 ##
5 : 04 ## 02 ##
5 : 04 ## 02 ##
4 : 05 ## 03 ##
5 : 07 ## 04 ##
3 : 07 ## 04 ##
5 : 08 ## 05 ##
3 : 08 ## 05 ##
Where ## is a hex number
The first ## within a given last block is a sequence ie. A8, A9, AA, AB, AC, while the second is not. The second ## within the same block is within a few numbers of each other, ie. 80, 82, 83, 82, 83.
|
|
|  |
 |
|  |
 |
|  |
 |
|  |
 |
|  |
 |
|  |
 |
|
Martin the Dane
|
 |
Aarhus, Denmark
Feb 2000 time: 06:15
|
|
Thanks Mc.
You pointed me in the right direction with that deep-sea-pit, first I played around with the end values and noticed that they were indeed directional values. I then noticed that shallow water, TileSetIndex 10, was 028x while deep sea, TileSetIndex 11, was 02Ax. I then checked the other values an found out that if I treated the second Word as 4 octets (4bit) and not two bytes (8 bit) for all values the first 3 octets of were in deed 4 times the TileSetIndex.
The format is as follows:
bit value
( 0..15) First is the TileGraphicsID (as we have known for some time now)
(16..25) Then comes the TileSetIndex, as a 10 bit value!!!!! nope it's neither a word nor a byte value.
(26..31) And finally a 6 bit directional value
Who on earth thought that one up??????????? I mean why not use a byte for each of TileSetIndex (as in the TileID) and DirValue? 
OK the positive side of it is that now I can create an interface for the LastBlock, and tile-artists can now create better looking terrain. And nobody else need to bother with the odd way of splitting a 16 bit Word, I'll let the interface handle that.
The change to "understanding the tile file.txt" is:
The sixth block: Variation rules
This is meant to create variations within large swaths of the same terrain types, most noticeable is the deep-sea pits scattered over the ocean floor.
Each Rule can have up to 5 elements, each consisting of a TileGraphicsID, a TileSetIndex and a directional value.
The Directional Value can be from 0 to 4, and is relative to the previous tile in the list.
0 = First
1 = North-West
2 = North-East
3 = South-East
Graphically it can be displayed as follows:
1 2
0
4 3
An example - The deep sea pit :
Graphics TileSetIndex DirValue
hex/deci
049C/1180 11 0
049D/1181 11 1
049E/1182 11 2
049F/1183 11 3
04A0/1184 11 2
The result looks like this
2 2
1 3
0
Last edited by Martin the Dane on 06-10-2003 at 11:51
|
|
|  |
 |
|
Martin the Dane
|
 |
Aarhus, Denmark
Feb 2000 time: 06:15
|
|
Well, the aswer to that is that they did not! they multiplied it by 64. (2^6)
The result is that they used 6 bit and not 8 for the directional value.
As to why, beats me, I see absolutely no sane reason for it, programingvise it's a pain in the lower backside of the bodey.
Last edited by Martin the Dane on 08-10-2003 at 19:14
|
|
|  |
All times are GMT. The time now is 05:15. Apolyton Time is 00:15. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|