Farewell - We are suspending FileFront site operations indefinitely on March 30. Please see the following link for more information: Farewell





  

     
[Register] [645236 Members] [2185 Online; 84 Members, 2101 Guests]  
Star Trek: Armada 2
File Search


Click Here for Advanced Search Options




Unlimited Free File Hosting

 Picture of the Month
 Mod DB - Vote For Us!
Mod DB Top 100

 Find lowest prices
 » Star Trek: Armada
 » Star Trek: Armada II

 Site Info
 » Home Page
 » Latest Poll
 » Site Rules
 » Forums

 The News
 » Latest News
 » News Headlines
 » News Archive
 » Submit News

 The Files
 » File Browser
 » File Search
 » Submit Files
 » Your submission status  » File Permissions
 » Query File Submission
 » Vote For FotW
 » Reviews and you!
 » Achilles Mod Surgery

 The PotD
 » Submit PotD
 » PotD Archive

 The Tutorials
 » Milkshape 3D Hardpoint
 » Map Editor Tutorial
 » Custom Music Tutorial
 » AI Files for beginners
 » Joint rotation on MS3D
 » Submit Tutorial
 » More Tutorials

 Star Trek Armada II
 » Cheats
 » Downloads
     - Demo
     - Maps
     - Mods
     - Media
     - Patches
     - Ships
     - Stations
     - More...
 » Screenshots
 » Overview
 » Story
 » FAQ

 Star Trek Armada
 » Cheats
 » Downloads
     - Demo
     - Maps
     - Mods
     - Patches
     - Ships
     - More...
 » Overview
 » Story

 The Community
 » Links
 » Forums
     - A2 General
     - Modding & Editing
     - Mapping
     - Clan Forum
     - Problems & Help
     - Rants & Raves

 The Site
 » About
 » Staff
 » Rules
 » Contact
 » Apply To Volunteer
 » Advertise
 » Link to us
 » Make Start Page

 Hosted Sites
 » Get Hosted!

 Join our TeamSpeak


Hosted By:
Leetservers.com




  AI Files for Beginners Tutorial
