# Projectgenericvessel - spacecraft3 and multistage2 replacement project

#### gattispilot

Sounds like a jointed Eva person could be made using this.

#### Face

Beta Tester
Sounds like a jointed Eva person could be made using this.

There already is one in the project:

• Examples: added EVAEMU2, a fully functional EVA figure

#### gattispilot

Is the new Eva available?

#### Face

Beta Tester
Is the new Eva available?

Well, normally if I write "added <thing>" in a release listing, it means that I've added all the necessary files to the project in order to use the feature <thing> in the described state.

So, yes, the EVAEMU2 figure is the example that Donamy kindly contributed to the project to showcase the multi-arm capability: http://bitbucket.org/face/genericvessel/src/default/Scenarios/Generic Vessels/EVAEMU2.scn

You can use the above linked scenario or even use the scenario editor to create a new EVAEMU2 (complete with thumbnail) once you have genericvessel installed.

#### n122vu

Donator
Did you miss this?

I had missed it as well (read this post back when you originally posted it though), but it just dawned on me - with the ability to have multiple robotic arms, my long-dormant MaintFury project would be able to have the necessary functionality for both grappling claws using GenericVessel, though I still want to go back and finish the .dll down the road.

Still looking at how to add some extra hours to each day...

#### Face

Beta Tester
Still looking at how to add some extra hours to each day...

Yeah, could need a solution to this problem, too. If you find one, please give me a note.

#### NukeET

##### Gen 1:1
Donator
Yeah, could need a solution to this problem, too. If you find one, please give me a note.

Make it a sticky note for all!

#### Donamy

Donator
Beta Tester
Make it another weekend day. No work.

#### gattispilot

So will this replace MS (Multistage)? and stage?

I saw issues on the Gemini and with D3D9 with Stage and Multistage

Donator
Beta Tester
No, AFAIK.

#### Face

Beta Tester
So will this replace MS (Multistage)? and stage?

The project's intention is to do that, yes. At the moment, though, it is only a replacement for SC3, and there is still a long way to feature completion with it.

#### fred18

Donator
Hi there,

I've been thinking about it and since I have a bit of time now and since I have already a lot of the code ready from the project of the Jarvis DLL, I was thinking about to start to create the new multistage (that could read also the old ones) with integrated autopilot etc.

First of all: does this create any issue with the work already in progress? Am I overlapping with you?

second: the only thing that I'm having difficulties to imagine how to do it's the parser, if it's not an issue could you help me with the logic of it? Just to understand basically how to read and assign all the parameters to a [STAGE_X] section

Fred

#### Face

Beta Tester
First of all: does this create any issue with the work already in progress? Am I overlapping with you?

Not at all. AFAIK, nobody working on genericvessel did a single line of code for multistage functionality yet.

second: the only thing that I'm having difficulties to imagine how to do it's the parser, if it's not an issue could you help me with the logic of it? Just to understand basically how to read and assign all the parameters to a [STAGE_X] section

Do you mean the xves thingy? That's Artlav's work, I just expanded on it. TBH, I'm not really happy with the C++/Pascal Frankenstein's monster that genericvessel currently resembles in this regards. I plan to get rid of the Pascal part once feature completion is reached regarding SC3 and replace it with plain old GetPrivateProfileString calls, because maintaining that parser really becomes a PITA already.

Naturally, Artlav will disagree on this, because his intention with the external parser architecture was to have a reusable code for other SC3-related projects like e.g. his SpaceWay pet project. It also seems that he is more versed in Pascal than anybody else here, so it would be a good start to ask him for clarifications on his parser code, IF you want to use his approach for multistage, too.

However, if you really want me to be the one to answer your questions, you are of course welcome to ask me anything about the code of the parser. I will try to answer as best as I can. If you want to know more about the easier way to get INI-like parameters from a file, I can explain that, too.

#### fred18

Donator
Thank you very much for the quick reply.

I think that to recreate the vinka module won't take long, it's just a matter of reading and creating everything as it is written.

Then I would like to add the autopiloting sequence, probability of failure and everything as it is in Jarvis DLL, that would make life much simpler, funnier and more manageable.

As long as I am capable of reading the .ini file, then it will be a matter of merging my Jarvis project with this, not too much work.

Regarding the parser, actually what I'm looking for is a simple logic that i'm a bit struggling to find without loosing the KISS approach...

Sections in Vinka's multistage are basically just
Code:
[SECTION_X]
xx
xx

[SECTION_Y]
yy
yy

without a closing tag or anything at the end...

so what could be the point? to read everything between two "[" ?
and then try to understand what the section is reading what it is written before the "]"

is there a quick way to do it? (i.e. if there was a closing tag it would have been much easier)

#### Face

Beta Tester
Sections in Vinka's multistage are basically just
Code:
[SECTION_X]
xx
xx

[SECTION_Y]
yy
yy
without a closing tag or anything at the end...

so what could be the point? to read everything between two "[" ?
and then try to understand what the section is reading what it is written before the "]"

is there a quick way to do it? (i.e. if there was a closing tag it would have been much easier)

It is even simpler than that. Vinka's format is the INI format, so you can use the long-standing Windows API to do all the work for you (parsing the file, caching the values, skipping comment, etc.).

The function GetPrivateProfileString is the most helpful in this set. Let's say you have a INI file "C:\path\to\file.ini" that contains a section "SECTION_1" with the line "VALUE_X=<whatever>". To get the <whatever> string, or <mydefault> in case of absence, you use code like that:
Code:
#define MAXLEN 4096
char data[MAXLEN];
GetPrivateProfileString("SECTION_1", "VALUE_X", "<mydefault>", data, MAXLEN, "C:\path\to\file.ini");
"data" will then contain the string <whatever> or the default <mydefault>, if the section or key is not present.

#### fred18

Donator
that is exactly what I was looking for!! :woohoo:

thank you very much! I'll start to work on that immediatly :thumbup:

:tiphat:

#### Artlav

##### Aperiodic traveller
Beta Tester
First of all: does this create any issue with the work already in progress? Am I overlapping with you?
Haven't done anything meaningful in the multistage direction, so you are in the clear.

Naturally, Artlav will disagree on this
Not exactly. I don't think i'll be around to support GV, so it makes sense to move the code to whatever is community-maintainable.
Otherwise the Vinka's story will just repeat itself.

you can use the long-standing Windows API
Sigh...
Well, whatever works i guess.

#### Donamy

Donator
Beta Tester
Do the aerodynamics work in GV ? I'm trying to get the Dragon2 Abort test vehicle to fly right. I woould also ask if a chute could be added as a second airbrake.

#### Face

Beta Tester
Do the aerodynamics work in GV ? I'm trying to get the Dragon2 Abort test vehicle to fly right. I woould also ask if a chute could be added as a second airbrake.

Unfortunately, it doesn't look like the aerodynamics are supported. In order to get myself a better overview of the feature-completeness of the current code-base, I've run down the mega-structure that works as interface between GV and XVES and took some notes comparing it to the SC3 doc, the GV doc, and usage in the code: https://bitbucket.org/face/genericvessel/src/tip/Doc/genericvessel/Notes.txt

There you will see that the aerodynamics section is prominent among the missing values list.

The airbrake idea is interesting. Do you mean having something like "CHUTE_ATTACK/_DRAG/_ANIM" values in the aerodynamics section?