1.3 editing AI scripts

Moderators: Hubert Cater, BillRunacre

Post Reply
gwgardner
Posts: 7146
Joined: Fri Apr 07, 2006 1:23 pm

1.3 editing AI scripts

Post by gwgardner »

I have been unable to edit AI scripts since installing 1.3. The editor simply hangs. I've waited as much as 5 minutes to see if it is doing anything before stopping it.

User avatar
Hubert Cater
Posts: 5986
Joined: Mon Jul 22, 2013 11:42 am
Contact:

RE: 1.3 editing AI scripts

Post by Hubert Cater »

When exactly does it hang? Is it when you attempt to open a script? Compile?

Any more details will help me track it down for you as on our end it is currently working as expected.
User avatar
Hellfirejet
Posts: 3036
Joined: Fri Oct 15, 2010 1:19 pm
Location: Fife Scotland
Contact:

RE: 1.3 editing AI scripts

Post by Hellfirejet »

AI scripts is it possible to edit the decisions that Naval Units make, if not is it possible to make these available so that modders can instruct the units to take a logical course of action instead, because at the present time they take very dubious courses of action? I'm speaking mainly about German surface units,historically they were instructed to avoid combat with superior warships, their mission was to raid the convoy routes,not to slug it out with warships!
Make it so!
User avatar
sPzAbt653
Posts: 10042
Joined: Thu May 03, 2007 7:11 am
Location: east coast, usa

RE: 1.3 editing AI scripts

Post by sPzAbt653 »

I agree with you Kirk, and I just started experimenting with Fleet Scripts so it is early in my learning curve. I know it is completely different, but my experience with TOAW has taught me that working with the computer is a trial and error thing to get results. I think that TOAW is similar to SC3 in that there are hard coded behaviors and we can influence them by using the available scripts.

The shot below is from 653H. I have made changes to the convoy system, and therefore I needed to give subs some scripts. Pictured is an example of one of several scripts that I added for subs. In the green circles, the subs have moved to the precise locations that are scripted. Awesome. In the red circle, three subs have moved to Wilhelmshaven and sit there doing nothing. Wilhelmshaven is not in any of my scripts, nor in any of the originals. So I need to do some more experimenting. Based on what I have seen so far, we can influence where naval units go, but not how they act with regards to mission and enemy presence. I guess those things are hard coded.

EDIT: See more comments in Post #6 below.

Image
Attachments
653H36.jpg
653H36.jpg (93.46 KiB) Viewed 183 times
User avatar
Hellfirejet
Posts: 3036
Joined: Fri Oct 15, 2010 1:19 pm
Location: Fife Scotland
Contact:

RE: 1.3 editing AI scripts

Post by Hellfirejet »

Yip I don't like how the naval AI reacts to the presence of enemy forces, I would like to be able to let say enlighten the AI as to what it should do, which for the most part is the opposite of what it does now![;)]


Another thing that completely baffles me is this, when a ship is being attacked and takes damage,most off the time it retreats further into enemy territory? Surely you would retreat towards friendly forces and friendly ports, and not move closer the enemy[&:]
Make it so!
User avatar
sPzAbt653
Posts: 10042
Joined: Thu May 03, 2007 7:11 am
Location: east coast, usa

RE: 1.3 editing AI scripts

Post by sPzAbt653 »

A further report on what I said in Post #4 above, concerning the German subs congregating around Wilhelmshaven - it's my fault ! In the Fleet scripts I added several that had a #FRIENDLY_POSITION= St. Nazaire, but St. Nazaire is not friendly until France falls, so the subs had no idea what to do, and reported back to home base I guess. Nothing wrong with that !

Kirk, like I said I just started working with Fleet Scripts so I don't want to portray that I know anything yet, but in my first tests it seems that the naval units are following the coordinates that I input, so I wonder if you have tried inputting specific successive hex locations for the Deutschland, from its start position back to Germany, in order to get it to m0ve as you want it to ?
User avatar
Hellfirejet
Posts: 3036
Joined: Fri Oct 15, 2010 1:19 pm
Location: Fife Scotland
Contact:

RE: 1.3 editing AI scripts

Post by Hellfirejet »

Yes I have tried giving the Deutschland/Lutzow a breadcrumbs path to follow, the problem is if it sees any enemy warships it attacks? I don't want to engage enemy warships, I just want it back in home waters hence the reason for me creating a new naval loop between Baltic and Greenland sea, on the bright side it now returns to the baltic. If possible I would like access to the files for modding that dictate how units decide what strategy to use when attacking or not.
Make it so!
User avatar
Hubert Cater
Posts: 5986
Joined: Mon Jul 22, 2013 11:42 am
Contact:

RE: 1.3 editing AI scripts

Post by Hubert Cater »

This is a bit of a tricky one as while I can see there are times you want the AI naval units to simply go from A to B, there will be situations where you would like the AI to react to a naval encounter (along its route from A to B) and then fault it for not doing so.

One option I can consider is an additional AI flag in the FLEET script to tell it what kind of movement strategy it should be following, i.e. move along without reacting or allow for reactions.

A workaround I use for the Axis naval AI is to try and move the German fleet towards Konigsberg to get it out of range of the Allied naval units early in game so that if you have subs moving out to the Atlantic and they get intercepted, the Axis AI is not in range to react. I try and script new units arriving off of the Production Queue to also move towards Konigsberg until a later date.

I then move the German fleet towards the Atlantic later on in the game (at random times from game to game) and the general AI takes over from that.

Sometimes this doesn't always go according to plan, it all depends on what the Allies are doing as well, and sometimes this works out well and other times less than ideal but it does create some differences from game to game as well which is not always a bad thing.

Hubert
User avatar
Hellfirejet
Posts: 3036
Joined: Fri Oct 15, 2010 1:19 pm
Location: Fife Scotland
Contact:

RE: 1.3 editing AI scripts

Post by Hellfirejet »

ORIGINAL: Hubert Cater

One option I can consider is an additional AI flag in the FLEET script to tell it what kind of movement strategy it should be following, i.e. move along without reacting or allow for reactions.

Hubert

Hi Hubert I must say I like the idea of having an AI Flag in the Fleet script that gives ships the option of whether or not to react to enemy contact. I think the German Kriegsmarine should use this tactic as standard practice.

Hubert is there anything you can do to stop warships retreating in the wrong direction? Time and time again damaged ships when they retreat, move deeper into enemy territory,instead of heading closer to safer waters near friendly ports?
Make it so!
Post Reply

Return to “Strategic Command WWII War in Europe Public Beta”