PDA

View Full Version : Ideas for Improving Game Play in Campaigns



Daiwilletti
April 12th, 2012, 20:55
I have written down the results of some fiddling around with files I've done over the past few years. Hopefully this will inspire those who enjoy campaigns to increase the challenge a bit. :salute:

Campaign Play: Upping the Ante

When a new campaign is started, a list of AI pilots is created. These pilots will fly as wingmen to the player. The AI pilots also fly the escort to the player’s missions (I think).

You can find the list of AI pilots generated for the campaign, under (in Win XP at least) My documents\whatever you’ve called the CFS3 Install\Campaigns\Your pilot’s name\*.cmpstat.

The *.cmpstat file holds the campaign statistics for a point in time. The file can be opened using notebook or a similar simple text editor. The file holds a list of the AI pilots flying in your support. For each of the AI pilots, a list of Attributes is provided. Some of these Attributes control how well the AI pilot will fly in your support in your campaign.

This discussion explores how to change the list of Attributes, so that your AI pilots fly well. It is also possible to influence the characteristics of the enemy AI pilots, so that you have a good contest.

Influencing Your AI Pilots’ Attributes

Pilotconstants.xml

The first file to modify is called the pilotconstants.xml. This file contains a series of algorithms for a whole host of AI pilot attributes, including fatigue, health, vision, whether the pilot is captured on bailout, when various types of technology are available to the AI pilot, etc etc. Again you can read the file with a simple text editor, although using an xml editor which uses different colours for different text, makes the file more intelligible.

Within the pilotconstants file, the section of most interest deals with Experience/levels/Rank. But before going into this section you need to be aware that the ranks assigned to the pilots are determined in the country.xml file, under the <countries> section. The default for CFS3 is that there are:


10 Ranks
4 levels within each rank


Gaining Skill By Progressing Through the Levels

The way skill is gained is controlled by parameters within the pilotconstants file and is fairly complex. But here is an attempted explanation: the first important parameter is Experience. The pilotconstants file defines how much Experience is gained for each mission an AI pilot flies in a campaign. So an AI pilot might gain 100 experience points in a single mission if all goes well. The outcome is determined by the success of the mission.

To progress up the levels and therefore up the ranks, the pilotconstants file defines how much experience is required to attain a particular level. Also the number of levels per rank is defined (as mentioned above, the default number of levels per rank is 4).

Now the good bit is that the pilotconstants file also defines the number of skill points that are attained at each level as the AI pilot progresses up the ranks.

Pilotattributes.xml
There is heaps more that could be looked at and tinkered with in the pilotconstants file but time and space are short so lets move on. The second file influencing the AI pilots’ attributes is (funnily enough) the pilotattributes.xml.

This is how I think it works: there are five attributes listed in this file. Each of the attributes as a default, a minimum, and a maximum value. At the start of the campaign, the AI pilots are randomly created (random in the combination of firstnames and lastnames anyway). However, what is not random are the five attributes:


Vision,
Gtolerance,
Level,
Age
Maxhealth.


So if you start a new campaign, create your pilot, then close out of CFS3 (saving your campaign when prompted), you can take a look at how the above attributes influence the attributes for the AI wingmen in the campaign. You simply go to the 1.cmpstat file, and take a look at the vision, gtolerance, level and other parameters for each of the AI pilots in the .cmpstat file. You can see that the starting attributes are all bounded by the pilotattributes file.

So it is important to remember that the pilotattributes file merely influences what values are assigned to each attribute for each AI pilot when they enter the campaign. After that, your AI wingmen will gain or experience, promotions, skill at a rate determined by how successful they are in each mission they fly. The parameters determining progression are set in the pilotconstants file, as explained above.


Tweaking the Files to Improve AI Wingmens’ Performance

One tweak I put in the pilotconstants file is:

<entry name="AIWingmenExperienceCap" type="int" value="3"/>
<entry name="AIWingmenAccuracyCap" type="int" value="3"/>

The default values are 1 and 1. I think the “cap” stands for “capacity” but its not obvious.

An important tweak is to change the value in:

<entry name="StartSkillPoints_Campaign" type="int" value=" 10"/>

….from “10” to say “20”. I think this influences your AI wingmen’s starting level of skill, however it is also influenced by a matrix of the attributes defined for experience, vision, level, etc.

You can tell just by looking at vision gtolerance and level, that boosting the values for these parameters in the pilotattributes file, will boost the starting values for AI pilot attributes.

