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

Manual editing of yourmission.xml - A cautionary tale

Messages
1,361
Country
scotland
Hi Folks

Further to my posts regarding my problem with a non-working mission.

Yesterday, after 3 weeks of hair pulling,
I found the error(s) in my mission file. :D

I'd been deleting blocks of code till it eventually worked.

Finally tracked it down to a property trigger,
the variable for which I'd inserted
AFAIK via the OPT condition-editor.

Simvar.IndicatedVIAS

Turns out that during a lare scale search and replace for 'airspeed'
I'd accidentally replaced this with my chosen description 'VIAS'.



I feel a right klutz. :o



As recommended elsewhere -
Back up regularly and often.



Now just have to find out
why the others property triggers aren't activating or firing
other than their indivdual initialization timers.



Debugger / better error trapping, required for the OPT please.



HTH
ATB
Paul
 
Well,

I do feel your pain. Learnt the hard way about backing up on my first mission and a few times even after that! Now, first thing I create is a double-clickable .bat file to back up my in-development mission with two clicks.

"Large scale search and replace" = :eek: Better Backup!!!!!!
 
Hi Folks

Cheers RNO.
I'd been a little over-ambitous with this first mission.

Now just have to find out
why the others property triggers aren't activating or firing
other than their indivdual initialization timers.

My mission is finally now working again.

It wasn't an error/fault in the code itself,
rather that some code was taking a while to work,
and was further impaired by my debugging code,
particularly the 30 debug caption based dialogs. :o

Adding debugging code using dialogs
can really bu**er up your mission.


ATB
Paul
 
I can relate to this!

I tend to add a few new items to my mission, test it, add a few more, etc. One day, I decided to blow through a whole pile at once and - D'OH! Mission won't load! After basically ripping it down and starting over, I found out the problem.

Evidently, you cannot have a property trigger without an action! My last trigger was setup without an action, as that was to be in my next set. Because of that, the whole thing failed to run. Good! That, that's good!

In terms of manually editing the xml, that's actually what my mission/addon thing is built around and so far, it works very nicely. You just need to watch everything and have multiple backup points. When I get a mission to run, I copy the xml to a safe place before continuing.

By the way, here's a neat trick that isn't allowed in the SDK but IS when you manually edit. You can use the same dialog action multiple times within the same trigger. The SDK allows only one use, as it is then removed from the selection list. You can manually paste it into the xml code, though.

For example, I have a checklist flow that requires the pilot to use the dlgPilotCheck dialog a number of times. To use it, I just go into the xml in wordpad and paste the two lines of code (don't forget the GUID!) in the right spot. Again, test this before moving on or you may not be able to track it down later, in case something fails to perform.
 
Hi Folks

you cannot have a property trigger without an action!
Jetliner -
Add the following to your fsx.cfg, and you'll receive a warning on loading.
Code:
[Debug]
ReportLoadErrors=1



You can use the same dialog action multiple times within the same trigger.

I hadn't realised the OPT prevented this.

I've used the same dialog many times,
though had primarily incorporated it by manual editing.

ATB
Paul
 
Last edited:
Well, personally I find no use for multiple calls of the same dialog action, unless it's a sound-fx called by a dialog action.
If you want to ensure, for example, that the user stays below 1000f I find it very annoying if the Copilot keeps on telling me "Please keep below 1000f!" - "Please keep below 1000f!" - "Please keep below 1000f!" - ... :D
In that case I use a random action that calls different dialogs with the same content like "c'mon, keep below 1000f!",...
So, no need for multiple calls. :)
 
Hi Folks

personally I find no use for multiple calls of the same dialog action
Thorsten -
You may find it useful for a stub 'dummy' call,
as all triggers require an associated action.
e.g.
for an event counter, or debugging code, etc.
where you later test for an event using Simmission.Latched,
i.e.
attach a dialog action
with neither caption text or associated sound file,
to the trigger event, (which does not require an associated soundfile to play at that point).

HTH
ATB
Paul
 
Last edited:
That is true. Creating a dummy-dialogaction is always the first thing I do creating a new mission. :D
And everytime I set a trigger I link the dummy to it. So I never get an error message because of mission actions linked to the trigger.

But the point here was that one action should be called several times from one trigger. That is not possible from within the OPT - and (as stated) in my eyes not necessary. ;)
 
Here's an example of why you'd want to repeat the same dialog action within the same trigger.

Say you're carrying 9744 lbs. of fuel. To report this, you could have a trigger that calls for the fuel check dialog - then you need the values:9, 7, 4, 4. To do that, you'd either need to call the "4" wav by two different dialog actions or call the same dialog action twice. As far as I know, manually editing the xml is the only way to do that.

I personally only use the multiple dialogs thing a few times. Most of the editing is for entering V1, VR, V2, etc. values into the IndicatedAirspeed triggers, depending on the aircraft being used. But, it is nice to know it's possible. :)

John
 
In that case I use a random action that calls different dialogs with the same content like "c'mon, keep below 1000f!",...
So, no need for multiple calls. :)


Or, you could also use counter triggers that trigger increasingly emphatic dialogs the more you deviate.

First time below 1000 feet: "Keep it under 1,000 feet."
-object activation, reset trigger
Second time (count = 2): on count 2, trigger object activation to deactivate the first call and activate the second call: "Come on, stay below 1,000 feet!"

Third time (count = 3 or thrid counter trigger): "Dude, what's wrong with you!"

:D

I have a similar need for this in a section dealing with bank angles, such as what to say if you bank beyond 60 degrees, 75 degrees, 90 degrees, etc. For negative G Forces as well, I have a trigger for extreme, sustained negative G's: "Alright! The passengers have experienced a zero G environment and have had enough! Can we PLEASE level out now before someone sees us?" Or, something like that. Hopefully most airline pilots won't trigger that call but, it'll be there just in case. ;)
 
Both is really interesting, but did you try to implement those features in a mission? This will be not as easy as you may think. ;)
To make the copilot telling the pilot how much fuel he got onboard will take a LOT of triggers. :o
And a counter cannot include several actions for different counts. So you'd have to create different counters for each action.
 
Both is really interesting, but did you try to implement those features in a mission?

Yup - have done it.


To make the copilot telling the pilot how much fuel he got onboard will take a LOT of triggers.

Actually, no. For my example, I only do it as part of the before start checklist so, I only have to program the xml for the starting fuel which is determined in advance. Then, I just parse the digits and add the appropriate number wav dialogs to the checklist at the right point.


And a counter cannot include several actions for different counts. So you'd have to create different counters for each action.

Exactly! It would be quite a headache but, it can be done. I actually haven't done a whole lot with counters yet. Can each counter action add a count to multiple counter triggers? Then you need to activate and deactivate other triggers, etc...

Hmm... maybe not. ;)
 
Hi Folks

I've used numerous multi-stepped counters
which self reset, for -
a) Increasing dialog emphasis, similar to Jetliner's idea.
b) Granting appropriate performance 'rewards'.

However each 'counter' implementation
uses one count action
but multiple counter triggers.

HTH
ATB
Paul
 
That is indeed possible.
Take care that you use oneshottriggers. Any time a trigger fires it is set to 0 again. If it's not one-shot trigger it will then start again and fire at the designated point. This can also be very useful.
 
Back
Top