ReadL2 Util

F4Browse, CATE, Tacedit, Terrainview & TheaterMaker etc utility related

Moderators: Lone Wolf, Snake Man

codec
LeadPursuit
Posts: 103
Joined: 2001-03-07 23:01:01
Location: UK

Re: ReadL2 Util

Post by codec »

quote:Originally posted by Skyfire76:
Yes, but I suspect there could be something like full ocean region should always be at the beginning of L2 file, or something like that.
Ocean tiles are 0 just by accident. The code just converts the digital elevation into segments. If the first segment is sea, then it will be sea. In my code, I then remember a signature for each segment, and if I see another segment identical, I just reuse the index again.
So it goes something like
generate a segment,
make a signature of it (gives a unique number based on the segment)
compare this to other segments generated.
If its the same as another segment, insert this reference into the O2 file
Else add new segment to the end of the L2 file, and point to this new segment from the O2.
move on to next segment

Mostly this means that all sea only tiles are shared, a very few others are shared, although it might be the case for some (like desert perhaps).

Sea only tiles will only be 0 if the first segment of the terrain happens to be sea, I think this is not the case for ODS for instance.
Julian.
F4ut
Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: ReadL2 Util

Post by Skyfire76 »

OK, thanks.

That's what I thought, and that's what I did (sort of : I did not use signatures but another way).

So, hopefully, this version (sent 2 minutes ago to SnakeMan ;)) will be correct.

Regards.
Snake Man
Commander-In-Chief
Posts: 9811
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: ReadL2 Util

Post by Snake Man »

quote:Originally posted by Skyfire76:
So, hopefully, this version (sent 2 minutes ago to SnakeMan ;)) will be correct.
I'm on it...

PMC TFW
Snake Man
Important PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."
codec
LeadPursuit
Posts: 103
Joined: 2001-03-07 23:01:01
Location: UK

Re: ReadL2 Util

Post by codec »

[quote]quote:Originally posted by Skyfire76:
So, hopefully, this version (sent 2 minutes ago to SnakeMan :)

Julian.
F4ut
Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: ReadL2 Util

Post by Skyfire76 »

LOL ! No, no chance about this :D

After all, this is just a small Visual Basic program, nothing fancy. Well, to be honest, L2/O2 translation into a terrain grid and reversing back had me scratching my head for some time, but up to that feature, that was a pretty simple program :D

Regards.

[EDIT]

Hey, I've been promoted (CATE creator). Great :D

[/EDIT]
Widowmaker
Lt. General
Posts: 1002
Joined: 2000-10-30 23:01:01
Gaming Interests: Falcon 4.0
Editing Interests: Terrains
Location: The Netherlands

Re: ReadL2 Util

Post by Widowmaker »

All is going great I see

I'm missing all the fun when i'm at work

:(

Keep it up guys


Widmak
Widmak
Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: ReadL2 Util

Post by Skyfire76 »

OK, I sent an updated version to SnakeMan an hour ago (after correcting two or three crawling insects, yes OK bugs :)

Regards.
Snake Man
Commander-In-Chief
Posts: 9811
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: ReadL2 Util

Post by Snake Man »

quote:Originally posted by Skyfire76:
He must be busy trying to find problems :)
Or painting the map with amazement!

PMC TFW
Snake Man
Important PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."
Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: ReadL2 Util

Post by Skyfire76 »

Hehe, french proverbs always speak the truth ;)

Regards.
Snake Man
Commander-In-Chief
Posts: 9811
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: ReadL2 Util

Post by Snake Man »

quote:Originally posted by Skyfire76:
Hehe, french proverbs always speak the truth ;)
One thing I'm wondering, you said the colors are B,G,R in there?

I was wondering could it be R,G,B to make it more simpler (for me at least).

PMC TFW
Snake Man
Important PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."
Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: ReadL2 Util

Post by Skyfire76 »

No, no, for you, it's the usual R,G,B.

What I meant is that in the BMP file, the color table is reversed (BGR) and version 2.00 of CATE was expecting RGB. Hence the problems you saw with some colors not working.

