New Grid for the Campaign xml
Results 1 to 9 of 9

Thread: New Grid for the Campaign xml

  1. #1
    SOH-CM-2020
    Join Date
    Jun 2005
    Location
    Aotearoa, New Zealand
    Age
    63
    Posts
    2,896

    New Grid for the Campaign xml

    The settings in the stock Fortress Europa.xml campaign file influences gameplay in missions and campaign missions. The Fortress Europa.xml is specified in the game.xml file in the root of the install, for SingleMissionCampaigns or somesuch.

    Anyway, those paying attention will remember that my coastal spawns rely on the presence of the grid established in the default Fortress Europa.xml file (56 x 56 squares), and the landclass "coastal" which is given to some of the squares.

    I checked how many of the squares (actually "cells") are labelled "coastal" in the stock xml file, and it wasn't that many. I think that is the reason why coastal shipping is not everywhere after you've installed the coastal shipping addon.

    Then I had a bright idea, and thought that if I create a finer grid, then the coastal cells can align more closely to the physical coastline. So I tried to set up a grid of 120 x 120 and got an error message saying that the maximum CFS3 can handle is 100 x 100 grid mesh.

    So I'm a fair way into setting up a 97 x 97 cell grid pattern in the Fortress Europa.xml. The most time consuming aspect is having to give each cell a landclass entry (water, river, open, coastal, etc). Thats over 9,400 entries, folks!

    But it offers a network of cells closely following the coastline, so hopefully my coastal shipping will spawn more regularly, and closer to the coast. A pretty mind-numbing exercise.

    But then I had another idea. What if I set up a landclass sub-type called "Shipping Lane"? That would free up installs from being reliant upon shipping lane vector data for their ship spawns. I see WOTR is trying to do something similar by setting up "shipping lane" facilities which are included in the global layer. I think the way I'm going to try has advantages - such as not requiring global layer entries, hopefully.

    Anyway, once the grid is fully populated it's finer grain will offer a more detailed set of landclass entries for the grid. These landclass entries are not to be confused with the .lcf file and the landclasses.xml. In the campaign xml, landclasses are simply there to influence the die roll for the frontline to progress. When the frontline encounters a river landclass, for example, it takes a lot more effort to advance the frontline - or mountains, or swamp etc. All that is set out at the end of the campaign.xml file (usually Fortress Europa.xml). The second thing that the landclass entries do in the campaign file, is to influence spawning events that are tied to a landclass - that is how my coastal shipping spawn file set works. So these functions are quite different from the .lcf file and landclasses.xml file which influence what ground tiles/textures appear.

    All good? Great

  2. #2
    Member sixstrings5859's Avatar
    Join Date
    May 2011
    Location
    Sulphur,South West Louisiana in the good'ol USA
    Age
    59
    Posts
    3,527
    Blog Entries
    1
    Fantastic idea ! A ton more immersion .

  3. #3
    That's some serious grunt work, but I agree it will be well worth it. I think there may be even more value than you mention. I don't recall the specifics, but I believe something was done with the grid in the past to define areas like Italy and it had an effect on how the AI aircraft behaved. I'd be very curious what benefits for AI might be hidden in here.

  4. #4
    SOH-CM-2020
    Join Date
    Jun 2005
    Location
    Aotearoa, New Zealand
    Age
    63
    Posts
    2,896
    That's interesting Daniel. I'm experimenting with the spawning opportunities provided with a more detailed grid. Also seeing if I can set up new landclass subtypes like shippinglane, linked to facilities to trigger spawn events.

  5. #5
    SOH-CM-2020
    Join Date
    Jun 2005
    Location
    Aotearoa, New Zealand
    Age
    63
    Posts
    2,896
    Forgot to mention that the point of this is to have spawning occur at specific cells in the grid, much more focused than stock random spawns.

  6. #6
    SOH-CM-2020
    Join Date
    Jun 2005
    Location
    Aotearoa, New Zealand
    Age
    63
    Posts
    2,896

    Progress Update

    Well I'm pleased to finally announce progress in this project. I've entered landclass values for 96x97 cells in a campaign xml file. So far it is very basic - only Open, Water and Coastal values have been used. In the stock campaign, grid cells designated mountain, river, swamp etc slow down the advance of a frontline during an offensive - so it is worthwhile if I start to identify some coherent cells having River, Mountain, Forest designation etc.

    One of the reasons for this 9,312 cell grid is to see if I can add some "non standard" cell types - like shippinglane for example. If I can set up spawning events linked to a network of shippinglanes I've set up myself, more options become available. Still trying to get my head around the possibilities. My coastal spawns are triggered by a dummy facility xml with Flags="isCoastal". The coastal cells in the new grid sit nice and snug with the coast, only extending a couple of kilometers offshore.

    So maybe I can set up a string of cells that trigger a spawning event - shore defenses or whatever. Once the grid is better developed, it can be used as a resource by anyone writing a campaign for CFS3.

  7. #7
    SOH-CM-2020
    Join Date
    Jun 2005
    Location
    Aotearoa, New Zealand
    Age
    63
    Posts
    2,896

    Update on Landclasses

    Now I have the new detailed 96x97 grid for ETO, I've been experimenting with landclasses. Firstly all the cells were apportioned to Open, Water and Coastal landclasses. CFS3 turns out to be fussy about subtype entries. It doesn't like me trying to add a subtype under the Water landclass, called "shipping". It also doesn't like "shippinglane", which tells me that being a viable name for a vector isn't enough.

    Funnily enough, although the CFS3 error messages talk about recognised landclasses, it isn't quite that simple. The categories in the landclasses.xml aren't fully congruent with the categories able to be used in the grid in the campaign.xml file. Almost like different people were working on the terrain type of things, and the campaign workings side of things, when CFS3 was put together.

    So in the campaign set of landclasses, a big category is "water". However elsewhere in CFS3, the categories are "ocean", and "river".

    So I'll continue to experiment with what I can add as categories for the grid in the campaign.xml. One option might be to add "ocean" as a subtype of "water" in the campaign grid. I want to set up a set of lanes for shipping, and set the spawns so that ships only spawn in the lanes, rather than all over the place. By setting up some facilities (containing ship paths) over a very big area, it might be possible to create zig-zag paths for the ships, making torpedo and bombing runs a bit more difficult. WOTR has some facilities set up but I haven't looked into them to see if I'm on the right track yet.

    IN Valetta Harbour in MAW, there are some great facilities with ship paths, but observant people will notice that these work for QC and Mission modes, but not in campaign mode. The facilities will have to be used in a different way if they are to work in campaign mode, not sure if it can be done.

  8. #8
    Member sixstrings5859's Avatar
    Join Date
    May 2011
    Location
    Sulphur,South West Louisiana in the good'ol USA
    Age
    59
    Posts
    3,527
    Blog Entries
    1
    This sounds like a very interesting addition to campaigns. I have you to thank for getting me interested again in campaigns ! Best feature of CFS3. I still do a lot of QC but your campaign addon for CFS3-BoB is fantastic. Thanks for your hard work. Regards,Scott

  9. #9
    SOH-CM-2020
    Join Date
    Jun 2005
    Location
    Aotearoa, New Zealand
    Age
    63
    Posts
    2,896
    Thanks, Scott.

    As an update I've found that the landclasses and Terrain subtypes are fixed, as defined in the stock campaign.xml file (mountain, river, swamp, hedgerow, etc etc). So if I want to set up a spawn-triggering facility (eg like my "coastal.xml" facility file), I need to use one of the existing names and set up that terrain type in desired locations on the grid.

    So at this stage the main benefit of the finer-grained grid is to confine the coastal cells of the grid more closely to the shore. Using the original 57 x 57 (or thereabouts) grid of the campaign.xml, the coastal cells in France and England almost touch each other in the English Channel. And we want the little vessels to stick closer to the shore.

    I've created a new spawn set of coastal vessels. I've set up a generic minesweeper, tug and barge, using country="neutral". The tug can "tow" a string of barges, using the herringbone formation. Other players include patrol boats and submarines, to create a variety of smaller vessels along the coastline.

Members who have read this thread: 0

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •