ReadL2 Util

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

Moderators: Lone Wolf, Snake Man

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'll triple it.. :)

come on Zaggy..
get us the images.. ;)

Widmak
Widmak
xjussix
Recruit
Posts: 28
Joined: 2002-02-28 23:01:01
Location: Tampere, Finland

Re: ReadL2 Util

Post by xjussix »

Hah! Skyfire, you can't get rid of me that easily. I'm now here also :D

I definately need very concrete examples of things at least in the beginning so yes, screenshots please.
Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: ReadL2 Util

Post by Skyfire76 »

Oh no, xjussix is here :D

Try TerrainView, it will give you a first idea of what we're talking about.

Regards.
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 »

rgr
if any questions
you know were to find us.. ;)

Widmak
Widmak
xjussix
Recruit
Posts: 28
Joined: 2002-02-28 23:01:01
Location: Tampere, Finland

Re: ReadL2 Util

Post by xjussix »

Sure, I'll try it this weekend. Any chance of screwing my F4 install up? ;)
Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: ReadL2 Util

Post by Skyfire76 »

No, as long as you just look at things, and do not try to change them ;)

Regards.
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 »

yup
copy the korea dir in
falcon4/terdata
to a save palce
and work in this dir

the magic word is make a Backup
of the dir you are working in
in this case korea/terrain

unzip korea texture.zip only the H*.pcx
to a seprate dir
and direct terrainview to these textures


Widmak
Widmak
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 xjussix:
Sure, I'll try it this weekend. Any chance of screwing my F4 install up? ;)
Terrainview and CATE dont mess up your falcon installation, as you work with the new theater.L2 files not in Falcon4 dir.

Its very rarely when I even need falcon installation when working on the terrain itself (as its so slow and tedious work).

Anyways to stick with the topic, I've have just discussed with Codec about the "paintbox" type of tiling tool. Here is how it should work...

First we would color the different terrain types to a bitmap image, then CATE would read that bitmap and convert the color palette (for example 0,255,0 (green) => forest) to theater.L2 file coordinates, where it would tile the colored types according to the tiles specified in the config file.

Hows that sound?

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 »

Hum, I think I would be somewhat able to do something like this. However :

1- I don't think this should be done in CATE, which should stay purely script based, IMHO. This would be at the edge of CATE actual features, but why not. But see point 3.

2- Last time I tried to read bitmaps (a looong time ago) I was not so successful (depending on some versions of BMP files)

3- This would probably be too slow in VB, so again, if xjussix could make another program in C++ for this, all the better.

4- I don't really see how this could be time-saving for you (you still have to colour the whole bitmap), but after all, it's none of my concern ;)

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:
1- I don't think this should be done in CATE, which should stay purely script based, IMHO. This would be at the edge of CATE actual features, but why not. But see point 3.
3- This would probably be too slow in VB, so again, if xjussix could make another program in C++ for this, all the better.
So how about if xjussix creates C reader for the bitmaps, outputs some text/conf file for CATE to read. Can CATE then know which segment/tile (coordinates) its processing?
quote:4- I don't really see how this could be time-saving for you (you still have to colour the whole bitmap), but after all, it's none of my concern
Scenarios:
- Draw a dark brown, green, light green and white to a 512x512 image like kiddie coloring book.
- Tile 16384 segments by hand.

Which one would you choose? :eek:

It will help definitely, of course the tiling according to elevation is also good option but not all terrain types go with only the elevations. For the 128 theaters the areas get so huge that there can be so many different types of terrain in different locations, we need a quick way to tell the util(s) to "tile forest here - tile desert there!".

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 »

I think the idea of xjussix creating some file for CATE is a really good one.

About the couloring of a bitmap, if I'm not mistaken, that would mean you would have to do a 1024x1024 bitmap (for a 128x128 terrain) and giving each pixel the right coulour !!! But as I said, I'm not in position to say if it's good or not : tell us to do it, and we will do it (errhh, if we can) ;)

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:
About the couloring of a bitmap, if I'm not mistaken, that would mean you would have to do a 1024x1024 bitmap (for a 128x128 terrain)
I guess so if Julian ment with the 512x512 reference as 64 segment theater. But if we are looking for one pixel - one tile, then its 64 theater 1024x1024 bitmap and with 128 theater its 2048x2048 bitmap.
quote:and giving each pixel the right coulour !!!
Yes. Thats no problem, we arent working on exact science here. we just "kiddie color" the map with BIG brushes, it takes about 10 minutes to color that kind of bitmap and thats using some detail. We can draw the map fast in minute or two if we just platter around a bit ;)

