AI Script Advice Needed

Please post here for questions and discussion about scenario design, art and sound modding and the game editor for WITP Admiral's Edition.

Moderators: wdolson, MOD_War-in-the-Pacific-Admirals-Edition

Post Reply
User avatar
Shark7
Posts: 7936
Joined: Tue Jul 24, 2007 4:11 pm
Location: The Big Nowhere

AI Script Advice Needed

Post by Shark7 »

OK, I need to write a naval surface action script and I'm lost. (Scripting has never been my strong suit).

Basically, I have added some ancient BBs to the Asiatic Fleet in Manila Harbor. What I'd like for the AI to do with these is form up a SAG or two and attempt to oppose the Japanese landings. And I have no clue on how to do it.

Can anyone help out?

My scripting level would be rated as beginner.
Distant Worlds Fan

'When in doubt...attack!'
Andy Mac
Posts: 12578
Joined: Wed May 12, 2004 8:08 pm
Location: Alexandria, Scotland

RE: AI Script Advice

Post by Andy Mac »

OK step one are there going to be enough assets to allow a TF to form i.e. are there a few DD's disbanded in the same port.

Allied AI ship teleporting to allow TF's to form is disabled for about the first 60 days to stop the Ai blatently teleporting ships into the wrong place so you need to allow the port to have at least 1 DD per BB ish as a rule of thumb or no TF will form.

So thats step one assume you have 3 or 4 DD's in the same port disbanded (can be existing ones in a TF just make sure they are disbanded)
User avatar
Shark7
Posts: 7936
Joined: Tue Jul 24, 2007 4:11 pm
Location: The Big Nowhere

RE: AI Script Advice

Post by Shark7 »

Assets Available:

5 Old BB
1 BC
12 DD

So that part should be well covered. These are all disbanded, and 5 of the DDs are newly added.

This is a No Washington/London Treaty mod, just wanted to play around with the ships that got scrapped due to those. [:D]

So looks like I got step 1 covered.

Should be able to form the Task force.
Distant Worlds Fan

'When in doubt...attack!'
Andy Mac
Posts: 12578
Joined: Wed May 12, 2004 8:08 pm
Location: Alexandria, Scotland

RE: AI Script Advice Needed

Post by Andy Mac »

OK this is how it would look if I was doing it

2 TF's based at Manila to go north and attack the landing zones

Image
Attachments
NavalAI1.jpg
NavalAI1.jpg (130.92 KiB) Viewed 263 times
Andy Mac
Posts: 12578
Joined: Wed May 12, 2004 8:08 pm
Location: Alexandria, Scotland

RE: AI Script Advice Needed

Post by Andy Mac »

Then a second script a few days later based at Jolo or some other base to raid Legaspi or maybe Davao and retire on Java before Mrs Betty gets to them



Image
Attachments
NavalAI2.jpg
NavalAI2.jpg (151.79 KiB) Viewed 263 times
Andy Mac
Posts: 12578
Joined: Wed May 12, 2004 8:08 pm
Location: Alexandria, Scotland

RE: AI Script Advice Needed

Post by Andy Mac »

Then a 3rd to keep them busy at Java to stop them going back into harms way

You need this script to keep their home base somewhere sensible.

As you have more ships than I thought the TF's could probably form as Normal sized best way is to play with the script in AI v AI mode until you get a size combination that works

Hope this helps

Image
Attachments
NavalAI3.jpg
NavalAI3.jpg (151.9 KiB) Viewed 263 times
User avatar
Shark7
Posts: 7936
Joined: Tue Jul 24, 2007 4:11 pm
Location: The Big Nowhere

RE: AI Script Advice Needed

Post by Shark7 »

Thank you Andy Mac. [&o]

That is pretty much what I was looking for them to do.

And with the screenshots you provided, I can actually see it, that really helps. [:D]

Judging from the screenshots, assigning ships is not necessary, the AI will pull what it needs, correct?
Distant Worlds Fan

'When in doubt...attack!'
Andy Mac
Posts: 12578
Joined: Wed May 12, 2004 8:08 pm
Location: Alexandria, Scotland

RE: AI Script Advice Needed

Post by Andy Mac »

Yes but you will have to play about with size combinations sometimes two Large/Minimum will form more often than a single Large/Normal TF.

You can play with the options until you get one that works optimally - with the ship mix you are using I would maybe start with 1 TF of Large Size and Normal Composition or maybe even a Large/Max SCTF and see if it works
Andy Mac
Posts: 12578
Joined: Wed May 12, 2004 8:08 pm
Location: Alexandria, Scotland

RE: AI Script Advice Needed

Post by Andy Mac »

Also waypoint which I have used to make this a one run through then stop option may not be best you can use patrol in this kind of situation just dont leave it to open ended or to long as its a good way to get ships trashed.


Andy Mac
Posts: 12578
Joined: Wed May 12, 2004 8:08 pm
Location: Alexandria, Scotland

RE: AI Script Advice Needed

Post by Andy Mac »

p.s. dont forget to increase the VP's for some US base to compensate for the extra VP's you are probably giving Japan
User avatar
Shark7
Posts: 7936
Joined: Tue Jul 24, 2007 4:11 pm
Location: The Big Nowhere

RE: AI Script Advice Needed

Post by Shark7 »

ORIGINAL: Andy Mac

p.s. dont forget to increase the VP's for some US base to compensate for the extra VP's you are probably giving Japan

The Allies got some interesting new targets to shoot at as well, mostly the ships that never got built due to the treaties. I think I managed to keep the ratios fairly balanced as to what they were, but I may have to do some tweaking there.
Distant Worlds Fan

'When in doubt...attack!'
User avatar
Shark7
Posts: 7936
Joined: Tue Jul 24, 2007 4:11 pm
Location: The Big Nowhere

RE: AI Script Advice Needed

Post by Shark7 »

Just so you know the results, it did in fact work. Settings were Large/Normal and if formed a TF with 1 BB, 1 BC, 2 CA (I forgot about those being there), and 4 DDs. Unfortunately for the BB Florida, Miss Betty's dance card wasn't full...hehe.
Distant Worlds Fan

'When in doubt...attack!'
Post Reply

Return to “Scenario Design and Modding”