This Page has been viewed 12924 times since March 2004!
When you are modding armada2 you will find there are two main areas, programming and arty stuff. The arty stuff is more about talent in my opinion and is difficult to learn (I can't do it). I can however mod programming files odf etc. as these are easier to learn and don't require as much talent. Though programming is generally simple, one area of it confuses nearly everybody (including me) and that area is know as the AI. This area is really quite complex as you are programming how you want the computer to play against the player. The best AIs use all the ships and stations available to it, gets them built quickly and has a strong economy to support them. The best AIs do all this without following a predictable pattern.

So how do you do it?

Ok most AI files are AIPs. Each race has 5 plus files for any missions the game has. You have to make any changes to all 5 files for it to work, as they are just slight variants of each other for the AI to vary it's strategy.
Here is here is the first part of the federation_instant_action_build_list.aip.

//
// Borg_Build_List.aip
//
// Contains a default build list for the klingon AI
//
// edited by the Nord

// Load up the basic structures...
#include \"aipdef.h\"

// This aip needs to play by the rules
int checkTechnologyAvailable = 1;

Way_Better_Build_List_Element the_build_list[MAX_ELEMENTS] =
{
//---------------------------- ----------------------------------------

This section you can ignore except for this bit

int checkTechnologyAvailable = 1

By default the AI isn't effected by techtrees so it can build Akira class vessels without a Research Facility ect. When this line is present the AI checks the techtrees before trying to build a vessel. I personally delete this line and make the AI build the required building before moving on to dependant ships anyway.


After this you come to the build list. This is the order in which the AI constructs ships and stations. This is the bit we can do stuff with. The AI follows this list to the letter and this list is used by the AI no matter it's difficulty level (Hard AIs get resource gathering and combat bonuses but still build the same ships).

Ok here is the start of the federation_instant_action_build_list.

//
// Syntax: \"ODF name\", number to build, base to build at, max number from this line, min tech level
//

//
// Phase I. Base & Yard
//

\"fbase\", 1,0, -1, 1, // starbase
\"fconst\", 1,0, -1, 0, // construction ship
\"fconst\", 1,0, -1, 0, // second construction ship
\"fscout\", 1,0, -1, 0, // scout
\"fmining\", 1,1, -1, 0, // mining stations
\"fturret\", 2,1, 4, -3, // basic mining defense
\"forbital\", 1,1, -1, 0, // build an orbital station
\"ffreight\", 2,0, -1, 0, // mining freighter - two freighters for each station
\"fyard\", 1,0, -1, 0, // basic shipyard
\"fdestroy\", 2,0, 4, -2, // Defiant

The first column is the name of the odf used. You first notice that the first thing it tries to build is a starbase. This is because the list defines what the AI is supposed to have so if you changed the start units but not the AI file the AI would try and build any of the units you changed.

The first number is how many of the odf the AI is supposed to have which doesn't need explaining.

The second number is location to build the odf at. 0 is the AIs "main base" or starting position. 1 is the nearest dilithium moon to the AI. (The orbital processing facility is built at the planet nearest the moon) 2 or more are subsequent dilithium moons in order of priority (The AI will ignore the nearest moon if it can go a bit further and find an infinite moon)

The third number is how many times to repeat the line if the odf from the line is destroyed for example this is a line in the file:

\"fdestroy\", 2, 0, 2, 0, // Defiant

The AI will build two Defiant Class ships and then if one of them are destroyed it will replace it with another one meaning that in total the AI can build four Defiant Class ships.

If the number –1 is there the will replace it an unlimited number of times which is why the starter units are on the list.

The next column I will come back to.

The AI moves on to the next line when it has started all of the line above. Look at this extract:

\"fturret2\", 3,0, -1, 0, // torpedo turret
\"ffrigate\", 1,0, -1, -4, // Aegean

If you have 3 construction ships and an advanced shipyard the AI will start the turrets and then start the Aegean so the AI doesn't have to wait for the line above to be finished.

\"fbattle\", 4,0, -1, 0, // Sovereign
\"fcruise2\", 2,0, -1, 0, // Steamrunner (Artillery)

Suppose the Al has 2 of each type of shipyard it will start building 2 of the sovereigns but as it hasn't started all of the line it can't move onto the next line. This means the standard shipyards are left doing nothing slowing down the AIs fleet building.

This is a way round this

\"fbattle\", 2,0, -1, 0, // Sovereign
\"fcruise2\", 2,0, -1, 0, // Steamrunner (Artillery)
\"fbattle\", 2,0, -1, 0, // Sovereign

The AI will start two sovereigns then two Steamrunners and when there is space at the advanced shipyards the other two are built. (if the AI has enough resources…wink

The fourth number is very confusing but if you are really ambitious this is how you use it.

The fourth number represents a technological barrier to stop the AI building weaker ships when it builds certain things (usually stations). This makes sure the longer you play the stronger the ships against you get. This is actually cannon as NX class ships are not built in the 24th century when Defiant class ships are cheaper, more powerful and faster.

Look at the first entry:

\"fbase\", 1,0, -1, 1, // starbase
\"fconst\", 1,0, -1, 0, // construction ship
\"fconst\", 1,0, -1, 0, // second construction ship
In the fourth column there is a one this means that the AI thinks that this is the start of tech level one that ends when an entry with 2 in the column appears. Now entries with a zero are unaffected by this but entries with a negative number are. The number –1 would mean that the AI would stop replacing the ship after tech level 1.

Here is an example:

//
// Phase II. Research
//
\"fresear\", 1,0, -1, 2, // basic research
\"fcolony\", 1,0, 4, 0, // colony ship
\"fdestroy2\", 2,0, 4, -2, // Defiant
\"fcruise1\", 2,0, -1, -2, // Akira

//
// Phase III. Advanced Shipyard
//

\"fyard2\", 1,0, -1, 3, // advanced shipyard
\"fgalaxy\", 3,0, -1, -4, // Galaxy (Battleship)

When tech level 2 ends the AI will stop replacing the Defiant and Akira class vessels, regardless of column 3. This stops the AI wasting resources. The galaxy will be built in tech level 3 but can be replaced in levels 3 and 4 but will stop being replaced in level 5.

So a positive number decides when a level starts, a negative number decides what level something is restricted to and 0 means it is unaffected.

Ok now you know how AI files work. With this you can make the AI use any ships you add to the game or you can completely rework the AI into a stronger more interesting player.

Average User Rating: 8
Number of Votes: 7


User Comments  
The following comments are owned by the user that posted them. Armada 2 Files is not responsible for their content.

Total comments: 10 | Last comment: 08-18-2008 at 13:15

 #1 - Posted by: AdmarilRyan (Member) on 10-31-2005 at 03:20
I didn't realise I submitted this is March 2004! Hangon... I hadn't even started modding in March 2004! that is strange.....

also there has being a weird error...

"fyard2", = "fyard2"

you have to ignore the random backslashes


 #2 - Posted by: AdmarilRyan (Member) on 10-31-2005 at 07:06
ur this is very strange I put

"fyard" = "fyard"

I think I need to go lie down!


 #3 - Bookmarked this great page..... - Posted by: DScottHewitt (Member) on 05-23-2007 at 13:07
Since the Admiral pointed me to it in my thread about this.....




Scott


 #4 - Awesome! - Posted by: Chiletrek (Member) on 05-23-2007 at 17:41
Hello:
Even though I learned some of the AI editing by following the Norway Class minimod (and how the author added that ship to the AI), I find this tutotial both good and useful.
Thanks for the tutorial smile


 #5 - Laymens terms needed - Posted by: Lee2006 (Member) on 06-06-2007 at 11:27
I don't know what it is but I don't understand it. You need to write this up from the understanding that a person has no knowledge but wants to learn how.. U get it? I mean I don't. Make it so a child could understand. For ex.. How do I even open up the files needed to change the cpu, where are they located? Give examples, help put the readers mind into the editing mode and establish and build on the fundementals. This tuturial is for novices but I am a beginner thank you.

 #6 - Posted by: AdmarilRyan (Member) on 06-17-2007 at 15:36
#5 right...not quite sure what your problem is.

If you can't even find the files, they are in the AI/AIPs directory.
If you really can't get that far then I'm afraid no tutorial on the subject will help you.

AI modding is perhaps the most difficult part of modding Armada 2, I am one of very few modders who have mastered it (well, mastered aspects of it), generally most won't even touch it. When I wrote this I should perhaps have explained that this is for beginners to AI modding, not beginners to modding overall. A basic understanding of concepts like odfs and techtrees are needed before this will make sence to you.


 #7 - Posted by: dEjavU001 (Member) on 05-14-2008 at 15:18
Hello...... I'm trying to tweak the game AI for the Romulans in instant action because unlike the cardassian race(that I moded into using Dominion ships as well)the AI builds a variety of different ships but the romulans end up building only(rbattle2)warbirds throughout the duration of the game without any other variety of other classes of ships(maybe a science vessel now and again).....please help me out here.I dont understand whats causing this glich. i try to brush up on the inner workings of the AI but I dont know how to open the files in question....HELP ANYONE!!!

 #8 - Posted by: dEjavU001 (Member) on 05-14-2008 at 15:25
...........is there anyone left in the Armada II community..............did I come a little too late..

 #9 - Posted by: Freyr (Member) on 05-17-2008 at 06:50
There are plenty of people still left around, but there are thousands of pages on this site, and the comments section is meant to be for comments on the file, rather than communication between people.

If you drop a message in the forum :-
http://forums.filefront.com/star-trek-armada-ii-136/?=

Then it will get noticed within a reasonable time frame and people will be able to respond to it.


 #10 - how can i create my own race? - Posted by: Darkrenamon (Member) on 08-18-2008 at 13:15
i want create a race. can you write a tutorial for this?



When posting comments, you must follow these rules:
  1. No "Yay I got First Post!" posts, no exceptions and no matter what other content the post has!
  2. No Pornographic Material. Any sexually oriented imagery or links to such content will not be tolerated.
  3. No Warez or Illegal Software. This includes linking to software, posting about it, and suggesting to get it.
  4. No Cursing or Swear words. We encourage you to use our comment sections as a forum to debate files, news, etc., but please use proper adjectives to express yourself. We will not tolerate abuse upon another member or author.
  5. No Attacks / Retaliation of any kind against a member, or group of members.
  6. Please do not advertise for other sites or forums here.
  7. Maximum of 3 smileys per regular member.
The high interactivity of this site should be considered a luxury, not a right. If you cannot follow these simple rules, you can and will be warned or banned from the comments, site or the entire network for any period of time.
Now enjoy yourself and behave!



  • Register: To get your own Username, click here!
  • Forgot your password? click here!
  • You can use UBB here!
Username:     Password:  
Remember my username and password
Comment Title:
Your comments for this Document please:

Game News

 Latest Files
 » USS Sarat.. (from S:AaB)
 » Shield Effect
 » Tal Shiar Operat.. (1.0)
 » ODF Mod (Fed) .. (V.1.1)
 » SA-43 Hammerhead fig..
 » X-men Blackbird jet
 » Cylon Basestar
 » Colonial Movers
 » Colonial Fabrication..
 » Battlestar Valkyrie

 Latest News
 » Weekly Poll Results ..
 » FileFront Network In..
 » New Ships > Battlest..
 » Weekly Poll Results ..
 » A new social Network..
 » FileFront Network In..
 » New Starfleet Museum..
 » Weekly Poll Results ..
 » An issue mirroring f..
 » FileFront Network In..

 Affiliates




Starbase 34: Your online source for Armada II modding information



Star Trek: Legacy Files
EFFiles.com! The best source for Elite Force 1 & 2 files!
IFT: SpaceStation 51

 Modifications
 Supported










 In Progress

Armada I


Armada II









Upgrade Projects



 Link To Us


 The Network
 » Gaming Today
 » Game Demos
 » Trailer Videos
 » Game Patches
 » Act of War
 » Age of Empires 3
 » Age of Empires 3:
      The Warchiefs
 » Age of Mythology
 » Aliens vs Predator
 » Aliens vs Predator 2
 » America's Army
 » Armada
 » Armada 2
 » Armed Assault
 » Battlefield 1942
 » Battlefield 2
 » Battlefield 2142
 » Battlefield Vietnam
 » Bet on Soldier
 » Black & White 2
 » Breed
 » Bridge Commander
 » Brothers in Arms
 » Brothers in Arms 2
 » Brothers in Arms: Hell's Highway
 » Call of Duty
 » Call of Duty 2
 » Call of Duty: World at War
 » Civilization IV
 » Command & Conquer:
      Generals
      Red Alert 2
      Red Alert 3
      Renegade
      Tiberian Sun
      Tiberium Wars
 » Company of Heroes
 » Crysis
 » Crysis: Warhead
 » CS: Condition Zero
 » Counter-Strike: Source
 » Dark Messiah
 » Dawn of War
 » Dawn of War:
      Dark Crusade
 » Dawn of War:
      Winter Assault
 » Day of Defeat: Source
 » Deus Ex
 » Deus Ex 2
 » Devastation
 » Doom 3
 » Elite Force
 » Elite Force 2
 » Enemy Territory: Quake Wars
 » Far Cry
 » Far Cry 2
 » F.E.A.R.
 » Flight Simulator X
 » Front Lines: Fuel of War
 » Gears of War
 » Ghost Recon: AW
 » GTA 3
 » GTA San Andreas
 » GTA Vice City
 » Half-Life
 » Half-Life 2
 » HL: Counter-Strike
 » Halo
 » Halo 2
 » Jedi Knight 2
 » Jedi Knight 3
 » Joint Operations
 » Knights of the Old Republic
 » KotOR II: The Sith Lords
 » LOTR: Battle 4 Middle Earth
 » Lord of the Rings Online
 » Lord of the Rings: Conquest
 » Medal of Honor
 » Medal of Honor:
      Pacific Assault
 » Neverwinter Nights 2
 » Operation Flashpoint
 » Operation Flashpoint 2
 » Portal
 » Prey
 » Quake 4
 » Return to Castle
      Wolfenstein
 » RoN 2: Rise of Legends
 » Serious Sam 2
 » Sins of a Solar Empire
 » Soldier of Fortune
 » Soldier of Fortune 2
 » Soldier of Fortune 3
 » S.T.A.L.K.E.R.
 » Star Trek: Legacy
 » Star Wars Battlefront
 » Star Wars Battlefront 2
 » Star Wars Empire at War
 » StarCraft II
 » Starfleet Command III
 » Stargate Worlds
 » Supreme Commander
 » Team Fortress 2
 » The Elder Scrolls III
 » The Elder Scrolls IV
 » The Movies
 » The Sims
 » The Sims 2
 » The Sims Online
 » Tribes Vengeance
 » TrackMania Nations
 » TrackMania Sunrise
 » TrackMania United
 » Unreal Tournament
 » Unreal Tournament 2003
 » Unreal Tournament 2004
 » Unreal Tournament 3
 » Warcraft III
 » Wolfenstein:
      Enemy Territory
 » World in Conflict
 » World of Warcraft
 » FileFront Gaming Forums

 Partners
 » Nintendo DS
 » Family Gaming eBook
 » Feng Shui Life Tips
 » Increase Ad Revenue
 » PlanetMirror
You got served by in 0.2981 seconds using 8 MySQL queries and 13 includes
Copyright © 2009 FileFront, Inc. All rights reserved.
Design by Jos Jongejan aka Pro-Filer & Blumenkohl. Use of Armada 2 Files materials is subject to certain Terms & Conditions.
TM & © 2009 Paramount Pictures. All rights reserved. Star Trek and related marks are trademarks of Paramount Pictures. © and TM 2009 Activision, Inc. All rights reserved.
Top Download Sections:   Game Demos | Game Patches | Game Mods | Game Clients | Game Videos
game patchesCopyright © 2002-2008 Ziff Davis Publishing Holdings Inc. All Rights Reserved. FILEFRONT logo are registered trademarks of Ziff Davis Publishing Holdings Inc. Reproduction in whole or in part in any form or medium without express written permission of Ziff Davis Media Inc. is prohibited. Use of this site is governed by our Privacy Policy, Ziff Davis Terms of Use, and FileFront AUP.