Jump to content

[20.2] EVA Followers 0.12 (Open to a Good Home)


Fel

Recommended Posts

I've someone knows how to properly load a part to a KerbalEVA prefarb, than this mod can life again, until that the code just keeps getting random null reference exceptions, spamming the console.

Link to comment
Share on other sites

  • 1 month later...
i wish i could but i have no skill with plugins nor coding because all i am loaded with are ideas and some minor modeling ability

hmm maybe i can show this to someone with the necessary skill...

Bump it till the end of time!

Link to comment
Share on other sites

**** METHODS ****

<<<KerbalTeamAI>>>

Collections.IEnumerator Start H ()

Void SetupFSM H ()

Void FixedUpdate H ()

Void Update H ()

Void LateUpdate H ()

Void OnVesselActive P ()

Void FindTeam P ()

Boolean isTeamLeader P ()

Boolean isTeamMember P ()

**** FIELDS ****

<<<KerbalTeamAI>>>

KerbalEVA eva P

KerbalTeamAI leader P

Collections.Generic.List`1[KerbalTeamAI] team P

A grab from 0.23: Perhaps, no?

The issue is more so "what is the best way to do this" and well... I think I'll have to use reflection to break into

PartModuleList (unprintable ASCII characters) H

*Yes, it really is named " ", some kind of scrambling that mono doesn't afford me and I don't care enough to learn how to do it.

Or I could brute force it by awakening the part. Ian (Module Fuel Tanks) has a bruteforce way of calling "Awake" via reflections. Or I think that adding it as a gameobject (Reading Unity References revealed that "Awake" is called by unity, so yeah) will do it as well, it's just that it is "brute force" and I don't know what kind of issues that could cause.

Eitherway, I can say that currently there are 4 modules attached to the KerbalEVA part (KerbalEVA, ModuleScienceExperiment, ModuleScienceExperiment, ModuleScienceContainer) which indicates that the core should still be there, (In theory again, If you awake a module then add it... it "might" work. I recall doing several bruteforces until I settled on the method used here).

*Right now, I'm really just working on getting the EVA_LifeSupport working again; but as I understand, it is the same problem between the two of them.

Edited by Fel
Link to comment
Share on other sites

I've someone knows how to properly load a part to a KerbalEVA prefarb, than this mod can life again, until that the code just keeps getting random null reference exceptions, spamming the console.

... okay wth.

I spent the past few hours slowly trying to get the prefab to "correctly load" a partmodule (I don't really use C# or "Reflection" that much, and I tried figuring out from reference first so... yeah).


Type PartType = Type.GetType("Part, Assembly-CSharp");
foreach (FieldInfo m in PartType.GetFields(BindingFlags.Instance | BindingFlags.NonPublic)) {
if (m.FieldType.ToString() == "PartModuleList") {
m.SetValue(part, new PartModuleList(part));
part.AddModule("ModuleName");
break;
}
}

But the age old


try {
part.AddModule("ModuleName");
}catch{}

Still works :S

In fact, it is exactly what you're currently using as I just downloaded your source to patch that in, and then found it was already working.

Err, so what was the problem? What broke? Just need to recompile it?

Wait...So you are back again ? Can we expect an update?

I was just trying to patch it into "working order" for MSD, but now I'm confused as it doesn't seem to be "broken".

https://www.dropbox.com/s/nyjb662pnc07ykc/EvaFollowerX.zip

(Attributes to MSD as this IS entirely his code and all I did was compile the thing)

I mean, they follow... the code is attached to each Kerbal, after that it's just algorithms and programming?

Edited by Fel
Link to comment
Share on other sites

Hooray! I can confirm that this works! (I guess that no one had bothered to try the update :P )

hkXwKwPl.png

One question. It appears that Fel, the original author of the mod, had added buttons to Tighten/Loosen your formation; is there any hint of them in the code? Because they don't appear on the kerbals...

Link to comment
Share on other sites

  • 2 weeks later...

I can confirm that, yes, it does work. Kinda wish that the followers would mimic your actions, EVA packs, running, etc, rather than just sedately trudge along.

Sadly, unless someone else picks this mod up, that will never be fulfilled. Ah well, as it stands, it's good.

May this mod never break!

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...
  • 4 weeks later...
  • 1 month later...

I updated MSD's work for 0.24.2.

I did make a small change in the code, because of an optional argument problem, but nothing important.

Didn't really test this anywhere but the launchpad, I don't know yet if this work on moons or other planets.

Sources are included in the zip file.

Edited by Lilleman
Link to comment
Share on other sites

This mod idea is awesome, sad part is that I'm not experienced enough with unity, so the trick of loading the mod was horrible, it resulted in a lot of bugs and nullreferenceexceptions.

The reason I forked the code was to tweak some of the animation problems and the fact it didnt work on the mün, not to actively develop it. Should I?

Thanks Lilleman for patching it for 24.2!

Edited by MSD
Link to comment
Share on other sites

  • 2 months later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...