What I have found is it is possible to add attributes to the pilotattributes file.

For example, taking a useful-looking attribute from the *.cmpstat file, I added numSkillPoints as an attribute. So a pilotattributes.xml file I am using looks like this:

<Bomber>
<Attribute Name="vision" Default="30" Min="20" Max="55"/>
<Attribute Name="gtolerance" Default="25" Min="19" Max="36"/>
<Attribute Name="level" Default="6" Min="4" Max="12"/>
<Attribute Name="numSkillPoints" Default="20" Min="20" Max="100"/>
<Attribute Name="age" Default="20" Min="19" Max="36"/>
<Attribute Name="Maxhealth" Default="25" Min="19" Max="36"/>
</Bomber>
<FighterPilot>
<Attribute Name="vision" Default="45" Min="35" Max="65"/>
<Attribute Name="gtolerance" Default="35" Min="25" Max="50"/>
<Attribute Name="level" Default="7" Min="4" Max="13"/>
<Attribute Name="numSkillPoints" Default="20" Min="20" Max="100"/>
<Attribute Name="age" Default="20" Min="19" Max="36"/>
<Attribute Name="Maxhealth" Default="35" Min="25" Max="55"/>
</FighterPilot>

A number of the values are tweaked compared with the default values.

The Result:

When I start a new campaign as a British fighter pilot (I am using Pat’s CFS3 BoB as a test workhorse) I get higher ranks for my AI wingmen, and higher starting skill level.

I get one or more Squadron Leaders, a swag of Flight Lieutenants, a lot of Flying Officers and only a few Pilot Officers. Boy, it is good having a bit of experience behind me when I go to tackle the Hun.

All the more important because the Hun’s performance has been improved, too.

Improving Enemy AI Skill

As discussed in the Knowledgebase sticky thread for this forum, the file Uisel.xml can be tweaked to improve enemy AI performance. The Uisel.xml file is located (in Windows XP anyway) under C:\Documents and Settings\*Username\Application Data\Microsoft\*name of your cfs3 Install. It can be edited using a simple text editing program but an xml editor makes things easier.

By default, once you have flown CFS3 a few times, and set skill levels/attributes for Quick Combat and a mission or two, the uisel file will contain parameters setting skill level for enemy air skill and enemy ground skill.

It is possible to take some of the values listed under the Missions section of the uisel file, and add them to the Campaigns section. For example, I am currently using a uisel.xml file in Pat’s BOB install, with the following campaign parameters:

<Campaign>
<Aircraft type="string" val="Spitfire MkI 609"/>
<AmmoPct type="uint" val="100"/>
<FuelPct type="uint" val="87"/>
<MissionEnemyGroundSkill type="uint" val="100"/>
<MissionEnemySkill type="uint" val="100"/>
<Model type="string" val="bob_spit_609"/>
<PayloadIdx type="uint" val="0"/>
<UseCustomAircraft type="bool" val="n"/>
</Campaign>

The result is that, when flying a campaign, the campaign statistics has the following entry, right at the bottom of the file (an eg of a *.cmpstat file for Pat’s BoB install):

<CampaignSelections>
<Aircraft type="string" val="Spitfire MkI 609"/>
<AmmoPct type="uint" val="100"/>
<FuelPct type="uint" val="87"/>
<MissionEnemyGroundSkill type="uint" val="100"/>
<MissionEnemySkill type="uint" val="100"/>
<Model type="string" val="(None)"/>
<PayloadIdx type="uint" val="0"/>
<UseCustomAircraft type="bool" val="n"/>
<CustomAircraft>
</CustomAircraft>
</CampaignSelections>

OldCrow
April 13th, 2012, 03:26
Great post man! Thank you

KellyB
April 13th, 2012, 05:18
This is good work!

Thanks for posting it.:icon29:

middle
April 13th, 2012, 09:43
Great stuff!

middle
April 13th, 2012, 09:48
D...why don't you post this again in the Projected Knowledge Base" Sticky? It's good stuff...middle

Daiwilletti
April 13th, 2012, 22:24
D...why don't you post this again in the Projected Knowledge Base" Sticky? It's good stuff...middle

yes will do....Thought it might get a bit more exposure as a general thread as well...I'd like to hear how people go with this.

David

vonOben
April 15th, 2012, 02:34
D...why don't you post this again in the Projected Knowledge Base" Sticky? It's good stuff...middle

I second that! :jump:

Cheers