Home   Help Search Login Register  

Author Topic: Converting OFP missions to arma.  (Read 3100 times)

0 Members and 1 Guest are viewing this topic.

Offline Quagmire

  • Members
  • *
Converting OFP missions to arma.
« on: 31 May 2009, 05:09:23 »
Since the syntax between OFP and arma seemed, at face value at least, to be very similar, I thought I'd try my hand at converting an OFP mission to arma. The map object creation stuff transferred over fine (with some editing), the mission loads up in the editor fine, but I seem to be getting some other problems when I actually try to play the mission (I seem to prematurely win the mission a few seconds after starting), is there somewhere where I can find out how to "translate" OFP syntaxes into arma syntaxes?

Also, does anyone know if a conversion of McHale's mission "The Partisan: Persistent Campaign" from OFP to arma already exists? It'd save me the trouble (but I'd like to learn how to convert missions over anyway).

I did search for other threads on this topic and indeed, found some, but most of them are so old that all the links which people have given to go away and look at were dead.

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: Converting OFP missions to arma.
« Reply #1 on: 31 May 2009, 08:04:33 »
hello Quagmire  :)

Please check the OAC project:

http://community.bistudio.com/wiki/OAC:Project
http://oac.armaholic.eu/page/

Here you can read how to convert missions via regex with the tool powerGREP:
http://community.bistudio.com/wiki/OAC:HowToConvertMissionsAndShare

McHale's mission "The Partisan: Persistent Campaign" was converted,
yet not tweak yet. So may still contain errors.
You need to install git to access the dev repository to grab the version:
http://community.bistudio.com/wiki/OAC:HowToImproveTheCompatibilityAddon

Enjoy!

Offline Quagmire

  • Members
  • *
Re: Converting OFP missions to arma.
« Reply #2 on: 31 May 2009, 11:56:42 »
Ok, thanks for the links.

Are those OAC GREP files complete though, after I run them and look through the edited files, I notice that although most of the troops have been replaced with arma ones, there are still quite a few OFP ones left over. Also, I notice there are a lot of classnames like: "WGL_SoldierEB". What are all these "WGL" troops, are they from some sort of addon?

In one mission in particular, I replaced all the classes/weapons etc.. with ACE mod content prior to running the GREP files, so only the scripts and so on should have been altered. I still have the same problem of "winning" the mission pretty much instantly after starting, the only error I get has something to do with the visual fade in at the start of the mission though.

I looked through the OAC missions and couldn't find a conversion of Partisan campaign, is there somewhere I can download the converted version? Is that what this git thing is? I may have to wait until I have fast internet again.

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: Converting OFP missions to arma.
« Reply #3 on: 31 May 2009, 13:39:47 »
You always need to run the ofp_compatibility_addon.pbo along.

Get it here:
http://dev-heaven.net/projects/list_files/oac - ofp_compatibility_addon.7z

While the class inside the mission could be replaced,
doing it via addon is one instance and requires no per mission modification.
Even more tracing classes in scripts can be rather tricky.

WGL is from WGL5 mod. Its an optional replacement file for WGL missions.

Quote
I still have the same problem of "winning" the mission pretty much instantly
after starting, the only error I get has something to do with the visual fade in
at the start of the mission though.

Impossible to say what the issue is without looking at the mission.

Sent you the link to packed Partisan campaign via OFPEC PM.

Take note that this one is just a basic conversion without play-testing nor
tweaking done.
That said if you report the problems in the OAC issue tracker,
we will try to fix them.
OAC is currently being updated to make OFP and A1 missions playable in A2.  :D

Offline Quagmire

  • Members
  • *
Re: Converting OFP missions to arma.
« Reply #4 on: 31 May 2009, 15:13:55 »
Ok great, thanks for the link, now that I've got the compatibility addon it seems to work. I'll probably just play around with it for a while to see if there are any bugs. If things go well I might make an ACE version.

I'll be sure to report any bugs I find  :)

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: Converting OFP missions to arma.
« Reply #5 on: 31 May 2009, 16:29:43 »
There is also CWR for the most part its a one to one mission replacement with only a few tweaks.
Xbox Rocks

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: Converting OFP missions to arma.
« Reply #6 on: 31 May 2009, 18:12:59 »
And OAC is/was compatible to CWR.  ;) :good:

Offline Quagmire

  • Members
  • *
Re: Converting OFP missions to arma.
« Reply #7 on: 05 Jun 2009, 09:50:22 »
Ok, so I've "finished" making an ACE version, but I get an error which I think is preventing from getting new recruits at the start/end of each mission.



