Skip to content

JovanRakovic/PersistentAbrisManager

Repository files navigation

What is PersistentAbris

PersistentAbris is a solution to the problem of losing all your routes, additional info, nav data and options from the Abris of the Ka-50 when leaving a mission or server in DCS.

The solution to making all the Abris related data persist across missions is to modify the ABRIS.lua file, which is responsible for saving and loading said data, so that is saves all the data to a set of files which don't get deleted and read from them when loading the data. From testing, this does not appear to break the integrity check, so you should be able to fly on any server. All the information gets stored in the Saved Games DCS directory.

Note

Currently, if a mission has baked in abris data, your persistent files will not be loaded for that mission. I have tried a couple of ways of getting around this issue, but have yet to find a solution

With just the steps described above, you would have a single set of files containing all your routes, additional info and nav data and one file for options, which would accumulate quite a collection of information with enough time. Given that you would probably want to avoid having a massive amount of routes and possibly conflicting or inaccurate map elements loaded in at the same time, I also developed a manager app to work alongside the modified ABRIS.lua file. Keep in mind that you do not need the manager app for the persistent data to work, only to manage what you load and save in an easier fassion.

Installation

As said before, you will need to do two things to make PersistentAbris work: overwrite the ABRIS.lua file with the modified version and make a certain folder structure inside the SavedGames DCS directory.

There are two ways of doing this:

  1. Manually (Mod only installation, no manager app)
  2. Via the manager app (Recommended)

Manual method

  1. Download the modified ABRIS.lua and Options_example.lua files from the repository above
  2. Repalce the original ABRIS.lua file in [your dcs root directory]/Mods/aircraft/Ka-50_3/Cockpit/Scripts/Devices_specs/ with the downloaded one (feel free to save the original file somewhere)
  3. In the SavedGames DCS directory make a folder called PersistentAbris, inside it a folder called ABRIS, and inside it a folder called Database.
    You should end up with this folder structure inside the SavedGames DCS directory: PersistentAbris/ABRIS/Database
  4. Place the Options_example.lua inside the PersistentAbris folder.

  5. Those are the bare minimum steps to get PersistentAbris working, you should be able to save and load you data now.
    You can find information about saving and loading data in the How to use section below

PersistentAbrisManager method

  1. Download the lates release of the manager app (PersistentAbrisManager.zip)
  2. Unzip the downloaded archive directly into the SavedGames/DCS/ directory
  3. Open the PersistentAbris folder that was created after unziping and launch PersistentAbrisManager.exe
  4. To replace the ABRIS.lua file, we will focus on the bottom left section of the app titled: DCS root directory



    Press the Select Directory button.
    This will bring up a folder seletion interface. Simply navigate to the root directory of your DCS installation ( The folder you select will likely be called DCS World )
    After doing so, providing you selected the correct folder, the text box below the button should be populated with the full path to the folder in which ABRIS.lua is located.
    The full path won't fit inside the allocated display space, but if it is showing a path, then it is the correct one as the app checks if the path exists.



    If the path is valid, it will also be saved in a .txt file inside the PersistentAbris directory and it will be loaded from there on any future launches of the manager app
  5. Having slected the path, press the Replace ABRIS.lua button.
    It will create a copy of the ABRIS.lua file in the same directory it was found in (it will be renamed to ABRIS_old.lua) and copy the modified file in its place.

Note

The ABRIS_old.lua will not be overwritten if it already exists. If ED updates the ABRIS.lua file at some point, you will need to delete the ABRIS_old.lua to make sure it gets backed up when replacing the file again.

Updating the mod and app

If you are using only the modded ABRIS.lua file, you will need to replace it with the updated version (same with the Options_example.lua file)
If you are using the PersistentAbrisManager, you will need to download the new release and extract the zipped files directly in the SavedGames/DCS directory, the same way as in the installation process. All your data will remain saved, so be sure to allow the extraction process to overwrite any files it asks you to.

Important

It is likely that any DCS updates will revert the modded ABRIS.lua file back to the vanila version, so be sure to replace the file after every update

How to use

Saving routes, additional info and nav data

Important

To save any routes in game, you will first need to save and name them using the PLAN page of the Abris.

  1. Navigate to the MENU/CONTROL/DTB page of the abris.



  2. Press the SAVE button and use the rotary knob or the arrow buttons to navigate to the data you want to save.
    • Pressing SAVE on NAVIGATIONAL DATA will save navigation points and map objects and other navigation information
    • Pressing SAVE on ADDITIONAL INFO will save Point and Line objects entered by user
    • Pressing SAVE on ROUTES will save routes entered by user
