Jump to content

[1.0.x] [V1.9f] Kerbal Foundries wheels, anti-grav repulsors and tracks


lo-fi

What to work on next?  

1,282 members have voted

  1. 1. What to work on next?

    • More wheels
      123
    • More tracks
      453
    • Rover bodies
      241
    • Landing gear
      137
    • Landing legs
      108
    • Something completely different
      193


Recommended Posts

That means maintaining it - which I'll never remember to do. I even forgot to increment the version number from 1.7 in assemblyinfo to 1.8 when I released it.

Link to comment
Share on other sites

There are ways to automate those things. I'll look for an example when I get back to my computer.

- - - Updated - - -

by the way, tweakscale is behaving again with my revised scaletypes. You'd better update it for your install to make sure it still works for you. I'll be looking into reducing the exponent sets after some testing and further integration with tweakscalecorrector.

Link to comment
Share on other sites

Yeah, it's not well documented, but if certain parameters in the scaletype definition are missing or using an old format, the scale implementation for that part completely breaks. I suspect that a few default values for the parameters in the DLL would fix that issue, or at the very least a "final" layer MM patch to apply default values to scaletypes that lack a definition for that parameter would do the trick. It's not my problem right now though and, try as I might, the developers in that thread are really slow to investigate and fix problems like that. It probably stems from a feeling of "and who do you think you are telling this awesome individual how to code his successful plugin that is beautiful and smells sweetly." It's a "battle of the lost staplers" event waiting to happen. By the way, you do get the reference in there don't you?

So, I was looking at a few misbehaving mods in ILSpy today to see what's going on in their code and, as usually happens when I'm doing this, I started browsing through other mods. I came across this little beauty in a mod that implements suspension-based auto-balancing for landing legs (not the best implementation due to it relying on the length of the suspension instead of creating a leg with multiple joints which can adjust itself further than the main spring-suspension of the foot, but it's the best we've got so far.) From what I can tell, it uses a stock method that allows the part to update it's drag cubes. I immediately thought of the problem we've been having with tracks appearing to be inside a fairing, but burning up as if they were not, and my idea about a dummy retraction state for the wheels that would mimic a "shielded" state on the part and, as a side effect, pull all the suspension into a tight "fully retracted" position for easy fitting. I'm sure you've probably seen this already, but in case you haven't, it might be an interesting place to start. If not, it's just one of my uneducated discoveries that I felt like sharing. Anyway, the method I'm going to post below is a custom method in the mod called "AutoBalancingLandingLeg" (at least, it lacks and spaces or dashes in the code decompiler):

[COLOR=#0000ff][B]private[/B][/COLOR] [COLOR=#ff0000]void[/COLOR] [COLOR=#191970][B]setDragCube[/B][/COLOR]([COLOR=#ff0000][B]float[/B][/COLOR] [B]value[/B])
{
[B]base[/B].part.DragCubes.[COLOR=#191970][B]SetCubeWeight[/B][/COLOR]([COLOR=#0000ff]"DEPLOYED"[/COLOR], [COLOR=#00008b]1[/COLOR]f - [B]value[/B]);
[B]base[/B].part.DragCubes.[COLOR=#191970][B]SetCubeWeight[/B][/COLOR]([COLOR=#0000ff]"RETRACTED"[/COLOR], [B]value[/B]);
}

It could be of interest to check it out. the "SetCobeWeight" method is found in "Assembly-CSharp.dll -> DragCubeList"

Of course, it goes without saying that you'd probably have to look into some custom drag cubes for your parts... but that's another story altogether.

- - - Updated - - -

Would there be any harm in decreasing the existing crash resistance and structural/torque failure figures? It seems faintly absurd that one can slam them into the ground at orbital velocity without consequences.

I'm asking not for a second bite on the suggesting cherry, but "if I do this in my own game, do you know that something unexpected will happen"?

To chime in on this one, a bit late as it is, you should always expect that something unexpected will happen. That's why it's unexpected... y'know... cause you don't expect it... except that you should be expecting it... I'm not making any sense now... -explodes-

Anyway, I'm curious as to how you can drop a craft, with these parts on them and at orbital velocity, and still be able to do anything with them at all? I understand the parts themselves will probably be intact to a certain degree if they are really that hard to damage, but the rest of your craft is going to be trying to reconcile their existence at the atomic level... and failing miserably. If you've managed to do this, in practice, I would love to see how you did it.

Edited by Gaalidas
Putting more emphasis on my astonishment.
Link to comment
Share on other sites

Ahh, drag cubes. I haven't found the will to fight with those yet. Don't think the retract state would make any difference, but if I can define custom drag cubes it'll probably help. Still doesn't stop KSP thinking the parts are bigger than they really are for assembly building sizing.

Nope, actually didn't get the reference?? I just thought it was hilarious. And if you google it now, it comes up with all my posts in this forum! Which is kinda cool, and very handy..

Link to comment
Share on other sites

Drag cubes? Thought this was mentioned recently somewhere...as far as i understood, it is another collider mesh without physics, mainly used to spare out hollow parts or to simulate the room in a hollow part. Is it possible to tell,a model at what time it has to change the collider?

Link to comment
Share on other sites

I've been putting together something that is kind of a mashup of my deployable parts, and Lo-fi's tracks here, and I know it's been wanted by a few people way back when I was developing the tracks myself. Finally, here they come.

I'll be handing them to Lo-fi when they're about ready, and he will be getting them running.

traacks2.gif

Link to comment
Share on other sites

Not at all, go for it damerell.

The version will show in the debug menu, under database > assemblies, 0kev

Ah, good to know. An out-of-game method would be nice. My computer doesn't do well at anything else when KSP is running, so I check for manual updates with KSP closed.

Link to comment
Share on other sites

I've been putting together something that is kind of a mashup of my deployable parts, and Lo-fi's tracks here, and I know it's been wanted by a few people way back when I was developing the tracks myself. Finally, here they come.

I'll be handing them to Lo-fi when they're about ready, and he will be getting them running.

http://3.bp.blogspot.com/-LXxN5som-VE/VXdaxM48GlI/AAAAAAAAD4k/7CRmO7B7qZ4/s1600/traacks2.gif

:0.0::0.0::0.0: DO WANT! Awesome idea and execution! So many times I've wanted to put up a largish rover, but couldn't deal with having big honking wheels/tracks sticking out. Have you considered something for non-tracked wheels as well?

Link to comment
Share on other sites

Ahh, drag cubes. I haven't found the will to fight with those yet. Don't think the retract state would make any difference, but if I can define custom drag cubes it'll probably help. Still doesn't stop KSP thinking the parts are bigger than they really are for assembly building sizing.

Nope, actually didn't get the reference?? I just thought it was hilarious. And if you google it now, it comes up with all my posts in this forum! Which is kinda cool, and very handy..

I'm trying to remember the movie... the name is not coming up. I hate my memory sometimes. Anyway, it features a guy who is upset because his co-workers keep stealing his staplers. He refuses to accept that he's been fired, and so they just move him into a basement room and tell him he's being "upgraded" all the whole he keeps muttering about his stolen staplers. I have this fleeting memory of the entire building being burnt to the ground later on in the movie, and I think it also features some guys trying to get rich by shaving off fractions of a penny from all the transactions being handled by their company's server farm all the whole not ending up in prison. It's been a while, but what I can remember was that it was hilariously awesome.

- - - Updated - - -

I've been putting together something that is kind of a mashup of my deployable parts, and Lo-fi's tracks here, and I know it's been wanted by a few people way back when I was developing the tracks myself. Finally, here they come.

I'll be handing them to Lo-fi when they're about ready, and he will be getting them running.

http://3.bp.blogspot.com/-LXxN5som-VE/VXdaxM48GlI/AAAAAAAAD4k/7CRmO7B7qZ4/s1600/traacks2.gif

My words, literally, upon seeing that were "holy craaaaaaaaa...." and I think I sat there with my mouth open for at least 3 seconds before recovering. That is exactly what we need. Still gonna be a beast to figure out how to get KSP to accept that it's not as huge as it seems when retracted, but visually that thing is awesome.

Link to comment
Share on other sites

Wait a minute. Wasn't it Office Space?

Such cool stuff from electronicfox :D can't wait to see that in game - I have a feeling it will be quite popular.

Link to comment
Share on other sites

:0.0::0.0::0.0: DO WANT! Awesome idea and execution! So many times I've wanted to put up a largish rover, but couldn't deal with having big honking wheels/tracks sticking out. Have you considered something for non-tracked wheels as well?

I am thinking about regular wheels. The whole purpose of my mod is to make parts that can fold themselves within the profile of a rocket, or within a decently sized fairing. Wheels, engines and more discreet large solar panels are in the box of ideas at the moment. I might even tackle some mining parts later.

- - - Updated - - -

My words, literally, upon seeing that were "holy craaaaaaaaa...." and I think I sat there with my mouth open for at least 3 seconds before recovering. That is exactly what we need. Still gonna be a beast to figure out how to get KSP to accept that it's not as huge as it seems when retracted, but visually that thing is awesome.

I'm not sure exactly how KSP handles moving objects but if its anything like my folding wings, a little plugin work might be needed. Another thing I still havent figured out is how to stop parts colliding with each other when retracted. Things get all twitchy and explodey, if I can work out how to disable certain colliders at runtime when stowed, I'd be golden.

Link to comment
Share on other sites

I can write a little module to disable certain colliders, that's pretty straightforward. I don't know if you can disable GameObjects as part if an animation though?

Such cool stuff happening :)

Link to comment
Share on other sites

I can write a little module to disable certain colliders, that's pretty straightforward. I don't know if you can disable GameObjects as part if an animation though?

Such cool stuff happening :)

Ah that'd be amazing! It would also help my (currently collider-less) wings.

Link to comment
Share on other sites

https://github.com/KerbalFoundries/KF_plugin

This one is public, and where I'll distribute source from in the future. I suggest we make dev branches after setting the stable point for the next release.

I think the part grouping was as simple as prefixing the names of the parts, so put KF in from of all the part titles and that's where the magic happens.

Link to comment
Share on other sites

Handy! OK, so in the pipeline:

Very small, simple tracks. Asymmetric, raised sprocket (like CAT dozers).

Large tracks of similar design.

Fixes for the orientation code to allow parts set up in something other than the default orientation.

DustFX: I've got some cool ideas I need a little time to try out.

Roll cage.

Bofors BV202 inspired tracks

Rolling resistance model based on design and weight.

Had an idea suggested for small, ruggedized chain link wheels I quite like.

Rebalance cost, weight, speed, power, consumption as suggested by Riocrokite.

After that, it's 1.9 release.

Link to comment
Share on other sites

cool stuff lo-fi,

maybe it could be possible to tweak formula for rolling resistance so it affects acceleration / deceleration only. So in this way we could have workaround for the issue that even small wheels on heavier vehicles have same or better acceleration/deceleration.

For example final engine torque = initial engine torque curve - (rolling resistance curve * mass coefficient)

(it can't be lower than zero)

So in this case you don't have weird situation that rolling resistance * mass coeff behave like super brakes with heavy weights but they actually increase inertia force of vehicle while accelerating and decelerating (so acting how unity should behave originally). In this scenario player has incentive to use bigger wheels that provide better acceleration and higher speed for heavier vehicles (similar to TWR in rocket engines)

I guess that more efficient formulas would be possible with square power or something so that final acceleration / deceleration torque would not decrease linearly as weight increase (so that the final value would never reach zero).

btw, we have confirmation that Edy's vehicles model will be used in KSP:

http://www.reddit.com/r/KerbalSpaceProgram/comments/39lcs8/ksp_to_use_edys_vehicle_physics/

Edited by riocrokite
Link to comment
Share on other sites

Not really - too difficult given the sand box nature of KSP. Using the rolling resistance would be a poor method anyway, it should be done with the mass value of the wheel collider really. It's not something anyone else has ever picked up on though, so I'm thinking leave well alone!

Link to comment
Share on other sites

Hey, lo-fi, do we have any easy way to find out if the water repulsion is active or not? In the current dust system, the water biome exists, but the scraping with the ground would only work if I was scraping the bottom (aka. the landscape below the water). My idea to get around this is to send it a fake collision state when the water slider is active, but I can't find any sort of boolean to grab.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...