User Tools

Site Tools


arma2:missions:porting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
arma2:missions:porting [2015-06-29 00:28]
snakeman added latest ofp to arma2 porting guides.
arma2:missions:porting [2015-07-05 23:26] (current)
snakeman added ofp to cwr2 porting and misc header.
Line 110: Line 110:
  
 This is how to hunt down missing classes: put mission in users\Missions dir, load it in Mission Editor. You get errors (or not), check [[arma2:​arma2.rpt|RPT]] for all errors. Fix errors and start again until you have no more errors. Easy. This is how to hunt down missing classes: put mission in users\Missions dir, load it in Mission Editor. You get errors (or not), check [[arma2:​arma2.rpt|RPT]] for all errors. Fix errors and start again until you have no more errors. Easy.
 +
 +
 +====== OFP to CWR2 Porting and Misc ======
 +
 +ArmA 2 Cold War Rearmed 2 (CWR2) modification. How to port OFP missions for CWR2.
 +
 +CWR2 Missing OFP object classes:
 +<​code>​
 +CampEastC
 +CampEmpty
 +Shed
 +ShedSmall
 +</​code>​
 +When you try to create these, you get the "​Cannot create non-ai vehicle <​classname>"​ error. However they are included in arma2 config, not sure why as they do not work(?)
 +
 +Descriptions of these models:\\
 +campeastc = east tent\\
 +campeasty = tent (enterable)\\
 +shed = Vehicle Enclosure\\
 +shedsmall = Small Enclosure
 +
 +Classes compatible, verified by Snake Man 06-23-15:\\
 +shed = Land_CamoNetB_NATO\\
 +shesmall = Land_fortified_nest_small
 +
 +OFP Soviet USSR red commie flag:
 +<code php>
 +// OFP soviet commie flag
 +this setflagtexture "​rus_vlajka.pac";​
 +</​code>​
 +
 +<code php>
 +// CWR2 soviet commie flag POLE object class name
 +cwr2_Flag_USSR
 +this setFlagTexture "​\cwr2\General\cwr2_flags\data\USSR.paa";​
 +</​code>​
 +
 +PMC Editing Wiki **wrong flag** replacement setup:\\
 +this setFlagTexture ""​rus_vlajka.pac"";​===this setFlagTexture ""​\ca\data\flag_rus_co.paa"";​\\
 +this setFlagTexture ""​usa_vlajka.pac"";​===this setFlagTexture ""​\ca\data\flag_usa_co.paa"";​
 +
 +Some odd mission uses: this setFlagTexture ""​\cwr2\General\cwr2_flags\data\rus_vlajka.pac""​
 +
 +**Event Scripts**
 +
 +exit.sqs is the old OFP old school script that is run when mission ends.\\
 +exit.sqf is the same for arma2, both the above and this works, but this is executed first if both exists in mission dir.
 +
 +Apparently exit.sqf script do not work from Scripts\ directory for some reason, so if your campaign for example stores these repetitive exit.sqf files in that dir, you need to modify it a bit.
 +
 +Place exit.sqf in all mission dirs but use that to call some generic mission ending exit script from Scripts\ dir.
 +
 +Yes you still have to dupe the exit.sqf in every dir, but at least it can be smaller than the full script you're executing from Scripts\ dir.
 +
 +**OFP setFuel 0 Trick**
 +
 +OFP helicopter reinformcents setup of putting helo + waypoints with zero fuel and then when reinforcements are called do setFuel 1; but it does not work anymore in arma2, if helo (vehicle) is out of fuel the crew and cargo jumps out. Also in .sqm its done by fuel=0
 +
 +Make new waypoint where the helo is located, with activation condition using variable or sync to switch trigger. This way the helo will not move or even start engines until the condition is met.
 +
 +If you want to add this waypoint manually in mission.sqm it is very tricky, be warned :)
 +
 +Make new waypoint with condition line '​myVar'​ to be true:
 +<code php>
 + class Item0
 + {
 + ! INSERT-HELO-POSITION-HERE !
 + expCond="​myVar";​
 + class Effects
 + {
 + };
 + showWP="​NEVER";​
 + };
 +</​code>​
 +Then you need to adjust the "​ItemX"​ classes according to the newly numbered order. When you're done that, adjust the items=X; value too. And finally remember to change the setFuel command to Myvar = true;
 +
 +**Helicopters Crashing to trees**
 +
 +Helicopters crashing into trees issue. This is actually known arma2 bug, when AI helicopter (gunship) is attacking enemies it usually does so steep and low attack run that it collides with trees if there are any nearby. ArmA 2 default helicopter flight altitude is about 47 meters, often times when attacking the helos come down as 30 meters. That is low enough to have them crash into trees.
 +
 +You can and should put flyInHeight 150; to the helicopters unless mission specifically requires something special AND there is no trees in flight path. However gunships do not respect this setting then they do attack runs, nothing you can do about it except pray that stupid AI wont crash into trees :(
 +
 +I know you don't want to hear this, but if you absolutely must destroy some enemy vehicles by AI helos, then its better to use aircrafts like A10 or SU25 instead. The AI aircraft attack code was fixed in arma2, but not helicopter code. Sucks, I know :(
 +
 +PMC arma2 standard flyinheight will be now 95m, its twice the amount of default arma2, should be nice average height.
 +
 +mission.sqm entry for 150m:
 +<code php>
 +init="​this flyInHeight 150;";
 +</​code>​
  
  
 ====== Class replacements ====== ====== Class replacements ======
  
-Here is rough and work in progress ​class replacement lists, these are by no means complete and might be totally incorrect too (also some ArmA class names might be mixed with OFP ones, but it doesn'​t matter). However you get long way by using these. If you use and further develop these lists, please let us know so we can update the lists.+Here is class replacement lists, these are by no means complete and might be totally incorrect too (also some ArmA class names might be mixed with OFP ones, but it doesn'​t matter). However you get long way by using these. If you use and further develop these lists, please let us know so we can update the lists.
  
 **OFP to ArmA 2** **OFP to ArmA 2**
arma2/missions/porting.1435537703.txt.gz ยท Last modified: 2015-06-29 00:28 (external edit)