The mentioned data will be stored into corresponding files inside the ABRIS/Database directory:
  • ROUTES.lua
  • ADDITIONAL.lua
  • NAVIGATION.lua

Important

Keep in mind - from testing it seems that the NAVIGATION.lua needs to go along with routes and additional info. Meaning, if you save either the routes or add. info, you need to save the navigatinal data along side them for them to work properly!

Note

The DTB page of the Abris has a use in vanila DCS as well, though not many people seem to know that. You can save all the mentioned data while in a mission or server, in the sense that when you die or respawn in that mission, the data doesn't get lost. It just doesn't provide the ability for that data to persist across missions, so reloading the mission or leaving the server would delete the data. The mod only builds on that system to make it persistant, which is why saving and loading of data can be done entierly in game.

Saving Abris options

Currently, there is no way to save Abris options in game, so you have to manually edit a Options.lua file to do so and place it inside the Database folder so it can be loaded in game.
If you followed the installation guide, you will have a Options_example.lua inside the PersistentAbris directory. You can copy it to the database folder and rename it to Options.lua

Loading data in game

The loading of the data is automatic.
When you spawn in a Ka-50, the data stored in the Database folder will be loaded into the Abris.
With that in mind, you can change the data you have loaded in your abris during a mission by moving the data you want into the Database folder and then respawning.

PersistentAbrisManager


We will analyse all aspects of the manager app, apart from the "DCS root directory" section, as it was covered in the installation process.

Working principle of the app

The manager is designed to allow you to easily make different collections of Abris data.
The data consists of the 4 files mentioned in the How to use section.
By moving those files in and out of the Database folder, they can be loaded in game or stored in a different directory for later use. All the app does is it creates collections which consist of the abris data files by way of making folders in the ABRIS directory and copying files between those folders and the Database folder.
The collections don't have to contain all 4 files, but as mentioned earlier, always save and load the navigation data along with the routes and/or additional info!

Collection name input field

The collection name field is used to indicate which collection you want to work with.
By typing the name of a collection that does not exist in this field, you will be able to create a collection with that name.
By typing the name of a collection that does exist, you will be able to modify it, load data from it, delete data from it or delete the collection itself.
Trying to type "Database" into the input field, the field will get cleared of all input as modifing the Database in that way would cause problems.

Database Files

This section consists of 4 check boxes which let you choose which files you want to manipulate.

Collection and DTB control buttons

This sections consists of 5 buttons used to manipulate the Database and the collections:
  • Create
    This button allows you to create a collection with the name inserted into the "Collection Name" field.
    To create a collection, it will copy files from the Database folder into a folder with the same name as the collection.
    The check boxes will determine which files get copied to the collection.

    In case that the name of a collection that already exists is input into the "Collection Name" field, the button will read "Update" instead of "Create".
    The functionality will remain identical, the press of the button will move selected files from the Database folder into the corresponding collection folder.
    Keep in mind that updating a collection with new files will override the files currently in it.

  • Delete
    This button allows you to delete files from collections, or to delete collections themselves.
    Choosing which collection to delete from is done via the "Collection Name" field. If the name entered into said field isn't a existing collection, nothing will happen upon clicking the button. In case that a collection has files in itself, the delete function will delete files from the collection.
    The check boxes determine which files get deleted.

    In case that the collection is empty, pressing the Delete button will delete the collection.
    The check boxes are irrelevant in this case

  • Load
    This button copies files from the selected collection into the Database folder.
    The check boxes determine which files get loaded.
    Any loaded files will overwrite the files in the Database folder, destroying any unsaved data.
    This button will do nothing if the selected database does not exist or is empty

  • Clear
    This button deletes files from the Database folder.
    The check boxes determine which files get deleted.

  • Refresh
    This button refreshes the Collections display on the right side of the app. Only needed if manualy editing the files or folder structure.

Collections display

This sections displays all the collections, along side the Database, and shows which files they contain within them.
  • R -> Routes
  • A -> Additional Info
  • N -> Navigation Data
  • O -> Options
A '+' indicates that the corresponding file exists and a '-' indicates that the file does not exist within the collection/database.
Double clicking on any of the collections within the display will copy their name to the "Collection Name" input field

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors