Project Universal Astronaut and Cargo System (UACS)

Buck Rogers

Major Spacecadet
Joined
Feb 26, 2013
Messages
414
Reaction score
332
Points
63
In the API there's a call for: SetAttenuation ( , , ), I think this controls power.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,804
Reaction score
2,779
Points
203
Location
Dallas, TX
3 issues. I can figure out.
1. airlocks how to make all closed
!vslAstrInfo.airlocks.at(0).open;
2. make a airlock open/closed on a key

3 I know this is a bug. But how to show the guy in the vessel when they enter.
void FLEXUACS::clbkPostCreation () { mdlAPI.clbkPostCreation(); for (size_t idx{}; idx < vslAstrInfo.stations.size(); ++idx) { if (!vslAstrInfo.stations.at(idx).astrInfo) continue; const auto& astrInfo = *vslAstrInfo.stations.at(idx).astrInfo; SetEmptyMass(GetEmptyMass() + astrInfo.mass); SetStationMesh(idx, astrInfo.role, true); //show the mesh } }
void FLEXUACS::SetStationMesh(size_t stationIdx, std::string_view role, bool show) { switch (stationIdx) { case 0://left // Show first station commander mesh if (role == "Commander") SetMeshVisibilityMode(6, show ? MESHVIS_ALWAYS : MESHVIS_NEVER); // Show first station pilot mesh else if (role == "Pilot") SetMeshVisibilityMode(5, show ? MESHVIS_ALWAYS : MESHVIS_NEVER); break; case 1://right // Show second station commander mesh if (role == "Commander") SetMeshVisibilityMode(4, show ? MESHVIS_ALWAYS : MESHVIS_NEVER); // Show second station pilot mesh else if (role == "Pilot") SetMeshVisibilityMode(7, show ? MESHVIS_ALWAYS : MESHVIS_NEVER); break; } }
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,804
Reaction score
2,779
Points
203
Location
Dallas, TX
Also is it possible to have a astronaut with a different specific module? I saw for cargo you could.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,804
Reaction score
2,779
Points
203
Location
Dallas, TX
On my vessel I have 4 airlocks. the open/close state is based off animation. But even though it says it is open no guy can get out and no error message??

open door for which airlock
if (key == OAPI_KEY_D && !KEYMOD_SHIFT(kstate) && KEYMOD_CONTROL(kstate) && !KEYMOD_ALT(kstate)) { if (astrHUD.airlockIdx == 0) RevertADOOR1(); if (astrHUD.airlockIdx == 1) RevertADOOR2(); if (astrHUD.airlockIdx ==2) RevertDOOR1(); if (astrHUD.airlockIdx == 3) RevertDOOR2();
here the airlock open if door open
vslAstrInfo.airlocks.at(0).open = ADOOR1_proc >= 1;//LEFT vslAstrInfo.airlocks.at(1).open = ADOOR2_proc >= 1;//RIGHT vslAstrInfo.airlocks.at(2).open = DOOR1_proc >= 1;//LEFT vslAstrInfo.airlocks.at(3).open = DOOR2_proc >= 1;//RIGHT
void MMSEV::clbkPostCreation(void) { mdlAPI.clbkPostCreation(); for (size_t idx{}; idx < vslAstrInfo.stations.size(); ++idx) { if (!vslAstrInfo.stations.at(idx).astrInfo) continue; const auto& astrInfo = *vslAstrInfo.stations.at(idx).astrInfo; SetEmptyMass(GetEmptyMass() + astrInfo.mass); SetStationMesh(idx, astrInfo.role, true); } vslAstrInfo.airlocks.at(0).open = ADOOR1_proc >= 1;//LEFT vslAstrInfo.airlocks.at(1).open = ADOOR2_proc >= 1;//RIGHT vslAstrInfo.airlocks.at(2).open = DOOR1_proc >= 1;//LEFT vslAstrInfo.airlocks.at(3).open = DOOR2_proc >= 1;//RIGHT }
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,804
Reaction score
2,779
Points
203
Location
Dallas, TX
So here I should be seeing only 1 of the suit mesh. But both are seen,
void MMSEV::SetStationMesh(size_t stationIdx, std::string_view role, bool show) { switch (stationIdx) { case 0://left // Show first station commander mesh if (role == "Commander") SetMeshVisibilityMode(4, show ? MESHVIS_ALWAYS : MESHVIS_NEVER); // Show first station pilot mesh else if (role == "Pilot") SetMeshVisibilityMode(5, show ? MESHVIS_ALWAYS : MESHVIS_NEVER); break; case 1://right // Show second station commander mesh if (role == "Commander") SetMeshVisibilityMode(4, show ? MESHVIS_ALWAYS : MESHVIS_NEVER); // Show second station pilot mesh else if (role == "Pilot") SetMeshVisibilityMode(5, show ? MESHVIS_ALWAYS : MESHVIS_NEVER); break; } }
case UACS::ASTR_EGRS:
{
size_t stationIdx = static_cast<size_t>(context);
auto& astrInfo = *(vslAstrInfo.stations.at(stationIdx).astrInfo);

SetEmptyMass(GetEmptyMass() - astrInfo.mass);
SetStationMesh(stationIdx, astrInfo.role, false);

return 1;
}
SCn.
MMSEVUACS:MMSEVUACS
ASTR_STATION 1
ASTR_NAME John G.
ASTR_ROLE Pilot
ASTR_MASS 70.00
ASTR_OXYGEN 1.00
ASTR_FUEL 1.00
ASTR_ALIVE 1
ASTR_CLASSNAME UACS\Astronauts\Xemuredbroke
LIGHTF
SOLAR 0 0.0000
FDOORL 0 0.0000
FDOORR 0 0.0000
ADOORL 1 1.0000
ADOORR 1 1.0000
SOLP 2 0.0000 3 0.5000
CAM 1 1.0000
STATUS Landed Mars
POS -102.1971192 -7.0124952
HEADING 348.71
ALT 2.239
AROT 97.910 13.228 -12.322
AFCMODE 7
NAVFREQ 0 0
XPDR 0
END
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,804
Reaction score
2,779
Points
203
Location
Dallas, TX
Trying to figure this set stationmesh i have the crew mesh set as never not seen.
eva1_mesh = oapiLoadMeshGlobal("MMSEVUACS/MMSEVsuitright1"); SetMeshVisibilityMode(AddMesh(eva1_mesh, &mesh1ofs), MESHVIS_NEVER ); eva2_mesh = oapiLoadMeshGlobal("MMSEVUACS/MMSEVsuitleft1"); SetMeshVisibilityMode(AddMesh(eva2_mesh, &mesh1ofs), MESHVIS_NEVER);
and then in set stationmesh
void MMSEV::SetStationMesh(size_t stationIdx, std::string_view role, bool show) { sprintf(oapiDebugString(), "stationidx %d", stationIdx); switch (stationIdx) { case -1://right // Show first station commander mesh SetMeshVisibilityMode(4, MESHVIS_NEVER); SetMeshVisibilityMode(5, MESHVIS_NEVER); // Show first station pilot mesh break; case 0://left // Show first station commander mesh SetMeshVisibilityMode(4, MESHVIS_EXTERNAL); SetMeshVisibilityMode(5, MESHVIS_NEVER); // Show first station pilot mesh break; case 1://right // Show first station commander mesh SetMeshVisibilityMode(4, MESHVIS_EXTERNAL); SetMeshVisibilityMode(5, MESHVIS_EXTERNAL); // Show first station pilot mesh break; break; } }
If we load 2 crew both guy show up, great. eva 1 guy now only 1 guy shows, great. exit both then both guy show up:(
It looks like it is based off station index. i tried station index -1 for no crew.
 

misha.physics

Well-known member
Joined
Dec 22, 2021
Messages
443
Reaction score
565
Points
108
Location
Lviv
Preferred Pronouns
he/him
Sorry for my ignorance, does the UACS - Universal Astronaut and Cargo System include UCSO - Universal Cargo System for Orbiter? That is, does the UACS have all (or almost all features) as the UCSO and replace it?
 

Abdullah Radwan

Addon Developer
Addon Developer
Joined
Aug 20, 2017
Messages
319
Reaction score
296
Points
78
Location
Cairo
How many lamps are you supposed to get when unpacked? I'm getting cargolamp1-4, and lamp1, total 5. Maybe just a naming issue?
The lamp cargo has 5 lamps. The issue is that both packed and unpacked cargoes use the same name, which causes naming issues if another packed lamp cargo exists when unpacking. I should fix this in the next update.
Also. on the astronauts. Can they also be vessels? rathe than meshes

The reason I ask is so that we can use specialized eva guy like my shuttle guy with arm/leg animations,.....
Yes. Use the astronaut API to make a custom astronaut. Implement the necessary methods as specified in the documents then implement any custom functionality you would like.
Sorry for my ignorance, does the UACS - Universal Astronaut and Cargo System include UCSO - Universal Cargo System for Orbiter? That is, does the UACS have all (or almost all features) as the UCSO and replace it?
Yes. UCSO is obsolete now.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,804
Reaction score
2,779
Points
203
Location
Dallas, TX
Thanks.
It needs to work with Sound

not sure how to make a custom astronaut. if the astronaut. cfg. It looks like you can only change meshes?

And the fix of the showing the meshes of the crew
 

Attachments

  • astrocfgingo.jpg
    astrocfgingo.jpg
    73.3 KB · Views: 4

Abdullah Radwan

Addon Developer
Addon Developer
Joined
Aug 20, 2017
Messages
319
Reaction score
296
Points
78
Location
Cairo
Thanks.
It needs to work with Sound

not sure how to make a custom astronaut. if the astronaut. cfg. It looks like you can only change meshes?

And the fix of the showing the meshes of the crew
I will see what I can do regarding sounds.

As for custom astronauts, see the documents on how to implement them. It has nothing to do with the configuration files. You need to inherit from UACS::Astronaut class and implement the necessary methods.

I am not sure what you mean by fixing the visibility of crew meshes. What's the issue?
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,804
Reaction score
2,779
Points
203
Location
Dallas, TX
Oh. In the version you have you said there was an issue where the crew meshes didn't auto load.

The issue is that the API should call clbkGeneric after astronaut addition, but I forgot to do so. Until the next update, just call SetEmptyMass and SetStationMesh in the same way as the ASTR_INGRS block after adding the astronaut.
I have one vessel
meshes defined: eva1_mesh = oapiLoadMeshGlobal("MMSEVUACS/MMSEVsuitright1"); SetMeshVisibilityMode(AddMesh(eva1_mesh, &mesh1ofs), MESHVIS_NEVER ); eva2_mesh = oapiLoadMeshGlobal("MMSEVUACS/MMSEVsuitleft1"); SetMeshVisibilityMode(AddMesh(eva2_mesh, &mesh1ofs), MESHVIS_NEVER);
void MMSEV::clbkPostCreation(void) { mdlAPI.clbkPostCreation(); for (size_t idx{}; idx < vslAstrInfo.stations.size(); ++idx) { if (!vslAstrInfo.stations.at(idx).astrInfo) continue; const auto& astrInfo = *vslAstrInfo.stations.at(idx).astrInfo; SetEmptyMass(GetEmptyMass() + astrInfo.mass); SetStationMesh(idx, astrInfo.role, true); } vslAstrInfo.airlocks.at(0).open = ADOOR1_proc >= 1;//LEFT vslAstrInfo.airlocks.at(1).open = ADOOR2_proc >= 1;//RIGHT vslAstrInfo.airlocks.at(2).open = DOOR1_proc >= 1;//LEFT vslAstrInfo.airlocks.at(3).open = DOOR2_proc >= 1;//RIGHT } void MMSEV::SetStationMesh(size_t stationIdx, std::string_view role, bool show) { //sprintf(oapiDebugString(), "stationidx %d", stationIdx); switch (stationIdx) { case -1://right // Show first station commander mesh SetMeshVisibilityMode(4, MESHVIS_NEVER); SetMeshVisibilityMode(5, MESHVIS_NEVER); // Show first station pilot mesh break; case 0://left // Show first station commander mesh SetMeshVisibilityMode(4, MESHVIS_EXTERNAL); SetMeshVisibilityMode(5, MESHVIS_NEVER); // Show first station pilot mesh break; case 1://right // Show first station commander mesh SetMeshVisibilityMode(4, MESHVIS_EXTERNAL); SetMeshVisibilityMode(5, MESHVIS_EXTERNAL); // Show first station pilot mesh break; break; } }

then based off the station index the mesh shows. but what if no station. as no crew no suits should show


more details.
here the mmsev has no crew. so no suits show.
then added 2 crew guys:
MMSEVUACS:MMSEVUACS ASTR_STATION 0 ASTR_NAME Abdullah Radwan ASTR_ROLE commander ASTR_MASS 80.00 ASTR_OXYGEN 1.00 ASTR_FUEL 1.00 ASTR_ALIVE 1 ASTR_CLASSNAME UACS\Astronauts\NASASuitZ2 ASTR_STATION 1 ASTR_NAME Abdullah Radwan ASTR_ROLE commander ASTR_MASS 80.00 ASTR_OXYGEN 1.00 ASTR_FUEL 1.00 ASTR_ALIVE 1 ASTR_CLASSNAME UACS\Astronauts\NASASuitZ2 LIGHTF SOLAR 0 0.0000 FDOORL 0 0.0000 FDOORR 0 0.0000 ADOORL 1 1.0000 ADOORR 1 1.0000 SOLP 4 0 0 0.0000 CAM 0 0.0000 STATUS Landed Mars POS -102.1971192 -7.0124952 HEADING 348.71 ALT 2.239 AROT 97.910 13.232 -12.322 AFCMODE 7 NAVFREQ 0 0 XPDR 0 END END_SHIPS

but no crew suits show??
reset and now they show.
 

Attachments

  • mmsevcrew0.jpg
    mmsevcrew0.jpg
    71 KB · Views: 7
  • mmsevcrew2.jpg
    mmsevcrew2.jpg
    60.7 KB · Views: 7
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,804
Reaction score
2,779
Points
203
Location
Dallas, TX
Working on a cargo vessel.
Is there a way to load cargo like the astronaut? versus loading the cargo into the scenario

I guess I will do the select the station like the slot. So you can select a slot and release,....
 

Attachments

  • eaglecargo.jpg
    eaglecargo.jpg
    94.6 KB · Views: 3

Abdullah Radwan

Addon Developer
Addon Developer
Joined
Aug 20, 2017
Messages
319
Reaction score
296
Points
78
Location
Cairo
Oh. In the version you have you said there was an issue where the crew meshes didn't auto load.
I see. The issue is already fixed on my local build. The fix will be deployed on the next release.
Working on a cargo vessel.
Is there a way to load cargo like the astronaut? versus loading the cargo into the scenario

I guess I will do the select the station like the slot. So you can select a slot and release,....
You can select and add cargoes using the API just like the Carrier. See the API docs.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,804
Reaction score
2,779
Points
203
Location
Dallas, TX
Is the carrier code available? so I can use it for an example?
looking at the API doc also.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,804
Reaction score
2,779
Points
203
Location
Dallas, TX
So I found an issue. I added this cargo. and you see it is a bit high. but then exit and restart now it is good?

Left ALt +A add the cargo. what key deploys the cargo and can you set the location?
ALT +R releases. But it just releases where it was attached. Can you make a release point?
 

Attachments

  • eagleskid2.jpg
    eagleskid2.jpg
    64.1 KB · Views: 1
  • eagleskid1.jpg
    eagleskid1.jpg
    75.1 KB · Views: 1
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,804
Reaction score
2,779
Points
203
Location
Dallas, TX
Not sure how to fix this. Your cargo using attachments. BUT in the eagle freighter. You can't see the cargo from the inside view. I have the mesh at meshVIS_Always. if I give it MESHVIS_EXTPASS I can see the cargo from inside. but then the eagle is seen thru the walls also.
 
Top