:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Tue Apr 24, 2018 5:04 am
All times are UTC + 0
 Forum index » Modding Central » Generals Editing Forum » Tutorials Warehouse
(**) Editing the AI (ZH)
Moderators: Generals Moderators, Global Moderators
Post new topic   Reply to topic Page 1 of 1 [7 Posts] View previous topic :: View next topic
Author Message
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Fri Jun 01, 2007 9:53 am    Post subject:   (**) Editing the AI (ZH) Reply with quote

This tutorial will teach you how to edit the AI in Generals Zero Hour. I especially say Zero Hour, because Generals uses a different way of AI scripting.

Some generals information:
Generals (and Zero Hour) AI attack in waves. These are noted from 1 to 5. Wave 1 attacks are earlier in the game then wave 5 attacks. Wave 5 attacks always have much more and stronger units in them the wave 1 attacks. Easy AI only goes until wave 3. Medium goes to wave 4. Hard goes to wave 5.
Most teams use 3 paths that are in (almost) each map. These are CenterPath, FlankPath and BackdoorPath. Center is the most direct way from his base to his enemy's base. Flank is mostly from the side, and Backdoor is mostly from the other side, or from behind. If you play a map without these 3 paths, they always go directly to the enemy's base.

What do you need:
-FinalBig or XCC Mixer: these are to extract the files you need.
-Generals Zero Hour WorldBuilder (standard with each game): this is used for editing the AI.
-SkirmishScripts.SCB: this is the magic file you are going to edit.

Got everything? Ok, let's start Razz
First you need to find the SkirmishScripts in your Zero Hour directory. If it is correct, you will find it in YourZHDirectory/Data/Script.
NOTE: Always make a backup of your original SkirmishScripts!

Now you have found it, start up WorldBuilder. After it is loaded, go to Edit-->Edit Player List. After this is opened, make sure there aren't any players in the list. Then you click on the button "Add Skirmish Players". Now the list is filled with all armies from the game. Click OK so you close the window.

Go to Edit-->Scripts. Now you will see a window with some buttons and folders with all armies in Generals Zero Hour. Before we are going to import the SkirmishScripts, de-select the "Auto Verify" option. This make importing and exporting scripts a lot faster.

Click on the "Import" button to import your script file. Search for your SkirmishScripts, and import it. This may take a while. If you have done it correct, you now can expand each folder into many sub-folders. It may look very confusing and overwhelming, but it isn't that difficult when you understand it. And above all, we not are going to edit those in this tutorial.

Click OK to close the window. Now go to Edit-->Edit Teams. Now a new window will open. In the left collum you have all armies. In the right column you have nothing (yet). This is the window where you can edit all the teams the AI builds (attack teams, dozers, supply units, etc.).

Click in the left column on the army you want to edit. Now the right column will be filled with all the teams this army can (and will) build. The teams the AI uses to attack you are like this:

AAA B CCC Wave DDD E

I will explain this code:
AAA = the army name (IE, America is USA, GLA is GLA, China is China)
B = the AI level that uses this attack (E is easy, M is medium, H is hard)
CCC = the number of the wave (as explained above)
DDD = the type of attack (mostly it says tanks or artillery)
E = the path the team takes to your base (C is center, F is flank, B is backdoor)

NOTE: you don't have to stick to this code, but it is useful so you can see which team is in which wave and uses which path.

Double-click on the team you want to edit, and a new window will pop up. You will see a lot of things you can edit. For the this tutorial, we only will edit middle part of this window, which is also the most important.

You can see a few columns which are called "Min", "Max" and "Unit Type". Min is minimal, and it says the minimal amount of units to be build of this type in this team. Max is the same as min, only it is the maximum amount of units. Unit Type is where you can select the type of unit to be build.

For each unit you must set it's Min, Max and Unit Type. As you can see, you can have a max of 7 units in 1 team. This is well enough, because else the teams would get to large. Edit the teams you want, and to close the Teams window, click OK, or all your work will be lost.

Go to Edit-->Scripts again. It may take a while to load this, so be patient. Once it is loaded, click on the "Export Script(s)" button.
A new window will pop up.
NOTE: Select the "Export all scripts" option, or only the selected scripts will be exported!
You may notice that the OK button is missing. This is EA's fault, but if you look good, you can see the top of the button on the bottom of the window. Click on it to export your scripts.

Now select your original SkirmishScripts, and click Save or OK. Now close WorldBuilder, start up Generals Zero Hour, select a skirmish map and the AI level you changed teams from, and test it Smile

This was it all. Editing the AI in Generals Zero Hour is a bit more complicated the in RA2/TS, but when you know how to script a bit, you can do a lot of nice things.

I will create a tutorial about editing the base-building AI soon... Wink

Key Words: #Tutorials #Modding #Generals #ZeroHour #OSBIGEditor #XCCUtilities #FinalBIG 

_________________
Please, read the signature rules of the forum.

Last edited by Dutchygamer on Sat Apr 28, 2012 6:37 pm; edited 1 time in total

Back to top
View user's profile Send private message Send e-mail Skype Account
ufo-alien
Civilian


Joined: 23 Nov 2009
Location: iran-tehran

PostPosted: Tue Nov 24, 2009 3:55 pm    Post subject: Reply with quote

Hello
Please help urgent

c&c generals zero

name mod:ZeroHour Reborn V4.0 The Rise To Power

How we can add the new generals For example,Iraq or... to the .AI
Thank you
mohsen
mansoori54@ymail.com

Excuse me I do not English very good
_________________
I hope the emergence of world peace and justice savior

Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger Account AIM Address
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Tue Nov 24, 2009 5:31 pm    Post subject: Reply with quote

Next time, create a seperate topic, and don't PM spam me please.
Anyways, adding a new AI is quite hard to do. TBH, I dunno how to do this.
_________________
Please, read the signature rules of the forum.

Back to top
View user's profile Send private message Send e-mail Skype Account
ufo-alien
Civilian


Joined: 23 Nov 2009
Location: iran-tehran

PostPosted: Tue Nov 24, 2009 8:39 pm    Post subject: Reply with quote

Thank you
I Not wanted to send spam ,Sorry Embarassed
I am wait to your topic.

Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger Account AIM Address
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Wed Nov 25, 2009 4:41 pm    Post subject: Reply with quote

Well, base-building AI is a lot harder then I originally thought. For a mod I'm working on I'm trying to figure out how it works exactly. When I know this, I may create the thread I promised Wink
_________________
Please, read the signature rules of the forum.

Back to top
View user's profile Send private message Send e-mail Skype Account
The-Light
Grenadier


Joined: 08 Aug 2009
Location: Netherlands

PostPosted: Tue Mar 30, 2010 10:16 am    Post subject: Reply with quote

I know one base building method for the AI, but that only works in so-called Campaign missions like Generals Challenge.

I'll look it up, and maybe make a tutorial of that one.

Back to top
View user's profile Send private message
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Sat Apr 28, 2012 6:38 pm    Post subject: Reply with quote

Slightly updated the tutorial, fixing some spelling/grammar errors. I really should do that Base Building tutorial as I promised almost 5 years ago...
_________________
Please, read the signature rules of the forum.

Back to top
View user's profile Send private message Send e-mail Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [7 Posts] View previous topic :: View next topic
 Forum index » Modding Central » Generals Editing Forum » Tutorials Warehouse
Jump to:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

Wildcard SSL Certificates
[ Time: 0.2164s ][ Queries: 12 (0.0972s) ][ Debug on ]