But this should be corrected now, so you can work with RGB.

Clear enough ?

Regards.
Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: ReadL2 Util

Post by Skyfire76 »

BTW, I think that adding, in the BMPRules, a list of tiles in which CATE would choose randomly (as in TileRules) could be a nice feature, don't you think ?

It would add some randomness to what you paint, and it's not very hard for me to do.

Regards.
Snake Man
Commander-In-Chief
Posts: 9811
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: ReadL2 Util

Post by Snake Man »

quote:Originally posted by Skyfire76:
No, no, for you, it's the usual R,G,B.
Clear enough ?
Crystal.

I have been now playing with it and it is simply so awesome tool it scares me. This is something that really will kick the terrains of falcon world. We can have so good realistic terrain types applied in so fast and easy manner that its almost illegal.

Here is what I'm using Vietnam (default korean tile set)

BmpFileName=d:\F4Terrain\misc\Cate\vietnam.bmp

#
# vietnam default terrainview bitmap elevation thing
#
# swamp
123,165,115=1076

# wet farmland
148,173,123=160

# dry farmland
181,189,140=48

# forest
206,206,156=68

# some stuff
231,214,156=260

# some tougher stuff
231,222,173=661

But now we need to start digging into the rules of CATE. Can you tell me on general terms what kind of nice variations we can make it as right now...

For example: can I just paint the bitmap to scan certain area and change tiles in that area like "if found #115 replace it with #220" type of rule, just in this painted area only?

PMC TFW
Snake Man
Important PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."
Snake Man
Commander-In-Chief
Posts: 9811
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: ReadL2 Util

Post by Snake Man »

quote:Originally posted by Skyfire76:
in the BMPRules, a list of tiles in which CATE would choose randomly (as in TileRules) could be a nice feature, don't you think ?
Like my earlier post, it would rock if we can just paint the areas where we want to "apply tilerule's".

The painting would be like big finger pointing angrily to CATE like "you devil you - tile THAT area immediately or I'll make you fly Jetfighter III forever!"

Umm :)

PMC TFW
Snake Man
Important PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."
Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: ReadL2 Util

Post by Skyfire76 »

If I hear you well, you want me to do the same rules as before (TileRules for example), but that would apply only to certain painted areas ?

If so, I'll look into this.

Meanwhile, see my proposition above.

Regards.
Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: ReadL2 Util

Post by Skyfire76 »

No, no, please spare me. Not Jetfighter III ! :D :D :D

At first sight, this should be doable, but I'm afraid we'll soon have lllllooooonnnngggg treatment times.

And besides, you can already use a BMP pass first, and immediatly apply other CATE rules after that first pass (I mean you don't need to remove other CATE rules to use a BMP, previous rules will apply after BMP rules as usual). Maybe this is enough ?

Regards.
Snake Man
Commander-In-Chief
Posts: 9811
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: ReadL2 Util

Post by Snake Man »

quote:Originally posted by Skyfire76:
you can already use a BMP pass first, and immediatly apply other CATE rules after that first pass. Maybe this is enough ?
Lets assume we have desert all around, but then we use bmp to draw small swamp somewhere in the desert. Now when we do the another pass and change the roads/rivers/cities according to elevation - CATE will bulldoze over the swamp area... and we have desert road tiles tiled over the swamp which looks awful (we had just this situation before CATE).

Do I make any sense?

PMC TFW
Snake Man
Important PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."
Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: ReadL2 Util

Post by Skyfire76 »

Sort of ;)

In TileRules, you can specify if such or such tile number should be replaced. So if you don't want to overwrite swamp tiles, write your rules so that swamp tiles are excluded of it.

Come to think of it : what you need may be that I update TileRules so that you can apply a rule to any tile except the ones you list (it should be easier to list tiles to exclude than to write rules for all the tiles they should be applied to).

What do you think ?

Regards.
Snake Man
Commander-In-Chief
Posts: 9811
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: ReadL2 Util

Post by Snake Man »

quote:Originally posted by Skyfire76:
In TileRules, you can specify if such or such tile number should be replaced. So if you don't want to overwrite swamp tiles, write your rules so that swamp tiles are excluded of it.
But when we tile the painted bmp terrain types, at the same pass we should make road/river/city tile check (about 30 or less tiles to be checked) and adjust them also.

Because when the whole map is plain desert and we paint small area for swamp - we want everything to be swamp of course, the basic terrain + roads/rivers/cities.

Is that possible with bmp pass?

PMC TFW
Snake Man
Important PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."
Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: ReadL2 Util

Post by Skyfire76 »

Honestly, I'm not sure of what you want exactly.

First question : road/rivers/cities - are these standard tiles, or does this has something to do with tdf file WidowMaker was talking about some time ago.

Second question : could you try to write down how you would see the rules in conf files so that they match what you want. I think that would help me understand precisely ...

Regards.
Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: ReadL2 Util

Post by Skyfire76 »

Well, I must leave now ... :D

Regards.
Snake Man
Commander-In-Chief
Posts: 9811
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: ReadL2 Util

Post by Snake Man »

quote:Originally posted by Skyfire76:
road/rivers/cities - are these standard tiles, or does this has something to do with tdf file
Standard tiles, nothing to do with TDF files. Here is part of my vietnam config file, replacing dry tiles with wet ones:

#
# ROAD: dry to wet
#
TileRule=160 660 112 (190) * * * *
TileRule=160 660 113 (180) * * * *
TileRule=160 660 114 (178) * * * *
TileRule=160 660 115 (181) * * * *
TileRule=160 660 116 (177) * * * *
TileRule=160 660 117 (176) * * * *
TileRule=160 660 118 (183) * * * *
TileRule=160 660 119 (179) * * * *
TileRule=160 660 120 (185) * * * *
TileRule=160 660 121 (186) * * * *
TileRule=160 660 122 (182) * * * *
TileRule=160 660 123 (184) * * * *
TileRule=160 660 124 (189) * * * *
TileRule=160 660 125 (188) * * * *
TileRule=160 660 126 (187) * * * *
quote:could you try to write down how you would see the rules in conf files so that they match what you want.
One approach would be that if we have the RGB values set for some tile. For example
255,255,255=666
Then we would have some conf part where we basically say that "if found ANY other road/river/city tile THAN 666 type, change them to 666".

Ok how that rule would actually look like... hmm.

Does CATE run the bmp colours one at the time?

If so, then we could just make basic tilerule like now "if found #115 replace with #200" etc. But this must be the thing you said it takes lot of time.

But how long time, thats the important part. I am sure it doesn't take as much time as manually tiling (heh) but then again it is not sensible to make another DEM2L2 where feature processing takes couple of days. Could you just make test version for BMPRule file with tilerule's, so I could process certain painted regions and replace tiles?

PMC TFW
Snake Man
Important PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."
Widowmaker
Lt. General
Posts: 1002
Joined: 2000-10-30 23:01:01
Gaming Interests: Falcon 4.0
Editing Interests: Terrains
Location: The Netherlands

Re: ReadL2 Util

Post by Widowmaker »

I just prepared a Run with CATE 1.21
it is running now (for the last 30 mins
that why I am posting now as it seems it will be running for still quite a while.. ;) )

what I've noticed up to now
is that when loading a L2 (read Data)
the 'loading progression' box is not shown

for loading bmp it is though

very very minor bug just wanted too let ya know.. ;)

... searching for duplicate regions now at 50 procent.. ;)
that the price I pay for a 256 segment map
wich is 60 procent water.. ;)

Widmak
Widmak
Widowmaker
Lt. General
Posts: 1002
Joined: 2000-10-30 23:01:01
Gaming Interests: Falcon 4.0
Editing Interests: Terrains
Location: The Netherlands

Re: ReadL2 Util

Post by Widowmaker »

