Project Perfect Mod


Site Menu

News & Forums

Forum

Site News

All News

Submit News


Info & Services

About PPM

PPM FAQ

Project Hosting

Community Features

Privacy Policy

Report a Bug

Become Affiliates

Credits


PPM: Final Dawn


C&C Editing Tools


Game Expansion Projects

HyperPatch

Download HyperPatch 0.2

Forum


Extended Tiberian Sun

Site

Download ETS 3.40

Forum


TS Projects


RA2 Projects

D-Day

Site

ModDB Profile

Download Public Beta 3.6

Forums at PPM

Forums at Revora


Reign Of Steel

ModDB Profile

Download Reign Of Steel

Forum


Star Strike

Site

Download 0.6x TB2

Forum


Beowulf's Rules

Site And Download

ModDB Profile (RA2)

ModDB Profile (YR)

Forum


C&C Rewire

ModDB Profile

Download

Forum


CnC: Final War

Download Mod

Forum


EASB Hour

ModDB Profile

Download EASB Hour Alpha

Forum


Zombie Mod

Site

Download 0.2 Public Alpha


VenomRage

Forum


Cold War

Forum


Red Alert 1.5

About

Forum


Red Alert X

Forum


YR: The Generals

Forum


Echilon: The War for Terra Nova

Forum


Eternal Armageddon

Forum


Colony Wars

Download Public Beta 1

Forum


Tiberian Dawn: Renegade

Forum


Generals Projects

Invasion Confirmed

Site

Images

ModDB Profile

Download Mod

Forum


Frontline Chaos

ModDB Profile

Forum


Tiberium Wars Projects

Tiberium Essence

Images

ModDB Profile

Download Mod

Forum


Crossfire

ModDB Profile

Download Demo

Forum


Red Alert 3 Projects

The War Factory

ModDB Profile

Forum


Other Projects

C&C Meets Star Wars

Site


Wintermaul Wars X

Download 0.84X

Download 0.85X Beta

Forum


Tiberian Sun


Red Alert 2


Generals

Forums

Editing

Mapping

Tutorials


Map Archive

View All Maps

Submit A Map


Zero Hour Screenshots

USA Campaign

China Campaign

GLA Campaign: Part 1

GLA Campaign: Part 2

Miscelanous Info


Starting Guides

Newbie Guide in Modding

Working with .BIG Files


Graphics Tutorials

Adding new Cameos

Modelling Tutorial

Working with RenX

Finding Renegade Models


INI Editing Tutorials

Adding a New Unit

Adding Starting Units

Adding Playable Factions

Adding Buttons

Upgrades #1

Upgrades #2

Unlockable Units w/ Gen. Points

Nanocores and MCVs

Teleporting & Jumping Units

Editing the AI


Misc. Tutorials

Playing Custom Maps

Adding Ingame Text


Download

Zero Hour Ini Files


Tiberium Wars


Red Alert 3


Tiberian Twilight

News Tracker
Select a topic:  


Headlines


May 22, 2013 16:14 Banshee
Cartographer's Call Competition III resu...
May 22, 2013 06:13 Banshee
Miicrotransactions and Modding
May 21, 2013 15:52 Banshee
Cartographer's Call Competition III stat...
May 20, 2013 04:34 Banshee
New Tiberian Sun: Reborn trailer.
May 17, 2013 01:19 Banshee
Today's blockbuster: C&C Legos: Seas...
May 14, 2013 23:54 Banshee
PPM Hosted Mod News (covering early may)
May 14, 2013 17:43 Banshee
Reminder: Cartographer's Call Competitio...
May 14, 2013 17:36 Banshee
OpenRA Release 20130514 is ready!

Featured Mod

Featured Content


Script Types (ai.ini)
August 09, 2003 - 16:32


Quote:
Tutorial Name: Adding New Script Types
Made by: Banshee
Difficulty: Moderate

Extra Info:

The whole veracity of the information below cannot be guaranteed. I am unable to test everything, however, most of info over there comes from Final Alert 2, Deezire's Editing Guide and also from testing and comparison between script types. This tutorial was originally written to the old Intel Website (from PPM) and to Entertainment Explosion. Since EE is no more, it has been placed here in PPM. Note that it was also originally designed for TS and Red Alert 2, but when it came for EE, it become TS only. If you wanna post this tutorial anywhere, please ask me thorugh email ( bansheeppm@hotmail.com ).



:: Adding New Script Types ::


Script Types are the way AI behaves when attacks. What does it target for? Will the units deploy? And other stuff.

