Jump to content

One click track replay with labels and externals enabled


Recommended Posts

Posted (edited)

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.

Posted (edited)

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

PC specs:

Windows 11 Home | Asus TUF Gaming B850-Plus WiFi | AMD Ryzen 7 9800X3D + LC 360 AIO | MSI RTX 5090 LC 360 AIO | 55" Samsung Odyssey Gen 2 | 64GB PC5-48000 DDR5 | 1TB M2 SSD for OS | 2TB M2 SSD for DCS | NZXT C1000 Gold ATX 3.1 1000W | TM Cougar Throttle, Floor Mounted MongoosT-50 Grip on TM Cougar board, MFG Crosswind, Track IR

Posted
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.

Posted
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. "

Posted (edited)

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]

Posted

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.

Posted
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.

Posted

Hi Case !

 

Thx for You time, I did everything like You said (double checked) but result is the same! I always get the same messages like before . . . :cry:

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

Posted

What is the full path to LockOn on your machine?

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

Posted

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.

Posted (edited)

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]

Posted

Ok, glad to hear it works.

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

Posted

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

 

 

Posted

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 :)

Posted (edited)
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

 

 

Posted

I actually made it myself by modifying case's script a bit and adding another file to restore the export.lua and launch the game instead of the usual shortcut... Testing in progress...

Posted
I actually made it myself by modifying case's script a bit and adding another file to restore the export.lua and launch the game instead of the usual shortcut... Testing in progress...

 

Hmm i see... yes that could work too!

 

Breakshot_Sig_2.jpg

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

 

 

Posted (edited)

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
Posted (edited)

Good Stuff Fahhh!

 

Gonna test it now...

 

EDIT: Just tested! Works a charm... This is great, now we got an easy one click solution for both unlocking tracks and auto ACMIs!

 

Two thumbs up....

Edited by Breakshot

 

Breakshot_Sig_2.jpg

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

 

 

Posted

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 :)

Posted
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

 

 

  • Recently Browsing   0 members

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