Jump to content

One click track replay with labels and externals enabled


Case

Recommended Posts

Here is a method to make replaying tracks easier, using a single click to enable labels in the track, to enable external views in the track and to load and replay the track.

 

The method works by inserting a new options file with labels and externals enabled into the track, which is an ordinary zip file. Then FC2.0 is started with command line arguments to load and replay the track. The --nopause option in the batch file further minimizes user input.

 

Step 1: Install the batch, zip and options file

Download the attachment and extract it in the LockOn FC2.0 root directory. Most likely this is C:\Program Files\Eagle Dynamics\LockOn Flaming Cliffs 2.0.

 

The rar archive contains 3 files:

  1. replay.bat: Batch file that changes the track and loads FC2.0 to replay it
  2. replay\zip.exe: DOS zip utility to add the options file to the track (see here)
  3. replay\options: options file with labels and externals enabled

 

Step 2: Check the batch file

The replay.bat needs to know the location of LockOn FC2.0. If it is not C:\Program Files\Eagle Dynamics\LockOn Flaming Cliffs 2.0, adapt the three lines in the replay.bat file (see the example below) to the correct location.

@start /d "C:\Program Files\Eagle Dynamics\LockOn Flaming Cliffs 2\replay" zip -d %1 Config\Export\Config.lua
@start /d "C:\Program Files\Eagle Dynamics\LockOn Flaming Cliffs 2\replay" zip %1 options
@start /d "C:\Program Files\Eagle Dynamics\LockOn Flaming Cliffs 2" bin\x86\stable\simulator.exe --nopause %1

 

Step 3: Associate replay.bat with FC2.0 tracks

To open a track with replay.bat, right click on a FC2.0 track and select "Open with", then select "Choose program...", then click "Browse..." and select the replay.bat batch file.

This associates the .trk extension with replay.bat. For more information about the "Open with" feature, check here.

 

If you have any questions or problems getting this to work, let me know.

replay.rar


Edited by Case
Adapted the script to remove config/export/config.lua
  • Like 4

There are only 10 types of people in the world: Those who understand binary, and those who don't.

Link to comment
Share on other sites

Very nice Case... STICKY this post!!!

 

Just noticed one thing... when you reply the track like this it created a new TRK file of this TRK

 

From client-20100425-223316.miz.trk

Created client-20100425-223316.miz.trk.trk


Edited by Kuky

No longer active in DCS...

Link to comment
Share on other sites

Just noticed one thing... when you reply the track like this it created a new TRK file of this TRK
Yeah, I noticed this too, but it appears LockOn does this, also when you replay a track using the normal replay button.

There are only 10 types of people in the world: Those who understand binary, and those who don't.

Link to comment
Share on other sites

th_Clip_3.jpgth_Clip_3.jpga%3E

Right-click "replay.bat", click edit, and enter the correct path to your FC2 installation.

i7 7700K | 32GB RAM | GTX 1080Ti | Rift CV1 | TM Warthog | Win 10

 

"There will always be people with a false sense of entitlement.

You can want it, you can ask for it, but you don't automatically deserve it. "

Link to comment
Share on other sites

Man You are fast! I tray to set up the picture...but any way... How to set up the path? My FC 2 is in Program files x86. . .

 

I also get this message :

th_Clip_2.jpg"]


Edited by Lulac

[sIGPIC]D:\avioni\razno\potpis 1 orao.jpg[/sIGPIC]

Link to comment
Share on other sites

From the RAR archive you should have extracted a zip.exe located in the replay folder. So, for example, if your LockOn root is located at C:\Program Files\Eagle Dynamics\LockOn Flaming Cliffs 2\ then you should have the files on the following places:

C:\Program Files\Eagle Dynamics\LockOn Flaming Cliffs 2\replay.bat

C:\Program Files\Eagle Dynamics\LockOn Flaming Cliffs 2\replay\zip.exe

C:\Program Files\Eagle Dynamics\LockOn Flaming Cliffs 2\replay\options

 

The replay.bat file should then have the following lines:

@start /d "C:\Program Files\Eagle Dynamics\LockOn Flaming Cliffs 2\replay" zip %1 options

@start /d "C:\Program Files\Eagle Dynamics\LockOn Flaming Cliffs 2" bin\x86\stable\simulator.exe --nopause %1

 

So is zip.exe located in the replay folder?

There are only 10 types of people in the world: Those who understand binary, and those who don't.

Link to comment
Share on other sites

Man You are fast! I tray to set up the picture...but any way... How to set up the path? My FC 2 is in Program files x86. . .

In that case the replay.bat should have the following lines:

@start /d "C:\Program Files x86\Eagle Dynamics\LockOn Flaming Cliffs 2\replay" zip %1 options

