Results 1 to 10 of 10

Thread: Question. How can I randomize the response of my .xml gauge?

  1. Default Question. How can I randomize the response of my .xml gauge?

    it's been long since I did a gauge. Just had an idea, but don't know where to start searching, (and feeling a bit lazy and sleepy too to be honest) so I thought I'd just ask.

    I made a gauge a while ago. That gauge works fine. I now want to improve it a little.
    The gauge is of the type:
    If condition A is met, show smoke effects on aircraft.
    And works.
    The gauge is written in XML

    I now want to Randomize the effect shown.

    As in:
    If condition A is met
    in 50 % of cases show effect 1
    in other 50% of cases, show effect 2

    Is there an easy way, in .XML, to do this?


  2. Default

    I'm sure you want to know more about the code I used.
    I should really look up to make sure.
    As I said, it's been a while, so looking up may take long.

    from memory:

    gauge syntax is similar to:

    (A:altitude) smaller then 1000 feet AND (L:ABCDE) = 1
    if: 1 &gt (K:SMOKE_ON) AND 2 &gt (K:SMOKE_ON) AND 0 &gt (L:ABCDE)

    or in words:
    If Altitude smaller then 1000 feet AND (L:ABCDE) was previously set to 1
    switch on smoke 1, smoke 2, and set (L:ABCDE) back to value 0 (zero).

    I would like to change this in such a way that half the time smoke 1 comes on in that condition, and half the time smoke 2.
    (or at least some randomisation, does not have to be 50-50. 60-40 is good enoug.

    (and don't worry too much about the L:ABCDE. It's not the end of the world if this becomes a runaway.)

    Sorry for not posting the full code.
    I tried to combine this gauge with another. And got really stuck.
    It may take me some time to untangle and find the working simple version again. So for now this is the best I can do.


  3. Default

    You could try using Doug Dawson's Random Number Gauge, from the Avsim library. The code would look something like this:

    (A:Indicated Altitude, feet) 1000 < (L:dsd_random_36) 18 < and if{ 1 > (K:SMOKE_ON) } els{ 2 > (K:SMOKE_ON) }

    Having not used Doug Dawson's Random Number Gauge myself, I think this code is something you can work with.

  4. Default

    Thanks. That sounds like a very nifty gauge. I'll look into it.

  5. Default
    I can not find that file on
    (Not in Library. Did find link in Avsim forum but clicking gives "file no longer available" message.)

    I did however find on an aircraft that has the gauge itself in it. - dsd_random_number.gau
    (I assume that is the file that would be in: ""
    as well.)
    With among it's files:
    dsd_random_number.gau 07.22.07 51.71 kB
    dsd_random_number_readme.txt 08.29.08 1.90 kB
    both in folder:
    ..\fsx_mcdonnell_fh1phantom_updated\FSX_McDonnell FH1Phantom_updated\gauges\AERIT-F104S-ASA-Gauges\


    (Haven't had time to look at the files yet. -- Just file info posted in case someone else was looking for the gauge as well.)
    Last edited by il88pp; 05-15-2019 at 04:54 PM.

  6. #6
    Join Date
    Jan 2012
    San Francisco, California


    Click image for larger version. 

Name:	avsim.JPG 
Views:	106 
Size:	105.2 KB 
ID:	209610
    Mr Zippy Sent from my keyboard using "Whackamole", NudgeAKey + 2 Fingers

    No flight Sim installed until I get a new computer.

  7. Default

    yes, found now, thank you!

    Had looked direct in Google, normally that finds files in Avsim Library. But now no results.

    Searching in the Library itself I now found Thanks.

  8. Default

    Have you managed to get this gauge working?

  9. Default

    Sorry, haven't looked at it much yet. Weather is too good here the last few weeks.

  10. Default

    Weather here in the UK has been good also!

Similar Threads

  1. XML guestions for XML experts
    By demyhr in forum Panel & Gauge Design
    Replies: 3
    Last Post: 04-16-2011, 03:20 PM
  2. Replies: 0
    Last Post: 10-14-2007, 10:32 PM
  3. Randomize parking in AFCAD files en masse
    By rlipoff in forum FS2004
    Replies: 2
    Last Post: 10-07-2007, 11:53 AM
  4. Replies: 6
    Last Post: 10-26-2005, 01:41 PM
  5. -Randomize-
    By Jonathan744 in forum MSFS Screen Shot Forum
    Replies: 5
    Last Post: 11-09-2004, 10:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts