Welcome to Close Combat Series
  Login or Register Home  ·  Downloads  ·  Forums  ·  Combat Camera  ·  Help  

  Survey
Do incapacitations count as a soldier's kills?

Yes
No



Results
Polls

Votes 1214
Comments: 1

  Shout Box!!

Only registered users can shout. Please login or create an account.

  Main Menu
Articles & News  
    Help
    Player`s News
    Site News
    Multiplayer
    Terrain Challenge
    Boot Camp
Community  
    Forums
    Downloads
    Combat Camera
    MOOXE @ Youtube
    Statistics
Members  
    Private Messages
    Your Account
    Logout

  Donations
Anonymous - $25.00
08/15/2022

Anonymous - $25.00
08/15/2022

Anonymous - $25.00
12/18/2021

Anonymous - $100.00
11/08/2021

Anonymous - $15.00
04/09/2021

Anonymous - $100.00
04/05/2021

Anonymous - $20.00
02/20/2021

Anonymous - $10.00
12/29/2020

Anonymous - $1.00
11/06/2020

ZAPPI4 - $20.00
10/10/2020

Find our site useful? Make a small donation to show your support.



Search for at
Close Combat Series Advanced Search


 Author
Message
 
vonB

Rep: 32.6
votes: 5


PostPosted: Sun Aug 01, 2010 9:28 am Post subject: Adding a Map Element manually Reply with quote

Not that I am actually thinking of doing that for real  Wink , but I want to be able to create an Application that is able to add/modify a Map Element, so I effectively need to know how to do this manually in order to be able to Code it.

In order to do that, I need to know how to identify the entry(s) in the TXT file.  Obviously the Map Tools already do this, but I am trying to produce an Application that can do this for a few specific elements (possibly only one), and that is Minefields.  This is not a Map Tool I am working on but a specific feature of another program.  Let us say that it is an extension to the Saved Game File Handler and the Operational Game.

I am not familiar practically with Map making (yet), though I do know the principles.

For example, let's say I want to add a Minefield at a specific location (x,y) on the Map, and want to add the entry manually, how would I go about it?

Is there any documentation that explains the format of the TXT file in detail?
Back to top
View user's profile Send private message Visit poster's website
 
papa_whisky

Rep: 42.2
votes: 4


PostPosted: Sun Aug 01, 2010 1:03 pm Post subject: Re: Adding a Map Element manually Reply with quote

I imagine you have already thought of this, but here goes anyway......I suggest creating a scenario play it twice, one where you have altered an element, such as firing a powerful HE weapon into an element creating a big crater , and one without keeping all other things equal as near as you can. Compare the two saved game files and look for the difference.
Back to top
View user's profile Send private message
 
Mafi

Rep: 2.7
votes: 17


PostPosted: Sun Aug 01, 2010 3:00 pm Post subject: Re: Adding a Map Element manually Reply with quote

vonB wrote (View Post):
For example, let's say I want to add a Minefield at a specific location (x,y) on the Map, and want to add the entry manually, how would I go about it?

Is there any documentation that explains the format of the TXT file in detail?


Hi vonB,

CC2Guide-TxtfMapLosRoof-v5.pdf

via
http://closecombat2.fortunecity.com/GuideList.html
http://cc2revival.npage.de/
or here at CCS.net

You can use MS-Excel for editing manually. Please look at the end-of-line delimiter of YOUR MS-Excel version, it might be not compatible...

The terrain elements are listed in the file "Elements.txt" (or the same ADB file of CC4/5/M).

Cheers
Mafi
Back to top
View user's profile Send private message Visit poster's website
 
vonB

Rep: 32.6
votes: 5


PostPosted: Sun Aug 01, 2010 3:44 pm Post subject: Re: Adding a Map Element manually Reply with quote

Thank you for the suggestions!  I will take time to study these, and hopefully it answers my need!  If not, I'll be back...  Wink
Back to top
View user's profile Send private message Visit poster's website
 
Mafi

Rep: 2.7
votes: 17


PostPosted: Mon Aug 02, 2010 4:16 pm Post subject: Re: Adding a Map Element manually Reply with quote

Hi vonB,

perhaps this littl addendum might be usefull:


The format of the map data files (Map### / *.txt) are a representation of the CC-engine’s own internal logic. CC1 is a computer game inspired by a board game ("Advanced Squad Leader (ASL)!" by Avalon Hill). A board game has usually it’s "battlefield" splitted into "tiles". Such tiles can be of squared shape or hexagonal shape ("ASL!" used hexagons). Since CC1 the CC-engine is using squared tiles. In CC1 it was used the way that such a "tile" had the size of 40x40 pixels, with a common terrain and elevation description and predefined graphic for the entire tile. Since CC2 such a tile is divided into 16 identical shaped "elements", squared size 10x10 pixels. Since CC3 until today such an element is the smallest terrain and elevation description within the game. CC2 had a slightly different format, using 16 terrain elements and 1 elevation description for the entire tile (like in CC1; in the early days of CC2-modding we called such a 40x40 pixel tile an "elevation tile"). For a better pre-battle description, a CC-map is also divided into larger "deployment tiles" = "Mega tiles" of the size 120x120 pixels. The "Mega tile" logic has no effect upon the format of the map data files (Map### / *.txt). Map sizes are (and should be) a multiple of "Mega tiles“.

The internal ordering of the tiles ("elevation tiles") is from left to right, top to down, counted from zero. That means "tile #0" is the 40x40 pixel area in the upper left corner of a map. The internal ordering of the elements (10x10 pixels) is also from left to right, top to down, counted from zero, within such a tile. That means for example, that "element #11, tile #0" has it’s upper left edge at the pixel coordinate "x=30, y=20".

The header info of the map data files (Map### / *.txt) contains therefore width and height counted in "tiles". Example: map size 4800x3600 pixels will show entries in the map data file’s header "120 X Max" and "90 Y Max". For CC-modders (and map dada editor programs) it became common to talk about the map’s size in "Mega tiles", but this has no effect upon the entries to be made within the map data files (Map### / *.txt).

The tile descriptions within the map data files (Map### / *.txt) starts after the line beginning with "&". For each tile there is a separate ASCII line in the map data file. The tile’s index number will be the first entry within such a line. The following 16 numerical values (separated by TAB-chars, ASCII #9) are the terrain values of the "elements" #0 to #15. CC2 map data files have then a single numerical value to follow, representing the "tiles" elevation. CC3-or-newer map data files have then 16 numerical values to follow, representing the "elements" elevations. Negative values are not allowed, neither for the index number, nor for terrain description nor for elevation.

It might be strange that the map data files contains index numbers for the tile entries. But this was necessary for CC2 to allow the map data files to contain additional tile entries at the end representing the status of only few tiles after "Bailey bridge placement" on the map.

A picture will illustrate the tile/elements concept. This picture shows a very small map of 12x6 "tiles". The red grid lines are the borders of the "tiles", the light blue grid lines are the borders of the "elements":



TheCCMapDataTileConcept-small.jpg
 Description:
 Filesize:  119.73 KB
 Viewed:  7678 Time(s)

TheCCMapDataTileConcept-small.jpg


Back to top
View user's profile Send private message Visit poster's website
 
papa_whisky

Rep: 42.2
votes: 4


PostPosted: Tue Aug 03, 2010 1:43 am Post subject: Re: Adding a Map Element manually Reply with quote

So a change in the state of an element in the saved game file will be given by the tile and element within it?
Back to top
View user's profile Send private message
 
Mafi

Rep: 2.7
votes: 17


PostPosted: Tue Aug 03, 2010 4:55 am Post subject: Re: Adding a Map Element manually Reply with quote

papa_whisky wrote (View Post):
So a change in the state of an element in the saved game file will be given by the tile and element within it?


Hi Papa_Whisky,
no idea what will be stored in saved game files. Depends on the CC-version? Perhaps the Saved-Game-file contains only the tile number and 16 element values ? No idea.

Cheers
Mafi
Back to top
View user's profile Send private message Visit poster's website
 
vonB

Rep: 32.6
votes: 5


PostPosted: Tue Aug 03, 2010 8:10 am Post subject: Re: Adding a Map Element manually Reply with quote

That 'little' addendum is spot on!
Back to top
View user's profile Send private message Visit poster's website
 
Stwa

Rep: 308.9
votes: 16


PostPosted: Tue Aug 03, 2010 8:23 pm Post subject: Re: Adding a Map Element manually Reply with quote

Can anyone explain the meaning and usage of column A6 in Mafi's Excell file Map diagram above.
Back to top
View user's profile Send private message
 
schrecken

Rep: 195
votes: 15


PostPosted: Tue Aug 03, 2010 8:35 pm Post subject: Re: Adding a Map Element manually Reply with quote

A5     map weather - 0 = clear, 1 = mud, 2 = deep mud, 3 = light snow, 4 = heavy snow
A6    map density - 0 = open, 1 = mixed, 2 = dense.

Map Weather doesn't do anything except decide whether to use snow uniforms and winter-equipped affects (for 3 or 4).

Map density is used by the AI to decide how to deploy on the map. "Open" means spread troops out more, "Dense" means pack them closer together. "Mixed" is in between.
Back to top
View user's profile Send private message Visit poster's website GameRanger Account
 
Stwa

Rep: 308.9
votes: 16


PostPosted: Tue Aug 03, 2010 9:01 pm Post subject: Re: Adding a Map Element manually Reply with quote

Thanks Schreck !!
Back to top
View user's profile Send private message
 
papa_whisky

Rep: 42.2
votes: 4


PostPosted: Tue Aug 03, 2010 11:50 pm Post subject: Re: Adding a Map Element manually Reply with quote

Curious about the map density - 0 = open, 1 = mixed, 2 = dense, the map maker decides whether it is open mixed or dense, what is the decision process for this? Has anyone really played with this to see what the effect is?
Back to top
View user's profile Send private message
 
schrecken

Rep: 195
votes: 15


PostPosted: Wed Aug 04, 2010 3:56 am Post subject: Re: Adding a Map Element manually Reply with quote

Yes, I've run tests on one of the explanations of what it means.

Explanation #1.  How the AI places the teams at deployment


Explanation #2. A Flag on the maps that will attract the Straegic AI... It will send Armoured BG's to OPen and Infantry to Dense maps.


In the pic below Red had the whole map to deploy in apart from Blues entry in the top left.

This pic is a fair representation of many, many tests using WaR as a base.



Density Test.jpg
 Description:
 Filesize:  311.61 KB
 Viewed:  7609 Time(s)

Density Test.jpg


Back to top
View user's profile Send private message Visit poster's website GameRanger Account
 
vonB

Rep: 32.6
votes: 5


PostPosted: Wed Aug 04, 2010 8:51 am Post subject: Re: Adding a Map Element manually Reply with quote

Good intel.  Interesting that the only one really very different is Density 2.

This kind of info would be very useful for any battle design (Map/VL/Battle Group), but would need to be based on a large (ish) set of trials to get any 'average' or common indicators.

Also, does this get moderated if the battle is attack/defend/meeting, or size of map etc.
Back to top
View user's profile Send private message Visit poster's website
 
schrecken

Rep: 195
votes: 15


PostPosted: Wed Aug 04, 2010 9:34 am Post subject: Re: Adding a Map Element manually Reply with quote

I never tested explanation #2

But did quite a bit with explanation #1  and the above results are indicative.
Back to top
View user's profile Send private message Visit poster's website GameRanger Account
 
 
Post new topicReply to topic printer-friendly view Close Combat Series Forum Index -> Modding Workshop


 
   
 


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum




Forums ©





In August of 2004, Zappi, Homba, Bambam887, RedScorpion and MOOXE all pitched
in to create this Close Combat site. I would to thank all the people who have visited and
found this site to thier liking. I hope you had time to check out some of the great Close Combat
mods and our forums. I'd also like to thank all the members of our volunteer staff that have
helped over the years, and all our users that contributed to this site!