I think the line of code its referring to is in endMission.sqs (which occurs in each mission folder within the campaign). I think the problem will be somewhere in this paragraph...

Quote
_n = 0
_text = ""
_n = random 6
_n = _n - (_n mod 1)

?(random 100 < 15): _n = 0
_z = units playerGroup
_z = count _z
?(_z > 6): goto "next"

?(_n > 1): _text = format["%1 new recruits have joined you", _n - 1];
?(_n == 2): _text = format["%1 new recruit has joined you", _n - 1];


_q = 1
_pos = [(getpos playerx select 0) + 50, (getpos playerx select 1), 0]
~2

while {_q < _n} do {_xx = "Civilian" CreateUnit [_pos, PlayerGroup, "", 0, "Private"]; _q = _q + 1}

Anyone got any ideas what the problem is and how I can fix it?

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: Converting OFP missions to arma.
« Reply #8 on: 05 Jun 2009, 10:49:46 »
Where do you see a rating command in the code here.  ???

Offline Quagmire

  • Members
  • *
Re: Converting OFP missions to arma.
« Reply #9 on: 05 Jun 2009, 11:21:13 »
actually wait, I assumed that since I was getting that error and also not getting reinforcements, that the two problems must be related. It seems I might have two issues here. That line of text occurs in init.sqs and I'm not sure exactly what it handles...

Quote
?(rollcall >= 0):(_z select 0) loadStatus "p0"; _r = _r + (rating (_z select 0)); (_z select 0) addrating -(rating (_z select 0));
?(rollcall >= 1):(_z select 1) loadStatus "p1"; _r = _r + (rating (_z select 1)); (_z select 1) addrating -(rating (_z select 1));
?(rollcall >= 2):(_z select 2) loadStatus "p2"; _r = _r + (rating (_z select 2)); (_z select 2) addrating -(rating (_z select 2));
?(rollcall >= 3):(_z select 3) loadStatus "p3"; _r = _r + (rating (_z select 3)); (_z select 3) addrating -(rating (_z select 3));
?(rollcall >= 4):(_z select 4) loadStatus "p4"; _r = _r + (rating (_z select 4)); (_z select 4) addrating -(rating (_z select 4));
?(rollcall >= 5):(_z select 5) loadStatus "p5"; _r = _r + (rating (_z select 5)); (_z select 5) addrating -(rating (_z select 5));
?(rollcall >= 6):(_z select 6) loadStatus "p6"; _r = _r + (rating (_z select 6)); (_z select 6) addrating -(rating (_z select 6));
?(rollcall >= 7):(_z select 7) loadStatus "p7"; _r = _r + (rating (_z select 7)); (_z select 7) addrating -(rating (_z select 7));
?(rollcall >= 8):(_z select 8) loadStatus "p8"; _r = _r + (rating (_z select 8)); (_z select 8) addrating -(rating (_z select 8));
?(rollcall >= 9):(_z select 9) loadStatus "p9"; _r = _r + (rating (_z select 9)); (_z select 9) addrating -(rating (_z select 9));
?(rollcall >= 10):(_z select 10) loadStatus "p10"; _r = _r + (rating (_z select 10)); (_z select 10) addrating -(rating (_z select 10));
?(rollcall >= 11):(_z select 11) loadStatus "p11"; _r = _r + (rating (_z select 11)); (_z select 11) addrating -(rating (_z select 11));
?(rollcall >= 12):(_z select 12) loadStatus "p12"; _r = _r + (rating (_z select 12)); (_z select 12) addrating -(rating (_z select 12));

It looks like this code may be loading up the status of each squad member. I'm still pretty new at this, and most of this syntax is still like a foreign language to me, so I've got no idea what its complaining about.

Also, whenever I load one of the campaign missions in the editor, or play the mission, I get this error...

What does this mean exactly? Is it because I have references to vehicles which I don't have the addons for? I'm curious to know if this could have anything to do with the fact that the new recruits with each mission thing isn't working, I know that troops are classed as vehicles.

It might be worth noting that I left to start of my mission.sqm files like this...
Quote
   addOns[]=
   {

   };
i.e. I simply deleted the lines which specified required addons. Could that be causing this?

Edit: Actually never mind, I do get new recruits...its just that its based on chance and I'm unlucky it seems. So should I upload my ACE version and link it here? (the errors I'm getting don't seem to be effecting the actual gameplay)
« Last Edit: 05 Jun 2009, 13:23:42 by Quagmire »