Project Universal Astronaut and Cargo System (UACS)

Buck Rogers

Major Spacecadet
Joined
Feb 26, 2013
Messages
371
Reaction score
290
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,755
Reaction score
2,738
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,755
Reaction score
2,738
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,755
Reaction score
2,738
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,755
Reaction score
2,738
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,755
Reaction score
2,738
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
431
Reaction score
554
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
316
Reaction score
292
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,755
Reaction score
2,738
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: 3
Top