To make new Script Types, you need to open your ai.ini if you don`t have Firestorm or your aifs.ini if you have Firestorm and go to the ScriptTypes List and write your new script type:

[ScriptTypes]
XX=SCRIPT1



XX is an unused number for the script type and SCRIPT1 is the internal name of your script type.

Then you have to decide what AI will do now. There are some codes that you can use, but it will be something like this:

[SCRIPT1]
Name=My new script type.
W=X,Y



Name can be anything....W is the number that indicates the number of behaviours. (Begins with 0 and works like the number in these lists) X is the type of the act and Y is the value of the type.

X can be:

0 = Attack a target - In this case Y will be:

1 = Go to the enemy base (Required if you want AI to attack someone, but it isn`t used for APC rushes).
2 = Attack air units.
3 = Attack harvester.
4 = Attack infantry.
5 = Attack vehicles.
6 = Attack Factories. (Includes Construction Yard)
7 = Attack Base Defense.
8 = Attack Base Threats (Very usefull for your base defense team)
9 = Attack Power Facilities

1 = Attack a waypoint. In this case Y is the number of the waypoint. It can be used to make units infiltrates in buildings too. Only use it in maps.

2 = Cyborg members of the team will go berzerk. Y must be 0.

3 = AI team will move to a waypoint. Y will be the number of the waypoint. Only use it in maps.

4 = Orders the team to move to a specific cell on the map. Y will be the cell...

5 = With this, AI will guard area for an specified amount of time. Y is the time ticks. 1 time tick = 6 seconds.

6 = This is a cool feature. It makes AI return to the line of the script that you want. I.e:

[Banshee]
0=0,1
1=11,14
2=6,0
3=49,0


Notice that when AI read the line 2, it will go back to the line 0. It`s good for big scripts.

7 = Player wins. Y must be 0.

8 = Unload transport. Infantry will leave any kind of APC. I`m not sure if it works with vehicles. Y can be:

0 = Keep transports, keep units.
1 = Keep transports, lose units.
2 = Lose transports, keep units.
3 = Lose transports, lose units.


