Jump to content

A few script questions....


Recommended Posts

Hi all. Ive bought SC2 and WaW and am playing with the editor. First, is there any kind of tutorial concerning the various AI and Event scripts? Im reading the manual and am studying the script templates. But Im not terribly familier with scripts of any kind so not sure what Im reading so I have a zillion questions.

Also, was wondering when I write a script, say the purchase script, are all the countries in my campaign listed in the one purchase script? Im guessing yes. Further, each country's purchases for each year in the campaign would be listed in that same purchase script also?

Lastly, how do I get a country to START the campaign with units on it? So far, all Ive been able to do is have initial purchases show up first turn in an empty country.

Thank you very much for your time. Im sure everyone has better things to do than answer questions from an ignorant newb...

Link to comment
Share on other sites

Hi

I would recommend starting off by making a fairly small and simple map with just a couple of countries in it, and then adding scripts in stages as you get a bit more familiar with how they work.

Each script only relates to one country, so you would need a purchase script for each country involved.

If you'd like the country to purchase different things in different years, then you will need a script per year, with those that start later (e.g. 1943) being above those that start first (e.g. 1940) in the script file. The reason being that the game engine will read downwards in the file until it finds one that meets its conditions.

I'll be back with instructions on adding units in a bit...

Link to comment
Share on other sites

I had to open the editor for this bit!

Once you've got your campaign open, you'll see that in the second row from the top of the screen in the editor there are various tools. Select the Draw one (it's the 8th from the left).

Editor.gif

Now if you select the various buttons that are 3 to its right (a green one, followed by a blue one etc) these allow you to edit various things on the map. The little grey one to the left of the lightning flash is to add units.

Select this and the Add Unit box will appear. Select the unit you want and add it to its country.

Note that you can't add units from one country into neutral territory belonging to another. Another thing is that if the build limit is zero or you have already deployed up to its limit, then you will need to increase that country's build limit. You can do this by selecting Campaign in the top row, followed by Edit Country Data; Edit Unit Build Data (in the bottom left of the screen that pops up). Hopefully it's self explanatory from there, but fire away with more questions if you get stuck!

Link to comment
Share on other sites

*slaps forehead...* *...too hard* Thanks Bill for the info VERY much. Cant beleive I missed the "adding units" part. I have started with a small map. I made three islands; one is England, another Germany, and another is a neutral Algeria so I could explore that side of things later. Was fun figuring out the tiles for islands, lol. Wife told me this moring I spent 11 hours yesterday playing with this editor and the game...yikes! Speaking of which, I have to go to work soon so will be away for awhile. But I'll be reading more of the manual tonight, lol.

Link to comment
Share on other sites

A few more questions if I may...

-What is the differance between amphibious and amphibious_minor scripts?

Now Im just speculating here but...In the D-Day mini-campaign in WaW, there are already amphibious transports waiting off the caost of France in the begining of the campaign and this campaign uses the amphibious_minor scripts. If I wanted the AI United Kingdom to continue to mount amphibious landings after the intial assaults, would I use the amphibious script instead of the amphibious_minor script? What about simply using transport scripts to move troops to a taken port?

-In the fleet script, is there a way to set the type of ship I have move to an goal_position? Like have subs only patroling an area off an enemy coast or port?

-I noticed in the D-Day campaign scripts that the troops were landed and attack coastal villages using the amphibious_minor scripts. Then the offensive script is used to attack inland to Caen. How would I extend the attacks on past Caen once its taken? How would I write another offensive script? How does the computer read this? I think I may already know but want to be sure.

Thank you much for your time...

Link to comment
Share on other sites

1) AMPHIBIOUS scripts try and add any available special units such as HQs, Artillery etc. whereas AMPHIBIOUS MINOR scripts only look for the regular Corps, Armies and so on. The reason the D-Day scenario only uses the AMPHIBIOUS MINOR script is that the units, regular and special, are already on transports and it only looks at the transports and not what is in them so the minor script works just fine.

You can follow up with the script of choice and easily use the TRANSPORT script as well if you are confident that the AI will take a port on the initial landings.

2) Not specifically but the engine will look for those units that are closest to the specified FRIENDLY_POSITION first. So if you rearrange your units on the map so the SUBS are closest to the FRIENDLY_POSITION then you can script to send those units out first, note you need to specify the correct size of the plan for the number of subs, and then follow up with additional FLEET events for the remaining ships.

3) If you set CAEN as the FRIENDLY_POSITION line then the event will only trigger once this position is taken and essentially friendly. Set the correct size and the desired GOAL_POSITION and the game engine does the rest. Remember how these events count units, i.e. take a look at the header notes at the top of these scripts, and the event should work as desired.

Hubert

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...