CONTENTS:
First off, to explain this entry, SAFEEDIT, is a way to make certain changes in the game, cause other changes in the game. For instance, you could make one that if a player stepped into a certain region, his alliances with his ally would change to enemy! Or you could make it so that to win the mission, you had to infiltrate and steal a certain plan.
The difference between End Conditions and FSMs is that End Conditions should be used on players that could be either human or computer, while FSMs should be used on purely computer spots, as it stops anybody from picking that spot.
OVERLAY:
When you go into SafeEdit, you should have lots of blue text. Ignore this for the moment, it's code that, thankfully, you don't have to type in. There should also be 'state' in pink. Double clk on this and 'State Actions' in red, will come up. You have just created a 'State', which, is known to your computer as 1. Next time you clk on STATE, you will create 'state 2'. Why have multiple states? Different states are like different webpages on the internet. Different causes (criteria) that you or a timer makes in the game, lead to different 'states' which can lead to different effects caused by the CRITERIA, which can actually lead to different CRITERIA that you can make!
--You DblClk on STATE ACTIONS to bring up a list of things to do. These are the effects of the last cause, if this is state one, that cause is starting the game(unless another state loops back to it).Here is a list of all the options in STATE ACTION:
SetAlliances(Team0 Team1 Team2 Team3 Team4 Team5 Team6 Team7): This sets the alliance between the player that this endcondition or fsm is assigned to and each team. The team that player is should always be 2. The possible things to put there on each 'team' are 0(Endcondition team is enemies with this team) 1(Endcondition team is neutral with this team) and 2(Endcondition team is allies with this team). Each 'team', represents a player that is one above it. 'Team0' means PlayerOne and so on. Alliances don't go both ways, so if this endcondition was assigned to Player one (team0) and you made a change so that he would be allies with Player 2 (team1), Player two would still have Player one as an enemy, unless you made Player two an endcondition
as well.
Trigger, Release, and Give SpecialForces: explained in PART4
AdjustRegionPriority: only used in an fsm. makes a computer try and keep a certain amount of units in a region. Like this: Adjust Region Priority(RegionID /\ Priority: I normally leave this blank, but I think it means that if you have multiple priority regions the highest number comes first, second comes second, and so on /\ Minimum Forces that computer should keep in region /\ Max forces... /\
Set AIP file: used only in fsm, changes computer AI to AI of specified *.aip file
SetMessageFile: used only in ends, I've never used this, I think it works similar to the GameMsg.txt, explained in Part3
BonusCredits: gives team that endcondition is assigned to X credits where X is what's in the blank: BonusCredits(X)
TriggerMessage: Shows message on screen, explained in Part3
DefineCondition: Shows a list of CRITERIA(causes) when you click this, it displays (Next State 0 0 0 Filename) Next state is the state it will continue on to. If you are on state one and want it to go to state five when the criteria after this is true, put five where next state is. Ignore the 0 0 0. I think 'filename,' is the end or fsm file it takes you to after that criteria to go to the next state. If you leave it blank, it'll look for states from this end or fsm file.
CRITERIA:
Crit OR, AND, NOT, and ONCE: The things contained within the parenthysis are complete according to the crit. For ex. Crit OR means that you can complete any of the defined criteria to make the criteria true. AND means you have to complete all of them. NOT means that to be counted as complete, the criteria must be false. Such as CritNOT(InRegion(276)) would wait for all that teams units to be out of 276. I have no idea what CritONCE() is.
More or Less units then enemy: Percentage
Timer: I think this is just a timer in 'GAME_CYCLES' until something happens (I don't know how many GAME_CYCLES there is per gaming second)
TimerGame: I think this is the amount of time in GAME_CYCLES until that team cannot win the game.
StealPlan: Infiltrate and steal the plan of a building/unit and bring it back to base. (the
symbol of the unit is within the parenthyses. Find it in the units text. For
instance, an imperium unupgraded training facility is iu1
Hold/Harass Region: don't ask me, check the AIdoc.
Build/BeginBuilding Building in region: Building 'symbol' like in StealPlan, Region to build in, Amount of buildings to build.
Build Unit (Symbol, Amount) (there is no REGION)
MoveUnitsToRegion: (Move certain amount of units into region X. Put the units IDs (NOT
symbols) in.
Destroy Building/Thing/Unit: Destroy unit building or thing with ID. (I think THING is an overlay.
Collect Mineral/Water: self-explanatory. Mineral is Taelon
Kill enemy/team units/buildings: Self-Explanatory, percentage of DEFAULT, or beginning units.
KillAll: Kill everyone except neutral and allies
KillAllAndAllies: Kill everyone including allies (I'm not sure about neutrals)
DestroyBuilding/UnitType: Destroy all of certain Building/Unit Symbol that team controls(remember, TEAM is Team
symbol, Player one is 0.)
EnemyInRegion: When any enemy unit is in region...
InRegion: When EndconditionPlayer is in region...
TeamInRegion: When Defined Team is in region...
HaveCredits: When you have X or Greater credits...
PHEW! THAT'S IT!
This is even more complex then safeedit... if that's possible It can be used as a reference for the
symbols of the units/buildings. The files you'll probably use most are Units and Build.txt.
Pretty much, the way to do this, is look at what things do with certain units and use them on others. Buildings aren't so easy, as you can't create new names for them for some reason(see part3).
Here's what to do: Copy all the files you want to edit into the mission that you want to use them in. ONLY THEN should you end them
Here's A list of a few from Units.txt:
SetMaker(What building is this unit made by)
SetWeapon(Check weapons.txt for list of weapons and you can also change them.)
SetStrength (Hitpoints, health, armor, whatever you want to call it.)
CanVeteran(This unit can turn into what unit after it gains X exp. (I think if it kills a unit it gets one exp., and if it kills a building it gets 20)
CanBoomerang(No idea)
CanAlternate(Can turn into another unit (like S.C.A.R.A.B. and Gemini Tank))
Some from Build.txt:
SetMaker(What unit is this building made by)
SetWeapon(Weapon is acturely a unit)
SetHitPoints(Like STRENGTH for units)
SetBay(Location of Bay, I normally leave it at 2, 2)
CanMake(Can make units)
IsBridge(Can be built on water)
If you open the Mlstring.cfg file with wordpad, you can change the names of everything(although whenever I change building names, it ends up having a name of UNDEFINED!)
This files pretty simple. Everything starts with #define, then it goes to the code name of something, and then the shown name of something.
For Instance:
#define Construction_Rig "Construction Rig"
defines Construction_Rig as Construction Rig. With this you could call Construction_Rig a Tomato
Creating Game Messages is a little harder, but the same in the Mlstring.cfg file. It goes like this: #define code_name "message"
For instance, when used, #define Tomato "We're under attack by tons of
tomatoes sir!"
would show: We're under attack by tomatoes sir!
The hard part is, that you then have to copy GameMsg.txt over to your mission, go to the end, and type:
DefineMsg(MessageCode)
{
In here you can put extra stuff to come along, like sound. I think you always have to put this though:
GetMLString(0) ;You could put (1) as well, but I don't know exactly what it does.
}
You must save this and then "simply" go into SafeEdit and use the TriggerMessage command in which you put in the code_name.
This has to do with Give Special Forces in an endcondition or fsm.
First go into (mapname).scn using wordpad.
Next go down to the bottom and type:
DefineSpecialForces((Put an unused ID number here to identify the sf with) (Put the !Team! (Player1 is team 0) of the units within the special force.)
{
ID of Unit that will be in sf
ID of Unit that will be in sf...
}
Note: sfs won't move around the map unless attacked
Now, go to Safeedit and put GiveSpecialForces(sfID team(team to give to)) under STATE ACTIONS
Note: You can also do Release and TriggerSpecialForces, but I don't know what they do
In the (mapname).scn file, you can also put units on the map and take them back off. Plus you can do many other things, but unfortunately, I don't know how.
Making Briefing:
To make a briefing, you must create a *.brf in your mission folder. If it will not save as *.brf and tries to add .txt or something, save it, and then rename it back to .brf.
It works pretty simply: start with \1, this is the briefing(\2 and \3 would deal with victory and loss in the main missions). Put \n after every line of text to complete it. put \c directly before a line of capitals to tell the computer that they are capitals. Put more '\n's to skip lines.
For instance:
\1
\cMISSION BRIEFING:\n
We're under attack! We have reinforcements to the West! Go to them and bring them back to destroy the enemy!\n
Would Print:
MISSION BRIEFING:
We're under attack! We have reinforcements to the West! Go to them and bring them back to destroy the enemy!
This isn't easy. (none of it is), but it gets even harder on fully editing graphics files.
OK! Say you want to create a terrain, a sort of mix between Jungle, and Snow, How do you go about doing that?
Okay, go into your darkreign directory, and go to (your DR dir.)/dark/graphics/
Then, create a folder called 'wasteland'. Then go into graphics/Jungle, and copy Jungle.Pal into the 'Wasteland' directory. Then, go into graphics/snow and copy the .til file into the 'Wasteland' directory. Finally go into graphics/Barren and copy all the files into 'Wasteland' except the .til and .pal files. That should be Sprites.ftg (and SpriteEx.ftg if you have the expansion,) plus Pakman.cfg (and Pakmnex.cfg if you have the expansion). Not tooooo tough is it, well, theres more (groan).
Go to your (where you installed DR)/dark directory, and you'll find Pakman.cfg (and PakmnEx.cfg if you have the expansion). Enter the Pakman.cfg with notepad, and were it says about the terrain, enter: wasteland=$GAME\graphics\wasteland
Then, you need to save that, and change the names of the .til files and the .pal files in the Wasteland folder to Wasteland.pal and Wasteland.til. Then go into DR and go into construction kit. Cycle through the terrains and you will find Wasteland. I've been experimenting with other terrains, but Wasteland seems the most realistic. It's a muddy sortof terrain.
Okay, I'll admit it, my friend 'razor' acturely figured all that out, except edting the Pakman.cfg. He just overwrote Barren Terrain instead.
You can go through this procedure with any mix of things you like. The type of sprite file contains what sort of overlays will be in the terrain.
This is not hard, this is EXTREMELY HARD.
Okay, first off, before we get started, I've worked and worked on this, and none of the files work except one, the rest say 'cannot find dos4gw.exe'. Maybe your computer will find it though.
Okay, if you're still with me, put in your DR disk. (the basic one, not the expansion.) And go into the Pakutils folder (Whatever your CD-rom letter is)/install/data/dark/pakutils.
Then, copy the 'unpak.exe' to your graphics folder, and drag the 'Sprites.ftg' onto the unpak.exe.
Oh, by the way, you weren't expecting one file were you??! This unloads about 700 sprites onto your harddrive... directly under C:/.
To get at them easily, go into the start menu, click 'Find Files and Folders,' and put in *.spr. Then uncheck the 'include subfolders' checkbox. Select C:/ and let'er rip. It'll search just C:/ for any files ending in .spr.
Okay, now you've got a huge list. Select them all by drawing a huge box around them in the find menu, and do 'ctrl-x'. This'll 'Cut' the files, so you can 'paste' them somewhere else. I'd create a folder under dark/graphics called "sprites", for this. Go to "sprites", and do 'ctrl-v' to paste all the sprites into the "sprites" folder.
Okay, so now you've got them under (DR)/dark/graphics/sprites. Go into (CD-ROM)/install/data/dark/sprutils, and copy all the files over to your graphics folder.
Okay, here's where I leave off, I only know how to use one of these files. Drag a sprite onto the 'Showsprite.exe', and it'll open with a blank screen. Click Open and select a terrain pallete file (*.pal) and hit open. You'll now see the sprite of the unit/building/overlay/(terrain?). You can hit the up and down buttons to scroll through the animation.