It`s recommended to use 2.

9 = Set units to deploy. Y must be 0.

10 = AI team will follow the nearest friendly unit.

11 = Assing the team into a mission. Mission is Y that can be:

0 = Sleep. (Unit sits still and plays dead).
1 = Attack (using threat rate logic).
2 = Move.
3 = QMove (special move to destination after other queued moves occur).
4 = Retreat (unit leave away, probably returns home).
5 = Guard. (Sit around and engage any enemy that wanders within weapon range.).
6 = Sticky. (Same to guard mode, but the unit doesn`t move).
7 = Enter (in a building or transport).
8 = Capture building (uses engineer`s logic).
9 = Harvest. (Harvesters will only take near tiberium).
10 = Area Guard. (Great for base defense).
11 = Return (Unused in Tiberian Sun).
12 = Stop (stop atacking or moving at th first oportunity).
13 = Ambush (Unused in Tiberian Sun).
14 = Hunt (AI will automatically search and kill every enemy unit).
15 = Unload (when leave transports like APC, Dropship, etc...).
16 = Sabotage (places a C4 in a building and leaves exploding it).
17 = Construction (buildings use this after their
placement. Don`t use it in ai.ini, because it just deal with buildings).
18 = Selling (buildings use this after being sold).
19 = Repair (service depot use this behaviour to repair units).
20 = Rescue (special team override mission. Use it in maps).
21 = Missile (special Missile Silo animation. Do not use it in ai.ini).
22 = Harmless (Unit doesn't fire and is not considered a threat).
23 = Open (animation that happens when a gate opens or close to allow passage).
24 = Patrol (Patrol a series of waypoints).

Note: You can edit these behaviour in your rules.ini.

12 = Set global. Global is a variable that serves to make AI understand that the thing X happened. You can enable other triggers after a Global value is set. Y is the variable and can have any name you want.

13 = Team members will have their idle animation. Y must be 0.

14 = Load troops on transports like APCs... Y must be 0.

15 = Was related to spy, but even Westwood says that it's obsolette. So, don`t use it.

16 = Patrol to waypoint. Y is the number of the waypoint. Since you don`t know the number of the waypoint, because maps are different, it isn`t good to add it in ai.ini or aifs.ini, but if you make maps, it will be very good for you...

17 = Change script. This makes the AI team to follow another script. Y will be the internal name of this script.

18 = Change team. Causes the team to switch team-types. Y is the new team-type.

19 = All members of the team will panic. Y must be 0.

20 = Team members will switch sides. I.e.: With this script, a computer unit can be yours. Y is the house number of the new owner.

21 = Units will scatter. Y must be 0.

22 = Causes a unit to flee to a shrouded cell. It`s a weird function. Y must be 0.

23 = Player loses. Y must be 0.

24 = Play a speech from EVA, Cabal or even another user made speech...Y is the number of the speech.

25 = Play a sound that is in sound.ini (or sound01.ini). Y is the number of the sound.

26 = Play a movie. Y is the number of the movie set in your art.ini.

27 = Play a music. Y is the number of the music in theme.ini

28 = Reduces the ammount of Tiberium near team-members... Y is probably the ammount of tiberium...

29 = House will begin the auto-production process (AI behaviour in skirmish games). It will build base and units. Y should be 0.

30 = AI will sell its buildings and make all their units hunt the enemy. Y must be 0.

31 = Causes the member to self-destruct. Y must be 0.

32 = Ion Storm starts in a specified time that is Y.

33 = Causes Ion Storm to end. Y is 0.

34 = Center view on team. Y is the speed of this operation. It wasn`t really clear by Westwood.

35 = Reshroud map. Y must be 0.

36 = Reveal map. Y must be 0.

37 = Delete team-members. Y should be 0.

38 = Clear Global. (More info about Global on 12)

39 = Set Local. Like Global, Local is also a variable. The difference is that Global can be used outside your maps and Local is just used in this map.

40 = Clear Local. (More info about Local on 39)

41 = Unpannic. Y must be 0.

42 = Force team members to face certain direction. According to Deezire, Y can be:

0 North
1 North East
2 East
3 South East
4 South
5 South West
6 West
7 North West



43 = This is basic for an APC attack. This code makes your APC wait until it`s fully loaded. Y must be 0.

44 = This makes trucks unloads crates. Y must be 0.

45 = This makes trucks to load crates. Y must be 0.

46 = Attack a specifically building. Y is the number of the building specificated in BuildingTypes list in rules.ini and firestrm.ini. Note: an engineer will infiltrate in the building, a unit with C4=yes will explode the building.

47 = Move into a specifically building. The unit will be adjacent to the building, but it will not enter on it. Y is the number of the building specificated in BuildingTypes list in rules.ini and firestrm.ini.

Here are some special values that are used for Y when X is 46 or 47:

131073 = Refineries
131074 = Power facilities
131076 = Upgrade Center
131084 = Construction Yard
131113 = Missilo Silo


Each number is a building, but I couldn`t find them out yet.

48 = The team will scout bases from players that hasn`t been scouted. Y should be 0.

49 = It will force the team to acomplish the previous objective until it successfully acomplish it, so it can move into the next instruction.

50 = Flashes a team for a period of time. Y is the period of time in time ticks (1 time tick = 6 seconds).

51 = Plays an animation over every member of the team. Y is the animation.

52 = Displays a talk bubble over the first unit of the team. Y can be:

1 = * - General Speech
2 = ? - Question
3 = ! - Shouting





Related Tutorials:

- Task Forces (For TS and RA2)
- Team Types (TS Only)
- AI Trigger Types (TS Only)
- AI Mini Guide (RA2 Only, but it shows a global use of all parts of ai.ini together which is also interesting for TS modders)

Posted by Banshee
Comments (0)



Project Perfect Mod Webmasters: Banshee & Sk8erkid

© Since 2000 AD Project Perfect Mod Group. All rights reserved.

Powered by phpBB © phpBB Group

"Oibles!" is a random trademark from Project Perfect Mod and Kane.
"He who loves the game, mods the game. He who mods the game, lives the game" is also a random trademark from Project Perfect Mod.
Website design by Muldrake

Login

Welcome guest.

Username:

Password:

auto login

I forgot my password

Register


Current Events

Cartographer's Call III

Contest Rules


Support Us
Donate to keep PPM online!

eXTReMe Tracker


Search

 

Advanced Search


PPM Network

Main Sites

Project Perfect Mod

PPM Mobile Site

PPM Forums

PPM Web SVN

PPM BugTracker


Resource Sites

EVA-251 Modding

CnC Relived

Zomba Production

MadHQ GFX Dump

MadHQ's Map Shack

Dead Dragon Mods (Archive)


Hosted Mod Sites

EVA-251 Modding

Twisted Insurrection

C&C Meets Star Wars

Novus Ordo

Invasion Confirmed

The Dawn Of The Tiberium Age


Affiliates


Community Links


Official C&C Links


Community

CNC Top 101


   

Community Rotator


Hosted by

Revora Creative Network