Jump to content
Sign in to follow this  
Guest Freddy Wilhelmsen

Draft tutorial for editing default LWM and VTP landscape files

Recommended Posts

Guest jimkeir

Hi.I think most of this stuff is there:- The existing cells have the data removed and the length set to 0.- The new data is still used from the BGL provided by the developer.- The modified version of the original BGL stays in the same place as the original, and- The unaltered original is stored under SceneryBackup- Any subsequent installations are performed on the already-altered copy, *not* on the backed-up copy- All uninstallations are done using the backed-up copy, once the zap-count for a cell has reduced to (or below, just in case) zero.This means that the uninstall order isn't important, even if two modified areas directly overlap. As somebody pointed out though, simply disabling an area in the scenery manager won't re-apply changes.I've used Slarti to create two LOD5 areas so far, but on both I've ended up going over the boundary and modifying an adjacent area which sort of defeated the purpose :D Besides, recreating an entire LOD5 is usually overkill.LOD8 is less of a big deal; it's easy to disassemble the original cell and modify a little.I'm quite happy to create a tool to do these modifications. However, as Ian Malcolm said: they were so concerned with whether they *could* they didn't think about whether they *should*.Cheers,Jim

Share this post


Link to post
Share on other sites
Guest jimkeir

Hi.I've uploaded a preliminary version of this program here :http://www.jimkeir.co.uk/FlightSim/bglpatch.zipIt contains the exe and corresponding C source. It needs two files given on the command-line; the first is the new file (containing your edited scenery), the second is the destination file (i.e. the one that came with FS).It will:- Open the source and destination files- Check that they are the same type (i.e. LWM or VTP)- Create a backup under SceneryBackup if it doesn't exist- Remove the data for any overlapping cells from the destinationTo un-patch, give '/u' as the first parameter. So...C: >bglpatch my_new_place.bgl ScenerynamwSceneryHP912340.BGL... will backup HP912340.bgl to SceneryBackup and then patch the original.C: >bglpatch /u my_new_place.bgl ScenerynamwSceneryHP912340.BGL... will restore the missing data. In this case it will tell you that the file is intact, and the backup may be deleted. Note that 'intact' is not the same as 'identical'; the file structure is re-written and will be different.Right now it only looks for the FS9 home folder. If it can't find it, it should assume the current directory; in other words, it should work with any version including the CFS series as long as you change directory to the right place first.This is really only for your evaluation, not for use with users. The exe is a 'debug' version - much larger than a normal one and more likely to fail noisily if something goes wrong. There are also places where additional checks need to be put in. However, it seems to work OK on the files I've tested with.I only have FS2004 handy so I can't test with any of the other sims but since it only interprets the indexes, not the data, I think it should be OK with any version.Please note that the 'patched' files will crash LWMViewer 1.2 or older because of a bug in LWMViewer which I've fixed in the latest (beta version here : http://www.jimkeir.co.uk/FlightSim/LWMViewer1.3a.zip ).So, feel free to download and play. I strongly recommend that you test it with *copies of* your installed BGLs, even though it should make a backup first. Please let me know what you find; does it work, is it what you needed etc. This could also be used as the basis for a more complete solution; if somebody with some spare time and C experience wants to take it on and add a GUI, or maybe modify it as a plugin for an established installer like NSIS, feel free.Regards,Jim Keir.

Share this post


Link to post
Share on other sites
Guest Freddy Wilhelmsen

Hi all!Thanx alot Jim!, for your effort in creating this program!. I have a home made mesh, with one seperate LWM bgl and VTP bgl, covering 6 LOD8`s. Hopefully I will be able to replace the VTP lines and the LWMs with your tool ( have downloaded it, but not tried it yet 9(I am currently at work)).Will you provide a graphical version of this tool, ore are we stuck with a command line version ?Freddy

Share this post


Link to post
Share on other sites
Guest jimkeir

Hi.> Thanx alot Jim!, for your effort in creating this program!. Better see if it works first :)> Will you provide a graphical version of this tool, or are > we stuck with a command line version ?Well, I'd prefer not to spend too much time on this because I'm simply very busy with other projects. In other words, not too likely! Besides, what would you have in a GUI? The source file or files are preset by the designer and, until the basic process is proved to work for *all* the common versions of the sim, having a 'scan-and-patch' function is a potential disaster. There's not much left beyond an "Are you sure?" dialog.Cheers,Jim

Share this post


Link to post
Share on other sites
Guest Freddy Wilhelmsen

Hi jim!I totally follow you! . Cmd version is fine by me :).Trying this afternoon, will post results here ..Freddy

Share this post


Link to post
Share on other sites
Guest Freddy Wilhelmsen

Hi again JIM!Tried your bglpatc tool with my VTP and LWM blgs.. it compiles ok, but whe i try to load fsim in the area of my patched BGL file, i get unknow error trying to start FS, When I open my edited HP and HL file i notice all the LOD8s contaioning my data are empty... any idea =Freddy

Share this post


Link to post
Share on other sites
Guest jimkeir

Hi.OK, I'll double-check the loading goes OK. You're supposed to get empty areas in the edited versions, that's what it does! It clears the existing data so it doesn't affect anything else in the area.Cheers,Jim

Share this post


Link to post
Share on other sites
Guest jimkeir

Hi.I found a problem with VTPs - the table of texture names was not being copied correctly. I've fixed this and tested the output and it seems OK. As before, YMMV so please let me know either way - a success report is just as useful as a bug report.Also, I've corrected some obvious mistakes when opening files and made it look under the FlightSim folder for the destination file; this means you don't have to know where the user has FS installed. If you run:bglpatch my_new_place.bgl namwsceneryHL9123450.bglit will try to open the destination file first in the current folder, then under Scenery .OK, sorry about the obvious VTP bug. Missed it somehow. Anyway, I've uploaded the new version to the same place so feel free to give it another try. You'll need to replace any patched (and faulty) BGLs with the unpatched originals under SceneryBackup; un-patching them or re-patching them won't correct the texture-name problem.Cheers,Jim

Share this post


Link to post
Share on other sites
Guest jimkeir

Hi.OK, fixed the 403 download problem. Sorry!JK

Share this post


Link to post
Share on other sites
Guest Freddy Wilhelmsen

Hi Jim!oki,..will try the latest version this evening. Seems my BGL contained to little data anyway--Will report back here later.Freddy

Share this post


Link to post
Share on other sites
Guest bostar2004

Hi everyone:Holger could you repost your (draft) tutorial again please? I

Share this post


Link to post
Share on other sites
Guest Eric R

Hi Holger,Please send me the zip file on your tutorial. I talked briefly with Mr. Wacko while he tore my tickets at the Chaba. Six of my family were in Jasper for 17 days in June.My Jasper scenery project is not progressing well. Too much I don't understand. I tried making a few changes (lake, river, roads) near Jasper town and I couldn't make it work. Maybe your tutorial will help.Regards,Eric Rawsonericrawson@rawsonoptics.com

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...