AIPEDIT, .fsm and .aip help

Get help for Map Making and Mission Editing here, or showcase your new work.

AIPEDIT, .fsm and .aip help

Postby Zeratul on Sun Feb 14, 2010 10:25 pm

WARNING: Editing AI files will probably ruin your online play ability (since everyone must have the same files). If you want to experiment either keep a backup OR BETTER: create a second dark reign folder and keep one in the original state so you can play online. I'll talk to Satz at some point to integrate a better AI in a new dark reign release (if everyone is okay with it) because the current AI is actually pretty shitty - Element.

This is recommended for beginner multiplayer mission makers. This also tells you how to make .fsm and how to get .aip into the game. (I might be wrong. Since I figured this out myself =P)

Making a mission:
1. Apply a tile set like: Jungle, Volcanic...
2. Think of what is the mission is like and how many players are allowed in the game.
3. Make the base for the players and edit the credits.
4. Apply the .fsm file for a computer player like player 5. (.fsm will be explained later) - optional
5. Make a base for the AI user. - Recommended for step 5
6. Apply terran for the mission. After that add trees, plants for more decorative purpose.
7. Sort out the teams. Eg: Player 1,2,3,4 = Team A Player 5 (AI) = Team B

Things you need to remember: The neutral player will always be on the mission if you add any units for it in the game. Civilian will run around in the map. Convoy will be like a stone and will not move unless it is attacked (Good for trapping certain units inside walls). Never give player 0 a team.
Editing units:
If you wish to edit units for the game. You will need unit.txt and weapon.txt if you want to change the weapon.
You will found them in the dark reign folder --> DARK --> DEFTXT --> and copy the .txt files you will need.
BEFORE YOU START: People often just copy a mission in the mission folder like dark star rpg. If you do that manually in explorer the mission will not load. You can only duplicate a mission by go to contruction kit, load the map you want to copy then click save as and type in the name you want.

After you created/ copied a mission. Paste the txt file that you will need to the mission folder.
Unit.txt - Contains data of all units in the expansion pack. (Will not work with mods)
build.txt - Contains data of all buildings in the expansion pack. (Will not work with mods and I don't teach you)
Weapon.txt - Contains data of all weapons in expansion pack. (Will not work with mods)

I am not sure of the others. But if you want you can test them yourselves. The 3 files I listed above is the ones that I recommend and the ones that I use. I do NOT know how to add extra units into the game. For now I only know how to edit units instead.

Edit a unit:
Find a unit you want to edit. (Press control + F to search for the unit you want)
Example: Tachyon Tank, below is my personal suggest you should use:

SetMenuImage(uitctmn0.spr) <--- You can change the sprite of this unit.
SetCost(1500 45) <--- 1500 = cost, 45 = time
UseEffects(Hover) <--- effect on the unit when it is moving
SetMoveMode(Hover) <--- The movement mode, doesn't interferr with the terran
SetStrength(410) <--- health of the unit
SetPhysics(10 12) <--- Mass and Speed
SetSeeingRange(9) <--- The seeing range of this unit
AddPart {
AddWeapon(TachyonCannon 1 0 ) <--- You can insert a weapon. Like TachyonCannon2 at next session
AddWeapon(SelfDestruct1 1 0) <-- the self destruct command for this unit.
Editing the weapon:
This part is easy. Tachyon Tank weapon editing:

;This weapon is used by the Imperium Tachyon Tank
; IMPTachyonTank itct
DefineWeapon(TachyonCannon) <--- You can copy and paste it and name it TachyonCannon2 if you want.
SetAttributes(1 8 0 20 2000) <-- min. range, max. range, maxammo (used for planes), firedelay (the less the faster) and energypershot
SetSpeed(35.0 0.0 1000.0 1)
SetOffense(E4 30 20)
CanShootGround() <--- Can shoot ground without a target
CanShootGroundUnit() < Can shoot a ground unit
CanShootFlyer() <--- by adding this then this weapon which applyed to a unit can shoot air unit. (Love this)
SetFireSound(gxtctwc0.wav 80)
CanShootBuilding() <--- You know what this means
I do not know what to do with the build.txt so I am not listing what to do.

.aip and .fsm files
This is a tricky part. But if you know what to do then it is quite easy. (My version)
Open up notepad then open this file
You should see a line which says:
SetAIPFile(Shad.aip) <--- Shad.aip is the name of the aip
By inserting a aip file to the folder and apply the name to the line above. That fsm will use the specified aip. If you can find it in the AIP folder in DARK folder. Then you do not need to add another .aip file

Go the DarkReign 1.7 folder and inside it you should see a exe called AIPEDIT open it up.
Load a .aip or you can make a new one.
Edit the values of it.
In the accounts tab you will find offensive or offensive inf/offensive veh whatever. You cannot open it up with the editor in some .aip file. So I suggest you use notepad to edit it. You can figure out what to do later on because I think you are not that stupid =P

I hope this helps :D

- Zeratul
Global Moderator
Posts: 52
Joined: Mon Dec 21, 2009 11:39 pm

Re: AIPEDIT, .fsm and .aip help

Postby Mesh on Fri Feb 19, 2010 12:36 am

Sounds like a player LeGioN has modified the core DR AI files and is randomly distributing the modifications to players online. So far he has claimed to have sent his modifications to you Zeratul but perhaps he has sent them to others.
My concern about modifying any core DR files is that it's a recipe for disaster for online play - even if the modifications makes things better. Without a global release patch (1.7.1 etc) that is sent to all people - many games will end up crashing randomly for no apparent reason. If you have changed the core files and want to play online - make sure you have a clean copy of DR for online gameplay.

Be advised that making DR better is in everyones interest, but please dont modify core DR files and distribute them online, definately NOT a good idea. Talk with Satz, Element, & Fooo about proposed adjustments and perhaps a global update can be released. Having multiple verions randomly distributed is a bad idea.

Also note, that missions accomplish what LeGioN is trying to do WITHOUT messing up core DR files. I made this suggestion, but either he doesnt understand, or doesn't care. He expressed to me that he doesn't have any interest in playing against other people - only AI which I found a bit strange. He did say he likes playing with people as allies against AI and hence why he has jumped on our server.

He offered me the modified files for DR and of course I declined because i know all too well what a disaster this creates with multiple versions out there.

Dont modify core DR files and distribute them please.

Development Team
Posts: 18
Joined: Fri Feb 20, 2009 8:28 pm
Location: Minnesota, USA

Re: AIPEDIT, .fsm and .aip help

Postby Fooooo on Sat Feb 20, 2010 2:53 pm

Yes I agree with mesh here.

Anything he wants to accomplish thru changing units/buildings etc can all be done within the maps instead of changing the default txt's, which, as mesh pointed out, will just cause the games to not launch at all.

If you speak to him again Zera, try to point out that he can make maps and add his new stuff to them instead of changing the original files, which is easier for everyone.

Anyone who has downloaded his changed unit files or whatever id advise to remove or keep seperate somewhere so someone can help him out adding them to a map instead, dont overwrite/add anything into the Deftxt or Deftxtex Directorys.
Development Team
Posts: 62
Joined: Mon Jan 19, 2009 10:19 pm

Re: AIPEDIT, .fsm and .aip help

Postby Zeratul on Tue Mar 02, 2010 2:49 am

My concern is not to change the aip file. This topic are just to CREATE aip and fsm files for missions. Not to change the original one.

EDIT*: I mean putting a newly created aip file into the mission folder. Then set the fsm to load that specified aip file.
Global Moderator
Posts: 52
Joined: Mon Dec 21, 2009 11:39 pm

Re: AIPEDIT, .fsm and .aip help

Postby Xan on Wed Mar 03, 2010 3:19 am

Thanks for your effort, I hope this can help other people.

Reading the included aip and fsm docs are crucial for mission editing. Making missions is fun, but also some work if you really want to let the AI react as you want it to ;)

But to avoid crashes you should also take care of the following lines:
SetRequirements {
SetType(10) -> The unit ID, duplicates will force the game to crash!
SetPrereqs(10004) -> Prerequisite Blog ID
SetMaker(10004 10005) -> Blogs which can build
SetEquivalence(3) -> Equivalent unit ID (for AIP)
SetTechLevel(40) - > Techlevel

The most important functions are explained in the upper region (the not compiled lines with a semicolon) of any definitiontextfile (units, build, weapons, etc.) and help a lot. Making tanks which can shoot everything with the skyfortress weapon with no recharge time and build costs of 1 credit is funny, but can anoy your opponents in custom maps when played online... Such changes should therefor only be made on Single Player missions ;)

That it`s not good to alter the original units.txt file (they are also everytime overwritten with the corresponding files of the selected starting version if you use a batchfile of v1.7) has been already discussed.
Development Team
Posts: 120
Joined: Wed Dec 17, 2008 4:46 am
Location: Salzburg, Austria

Re: AIPEDIT, .fsm and .aip help

Postby Zeratul on Thu Mar 04, 2010 1:42 am

ok thanks Xan. :D
Global Moderator
Posts: 52
Joined: Mon Dec 21, 2009 11:39 pm

Re: AIPEDIT, .fsm and .aip help

Postby Fooooo on Thu Mar 04, 2010 2:03 am

Zeratul wrote:My concern is not to change the aip file. This topic are just to CREATE aip and fsm files for missions. Not to change the original one.

EDIT*: I mean putting a newly created aip file into the mission folder. Then set the fsm to load that specified aip file.

Oh I wasnt referring to your topic or the post in general zera , it was more in collusion with mesh as to one member changing the core files and trying to pass them out (which as far as i know, he thought that was how you did it)

I guess it should have really been a topic of its own as its really just a notice/warning about not to change core files but to do it within the map itself. :)
Development Team
Posts: 62
Joined: Mon Jan 19, 2009 10:19 pm

Re: AIPEDIT, .fsm and .aip help

Postby XenPhaseTank on Mon Aug 11, 2014 6:31 pm

Does anyone know how exactly this works? I can't figure out what some lines mean.

efineEffectType(Wheel 100 2)
SetEffect(0 -1 0 6)
SetEffect(1 -1 100 6)
SetEffect(2 -1 100 6)
SetEffect(3 -1 100 6)
SetEffect(4 -1 25 6)
SetEffect(5 -1 25 6)
SetEffect(6 -1 25 6)
SetEffect(7 -1 25 6)
SetEffect(8 -1 200 6)
SetEffect(9 -1 200 6)
SetEffect(10 -1 100 6)
SetEffect(11 -1 100 6)
SetEffect(12 -1 100 6)
SetEffect(13 -1 100 6)
SetEffect(14 -1 100 6)
SetEffect(15 -1 100 6)

; special effects

SetEffect(16 0 0 0)
SetEffect(16 1 0 2)
SetEffect(16 2 100 2)
SetEffect(16 3 0 0)
SetEffect(16 4 0 0)
SetEffect(16 5 25 6)
SetEffect(16 6 50 2)
SetEffect(16 7 0 0)

Dark Reign Player
Posts: 42
Joined: Sun Dec 22, 2013 11:56 am

Return to Map Making / Mission Editing

Who is online

Users browsing this forum: No registered users and 1 guest