• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

P3D v4 XML dotted/dashed lines

Messages
27
Country
unitedstates
I’m kinda stumped here. I’ve programmed a custom waypoint system that works great with my HSI. My next step is to allow the user to input a sequence string (flight plans, airspace boundaries, etc). The aircraft I’m modelling for displays these sequence strings with dotted, solid, or dashed lines on the HSI. Does anyone have any idea how I can implement this?

My initial idea was to have long, thin BMPs of line styles with an accompanying mask BMP. Place one end of the line BMP at a waypoint, and make it face the next waypoint. Then, mask the line according to the distance between the waypoints. This works great until the distance between the waypoints is longer in pixels than the line BMP. You could get really complicated with dynamically adding lines but XML doesn’t seem flexible enough to do that.
 
Yeah I definitely should’ve been more clear about that! I have a waypoint system that is totally independent of the flightplan system. It’s just an array of multiple variables using XMLVARS. In certain tactical aircraft you can input them into “sequence strings” to display lines between them. For example, if waypoints 30 to 35 are Lat/Lon’s for a MOA boundary, you can make a sequence string for 30-31-32-33-34-35. The MFD should now display lines connecting all the waypoints on the HSI. I have 3 sequence string options on my MFD, and I want SEQ2 to display a dashed line, and SEQ3 to display a dotted line.
 
I figure it works about the same as the FLOT or threat rings that you can display on the HSI page in Falcon BMS.

Check Rob's reference document for the drawing capabilities of the GPS engine what you can and can't do:
http://www.robbiemcelrath.com/fs/guides/customdraw

- Edit:
Ah, Bob already gave you a link to that document in the other thread.
 
pdf wont open.
Just tried it. Download works and pdf opens.

@dobroDude: Using GPS module variables, you can easily create a flight plan using lat/lon pairs without going through the Flight Planner. The flight plan path will appear if you use the gps map and enable LayerFlightPlan.

You don't have to use the gps map as a base, however. With proper scaling, you can draw waypoint symbols and line segments on a MFD custom display.

Dotted or dashed lines are a problem ... unless LM created such ability in their latest P3D, I don't know of an easy XML way to do that.

Bob
 
Last edited:
Just tried it. Download works and pdf opens.

@dobroDude: You don't have to use the gps map as a base
Bob
Bob, going off topic here, your words just reminded me of a question I have about the gps. Is there anyway to render the base water layer in black. <watercolor> seems to apply only to the terrain layer. once the terrain layer is switched off, I can see a dark blue water rendered which I do not want. I would dearly like to have a black layer on the screen until I switch terrain mode on. Is there any way to accomplish this?
Cheers, TJ
 
add <BackgroundColor>0x010101</BackgroundColor>

Bob
Hi Bob, just an update, adding the background color did not work, as in all started out ok but when I switched on the terrain display and then switched it off, I got the same blue water. But if I zoomed out, voila, the background goes black as desired. I think it might have been a bug. I think I found a workaround though.
I changed
Code:
<DetailLayerTerrain>(@g:setup_ColorTerrain) 0 == if{ 1 } els{ 2 }</DetailLayerTerrain>
to
Code:
<DetailLayerTerrain>(@g:setup_ColorTerrain) 1 == if{ 0 } els{ 2 }</DetailLayerTerrain>
. As you would recognize, this loads the unit with the terrain layer on by default. With this in operation, all seems as desired. when now switching the terrain display off, the back ground goes black all the time. Not sure if this is just a fluke, but it works. Once again, Thanks for your help.
Regards, TJ
 
Back
Top