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

Fuel box

Messages
366
Country
us-maryland
Hey all,

I'm trying to figure out a way to place a fuel box in FS9 without the pump and ground markings used in FSSC. I "deselected" both items for that macro and it causes the fuel box to not work. It works fine if I allow at least the ground markings. I'm using the FS2002 SDKs for the majority of my scenery creation and since my FS Architect is totally corrupted and unuseable I seem to be at a loss.

I seem to remember something along these lines on the previous site but I'm not sure...

As this is only a convenience and not a necessity I won't be depressed if I can't get it to work.

Anyone? Anyone?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,885
Country
netherlands
Hi Ken,

In the Fs2002 techniques the fuel box works like this. You do a check if the plane is in the correct position and then you write to a certain variable with the SetWrd command. This will make that the fuel tanks are filled.

With the Fs2004 XML code you can also do it, but I haven't tried that yet. I remember that there is a command for this described in the BGLComp SDK.
 

bpahe

Resource contributor
Messages
335
Country
sweden
If your needs are for FS2004 I´ll be happy to post a working example of code when I get home this afternoon. It´s quite simple, since I´ve managed it! ;)

/hans
 
Messages
152
Hans,
if no one is interested, then I am! ;) Anyway, the variable that fills up the tank is 288 and must be set to 1.
Khaos, I tried that FSSC incorporated API and if You don't have lines on the floor, then You won't get Your aircraft filled up. So for my scenery I made up completely new fuel stations with the code for filling up the tank. If You need SCASM code for this, don't hesitate to ask ;) (but I must come home first)

Best regards,
 
Messages
366
Country
us-maryland
WOW!!! So much help!!

I'd absolutely be interested in the example and code. As I'm a bit lacking in the "coding" skills you'd have to hold my hand a little... I have experience editing ASM-files for basic tweaks and my APIs seem to turn out... I'm using the FS2002 SDKs since the FS2004 SDKs have me a bit lost when it comes to the simplest tweaks (no shadows, seasonal textures...etc...). Maybe it's just that I need to use GMax for only object creation, then make them all APIs... ?

Arno... where would I enter the SetWrd command? Would that be placed in the parameters for the fuel box in FSSC?

bpahe... bring on the code! Well... explain it a little though... Since I'm using the FS2002 SDKs... the code you offer may or may not pertain to me.

Gorchi... is your fueling station an API? If so... could you be a little more specific on where I should enter the variable 288 and the syntax for the line(s) of code in the ASM or API files?

I greatly appreciate all of your help. I actually wasn't expect such a response!
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,885
Country
netherlands
Hi Ken,

Which program did you know you to make your fuel station, or do you simply want an API that does the fuel check for you? If you have no visual model to link it with I can best post a simple example of a macro that only does the fuel check (will post it when I get home).

I think the code of Hans will indeed be XML and that only works if you are making the scenery for Fs2004 only. If you make the other parts with Fs2002 techniques does not really matter then.
 
Messages
366
Country
us-maryland
Arno,

I created the objects and rendered them directly from GMax. I tried to activate a fuel box using FSSC. In order to keep the look of my GMax ground polygons I don't want any ground markings. I can... if need be... create and entire API of the fueling area and edit the API code??

Easy or efficient methods are welcome!

Thanks again for the QUICK response!
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,885
Country
netherlands
I understand what you need now. Let me post some example code of macro that only fills your tanks, with no visual scenery being created. You can then place this on the correct spot to line up with your visual elements you made in GMax.

All this macro needs to do is check if you are in the fueling spot and then fill up your fuel tanks :D.
 
Messages
366
Country
us-maryland
GREAT!!

Just incase any of you want to see what the fueling area looks like... here are the links directly to the images from my site. Understandably it would be counterproductive to try and match the shape of the entire area. I do still have the inoperative fuel box in FSSC so I can use that or Lat-Lon from FS to locate the code right?

Day time fueling area at KSGJ

Night time fueling area at KSGJ
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,885
Country
netherlands
Hi Ken,

Yes, you can use the same coordinates. I will add some comments to the source that tell you have to size and rotate it, etc.

Are the planes parking on the yellow striped part in real life while reflueling?
 
Messages
152
khaos_56k said:
Gorchi... is your fueling station an API? If so... could you be a little more specific on where I should enter the variable 288 and the syntax for the line(s) of code in the ASM or API files?

Ken, sure it is a part of an API, here is the picture:
LJBL_Pump.jpg


This fuel pump was designed in FSDS 2.24. I don't know if You are accustomed to the code FSDS makes but it is easily readable.
At the beginning there is header of API, after that there is TextureList(), MaterialList() and VertexList() and after that there are some Call32() instructions to show parts of the object. I added one Call32() instruction there and added the following procedure at the end (before EndA instruction):
Code:
VertexList(....
   ....)
   Call32( :Part000001 )
   ....
   Call32( :Refuel )
EndVersion
Return

:Part000001
   ....

