Question Storing user input into external file

Reese

New member
Joined
Sep 30, 2013
Messages
9
Reaction score
0
Points
1
Is it possible to create a MFD that can take user input and store it into an external file(text,xml or something else), that can be loaded in different scenarios?

I've seen some VSA spreadsheets that i thought were nice, but if that info could be entered/stored/recalled inside an MDF that would be even nicer.

So is something like this possible?
 
The orbiter api supports read/write to basic text files so I dont see why not. What sort of data do you have in mind?
 
Of course ... done all the time.
 
Also you can use ANY C++/C-library you like for writing file formats not supported by Orbiter. Or for using a local or remote database.
 
I think in the new orbiter api there is also some "clbksimulatekey" or something like this that will allow to reproduce key pressing etc. Maybe it could be useful for replaying
 
Well I like to Roleplay that im doing missions ect when i fly. I imagine many people do. I'd like to have an MDF that would keep track of information that i usually put into a spreadsheet.

Fuel usage and refuel costs. LOX too.
Payments for payloads transported.

Maybe even automatically subtract the cost of refueling from your bank.

I personally have no idea how to start to write something like this. I do web development but C++ is beyond me. Not a lot of experience with compilers.

Someone looking for a side hobby? :lol:

Side note:
It would be cool to write in a bunch of missions in a text file with id's associated with certain bases. Maybe while you are landed at that base it will pick a few random missions and let you choose one or more to do. I would assume XML format would be better for this. But what do i know...

I dare not ask to "point me in the right direction", i hate when people ask me that. Especially when they know as little about something as i do...

So .. if anyone gets bored and wants to give this a stab.. that would be cool.
 
Last edited:
I do web development but C++ is beyond me.

What kind of web development? If you're fluent in Java script, it should be entirely reasonable to write a simple parser in C++ without too much of a headache, especially since Javascript employs a C-ish synthax (sure, you'll get annoyed a lot at C++ always wanting to know the datatype of everything, but you'll manage). Orbiter also has a LUA interface, and while it's been a long time since I touched LUA, anybody working on any kind of script language regularly should be able to familiarise himself pretty quickly with it from what I remember.
 
I personally have no idea how to start to write something like this. I do web development but C++ is beyond me.

If you only need to manipulate scenario files, why not do it browser/web based? :thumbup:
Use Javascript to manage scenario upload, update whatever values you need and then generate a new scenario.
Keep it simple, using standard UCGO cargo, scenario descriptions to output your status, etc.
 
Last edited:
Back
Top