Jump to content

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


Fel

Recommended Posts

It just makes Kerbals "follow the leader."

Adds two buttons to Kerbals on EVA "Follow Me" and "Stay Put".

Additional two buttons added "Tighten Up" and "Loosen Up", for prelim formation work. It seems to have some effect on small groups but can be improved.

Version 0.11

Kerbals are "space aware" in that they'll move out of the way while following... inefficient algorithm makes them "twitch" a fair amount, but maybe that is okay (it looks like they're settling in).

Changed the dll name and made it in a more "official format", so just be aware when replacing the original version.

Version 0.11.1

And fixed the bounding issue... sort of.

Version 0.11.2

Added in a "psuedo random movement" (actually, the kerbals just select a leader when the player doesn't say "I'm your leader")

Could be expanded to any vehicle (i.e. rover, bases, debris), thoughts?

[and yes, this ignores "Stay Put" after a while... eventually will merge the personalities a bit... and still lacking pathfinding so a kerbal that gets trapped in the "collision mesh" I made will bounce around XD. Additionally I need to add in a distance weighting factor to encourage "small groups" but also allow for the "running across" actions (over time, the kerbals will just form 1 solid mass)]

Version 0.11.3

Okay, that SHOULD fix the bug. There SHOULD NOT be any freezing...

Kerbals face the player when "follow me" is clicked, even if fairly close (would like some kind of "wave" too)

Some code trying to break up clusters > 3 but isn't going to be very successful.

Source Cleaning and Misc...

Version 0.12

Much Kudos to Razchek for finally slaying the Ragdoll Monster!

I believe the rotation issues are 'almost fixed', they no longer walk on their sides while at the poles of the mun.

Various 'animation related' bug fixes, (mostly, needing to reset the animation state)

Tried to annotate the source a little more.

Added a 'tighten up' box that should show up on only the followers, which makes small groups (I'd say 5 most) maintain some semblence of a formation better than the default;

I need to add in some kind of "boxed bounds" which will make the final push to keep kerbals in line. (It's like putting marbles in a small box, enough to fill it and they'll stay put as long as you don't shake it).

*** Issues ***

Kerbals will try to face the player, even if higher than they are. Sometimes this rotation will allow them to bounce like crazy or other nonsense (Kerbals are weird ;p)

https://www.dropbox.com/s/6zoyxgm1jgzqfg6/EVA%20Followers%202.zip (0.12)

https://www.dropbox.com/s/bpah4v1hun27ul7/EVA%20Followers.zip (Dev Sources for Formations).

I'm rather heading towards a haitus; I did a bit of testing with the formation code I wrote and found that it isn't actually as buggy as I initially percieved.

First, the Formation GUI needs to operate on the LEFT side of the screen. This is a "Making a GUI" issue (actually, it needs to be 2D and the game uses 3D inputs for screen renderer, if certain things got fixed (and certain maths used to get the camera orientation) this would be much better because it'd act as a 2D thingy).

Second, the Formation Algorithm "IS SUPPOSE TO" use projection to get a vector tangent to a given "formation vector" and the follower. This indicates the distance between the two and allows the motion of the kerbal to be modified. What it seems to be doing is getting the tangent vector, and then comparing the location to the length of the initial vector.

I hereby relinquish any holds on this source / mod or w/e so long as the Non-Commercial aspect of the license is adhered to.

Edited by Fel
Link to comment
Share on other sites

Judging by (sparse) description it's a plugin that gives you partial control over EVAing Kerbals. Usually you only control active kerbonaut, while others stay completely still. Now, after using "Follow me" they should start following active Kerbal. Is that right, Fel?

Link to comment
Share on other sites

Looking at the source code, looks about right. I'll compile this when I get home in about 2 hours and see how well this works. I'm interested in seeing if Kerbals can walk through each other. The code looks as though it checks distances between the active Kerbal and the following Kerbal, but, I don't see anything that depicts other following Kerbals vs other following Kerbals.

Link to comment
Share on other sites

Basically, yes. It just makes Kerbals "follow the leader."

No kerbals can't walk through each other (I don't turn off collision detection) but they'll fight for the space until one of them goes into RagDoll [which, I can't get them to pop out of and is probably something on unity's end (I mean, I can turn it on.... but can't turn it off)].

*And yes, I probably should check distances between other kerbals, but that is a factorial operation n! without optimization routines. (Which means I'd have to have a behaviour class that... well, I could potentially limit it 1 per 1, but you don't even need 1 per 1 because even better routines can give near O(1) results on whether one kerbal's path overlaps any other kerbal's path...)

Edited by Fel
Link to comment
Share on other sites

I am guessing some AI may need to be introduced as long as the non-active kerbals are in physics range for jetpack feature to work.

I use a VERY VERY bad hack to get rotations to work (Notice for you too Pontiac)

If I went into 3 dimensional movement, I'd need to figure out the Quaternion math, understand Model Transforms, and then apply a ConstantForce (???), (from my explorations into unity, most of the controls are actually "client side" rather than in the vessel or KerbalEVA... so I'd be working directly on the Unity Objects.)

As is, rotations are bound to have some issues when trying to rotate on a "non flat surface". The kerbal will move in your direction (movements are vectors), but won't be "looking right" (rotations are... some kind of vector + rotational axis math.)

I love this idea, I really do... it is just beyond my abilities because I have zero game dev experience.

And in the suggestion thread I suggested "EVA Life" which would have Kerbals doing things based on their stats (i.e. stupid people playing with their jet pack, or getting distracted by rocks or such). Which first exposed just how much I really need pathfinding (I also want it to prevent kerbals from jumping to their death, and sure, I can lag the game to hell with raycasts; but I'd rather admit that I am in over my league.)

Link to comment
Share on other sites

Wow op, this is very neat and cool that you made it possible! First a.i :D Im curious about how you did it and im going to check the source out, was it hard to make an passive kerbal follow you? This could be used to make some sort of crew managment stuff, one kerbal is researching, one is piloting etc, exiting plugin !

cheers

Link to comment
Share on other sites

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.

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