Question Storing user input into external file

Reese

New member
Joined
Sep 30, 2013
Messages
9
Reaction score
0
Points
0
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?
 

Hlynkacg

Aspiring rocket scientist
Addon Developer
Tutorial Publisher
Donator
Joined
Dec 27, 2010
Messages
1,870
Reaction score
3
Points
0
Location
San Diego
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?
 

ADSWNJ

Scientist
Addon Developer
Joined
Aug 5, 2011
Messages
1,667
Reaction score
3
Points
38
Of course ... done all the time.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,654
Reaction score
2,376
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
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.
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,667
Reaction score
105
Points
78
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
 

Reese

New member
Joined
Sep 30, 2013
Messages
9
Reaction score
0
Points
0
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:

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,889
Reaction score
2,141
Points
203
Location
between the planets
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.
 

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
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:
Top