Can you see with CATE, the process that "now we are reading tile #xx,xx on segment #xx,xx" etc coordinates? Would it be easy to read the stuff from config file?

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 »

I don't quite understand your question (but you're right about the size), but I think I can guess what you want.

The idea would be to have a conf file saying that for such a colour assign such tile (or maybe even better : take randomly one tile from a given list).

This is perfectly doable for me in VB, as long as I can remember how to read a bitmap ( ;)). That would just need on your side that you make a correct conf file (that is : all colours in bitmap are referenced in conf file).

However, this does not fit in the current CATE features, but I can do another program for that.

Did I get all this correctly ?

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

Re: ReadL2 Util

Post by codec »

See the autotiling thoughts thread to see how this fits in.

The idea though, is given a map of france for instance as a bitmap, you would paint it quickly with a bitmap editor.
E.g., flood fill the land with Green to say this is flat pasture.
Then drag out some brown over the Pyrennes/Alps to show mountain. Maybe some grey in another area to show this is mostly chalky whitish land. Some dark green elsewhere for forest.

Now - this data combined with other data we have on rivers, cities and roads can help you choose a good tile for each location.

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

Re: ReadL2 Util

Post by Skyfire76 »

OK, I'll go and search for this thread.

At this time, I don't understand how I could know about rivers and roads ? I however understand how I could read a bitmap and transform it into tiles, as said above ;)

And BTW : did you get the email WidowMaker sent to you and Dr Fred Balding about the order in which regions and tiles are "ordered" in the O2 and L2 regarding final terrain map ?

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 is perfectly doable for me in VB, as long as I can remember how to read a bitmap
Or is it faster if xjussix writes it with C ?
quote:That would just need on your side that you make a correct conf file (that is : all colours in bitmap are referenced in conf file).
Well using those RGB colors in the conf file referring to tile-types, like example 0,255,0 as green would be ok I assume.
quote:However, this does not fit in the current CATE features, but I can do another program for that.
Okay, well maybe we need to make good plan for this. If we have terrainview, CATE, bitmap reader, bitmap-conf-tiler and so on... its one big mess I tell ya :)

But I'm not picky, anything that reduces time spent on tiling, is a good thing !

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 »

Do you mean faster to develop, or faster when running ? :D

I can't answer to first question (depends on xjussix, or on me and finding bitmaps format and answers to my last questions about O2 and L2).

Second one : a C++ program is likely to run faster.

Note : I've read the Autotiling thoughts thread. Well, I understand the idea behind it, but I can't say if I would be able to implement them.

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

Re: ReadL2 Util

Post by codec »

quote:Originally posted by Skyfire76:

And BTW : did you get the email WidowMaker sent to you and Dr Fred Balding about the order in which regions and tiles are "ordered" in the O2 and L2 regarding final terrain map ?

Yes - I forget exactly - its been a while - but I think its inverted, so the first segement of 16x16 tiles are actually the bottom left and the last set is top right

I think they may be inverted in the 16x16 block too.

Hmm - I used to know all these numbers, but I seem to have forgotten a lot of it now.

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

Re: ReadL2 Util

Post by Skyfire76 »

Hehe, I see : at least, my question had a sense, then ;)

Regards.
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 »

been sleeping for a while and i'm already way behind.. ;)

256 color bmp
1024*1024 for 64 theater
2048*2048 for 128 theater
4096*4096 for 256 theater

a script wich holds
tilenumbers for instance
and theatersize

Theatersize= 4096

Tilelist:
16 0,0,0
48 0,10,0

etcetra

this way we can alter 256 tiles to this script to read from that 256 paleta of the BMP

Very good very good

and afterthat we have CATE to finetune all


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

Re: ReadL2 Util

Post by Zaggy »

OK.. i will work up some images and a brief overview of my idea's hopefully later this afternoon or tomorrow...
Daniel "Zaggy" Bell
Old-School, Grumpy and Anti-Social
Also to be found lurking round FighterOps
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 was thinking more stuff we can automatize, which take painful work from human otherwise.

Airbase tiling and leveling. Yes Widowmaker has been pushing airbase leveling already, but thats just leveling... somebody need to first tile those damn things.

We can read airbase type and coordinates from campaign .cam files, then using those coordinates the correct tiles (according to airbase type, orientation) can be laid out. This of course might be few more lines of code than just replacing existing tiles.

I believe Codec or BaldEagle can provide the necessary campaign objective (.cam) file structures to read the information.

Would this sound something we can do?

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."
Zaggy
Colonel
Posts: 380
Joined: 2001-07-09 22:01:01
Location: AU

