Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   IL-2 Sturmovik: Cliffs of Dover (http://forum.fulqrumpublishing.com/forumdisplay.php?f=189)
-   -   AITweak an AI tweaker for CloD missions (http://forum.fulqrumpublishing.com/showthread.php?t=31573)

von Pilsner 04-27-2012 08:47 PM

AITweak: an Automatic AI tweaker for CloD missions
 
AITweak for CloD
================
Version: 0.4
By: von Pilsner

This utility will modify the AI within a CLoD mission file (*.mis) based on these suggestions. It tries its best to determine the type of plane (fighter, fighter bomber, bomber/transport) and the skill level (rookie, average, veteran, ace) and modify the skill values accordingly.

When you run it from the batch file it automatically makes a backup of the mission file(s) before making any changes (puts them in a subdirectory named 'mission_backup' [as of v0.3]) so any changes can be easily un-done. If a backup file already exists AITweak will not process that mission.

Usage: AITweak [mission.mis]

This program does not include an installer, I simply unzip it to the desktop and copy the missions I want to mod into that folder and run 'AIProcess.bat'. To uninstall simply delete the folder.

Even though this program makes it's own backups I recommend making a backup of any important or purchased missions before running 'AITweak' or 'AIProcess'.

ADVANCED STUFF (not needed to use the program)

There is an included 'aiconf.ini' file that contains the AI info, you can hand edit the values and AITweak will use your values instead of mine. ;) This file will be auto-generated if it does not exist.

================

How it works:

First it matches a pattern to determine what type of aircraft it is dealing with then it looks for certain strings (ex.: ' 1 1 1 1 1 1 1 1' is an ace) and if it finds the string it replaces the skill based on airplane type. Skills that do not match the following patterns will not be modified:
' 0 0 0 0 0 0 0 0'
' 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3'
' 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7'
' 1 1 1 1 1 1 1 1'
Any AI that has been hand-set to anything other than the above by the mission builder will NOT be modified, this way missions that already have custom AI will retain that custom AI!

The default planeset is the CloD planes and unknown planes will be set with fighter AI.

This has been tested on WinXP and Win7x64.

================

v0.4 -added (beta) IL2DCG mode (-i), when enabled will read mission as though it is generated from IL2DCG and enhance the individual plane AI within the flights. This mode will not make any backups! TEST AT YOUR OWN RISK! This mode is really meant to be used with 'DCEMon.exe' to autoedit IL2DCG campaigns.
-added unsafe mode (-u), when enabled the program will not make backups.
-added debug mode (-d), this will generate lots of useless output...
-included DCEMonitor for use with IL2DCG and AITweak to auto edit your campaign while you play.
v0.3 -Moved the backup files to a subdirectory.
v0.2 -Added 'aiconf.ini' file that AI can be hand edited to allow more customization (for Madfish).
-Fixed cariage returns so missions can be read by a human (thanks pupo162).
v0.1 -Initial release.

================

Get it here: AITweakv0.4b.zip
Previous Version: AITweak_v0.3.zip

If you would like to test the AI improvements before trying this utility, here are the Quick Missions with modded AI (as of v0.6 I am using AITweak to modify the AI instead of doing it by hand): http://forum.1cpublishing.eu/showthread.php?t=31193

von Pilsner 04-28-2012 12:59 AM

Now with IL2DCG support
 
As of version 0.4 'AI Tweak' now includes 'DCE Monitor', an automatic utility for enhancing your IL2DCE offline campaign AI. :D
If you are not using IL2DCE you can simply ignore it.

DCE Monitor (for CloD and IL2DCE-0.2.1.306)

http://bs.beckament.net/files_pub/Fl...loD/dcemon.png

Automatically enhance your IL2DCE campaign AI while you play! (no need to alt-tab or re-run the program)

This program monitors the IL2DCE mission directory and when a new mission is generated it calls AITweak (in a special DCG mode) and expands and modifies the mission AI before you fly it.

It is automatic, nothing to config. Just run DCEMonitor.exe then start CloD and begin or continue an IL2DCG campaign. (it won't modify anything until IL2DCE makes a new mission).

=================================

When you run it, simply make sure the 'Monitoring' directory is correct for your system. If it is not correct start it (from a command line or batch file) like this (but replace c:\temp with the directory you want to monitor): DCEMon "c:\temp"

=================================

IL2DCE: http://code.google.com/p/il2dce/
IL2DCE release thread: http://forum.1cpublishing.eu/showthread.php?t=25076
AITweak: http://forum.1cpublishing.eu/showthread.php?t=31573

=================================

Go from this:

[BoB_LW_KG51_III.33]
Flight0 1 2 3
Flight1 4 5 6
Class Aircraft.Ju-88A-1
Formation VIC3
CallSign 33
Fuel 100
Weapons 1 1 1 0 0 4
SetOnPark 0
Skill 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3
Briefing BoB_LW_KG51_III.33

to this

[BoB_LW_KG51_III.33]
Flight0 1 2 3
Flight1 4 5 6
Class Aircraft.Ju-88A-1
Formation VIC3
CallSign 33
Fuel 100
Weapons 1 1 1 0 0 4
SetOnPark 0
Skill0 0.32 0.21 0.87 0.35 0.74 0.95 0.95 0.72
Skill1 0.93 0.21 0.96 0.45 0.74 1 1 0.75
Skill2 0.73 0.21 0.92 0.40 0.74 0.95 0.95 0.75
Skill10 0.73 0.21 0.92 0.40 0.74 0.95 0.95 0.75
Skill11 0.32 0.21 0.87 0.35 0.74 0.95 0.95 0.72
Skill12 0.30 0.21 0.78 0.30 0.74 0.85 0.90 0.70
Briefing BoB_LW_KG51_III.33

Automatically!

=================================

This beta has been tested on Win7x64 and WinXP using IL2DCE-0.2.1.306.

NOTE: Since it is only modifiying one mission in one directory quickly, DCEMon does NOT make a backup of the mission 1st! (so use at your own risk)

Madfish 04-28-2012 08:21 AM

Great tool! Following suggestions:

I'd love if the backups would go straight into a subfolder without messing with the extension (as some people may still use the option to not show file extensions).

As for the command line tool I'm okay with it. You might want to get input from others though if they are okay with the amount of help available to use it correctly.


Generally I'd love to see a launcher that let's you adjust the values before applying them. I've been looking for a thread I remembered where the values were explained and then realized it was probably yours. :D

http://forum.1cpublishing.eu/showthr...dvanced+flying
But I remember a different one with a screenshot from a mission builder itself with some sliders.

I'd love to have more control over the values so I can experiment with them easisly.

Madfish 04-28-2012 01:49 PM

One more suggestion: would it be possible to set individual planes to higher levels?

For example:
Make low settings set the planes to: 1. low 2. low 3. low 4. med 5 med. 6. high
medium setting so that planes are: 1. low 2. med 3. med 4. med 5 med. 6. high
High setting could then be like this: 1. low 2. med 3. high 4. high 5 high 6. high

This could turn out to feel more "realistic" as certain individual planes would stand out and could require actions taken against them. E.g. a quick kill rookie amongst aces or an ace amongst rookies.

Not sure if that makes sense :D

von Pilsner 04-28-2012 07:57 PM

Quote:

Originally Posted by Madfish (Post 416256)
I'd love if the backups would go straight into a subfolder without messing with the extension (as some people may still use the option to not show file extensions).

That is a great idea - I will make the appropriate change!

Quote:

Originally Posted by Madfish (Post 416256)
As for the command line tool I'm okay with it. You might want to get input from others though if they are okay with the amount of help available to use it correctly.

I was wondering about that myself, I am not good at GUI design and implimentation....

Quote:

Originally Posted by Madfish (Post 416256)
Generally I'd love to see a launcher that let's you adjust the values before applying them.

For full control of each setting you must open the mission up in the full mission builder and adjust the individual sliders there...
Open the mission in the mission builder and do this: http://bobgamehub.blogspot.com/2012/...-of-dover.html :D

EDIT: As of version 0.2 you can open aiconf.ini and adjust the individual AI values there and the program will use your values and not mine... ;)

Quote:

Originally Posted by Madfish (Post 416256)
One more suggestion: would it be possible to set individual planes to higher levels?

I think I understand, it depends on the original mission, if the pilots in the flight have different skill levels they will be converted automatically.

Class Aircraft.SpitfireMkIIa
...
Skill0 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7
Skill1 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3
Skill2 0 0 0 0 0 0 0 0
Skill3 1 1 1 1 1 1 1 1
Skill4 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7
Skill5 0.7 0.5 0.5 1 1 0.8 0.5 0.5
Skill6 0 0 0 0 0 0 0 0
the skills will be adjusted to:

Skill0 0.73 0.21 0.92 0.85 0.74 1 0.95 0.63
Skill1 0.32 0.21 0.87 0.75 0.74 0.95 0.90 0.53
Skill2 0.30 0.21 0.78 0.70 0.64 0.85 0.85 0.43
Skill3 0.93 0.21 0.96 0.95 0.84 1 1 0.63
Skill4 0.73 0.21 0.92 0.85 0.74 1 0.95 0.63
Skill5 0.7 0.5 0.5 1 1 0.8 0.5 0.5 (Notice that this one does NOT get converted)
Skill6 0.30 0.21 0.78 0.70 0.64 0.85 0.85 0.43

So if the mission designer wanted 1 ace in the flight and 2 rookies you will still end up with 1 ace and 2 rookies. :D

Thanks for the suggestions, Madfish! I work all weekend, but early this week I will make some changes.

von Pilsner 04-30-2012 04:16 AM

I was notified via PM that the formatting of the mission file may be losing the carriage returns after editing, I use notepad++ and it must be hiding that from me.... :D

I updated it to version 0.2: I added 'aiconf.ini' file so that AI can be hand edited to allow more customization and fixed the carriage return issue.

HessleReich 05-01-2012 09:03 AM

This a really nice tool, thanks for the hard work.

Tried this on the JG26 campaign, and omg the fighters attacked AND didnt defy gravity.

the_soupdragon 05-05-2012 04:34 PM

Sound cool. But how do I know what directory to point the deamon at? and how do I know if the program is working? Do i get any feedback in the deamon window?
Sorry if these questions are a bit silly but I need to know :)