@start /d "C:\Program Files x86\Eagle Dynamics\LockOn Flaming Cliffs 2" bin\x86\stable\simulator.exe --nopause %1

There are only 10 types of people in the world: Those who understand binary, and those who don't.

Link to comment
Share on other sites

Hi Lulac,

 

Here's some screenshots to explain where what should go:

ss1.png

 

On the top underlined in red is the full path to the LockOn root directory. This is the path you should use in replay.bat.

 

The two crooked arrows show where the replay.bat file should go, and where the replay folder should go, they both should be placed in the LockOn root directory.

 

The replay directory then contains the following files:

ss2.png

 

So if your full path is C:\Program Files (x86)\Eagle Dynamics\LockOn Flaming Cliffs 2 then replay.bat should have:

 

@start /d "C:\Program Files (x86)\Eagle Dynamics\LockOn Flaming Cliffs 2\replay" zip %1 options

@start /d "C:\Program Files (x86)\Eagle Dynamics\LockOn Flaming Cliffs 2" bin\x86\stable\simulator.exe --nopause %1

There are only 10 types of people in the world: Those who understand binary, and those who don't.

Link to comment
Share on other sites

CARAMBA!

 

Find the problem ! The problem was the braces () - . . . Program Files (x86) ! ! !

 

Thx again Case for Your time, appreciated !

 

S!


Edited by Lulac

[sIGPIC]D:\avioni\razno\potpis 1 orao.jpg[/sIGPIC]

Link to comment
Share on other sites

Case, would it also possible to make a 1 click "Replay with ACMI" option as well?

 

That way, we can fly without ACMI and not worry about failing IC... Then when done with the flight, we can just click on the replay and play the track + at the same time generating an ACMI... I guess the .bat file would simply have to write in a "dofile" command in export.lua, and then delete it once FC2 is closed...

 

Wacha think? I'd say this would be a great compromise and very efficient... :)

 

Breakshot_Sig_2.jpg

Tim "Breakshot" Mytrofanov | C.O. of 51 ПВО / 100 КИАП Regiments | twitch.tv/51breakshot

 

 

Link to comment
Share on other sites

Or if the IC is checking only the export.lua file in that folder, maybe keep a copy of the stock file and the one with tacview export enabled, so the .bat file would simply rename the files and play the track recording acmi. It seems easier to me than writing lines in a file through the command script that is .bat :)

Link to comment
Share on other sites

Or if the IC is checking only the export.lua file in that folder, maybe keep a copy of the stock file and the one with tacview export enabled, so the .bat file would simply rename the files and play the track recording acmi. It seems easier to me than writing lines in a file through the command script that is .bat :)

 

Yes, also an alternative... both would work equally the same... I guess its just a matter of what is easier to program... I suppose Case can shed light on this later...

 

Would be a great thing to have thats for sure! Im personally all for an easy "one click" solution to play the track and make an ACMI in one go... and it would make ICing export.lua not such a problem ACMI wise!


Edited by Breakshot

 

Breakshot_Sig_2.jpg

Tim "Breakshot" Mytrofanov | C.O. of 51 ПВО / 100 КИАП Regiments | twitch.tv/51breakshot

 

 

Link to comment
Share on other sites

Yep it works just fine. I hope Case won't be mad because of me tweaking and changing the script :)

 

What you should do is unrar the contents of the archive in the root folder of your game (it should be something like: "C:\Program Files\Eagle Dynamics\LockOn Flaming Cliffs 2") If it is something else, you'll need to edit the replay.bat.

 

Here is how you should do that - right click the Replay.bat file select Edit and wherever you see "C:\Program Files\Eagle Dynamics\LockOn Flaming Cliffs 2" replace it with the actual path of your game root folder.

 

How it works: First it copies a tacview export enabled copy of your export.lua file over the stock file. Then unlocks the views and starts playing the track. When finished playing the track, exit the game and the command prompt window will still be open. It will have displayed a message like this: "To restore the stock Export.lua when finished viewing the track hit any key..."

 

You just press any key and the original export.lua file will be restored from a backup copy and you will be able to pass IC checks. (I just tested with 104th and 51st...)

 

!And remember, ALWAYS make a backup copy of your installation! :)

replay2.rar


Edited by Fahhh
  • Like 1
Link to comment
Share on other sites

Happy to hear all is working well Breakshot! Credits should go to Case too, he made the main part, I just added a line or two :)

 

Of course, thats a given! GJ to both of you!

 

One question though, is it possible to make the bat file fully automated so you dont have to "hit any key" to restore the file after game is shut down... Id rather it do so automatically and then close down...

 

Breakshot_Sig_2.jpg

Tim "Breakshot" Mytrofanov | C.O. of 51 ПВО / 100 КИАП Regiments | twitch.tv/51breakshot

 

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...