Jump to content

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


Fel

Recommended Posts

I don't think anyone has tried this yet. It seems incredibly complicated.

I have been around since 0.16, and this mod is unique.

There is no-one who knows better than the maker of this mod, so, well, Good Luck!

There are really good program writers out there, like the maker of mechJeb. Go ask them for help if necessary, and don't be shy about asking for assistance.

*grumbles about Compilation Mods and bad programming habits.*

I can program, I can read through the API of KSP and Unity... but I lack the game development experience to do proper A.I. algorithms.

And yes, practically none of this can be done with KSP's interface because it is very self-contained; which means going onto learning Unity.

*Dramatic Sigh* Perhaps I'll see what I can do.

Just a quick suggestion, can you make them stand on their own if they somehow tumble down?

That's a RagDoll condition.

I believe that it can be disabled via unity's interface... which ".isKinematic" might actually be what I needed.

The mod does not work in low gravity. Sometimes the sort of glitchwalk toward the player controled kerbal, but the NPC don't walk in Mun Gravity.

Buggy programming on my part (and not a lot of exploration into the animations).

Okay, so the KerbalEVA is suppose to "bound" when "geeForce < me.minWalkingGee"... I assume some kind of small force; so just need to get the vectors down.

Edited by Fel
Link to comment
Share on other sites

Hey Fel, I can help you with ideas on some of these issues.

1) the ragdoll can be overcome. There is a condition called 'canrecover' have a look for it. Also a cheap way to knock them out of their ragdoll is to give them a force nudge, with an add force.

2)There is a variable that controls the minimum required g's to walk and stability while walking these might help on the moon/low gravity.

If you need other details pm me.

Later!

Link to comment
Share on other sites

I tested this on Mun but they just stood there then when I went to Duna the other Kerbal was walking like how they do on Mun? He didn't sprint either because he was walking like if there was low gravity on Duna but the walking is like Kerbin on Duna.

H3HMWzh.png

Link to comment
Share on other sites

tygoo7, is that off the latest versions?

*Confirm you REMOVED the old version as well, please.

The mun has some terrain issues at points... but even then that just makes them "float" to you. (And I KNOW they work on the mun because I hex-edited my crew of 10 kerbals there for excessive testing UNTIL they worked.)

And I THOUGHT I corrected the gravity issue

double geeForce = FlightGlobals.currentMainBody.GeeASL;

(Previously, geeForce was either part specific, or leader specific... it turned out that 'moving' increased the geeForce significantly which caused the switching between modes)

If still no for the mun, please give me the coordinates, or better yet, open your save file and copy these points:


VESSEL
{
pid = 496024c2da194fc1a7845ca430158dbe
name = Anmy Kerman
type = EVA
sit = ESCAPING
landed = False
landedAt =
splashed = False
met = 69.6999999645923
lct = 131344.900544404
root = 0
lat = 0.0610740628114508
lon = -74.6715070457977
alt = 378774.591345657
hgt = -1
nrm = 0.01787948,-0.9002814,-0.4349411
rot = -0.2253426,0.7882813,-0.4736075,-0.3217598
CoM = 0,0,0
stg = 0
prst = False
ref = 0
cPch = 0
cHdg = 0
cMod = 0
ORBIT
{
SMA = -533385.946696886
ECC = 1.00792732698069
INC = 7.06281505831726
LPE = 190.910197151153
LAN = 45.0788886004953
MNA = 0.679091350319027
EPH = 131357.260544398
REF = 1
OBJ = 4
}

*and, of course, any suggestions are MUCH appreciated. (Well, I still have to get them to break apart a with the 'A.I.' addition [or figure out a way for the player to disable it or something idk...])

*Also, I still am having an issue poping the kerbals out of ragdoll mode, any advice to that would be appreciated (remember, no human input).

Edited by Fel
Link to comment
Share on other sites

*Also, I still am having an issue poping the kerbals out of ragdoll mode, any advice to that would be appreciated (remember, no human input).

Give this a go:

                if (me.isRagdoll)
{
// Don't do it on the controlled Kerbal, player is capable of that.
if (FlightGlobals.fetch.activeVessel != me.part.vessel)
{
// You can recover no sooner than 0.200000003f seconds, 1.21 seemed like a good time to me.
if (me.canRecover && me.fsm.TimeAtCurrentState > 1.21f)
{
foreach (var stateEvents in me.fsm.CurrentState.StateEvents.Where(se => se.name == "Recover Start"))
{
me.fsm.RunEvent(stateEvents);
}
}
}

continue;
}

Edited by Razchek
Link to comment
Share on other sites

Ok I downloaded the new version but on Mun the following kerbal is walking on its side and it keeps making my game freeze and doesn't respond? I didn't have any trouble with my ksp until I just downloaded the new one?

Edit: I uninstalled it and now my ksp is working fine.

Edited by tygoo7
Link to comment
Share on other sites

I tested both versions in the first post and confirmed they both work.

Can you post the above code I requested and also post (via '['code']') your output_log.txt after the crash?

*Err, crash or "freeze" because... well, yeah...*

Hmm, would it be possible to make them go in some sort of a formation, a triangle for example. Also, some kind of a patrol function would be interesting, as you could liven up your base with wandering Kerbals.

Formations are "plausible" due to the code-rewrite (the standard formation looks something like this)

fjM2qkE.jpg

Which they'll eventually auto-arrange themselves into due to the way I wrote the "keep x distance away but get as close to the leader as you can"; just a question of what types people would want to see, then I can start working out the math for it.

Patrolling is kind of simple, right now the kerbals can follow anything so just need to tell any kerbal that gets within x meters of a "patrol node" to "goto x node"... the problem is making it easy for the player to setup. You could just walk between buildings rather than "patrol", which I think is interesting (again, fairly simple to do) but without pathfinding they can fairly quickly get caught trying to run though a building XD.

Edited by Fel
Link to comment
Share on other sites

this mod is just... the most awesome thing i ever seen. Keep with the great work.

Also, i have a question... The kerbals can follow vessels? Like... a rover or something?

Edited by Pachi3080
Link to comment
Share on other sites

I don't know if you already know this but... In the 0.11.2, when you get 2 or more kerbals on EVA, the game crashes.

here is the crash report, maybe this could be useful for you...

http://www./download/cnbo58apw1xoco4/Eva_Followers_0.11.2_crash.rar

edit:

The 0.11.1 works in the mun for me.

in a really weird way, but it works. (Almost)

5c1.png

ti8.png

Edited by Pachi3080
Link to comment
Share on other sites

Any Thoughts / Suggestions... I am a fair bit limited here, but having a strong grasp on what the A.I. should do would help, I think.

a way to make kerbals walk a certan way (like march in a line or grid ;) (like the military))