Cheers

SD

von Pilsner 05-05-2012 08:04 PM

Quote:

Originally Posted by the_soupdragon (Post 419474)
Sound cool. But how do I know what directory to point the deamon at? and how do I know if the program is working? Do i get any feedback in the deamon window?
Sorry if these questions are a bit silly but I need to know :)

Cheers

SD

Remember, DCEMon is just for use with IL2DCE (dynamic campaign), otherwise try AITweak.:D

On Win 7 look for: C:\Users\<your user name>\Documents\1C SoftClub\il-2 sturmovik cliffs of dover\mission\IL2DCE

For XP I believe it is: C:\Users\<your user name>\My Documents\1C SoftClub\il-2 sturmovik cliffs of dover\mission\IL2DCE

The monitor shows the directory it is monitoring in green
http://bs.beckament.net/files_pub/Fl...loD/dcemon.png
and when it is working you will see a bit of text scroll by:
http://bs.beckament.net/files_pub/Fl...on-working.png

To test DCEMon, start the monitor and drop a file into the target directory and you should see some scrolling text. :D
To test AITweak copy some missions to the AITweak directory and run 'AIProcess.bat'.

the_soupdragon 05-06-2012 07:45 AM

Thanks for the reply but I am still a bit confused (it doesn't take much :) )
So I have to copy the il2DCE missions into the DCEmon target folder? ........................OK I just did that and got some feedback in the DCEmon window, but, what do I do now? Do I have to copy the files back into the original DCE folder?

Sorry to sound a bit dense but I am just a little confused.

SD


All times are GMT. The time now is 07:49 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.