:Refuel
   IfVarRange( :RetP 37E -28 28 )
   IfVarRange( :RetP 386 -5 28 )
   SetVar( 288 1 ) ; Fills up aircraft tanks
:RetP
Return
Unfortunately refuel rate can't be set so the tanks are filled up instantly (argh!). Setting refuel rate is possible only in dynamic scenery but that brings other problems...

Edit: I forgot to explain that IfVarRange() :) Okay, I test if the object is in certain distance from the reference point, in X direction 28m to both sides (width=56m) and in Y direction 5m on the pavement and 28m on the grass before the pavement. If the object is in this boundary, then aircraft tanks get refuelled. Simple, isn't it?
Hope it helps!
Best regards,
 
Last edited:

bpahe

Resource contributor
Messages
335
Country
sweden
Hi everyone!

Well, Arno´s right, it´s XML. Dunno if it is me that don´t read postings properly, or if I´m having trouble :teacher: (to know what people want!). Hope this doesn´t disappoint too much. :confused:

Anyway, here is indeed the XML code, for those who want it. The BGLCOMP SDK is not that difficult to set up, and i.m.o. to be recommended when doing these kind of things.

Code:
<FSData version="9.0" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation="bglcomp.xsd" >
  <SceneryObject 
    lat="N57 21.07" 
    lon="E16 29.76"
    alt="0" 
    pitch="0" 
    bank="0" 
    heading="94" 
    altitudeIsAgl="TRUE" 
    imageComplexity="SPARSE">

        <Trigger type="REFUEL_REPAIR" triggerHeight="0.0">
            <Fuel type="100" availability="PRIOR_REQUEST"/> 
            <Vertex biasX = "-10.0" biasZ="-10.0"/>
            <Vertex biasX = "-10.0" biasZ="10.0"/>
            <Vertex biasX = "10.0"  biasZ="10.0"/>
            <Vertex biasX = "10.0"  biasZ="-10.0"/>
        </Trigger>
  </SceneryObject>
</FSData>

The example above places an area, 10x10 meters large, that refuels and repairs aircraft (no other options available). Note that I use the availability "PRIOR_REQUEST" - not that it makes any difference in FS2004, but hopefully it will mean that you have to ask for a refill in future versions of FS.

/hans
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,885
Country
netherlands
To complete all the nice examples that are already here, this is a simple macro that only triggers the refuel option when you are without a certain area. In this case I have defined a area of 20x10 meter (when the scale is 1).

Code:
Area( 5 %1 %2 22 )
RefPoint( 7 : %4 %1 %2 v1= %10 %13 %14 )
RotatedCall( :R 0 0 %5 )
Jump( : )
:R
SenseBorder( :E
-10 -5
 10 -5
 10  5
-10  5
)
SetVar( 288 1 )
:E
Return
EndA
 
Messages
366
Country
us-maryland
Thanks for all your help guys. I'll digest this code and see what comes out!

By the way Arno, in the real world most of the refueling at KSGJ is done with trucks and my "fuel area" is actually a filling station for the trucks. As far as I know... My one source for information at this location hasn't complained about my artistic representation of some of the airport.
 
Messages
9
Country
us-indiana
Lights on building

khaos_56k,
How did you get the night lights on the edge of those buildings?
Looks like landing lights.

Also did you design those fuel tanks and trucks in GMAX or FSDS?
If you did I would like a copy of them if you would be willing.
I am designing an airport and I like them, very nice work.
 
Messages
366
Country
us-maryland
S_C_P,

Why... creative texturing and landing lights. I was helping another designer figure out how to incorporate lights with GMax + FS2k2 SDKs... I felt my buildings were missing something so I spent hours trying to emulate what they might look like with the lighting (the lighting on the ground is solely from the landing lights).

If you like the way those look... take a gander at the terminal of Lancaster Airport I am presently working on (slowly but surely). Tried to simulate the red light of the 'EXIT SIGN' reflecting off the corner of the building's second floor plus the shadowing and decreasing lighting on the window shades in front...

KLNC terminal at night

I'd be happy to post the truck and tank files I created (GMax) on my site. It'll take me a day or so to collect and zip 'em. Watch this post and I'll let you know as soon as they're available with a link!
 
Last edited:
Messages
9
Country
us-indiana
Very nice work.
Are you using the "AttachToolGmax" from FS2004SDK?
Are you using the "attach effect" from that tool using landing light?

I will watch for your post thanks.

Thank you
 
Messages
366
Country
us-maryland
Here are the fuel truck files...

S_C_P,

FINALLY I managed to get time to collect the proper files for the fuel trucks, at least... Basic fuel truck with chrome fuel tank

As far the storage tanks seen with the fuel trucks in the images at the beginning of this post, they're just cylinders with boxes at their "base". I'll package them for you if you really want them.

I have to admit that I cheated :eek: with the lighting effects by using the FS2002 SDKs. I've not graduated to using 'AttachTool' nor FS9 effects yet. Most of what I've done has been by deliberate use of textures.
 
Top