and paths for kerbals to walk over and over and over and over and... ( OVER 9000!!!! and overs later...) kinda like a patrol...

Link to comment
Share on other sites

The 0.11.1 works in the mun for me.

in a really weird way, but it works. (Almost)

I believe that is caused because I decided to stop excluding ragdolls (If a kerbal ragdolls, I use to exclude it; but I figure it is more annoying to have to go back after realizing one of them got stuck or something... as well as I've been trying to get them to pop out of their ragdoll state.)

Just switch to him and press W.

Now, I am using a few dirty hacks to get them to turn upright; I'll look deeper at the transforms to see if I can use "natural code" instead; if that is causing the problem.

Could you give me the co-ordinates where this occurs; I've moved back and forth between the mun and the launch base and it seemed to work.

Also, i have a question... The kerbals can follow vessels? Like... a rover or something?

Currently they're just playing "follow the leader", I hope to extend it to nearby vessels so you have a kind of "roaming" about the base. (Follow the leader causes "bunching" far too often, and it is getting rather complicated to keep them from doing that. A base would be naturally spread out and make it fairly easy to keep them apart, occasionally play "follow the leader" and break off to go their own ways... it wouldn't look great (This isn't exactly my forte) but it'd be a start of an Ambient Life type of thing [so it'd be neatish])

Hmm, would it be possible to make them go in some sort of a formation, a triangle for example. Also, some kind of a patrol function would be interesting, as you could liven up your base with wandering Kerbals.

I've taken a look at the formation code, (v.delta); when v.delta /= 2 is used instead of 3 the kerbals maintain formation fairly strongly, They freak out a bunch over the tiniest of "out of place" though; (I can strip the rotations to only turn to the player to fix that end, but one freaked out enough to become a ragdoll XD)

Link to comment
Share on other sites

I've taken a look at the formation code, (v.delta); when v.delta /= 2 is used instead of 3 the kerbals maintain formation fairly strongly, They freak out a bunch over the tiniest of "out of place" though; (I can strip the rotations to only turn to the player to fix that end, but one freaked out enough to become a ragdoll XD)

>.>

Well, as long as you keep at it, I'm sure you'll get it to work. I would offer my assistance if i actually had any extensive programming knowledge. I've always been about to start but never finding enough time for it :S

This got onto the KSP Weekly's mod spotlight, btw.

Link to comment
Share on other sites

Could you give me the co-ordinates where this occurs; I've moved back and forth between the mun and the launch base and it seemed to work.

this hapens around the north pole... Tomorrow i'll give you the co-ordinates, i don't have the game in this computer right now.

Link to comment
Share on other sites

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...