How to create a scenery add-on.xml


Vooraf: P3D4 maakt tijdens het installeren een standaard map aan in C:\Users\jouwnaam\Documents\Prepar3D v4 Add-ons\
De bedoeling is dat makers van programma’s een Xml-bestand aanleveren om de Add-on te activeren of te deactiveren. Dit Xml-bestand wordt geplaatst in de map …\Prepar3D v4 Add-ons\

Om bijvoorbeeld een scenery te activeren of te deactiveren als je die niet gebruikt, kan je gebruik maken van deze werkwijze en maak je geen gebruik van de Scenery Library.

Hoe maak je een XML-bestand dat in Prepar3D v4 gebruikt kan worden.

Dit is de structuur van het Xml-bestand om een scenery of een aantal in eenzelfde groep te activeren of te deactiveren. Het voordeel van het gebruik maken van een Add-On als bestand betekent dat een scenery die niet is geactiveerd ook niet wordt ingelezen in P3D4 en dus het opstarten versneld. Dit is de standaard structuur. Let op de kleuren die gebruikt zijn om aan te geven waar een statement begint en hoe dat eindigt.

[1] <SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
  [2] <AddOn.Description>NL2000V4 Airport Scenery</AddOn.Description>
  [3] <AddOn.Component>
    [4] <Name>Ameland Airport</Name>
    [5] <Category>Scenery</Category>
    [6] <Path>D:\Base\NL2000V4\nl2k_v4_EHAL\scenery</Path>
  [7] </AddOn.Component>
  [8] <AddOn.Component>
    [9] <Category>Texture</Category>
   [10] <Path>D:\Base\NL2000V4\nl2k_v4_EHAL\texture</Path>
   [11] <Type>GLOBAL</Type>
  [12] </AddOn.Component>
[13] </SimBase.Document>

Regel 1: Iedere Xml begint met <SimBase. Document en wordt afgesloten helemaal aan het einde van de Xml met </SimBase. Op regel 13

Regel 2: deze regel bevat de naam van de Add.On. Deze naam wordt straks zichtbaar in het Add-on menu van P3D4. <AddOn.Description> Merk op dat de inhoud altijd tussen het begin en het einde van het statement staat: <blabla> tekst tekst tekst </blabla>  (let op de “/”)

Regel 3:geeft het begin van de AddOn.Component aan
Regel 4: de naam van de component: Ameland Airport
Regel 5: Geeft de soort van de Component aan: Scenery
Regel 6: het pad waar de scenery is opgeslagen
Regel 7: afsluiting van de addOn.Component
Regel 8 t/m 12 herhaalt zich voor de texture die behoort bij Ameland Airport
Regel 13 is de afsluiting van de Xml

Opmerking: voor het pad van de scenery en texture (regel 6 en regel 10) moet je dus het pad aangeven zoals dat bij jou w in de pc is ingericht.

Zet de bovenstaande 13 regels in een txt bestand en sla dat op als addon.xml
Zet dit xml bestand vervolgens in een map die je noemt NL2000V4 Airports en zet deze map inclusief het xml bestand in de map C:\Users\jouwnaam\Documents\Prepar3D v4 Add-ons\
Klaar.

Start de sim … en je krijgt dit te zien … No …wacht rustig af.
Ga naar EHAL … alleen RWY09/27?
Ga dan nu naar Options > Add-ons en Enable de Title

Dit vraagt om een herstart van de sim.

Dit zie je in de Scenery Library: {Menubalk / World / Scenery Library}
De scenery wordt vanaf Prio 1 neergezet en gelocked … en zo heurt het …

Wil je meerdere scenery in dezelfde map?

Kopieer dan regel 2 t/m 12 en plak die voor regel 13 en pas de tekst en de paden aan.

Klik hier voor de xml voor alle airports van NL2000v4

Je moet alleen even de paden aanpassen aan jouw situatie. Doe dat met Notepad++

Source: http://www.prepar3d.com/SDKv4/LearningCenter.php


 

  1. Open de addon.xml
  2. Sleep in regel 7 het pad aan D:\Base\NL2000V4
  3. Druk op CTRL+F (Zoeken) en Kies tabblad Vervangen
  1. Het zoekargument is reeds ingevuld
  2. Zet nu in het vakje Vervangen door: jouw locatie van de NL2000v4 bestanden.
  3. Druk op op de knop Alle vervangen.
  4. Bewaar (CTRL+S)
  5. Klaar en controleer of de bestanden die genoemd zijn ook daadwerkelijk in jouw scenery database staan en het pad correspondeert (!).

 

 

 

Scenery Config Editor in practice