quote:Originally posted by Skyfire76:
BTW, I think that adding, in the BMPRules, a list of tiles in which CATE would choose randomly (as in TileRules) could be a nice feature, don't you think ?

It would add some randomness to what you paint, and it's not very hard for me to do.

Regards.
It is a nice feature
still we can do this already with CATE
it is just a matter of sequence
or am I missing something here
look at this one
TileRule=1 50000 16 (16-17-18-19) 240 * * *

basicaly the BMP rule tiles tile 16 on the terrain
and THIS tilerule replaces it randomly
with other tiles (and put X1 to 240)


BUT... look at next post.. :)


Widmak
Widmak
Widowmaker
Lt. General
Posts: 1002
Joined: 2000-10-30 23:01:01
Gaming Interests: Falcon 4.0
Editing Interests: Terrains
Location: The Netherlands

Re: ReadL2 Util

Post by Widowmaker »

quote:Originally posted by Snake Man:
But when we tile the painted bmp terrain types, at the same pass we should make road/river/city tile check (about 30 or less tiles to be checked) and adjust them also.

Because when the whole map is plain desert and we paint small area for swamp - we want everything to be swamp of course, the basic terrain + roads/rivers/cities.

Is that possible with bmp pass?

PMC TFW
Snake Man
Basicaly what we need is an exclusion list
from the bmp part

example

ExclusionList
10
55
123
145

etc
if these ofsets are found on the terain (roads river tiles etc)
then the bmp should not overwrite them
and leave em alone
the 'old' rivers and roads will still be there

we can use a Tilerule again to make these
aeria's correct for the terrain again
by adding a new second tile rule
(or modify the old one abit)

current tilerule is by height
what we need is those same tilerules variables but then by RGB

so in a part of the terain with RGB 0,0,0
TileRule=(0,0,0) 32 155 * * * *
(32 is old road.. 155 is new road)

so all the same but by RGB (region)

the names could be altered to

HeightTileRule
RegionTileRule

This way Snakeman can adjust the roads rivers
to whatever region he wants
as previous done by altitude
(as the tiles were in the previouly mentioned exclusion list and can now be altered per region instead of just altitude))
(and i can do very nice stuff myslef with it.. :) )

It will increase total flexibility of the program

Widmak
Widmak
Zaggy
Colonel
Posts: 380
Joined: 2001-07-09 22:01:01
Location: AU

Re: ReadL2 Util

Post by Zaggy »

So how come I dont have a cool title, like CATE Creator, PMC Pimp, F4UT UI guru??? I want Tilemeister!!!! :)

Been flat out for the last few days, so sorry for my lack of input here... Been messing with my application for the air force... Got to get this right!!!
Daniel "Zaggy" Bell
Old-School, Grumpy and Anti-Social
Also to be found lurking round FighterOps
krfrge
1st Lt
Posts: 123
Joined: 2001-01-09 23:01:01
Location: La. US

Re: ReadL2 Util

Post by krfrge »

Well guys I am lost...Is the CATE Program available? It looks and sounds awesome but yet I am still lost on China and converting Chinese data to make thatr theatre.
Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: ReadL2 Util

Post by Skyfire76 »

[quote]quote:Originally posted by Widowmaker:
what I've noticed up to now
is that when loading a L2 (read Data)
the 'loading progression' box is not shown

for loading bmp it is though

very very minor bug just wanted too let ya know.. :D

Regards.
Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: ReadL2 Util

Post by Skyfire76 »

quote:Originally posted by Snake Man:

Does CATE run the bmp colours one at the time?

If so, then we could just make basic tilerule like now "if found #115 replace with #200" etc. But this must be the thing you said it takes lot of time.

But how long time, thats the important part. I am sure it doesn't take as much time as manually tiling (heh) but then again it is not sensible to make another DEM2L2 where feature processing takes couple of days. Could you just make test version for BMPRule file with tilerule's, so I could process certain painted regions and replace tiles?