Re: ReadL2 Util

Post by Zaggy »

Sorry kids.. have a had a few rushed things on over the last 48hrs, so Ive yet to do that overview mentioned above.. a give me a few more days.. :)
Daniel "Zaggy" Bell
Old-School, Grumpy and Anti-Social
Also to be found lurking round FighterOps
Skyfire76
Major
Posts: 244
Joined: 2002-02-24 23:01:01
Location: Toulouse, France

Re: ReadL2 Util

Post by Skyfire76 »

quote:Originally posted by Widowmaker:
been sleeping for a while and i'm already way behind.. ;)

256 color bmp
1024*1024 for 64 theater
2048*2048 for 128 theater
4096*4096 for 256 theater

a script wich holds
tilenumbers for instance
and theatersize

Theatersize= 4096

Tilelist:
16 0,0,0
48 0,10,0

etcetra

this way we can alter 256 tiles to this script to read from that 256 paleta of the BMP

Very good very good

and afterthat we have CATE to finetune all


Widmak
This seems doable, and if I manage to do something like this, it could be enhanced later with some of the ideas of the "Autotiling thoughts" thread.

One question : will the palette always be the same (that is : will 256 colors always be the same ones)?

Does someone have the BMP file format somewhere ? IIRC, it's basically an header, then a list of RGB bytes, but some more info on the header would be welcome.

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:
I was thinking more stuff we can automatize, which take painful work from human otherwise.

Airbase tiling and leveling. Yes Widowmaker has been pushing airbase leveling already, but thats just leveling... somebody need to first tile those damn things.

We can read airbase type and coordinates from campaign .cam files, then using those coordinates the correct tiles (according to airbase type, orientation) can be laid out. This of course might be few more lines of code than just replacing existing tiles.

I believe Codec or BaldEagle can provide the necessary campaign objective (.cam) file structures to read the information.

Would this sound something we can do?

PMC TFW
Snake Man
I really can't say : I don't know the CAM file format ...

Seems complex to me ?

Regards.
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:
This seems doable, and if I manage to do something like this, it could be enhanced later with some of the ideas of the "Autotiling thoughts" thread.

One question : will the palette always be the same (that is : will 256 colors always be the same ones)?

Does someone have the BMP file format somewhere ? IIRC, it's basically an header, then a list of RGB bytes, but some more info on the header would be welcome.

Regards.
a 256 color bmp image is indexed RedGreenBlue values

0,0,0 is black
255,255,255 is white

if we had a cfg file in wich to state
wich RGB color is wich offset then
we are always safe.

as for how to read it I dunno
perhaps Codec knows

anybody??

Widmak
Widmak
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 »

Another fine tuning we need. I was using the river altering and encountered interesting point, it lowered some altitudes to 0 which is ocean :)

Here is the conf file line:

TileRule=1 6560 144 (144) * * * M-200F

So when we alter tile 144 in elevation 200 or lower... gee whiz we make ocean heh. Could you make another option for that M-xF which would be like:

TileRule=1 6560 144 (144) * * * M-200F1

And it would mean "if altitudes 1 - 6560 found tile 144, then replace it with tile 144 and lower the elevation -200ft but NOT lower than 1ft", this way it would not make zero altitude which is ocean.

Hmm am I making any sense?

Also another fine tuning, could you make CATE to create the O2 file also, I'm not sure if it now reads O2 at all, but when we create L2 it would be good to have correct O2 to go along with it, as terrainview cannot read alone L2 file. Of course I
can always copy the O2 from the original L2 but... it would enhance the user friendliness a bit more to make CATE to save both, L2 and O2.

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:
This seems doable, and if I manage to do something like this, it could be enhanced later with some of the ideas of the "Autotiling thoughts" thread.
Really?

That would be great. I'll prepare a screenshot for you what would be another killer feature for CATE. Stay tuned.
quote:Does someone have the BMP file format somewhere ?
I don't have such info here. But I can try to look it from the web, Julian knows the format also, so maybe he can help.

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 »

Originally posted by Snake Man
So when we alter tile 144 in elevation 200 or lower... gee whiz we make ocean heh. Could you make another option for that M-xF which would be like:

TileRule=1 6560 144 (144) * * * M-200F1

And it would mean "if altitudes 1 - 6560 found tile 144, then replace it with tile 144 and lower the elevation -200ft but NOT lower than 1ft", this way it would not make zero altitude which is ocean.

Hmm am I making any sense?

Also another fine tuning, could you make CATE to create the O2 file also, I'm not sure if it now reads O2 at all, but when we create L2 it would be good to have correct O2 to go along with it, as terrainview cannot read alone L2 file. Of course I
can always copy the O2 from the original L2 but... it would enhance the user friendliness a bit more to make CATE to save both, L2 and O2.



I could do something like this. Problem is that at this time, I do some test at the end of rules for each tile saying that (if Altitude<0 then Altitude=0).

I could replace this with (if Altitude<0 then Altitude=1) but then, each ocean tile could be raised to 1 foot (except if you make sure ocean tiles are NEVER concerned by rules ..).

About creating the O2 file, I'll see what I can do. The problem now is that the user can choose any name he wants for saving data (included without an L2 extension if he wants to), so I'm not sure of how I could base the code to know what name the O2 file should have ???

And : the O2 file is not read anymore. "Creating" the O2 file at this stage is the same thing as copying the original O2 file. Problem, as said, is to know under which name.

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:

Really?

That would be great. I'll prepare a screenshot for you what would be another killer feature for CATE. Stay tuned.

I don't have such info here. But I can try to look it from the web, Julian knows the format also, so maybe he can help.

PMC TFW
Snake Man
Calm down, Snake Man :D I just say this a possibility ;)

As for now : I have found the BMP file format. Problem is I still don't have the complete O2 and L2 explanations ...

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 »

Here is the example of tiled transition between desert sand and light brown mountain tiles.

Image

I'm ready to work with you on this one, it would really be superb next enhancement for CATE.

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 »

Damn, too late, it seems I have triggered him on :D

SM : as I said, as long as I don't have the answers to my L2 and O2 questions, I won't know how to save new terrains. I could read all the BMPs of the world, and apply on them the best of all algorithms, that would be of no use to us ...

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:
I could replace this with (if Altitude<0 then Altitude=1) but then, each ocean tile could be raised to 1 foot (except if you make sure ocean tiles are NEVER concerned by rules ..).
if alt <0 then alt=1 is not good because Widowmaker wants to make fjords for Iceland and needs the zero ocean altitude
quote:so I'm not sure of how I could base the code to know what name the O2 file should have ???
O2 is saved with the same name as the L2. But this is really not a big issue, its just user friendliness not to make the user to copy the O2 to match the saved L2.
quote:"Creating" the O2 file at this stage is the same thing as copying the original O2 file. Problem, as said, is to know under which name.
Look what the user types for the Save L2 and use that name to copy O2.

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]quote:Originally posted by Skyfire76:
Dam, too late, it seems I have triggered him on :)

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:
Look what the user types for the Save L2 and use that name to copy O2.

PMC TFW
Snake Man
Yeah, of course, but as far as I know, the user can now save the L2 data under "newl2.absolutely_nomeaning_extension" file name. What name I give the O2 in this case ?

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:
Dont worry, I'll get that L2/O2 info for you shortly :)

PMC TFW
Snake Man
Good news :)

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:
user can now save the L2 data under "newl2.absolutely_nomeaning_extension" file name. What name I give the O2 in this case ?
I did not try it with extension yet, but you should ask only the user input for <name>.L2 and that way you use it to make <name>.O2 then.

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 »

I think you've not tried latest version yet : I use standard Microsoft Save dialog box. So it's up to the user.

Of course, I could check his input and refuse any name where extension is not L2 ...

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:
I think you've not tried latest version yet : I use standard Microsoft Save dialog box. So it's up to the user.
I have always just wrote there like "afghanistan" and hit save or enter. Then it saves nicely "afghanistan.L2" hmm, thats the v1.20

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 »

I just tried out the tile randomizer, this is the config lines used:

#
# generic background tile randomizer
#
TileRule=1 1640 382 (382-48-49-50-64-65-66-67-256-257-258-259-260-96-97-98-99-544-545-546-547-548-549-550-551) * * * *
TileRule=1640 6560 46 (45-1808-1819-1828-1835-1836-1837-1838-1839) * * * *
TileRule=6560 11481 480 (480-240-241-242-243-244-245-246-247-248-249-250-251-252-253-254-255-273-274-275-276-277-278-1670-1671-1672-1673-1674-1675-1676-1677-1678-1679-1680-1681-1682-1683-1684-1685-1686-16 87-1688-1689-1690-1691-1692-1693-1694-1695-1697) * * * *
TileRule=11481 99999 496 (496-1504-1505-1506-1507-1508-1509-1510-1511-1512-1513-1514-1515-1516-1517-1518-1519) * * * *

Uh that might be a bit long for the forum but... you'll get the idea.

It works great! No problems what so ever on 128 segment map.

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”