What is the Scenery Config Editor?
It’s a utility for editing both your FSX and Prepar3D scenery.cfg files. This software (Open source) is licensed under the GPL v2 with Classpath exception. You can find the source-code and latest releases of this software at: http://sourceforge.net/projects/fs-sceditor
Support, bug and feature request trackers can also be found there. New file are released at:
http://sourceforge.net/projects/fs-sceditor/files
Why is this better than using other editors?
There are multiple new additional features included in this program, including the ability to create groups, automatic detection of some errors, automatic fixing of other errors, abilities to add areas in bulk, drag-and-drop functionality… and many more. Further, it’s open source.
The purpose of the program.
This utility is designed to enable easier editing of your flightsim scenery configuration (.cfg) file. It was developed to allow the grouping of scenery areas to enable your flightsim to run with only the scenery areas you require for that particular flight. This will allow flightsim to allocate more resources to running the program by minimizing the amount of scenery enabled. It is hoped this will also improve loading times, but this has not been fully tested.
The marker system allows easier identification of scenery’s that have been installed incorrectly, and improves the functionality of any editing. We hope you find this handy program useful.
Source: Kev Smith BAW044

Manualhttp://fs-sceditor.sourceforge.net/index.html
User Guide in PDF: you will find an extended manual in pdf in the folder C:\Program Files\SceneryConfigEditor\Manual.pdf after installation


After installation:

  1. You wil find the program in Start (W10)
  2. Right mouse click SceneryConfigEditor v1.* to create a tile to Start  menu.
  3. Again … right mouse click SceneryConfigEditor v1.* and select  More | Open file location.
  4. There … C:\Users\yourname\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\SceneryConfigEditor\
    1. Right mouse click the  line to select Properties.
    2. On the tab Compatibility check the box Run as administrator and Apply.
    3. Done.
  5. Run the program together reading the User Manual up to page 11 … that’s where the new functionality begins …
  6. By default all scenery is place in Ungrouped (xx Areas).

How to rank the scenery?
Scenery should appear in a certain order as written in the scenery.cfg and located in C:\ProgramData\Lockheed Martin\Prepar3D v4\scenery.cfg.

Source: ORBX:
Everybody’s simulator setup is different, sometimes a heavily populated library can throw off an automatic insertion routine and leave users with scenery looking less than great. This article will show you the order in which the various scenery items should appear in your own scenery library.

First, some basics on the scenery library. Scenery is created in layers. These scenery layers are simply types of data and should not be equated to the layers in the scenery library. The layers within your scenery library are representing installed products, not basic data types. That said, each basic scenery layer type behaves differently within the simulator. Here is a rundown of how.

Terrain Mesh Data: The Simulator will ALWAYS use the most detailed terrain available to it, no matter where it is placed in your scenery library. If you have a 19 m (post spacing) terrain mesh product placed below a 38 m terrain mesh product in your scenery library, you will still see the 19 m mesh in the simulator. The only time the location of a mesh product matters is if you have 2 or more mesh products of the same post spacing. In this case, the one higher in your scenery library will be displayed.

Landclass Data: The landclass data that is placed in the higher position within the Scenery Library will be the one displayed by the simulator. It does not matter whether it is standard or vector landclass.

Vector Data: ALL vector data will be displayed within the simulator. The data that is highest in the scenery library list will be “on top”, but all data will be displayed. Of course this could look very messy in the simulator, so most vector based products include a special “exclusion layer” that removes any vector data from the simulator, below itself in the scenery library.

Textures & Autogen: This type of scenery update (FTX Global Base Pack) does not have an entry in the simulator scenery library. It is simply a straight swap of existing texture tiles. Autogen objects are part of those files. there is however an exception to this… PhotoReal areas will be placed in the simulator scenery library, but will be displayed within the simulator no matter the location. They will suppress any vector data and landclass data they cover.

Custom Scenery: This works much the same way as Vector data. All custom objects will be shown within the simulator, unless the previous version has been disabled/removed, or an exclusion is placed in the sim to suppress the old data. The objects higher in the simulator scenery library will be the ones “on top” in the simulator.


This brings us to the correct order of a properly configured Simulator Scenery Library, including showing the locations of FTX products in relation to each other, other 3rd party software and default items. This is the Scenery Config table to be:


Scenery Config Table [Click to enlarge]


How to create Groups in Scenery Config Editor (short: SCE)

  1. Before you start … backup your scenery.cfg as in C:\ProgramData\Lockheed Martin\Prepar3D v4\scenery.cfg (E.g. rename in yymmdd-scenery.cfg)
  2. Open SCE as administrator and go to the menu Edit > Preferences.
  3. Select your Flight Simulation Directory and press the button Prepar3D v4 Directory ( or anything else you got) and the Location of scenery.cfg file is shown (grayed out).
  4. Check the location … OK? Next …
  5. Check the box Follow the New scenery convention (read the manual page 15 again).
  6. This is how it looks … close with OK.
  7. Now open SCE in Group View … no groups at all  … right?
  8. In the Ungrouped ( nn Areas) first select all (hold SHIFT-key) the Default Base scenery 000 ./. 1107 areas and Add to group with that name.  (Look in the Scenery Config Table).
  9. Continue to group the other scenery lines with the group names as in the table as above.
  10. When Ungrouped is empty  … you’re done.
  11. Now … go to the List tab in SCE and move the scenery lines in numeric order starting from the bottom to the top.
  12. FTX will mandatory place FTX_VECTOR_AEC just above …\Scenery\BASE
  13. FTX will mandatory place all other FTX_VECTOR_* just above …\Scenery\1107
  14. Feel save to save? >> SCE > File > Save. Run the sim …