PMC TFW
Snake Man
For BMP rules, here's what CATE does : for each pixel in BMP, it scans all color rules. As soon as CATE finds a color in the rules matching the current pixel, it applies this rule (i.e. at this time, modify the tile number) and stops looking at other color rules (i.e. goes to next pixel).

In previous CATE rules, they were applied to L2 data. Now, in BMP rules, I do that on a full terrain grid (because at the end, I need to recalculate duplicate regions). If you look at Vietnam for instance, a full terrain grid has almost 2 times the number of tiles of just L2 data (because of duplicate regions). So, if I had to do CATE rules and BMP rules at the same time, that would say at least 2 times longer.

Was I clear ?

Regards.
Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: ReadL2 Util

Post by Skyfire76 »

About all ideas presented above :

I'm a little lost, now ... :D

First thing I could do :

Update TileRules, so that instead of only one tile or any to replace, you could do something like this :

Previously :

TileRule=1000 2000 * (100-101) etc.
TileRule=1000 2000 99 (100-101) etc.

After update :

TileRule=1000 2000 (*) (100-101) etc.
TileRule=1000 2000 (+99) (100-101) etc
TileRule=1000 2000 (+98,-97) (100-101) etc

The last rule would thus allow you to say : for altitudes between 1000 and 2000 feet, replace tile #98 but not tile #97 with a random tile from 100 or 101 list.

What do you think of this one ?

Regards.
Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: ReadL2 Util

Post by Skyfire76 »

About other ideas, I think that it is important that we keep the ability to have rules as in early versions, as well as rules associated with a BMP.

Two reasons for this : translating data into a terrain grid and then back is a long process, so if you can do it with TileRules on L2 alone, all the better. And standard rules do not need you to create a BMP ;)

I think I could try something like this : revert to having just one conf file. First line of conf file would say if you wish to use standard or BMP rules. Then update all standard rules so that they can be applied at the same time of BMP rules.

That would look like WM said above :

TieRule=1000 2000 and so on for standard rules
TileRule=R,G,B 1000 2000 and so on for BMP rules

What do you think ?

(I think this is not bad, but could be enhanced, because if you have two colors where you would want to apply the same rules, you would have to repeat these rules. Likewise, if you have several rules for one color, you need to repeat that color each time).

Regards.
Snake Man
Commander-In-Chief
Posts: 9811
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: ReadL2 Util

Post by Snake Man »

quote:Originally posted by Skyfire76:
So, if I had to do CATE rules and BMP rules at the same time, that would say at least 2 times longer.
I can live with that, we still are speaking matter of minutes, no hours.

Well it can be longer with complex rule settings, but so far my experiments on replacing roads/rivers/cities and randomly replacing generic desert tiles are taken only minute or two. Very good results.

PMC TFW
Snake Man
Important PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."
Snake Man
Commander-In-Chief
Posts: 9811
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: ReadL2 Util

Post by Snake Man »

quote:Originally posted by Skyfire76:
for altitudes between 1000 and 2000 feet, replace tile #98 but not tile #97 with a random tile from 100 or 101 list.
Altitudes are not used in bmp tiling. Or yeah sure we can use 1-999999 setting :)

When I paint the bitmap - it means we want to tile that area with that terrain type regardless of the altitude (above 1ft of course).

PMC TFW
Snake Man
Important PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."
Snake Man
Commander-In-Chief
Posts: 9811
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: ReadL2 Util

Post by Snake Man »

quote:Originally posted by Skyfire76:
it is important that we keep the ability to have rules as in early versions
True.
quote:revert to having just one conf file. First line of conf file would say if you wish to use standard or BMP rules.
Or maybe tick box in the CATE itself to enable/disable BMP reading/tiling?
quote:TieRule=1000 2000 and so on for standard rules
TileRule=R,G,B 1000 2000 and so on for BMP rules
With that r,g,b I could replace the roads/rivers/cities. Sounds good to me, but the altitude is no matter there, you can skip that.

PMC TFW
Snake Man
Important PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."
Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: ReadL2 Util

Post by Skyfire76 »

