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

Mission system Custom Action - need a simple SimConnect string.

Messages
69
Country
unitedstates
I am not really a programer but this custom action is looking mighty interesting in the mission creation tool. I am just at a lost to what kind of string I would plug into the "PayloadString" option - it needs to be a string simConnect can use. Can someone just provide me with a simple string that sets the parking brake? some example code.

The sdk states:
PayloadString - Text that will be transmitted to the SimConnect client when the action is initiated. The text can be any string that the client might find useful.

I've been looking at the sim connect sdk and i found this method: SimConnect_SetDataOnSimObject(
I suppose this will set what ever data on the sim object. But i just need some exaple code, what do I plug into the parathese? Help would be very much appreciated!
 
Last edited by a moderator:
You'd need to set up a SimConnect client dll or application that receives your strings and then acts upon them itself. You can't command events or set simulation variables directly via the payload string as you're hoping.

What this means is that to use payload strings, they have to be communicating to a specific aircraft or SimConenct client that has been written to receive and act upon them. You can't just create a generic mission for any aircraft and make use of the payload strings.

If you're not a programmer then I'm afraid you have a significant uphill struggle in learning to write SimConnect applications.

Si
 
Thank you. I knew it had to be something more. At some point I might look into programming a Sim Connect application or dll because it would be really nice to get all these commands for controlling the aircraft. When I was at ACES for the short time I was, they set up lua scripting that plugged right into simConnect and in made everything possible. I’m trying to create a well done mission with fsx and really constrained to the options in the FSX mission tool. I am surprised no one has released a free dll that connects a mission to sim Connect. It would open a whole other door for mission creation...
 
Last edited:
Hi,

Be surprised no longer - I've had this available for a year or so. Download the mission editor (from the sig) and read the docs for 'SimVar Extension'. You get full access to all the simulation variables, weather and events, a more flexible IF command, local variables with simple arithmetic, state persistence between missions, customisable mission briefings, a simple AI autopilot which can fly 'wingman' or home in on other aircraft instead of set positions, and more.

It's free to use for non-commercial purposes, and rather easier to use if you <ahem> buy the editor, which makes missions easier anyway. But I digress. :D

I'm at work just now and don't have the SDK docs to hand, but off the top of my head the PayloadString would be along the lines of 'SimVar Set "" "PARKING BRAKES" 1' . I'll confirm this tonight.

Cheers,
Jim
 
Wow Jim, quite a tool you developed there! Now that I recall a remember coming across this tool earlier – didn’t realize you set up payload strings to connect to simconnect though. Very nice! Unfortunately I need the mission for commercial use, so I can’t really use it for my development efforts. But now I see it’s possible and I might look into developing a way to make use of my own payload strings – that would be a ways down the road though! Thanks for the heads up though!
 
Hi,

You're not prevented from using it commercially! The license terms were meant to be simple:
- If you give your work away for free, so do I
- If you charge a token amount, so do I
- If you're making an income from my work, so do I ;)

If you really object to me making any money from months of work while you use it for free, you can release your missions with a note to the purchasers telling them where they can download simvar.exe from. The very least you can do is give me a bit of free advertising :D

Seems fair to me. Why not contact Francois at FSAddon and ask?

Cheers,
Jim
 
Simvar IF Command Problem

Hi guys,
I have added a custom action to my mission (specifically the {SV} IF action) to test out my plane's payload weight at some point during the mission, but it seems there is nowhere to specify the INDEX of the payload station I would like to test out. Is there a way or place in which I can specify the number of the payload station I would like to test out??? Maybe manually in the xml code if not in the mission editor itself???

I checked out the other variables and most of the settable/testable ones require an index as well (for example the number of an engine, the number of a tank, number of a throttle lever, or number of a payload station- what I'm messing with right now). Are you saying that I can't use or test out (using the IF command) ANY of these variables?!

I also tried debugging the mission and using the DEBUG RELOCATE command to see what the IF command is reading from the variable "Payload Station Weight", but it gives me 0.000 every time on the Simvar console. There must either be a problem with how I'm adjusting the plane's payload stations or the fact the Jim didn't leave a place to put the index number when your testing out or setting variables. Can you help???
 
Back
Top