Warfare 1 - Editing Guide
License
ArmA - Warfare MP Mission
Copyright © 2008 Bohemia Interactive a.s. All rights reserved. Unauthorized use is strictly prohibited.
For more information about the ArmA Warfare mission visit the Warfare forum (dead link).
This archive contains sample models, configs and model configs to be used in BI Editing Tools to create custom models for ArmA.
To distribute or modify or use the ArmA Sample Models in any way, you must agree to the following license:
THE LICENSE
1) Bohemia Interactive grants to you a personal, nonexclusive License to open, modify and distribute the ArmA Warfare MP mission content for the purpose of designing, developing, testing, and producing non-commercial game content for PC game ArmA and its sequels or expansion packs.
2) You acknowledge and agree that you will not commercially exploit any game content you may created using the data without Bohemia Interactive prior written permission.
3) Bohemia Interactive doesn't give you permission to exploit ArmA Warfare MP mission content in any other way, especially not to convert them for use in any other game or engine than ArmA or its sequels and expansion.
4) If you create and distribute a work based on the ArmA Warfare MP mission content you must license it under this License to anyone who will be using it. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
Intro
Warfare has been designed to be a totally open-ended mission in far more aspects than its gameplay. The core logic of capturing territory and acquiring new equipment can be applied to any location or era in human warfare - or rabbit warfare, if your mod is based on Watership Down rather than Black Hawk Down. This document will provide you with some of the main outlines of how the Warfare mission has been structured on a technical level, allowing you to easily exchange M16s for maces or Sahrani for Sandleford. |
Folders and names
When you want to modify the Warfare mission, the first things you require are the mission files. These can be acquired by manually unpacking the Warfare mission files. Locate the WarfareV11.SaraLite.pbo and Warfare32V11.SaraLite.pbo files in you ArmA\MPMissions folder and use a PBO extract application like CPBO to unpack the PBO contents. One new folder will be created for each mission. There's the regular 16 player WarfareV11.SaraLite and the 32 player Warfare32V11.SaraLite. These two mission folders only differ in their mission.sqm files, so changes made to any of the other scripts can directly be copied over to the other mission. If you want to edit either of these missions in the Mission Editor, it is advised to copy WarfareV11.SaraLite and/or Warfare32V11.SaraLite to your My Documents\ArmA\Profile\Missions folder. When you want to test your changes in multiplayer, simply copy the mission(s) back over to your ArmA\MPMissions folder and give the mission folder a identifiable new name to display it in your server mission list. Naming will also be important when trying to keep an overview of all community made modifications out there, so here's a short description of what to rename and where.
Once your Warfare mission folder is properly set up and renamed, you can again create a PBO out of it at any point using the same PBO application as you used for unpacking. Other people can now play your mission by placing this PBO in their ArmA\MPMissions folder. Overall mission structureTo ensure a clear overview of who runs which scripts at all times, the mission is split up into four main elements:
Each of the three main folders contain Init and a Functions folders, handling initialisation of the local gameplay scripts and their function processes respectively. If you are relatively new to scripting or have no desire to radically change any core game play mechanics, it is best to leave the Functions folder untouched for now. Certain files in the Init folder provide you with a lot of control over these function scripts by simply adjusting some very basic values. Similarly, the scripts in the Config folders (located in \Common and \Server) contain definitions for all weapons and vehicles used in the game, again allowing you to quickly edit such content with minimal knowledge of ArmA scripting. |
Common script structures
While you may not want to write them yourself, you could come across some seemingly complex lines of code in the scripts you want to edit. The following explanation should give you a basic overview of how this code is often composed, making it easier to interpret or even adjust them. Config file arrays – Scripts that define the troops, vehicles, weapons and buildings used in the game generally do so using arrays like this one:
Each of these lines is turned into a separate array entry, with subsequent classes being added to it. For example, the local variable _u contains the class name of this soldier. Generally this is the only entry you have to change to replace a soldier with a different variant. The next soldier to be defined in the script is an AT soldier, but this time the class name is listed as:
This means the local variable _u has now become ["USMCD_Soldier_R","USMCD_Soldier_AT"], an array. This is done for all the variables in each entry, resulting in an array for class names, one for unit prices, etc. You can now easily get all data for a specific unit type by refering to, for instance, position 2 in every one of these arrays. Dynamic variables – To prevent a lot of duplicate variable names for values that have slightly different variants, we can change part of the variable name like this:
This setup basically adds the value of _color in front of RabbitCount, allowing you to change the value of RedRabbitCount, BlueRabbitCount or GreenRabbitCount using just this one line of code. |
Editing default parameters
The first and easiest method of “modding” Warfare is the aforementioned use of init script files. To be more precise, the file Init_CommonConstants.sqs located in the Common\Init\ folder. In this file you will find a big list of variables, influencing things ranging from respawn times to AI team sizes. Each parameter is accompanied by a clear comment indicating its purpose, making it a rather safe environment in which to experiment with value changes. |
Modifying units
The second way of changing the face of the mission with rather little effort is by replacing default weapons, characters, vehicles and buildings with your own selection of add-ons. This can be done by replacing some of the default class names with the class names of the content you want to use in the mission instead. For example, exchanging Warfare's USMC infantry for the default ArmA US Army troops can be done as follows:
And you're done. It's really that simple, the only effort really being to locate all class names. So to make life even easier for you, here is a complete overview of the files where all the different soldier, weapon, vehicle and building properties are located. In these files you can adjust class names, unit costs, construction times and more. The following files contain soldier class properties that can be adjusted:
The following files contain vehicle class properties that can be adjusted:
The following files contain weapon class properties that can be adjusted:
The following files contain building class properties that can be adjusted:
|
Modifying teams
There are three types of teams to be found in Warfare. For the US and SLA there are the (player or AI controlled) regular combat teams and the (AI controlled) defense teams. The third type are the Resistance teams occupying neutral towns. The following list gives you an overview of where and how each of these teams can be modified:
|
Modifying the island
Obviously you'd much rather be fighting for strategic control over your own back yard than sunny Sahrani, so replacing Somato with the bicycle shed and Paraiso with your mom's flowerbed is a high priority modification. Assuming you've already recreated a fully functional map of your back yard, or just downloaded a nice alternative instead, converting Warfare to make use of it is again fairly easy. As described previously, moving the missions to your My Documents\ArmA\Profile\Missions folder allows you to open them in the ArmA mission editor. Once the mission has been loaded, you will find the following elements on the map:
To convert the Warfare mission over to a different island, you will first have to rename the mission folder to use the suffix of your new map. So for the Cold War Reloaded map Everon, the folder would change from WarfareV11.SaraLite into WarfareV11.Eden. After opening the renamed mission in the editor, you will only have to move the objects listed above to suitable locations, and replace the references to the old town names with the ones of the new island. Any other objects you find on the map are triggers and game logic objects that will function regardless of their placement. New playable characters, towns, camps and starting positions can all be added (or removed), as long as you ensure they are still named properly and where required call the correct scripts. The aforementioned list of map elements describes all required entries, but be sure to double-check your additions by comparing them to existing towns. |
Capture logic
Capturing town in Warfare is triggered by ground units standing within a certain range of an neutral or enemy town's depot building. If no enemy units are within the same range, the Supply Value of this town will start to deplete, declaring the town “captured” upon reaching zero. A higher number of friendly units around the depot and the number of camps occupied in that town, both act as multipliers of the capture speed.
The time it takes to capture a town, the distance one has to be from the depot to start this process, and the types of units that are allowed to do so, are all controlled in the \Server\Server_UpdateTown.sqs file. Several external factors are called to modify the capture process that takes place here:
Within the UpdateTown script, the #Update section constantly checks for the presence of enemy units within the defined TOWNCAPTURERANGE. If any units have been located and no defending troops are present, the script continues to the #TownOccupied section, determining the number of attacking units present and any possible modifiers to the capture rate, after which the Supply Value will start to drain accordingly. Upon reaching zero, the script will continue to the #Resistance/East/WestCapture section, depending on who now controls the town, broadcasting the change of ownership across the network. |
Respawn logic
One of the most influential game mechanics is the speed and location at which players and AI can respawn. The current logic is rather straightforward: you respawn in your team's main base, unless you get killed in a town where you control at least one camp. The latter scenario will bring up the respawn map interface, allowing you to select one of the nearby camps as a respawn location. The following elements are used to create the basic requirements for the default respawn behaviour:
While the mission is being played, several scripts track who is being killed and where. As shown above, much of the actual “respawn time” is somewhat faked, with the players looking at an interface while their characters are actually standing somewhere far away. This time is used by the following scripts to select a suitable respawn location:
Once a unit is ready to respawn back onto the battlefield, the following scripts ensure it will make a clean start, resetting all related tracking functions:
|
Evolving the editing guide
The info thus far should allow you to change a substantial portion of the Warfare mission. If you have already worked on specific scripts or functions, feel free to supplement this page with additional info or chapters. New features in upcoming official releases will also be described here, ensuring the documentation stays up to date. |