quote:Originally posted by Snake Man:
Or maybe tick box in the CATE itself to enable/disable BMP reading/tiling?

PMC TFW
Snake Man
That could be an idea. Let's see :

We leave the conf files as they are now, and add that tick box.

Different behaviours would be the following :

1- BMPRules line found in CATE conf file, and tick box unchecked

We do the same thing as previously, that is apply BMP rules, then apply standard CATE rules if any

2- BMPRules line found in CATE conf file and tick box checked

We apply the BMP rules, and for each tile where a BMP rule apply, we also apply all standard CATE rules to that tile. (And at the end of BMP pass, we do nothing more)

3- No BMP rules, and tick box unchecked

CATE will just apply standard rules

4- No BMP rules, and tick box checked

We do nothing, this is not a logical configuration ;)


As for altitudes, I'd like, if you don't mind, let them where they are. It's much much easier for me to have the same format for rules whatever the current behaviour of CATE. But of course, if you wish so, I can disregard altitudes when in behaviour #2.

What do you think ?

Regards.
Snake Man
Commander-In-Chief
Posts: 9811
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: ReadL2 Util

Post by Snake Man »

quote:Originally posted by Skyfire76:
As for altitudes, I'd like, if you don't mind, let them where they are.
TileRule=1 999999

Thats fine with me.

The tick box system you described sounds ok.

PMC TFW
Snake Man
Important PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."
Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: ReadL2 Util

Post by Skyfire76 »

OK, will try to do this. Two questions, though :

- In behaviour #2, BMP Rules give CATE a tile to replace others. But TileRules do that also. Which one should I choose in this case ?

- Damn, forgot what was my second question :D

Another thing : I think I'll leave the tick box, and do that in conf file. It should be easier to understand, I think.

Regards.
Snake Man
Commander-In-Chief
Posts: 9811
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: ReadL2 Util

Post by Snake Man »

I prepared you some illustrations to exalain the bitmap painting idea.

Oh btw from now on as you see me saying "feature tile" these mean roads/rivers/cities.

In this first image you see basic WET farmland tiled Vietnam/korea segment with road and river tiles

Image

Now we paint a bitmap and want to tell CATE to change the terrain TYPE in what ever region (happens to be our beloved segment here in this example), so now it looks the bitmap and sees that geewhiz this dude wants to tile DRY farmland into these coordinates, it does its process and this would be the result

Image

The rules said "replace ANY terrain type to WET farmland AND if found ANY feature tiles, replace them with WET feature tiles".

In this way which was my bitmap region painting tiling tool idea in the first place, we can change EXISTING tiling like features.

If we can paint certain regions to new terrain types only, but not to change the feature tiles in those regions also... then we are in the same spot as before we had CATE.

I hope this is very clear now : CATE applies bitmap tiling to background & existing feature tiles.

PMC TFW
Snake Man
Important PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."
Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: ReadL2 Util

Post by Skyfire76 »

OK, I see what you mean.

With what I said above, this should be doable like this :

- Create the correct BMP
- Create the BMP rules, giving whatever tile number (it won't be used, see below)
- Create tile rules so that standard tiles will be replaced by such tile(s) and feature tiles will be replaced by such other tile(s)
- Instruct CATE to do BMP and CATE rules at the same time.

This should work : CATE will apply standard rules to all tiles corresponding to a pixel with a defined color in the Bmp Rules.

Do we agree on this ?

And BTW : do we also agree on my idea about adding include/exclude tile list on TileRules ?

Regards.
Snake Man
Commander-In-Chief
Posts: 9811
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: ReadL2 Util

Post by Snake Man »

quote:Originally posted by Skyfire76:
This should work : CATE will apply standard rules to all tiles corresponding to a pixel with a defined color in the Bmp Rules.
Excellent.
quote:Do we agree on this ?
Yes.
quote:do we also agree on my idea about adding include/exclude tile list on TileRules ?
That would be good to have, yes.

PMC TFW
Snake Man
Important PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

Return to “Theater Tools”