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

@Gaalidas

The window isn't dragable anymore. Somehow it doesn't move when I wanted to drag it and I was too lazy to look into that. ^^

As for the position I think you can grab the coordinates of the app button and then just move the window according to that. Again I didn't looked into that matter.

Btw the dust toogle really turns dust on and off. But it's just a quick hack (KFDustFX.cs -> line 294) to test if the chain GUI -> persistence manager -> dust handling works. There might be a better place in the code to act on global variable changes.

One thing I'd like to see is whenever the window is closed, either by scene change, save button, or re-clicking the button, that it commits the changes to file.

IIRC it saves the changes when the player closes the window by clicking on the app button. But you should test it if it really works (at least there are no errors reported).

I have code in dustFX that changes the visible state of the context menu dust toggle (for per-part toggles) but I have no idea if the conditions for its visibility are checked per frame or some sort of heatbeat timer, or if it's only checked on the scene loading.
I've no idea myself. I didn't looked into large parts of the plugin code. I only know about the GUI, persistence manager and the dust color stuff.

Currently I'm investigating the part icon zoom bug in the editor's part list. I extracted some numbers and asked lo-fi if he can find them in the model somewhere. If he can find them then we'll probably know why the parts are zoomed wrongly.

Edited by *Aqua*
Link to comment
Share on other sites

Cheers guys. Latest commit correctly toggles the dust and camera. Previously, it was looking at a local variable that never got its value from the persistence value.

Link to comment
Share on other sites

The part icon zoom bug (infinite zoom right?) is something to do with resources and such. It only happens on modded parts as far as I know, and there's a mod for fixing it (I think it's called ModuleFixer) but there are hacks to get rid of it in a per-part basis. I don't know the details, I still use ModuleFixer and it hasn't even been updated since... well, forever. if you're referring to the position of the parts in the icons, however, then that's a different matter and is related to how the tracks cannot be shielded properly in a fairing and overheat, even though they are visually protected. PartIconFixer (a mod made during the early days of KF track development by a 3rd party) is avaialble which can fix that without requiring any module definition in the part, and thus no dependency.

- - - Updated - - -

Cheers guys. Latest commit correctly toggles the dust and camera. Previously, it was looking at a local variable that never got its value from the persistence value.

Indeed, that was based on old code of mine before Aqua joined the team and corrected by blunders.

Link to comment
Share on other sites

Ah ha.

The bug in question is the reported size of track in the editor. They're reported as huge, which is because of the same issue that causes the editor icons to be tiny without the part icon fixer. I believe the way to manually meddle with it is IPartSizeModifier(), but it's... bizarre...

- - - Updated - - -

Just got


NullReferenceException: Object reference not set to an instance of an object
at KerbalFoundries.KFDustFX.OnPause () [0x00000] in <filename unknown>:0


at EventVoid.Fire () [0x00000] in <filename unknown>:0


at FlightDriver.SetPause (Boolean pauseState) [0x00000] in <filename unknown>:0


at PauseMenu.Display () [0x00000] in <filename unknown>:0


at PauseMenu.Update () [0x00000] in <filename unknown>:0

Appears to be OK if you go to a launched vessel straight from the space centre. I had a craft off the side of the runway earlier, which I was clicking on and controlling from there. If I launch a craft from the SPH, the OnPause nullrefs start to appear every time I pause. At least I know why it was behaving earlier.. Presumably this is to do with what you were concerned about earlier, Aqua.

Link to comment
Share on other sites

I think that exception originates from the wheel sound object.

I could reproduce the error:

Pausing/unpausing the first vessel got me this:

[LOG 21:54:47.002] Game Paused!
[LOG 21:54:47.004] Active Vessel is moving (sqrVel = 227.915335272892). Cannot save.
[LOG 21:54:49.821] Game Unpaused!
[WRN 21:54:49.822] Can not play a disabled audio source
[LOG 21:54:58.608] Game Paused!
[LOG 21:55:01.623] Game Unpaused!
[WRN 21:55:01.624] Can not play a disabled audio source
[LOG 21:55:02.062] Game Paused!
[LOG 21:55:32.013] Flight State Captured

Then I started a second vessel and switched to the first one and got that:

[LOG 21:57:00.093] Game Paused!
[EXC 21:57:00.095] NullReferenceException: Object reference not set to an instance of an object
KerbalFoundries.KFDustFX.OnPause ()
EventVoid.Fire ()
FlightDriver.SetPause (Boolean pauseState)
PauseMenu.Display ()
PauseMenu.Update ()
[LOG 21:57:02.916] Game Unpaused!
[WRN 21:57:02.917] Can not play a disabled audio source
[EXC 21:57:02.917] NullReferenceException: Object reference not set to an instance of an object
KerbalFoundries.KFDustFX.OnUnpause ()
EventVoid.Fire ()
FlightDriver.SetPause (Boolean pauseState)
PauseMenu.Close ()
PauseMenu.Update ()

Looking at the code only WheelImpactSound or WheelImpactSound.audio could cause that.

Link to comment
Share on other sites

Edit: actually, something I struggled with on the camera, and related to your comment about the redundant allocations.. unless I destroyed the camera, KSP kept rendering the flight view through it. Which isn't massively helpful. I'll have to try and figure out why that kept happening.

You can disable the camera to prevent it from rendering automatically :)

Link to comment
Share on other sites

Ah... IIRC, there are some checks for whether to apply it, which presumably we're not. In any case, I'd handle the sounds from FKMW, so we can probably just remove the sound stuff, which might be easier than tracking that bug down.

I'm working on fixing the Tweakscale float stuff once and for all. Nearly there...

- - - Updated - - -

You can disable the camera to prevent it from rendering automatically :)

Thanks, I'll revisit the code shortly. Any tips for optimisation, other than what we've talked about already?

Link to comment
Share on other sites

I'm having a wierd bug with KF wheels and KIS, though it seems to be more visual and informational.

These wheeels were put on using KIS, and while the left side is visually rotating correctly, the right side is both visually and informationally with RPM, is going backwards. It's actually all working correctly, it's not like it's forcing me to do donuts when I attempt to go forward.

Edit: A switch to KSC and back (to fix a wierd phantom screwdriver) apparently fixed the graphical issue, but I'm still having steering issues, which I don't know how much of it is attributable to just being on minmus.

screenshot59_zpsyq7gso3m.png

The brakes also seem to have broken somewhat as I'm still sliding downhill. Also, shoulda stuck an RTG or two on.

Edit: Then again, it's minmus.

screenshot60_zpsqmmsqvoq.png

Edited by smjjames
Link to comment
Share on other sites

Thanks to a wildcard suggestion from V8Jester, I finally made some solid progress with this:

http://youtu.be/UwuiPtsmvW4

Also a big thanks to Baha for showing me the way with the Burn Together code. Still a lot of work to do on that before it gets released into the wild, but I'm no longer terminally stuck! Thanks to Gaalidas and *Aqua* for dealing with other bits while I'm off playing with crazy stuff. More to come ;) I'd also like to see an end to the need for docking ports to tie rovers down for transport...

Seeing some null refs by the way, guys. Mostly related to DustFX when the game is paused. I'll do some more investigation later and report back. I assume it's probably just some stuff that needs hooks into the OnPause and OnUnPause methods, so should be no big deal.

I have said it before, but I feel I must ask again- How do we get that cockpit? Can you post that cockpit?

Link to comment
Share on other sites

I'm having a wierd bug with KF wheels and KIS, though it seems to be more visual and informational.

These wheeels were put on using KIS, and while the left side is visually rotating correctly, the right side is both visually and informationally with RPM, is going backwards. It's actually all working correctly, it's not like it's forcing me to do donuts when I attempt to go forward.

Edit: A switch to KSC and back (to fix a wierd phantom screwdriver) apparently fixed the graphical issue, but I'm still having steering issues, which I don't know how much of it is attributable to just being on minmus.

http://img.photobucket.com/albums/v214/smjjames/screenshot59_zpsyq7gso3m.png

The brakes also seem to have broken somewhat as I'm still sliding downhill. Also, shoulda stuck an RTG or two on.

Edit: Then again, it's minmus.

http://img.photobucket.com/albums/v214/smjjames/screenshot60_zpsqmmsqvoq.png

Taking the Minmus thing out of the equation for the time being (which is like taking the numbers out of an addition problem and expecting it to work still, but let me work this one anyway...) I remember first off that there were some issues back in the days before we had KIS and it was just the KAS attachment. I am unsure why it would persist after a scene reload, however, since that is the normal fix for such issues. If you were using the latest dev version of the mod, I could also expect the brake issues if you craft is extremely light. Lo-fi might have fixed it since, but I remember making an extremely light vehicle that could overpower the brakes and do complete flips just by tapping the forward/backward button while the brakes were turned on.

Now, add Minmus back into the equation and it suddenly all makes sense for you. For me, not so much... I was on Kerbin when I did my flips.

One thing i do notice however is that those appear to be tracks, not wheels. Tracks tend to use a track steering which means they really don't visually "steer" at all, they simply run forward or backward at a different rate on opposite sides of the craft to turn the vessel.

- - - Updated - - -

I'm working on fixing the Tweakscale float stuff once and for all. Nearly there...

I wasn't aware they were broken... what's the story with those? Did you simply forget to patch the corrector into some of the new equations?

- - - Updated - - -

I think that exception originates from the wheel sound object.

I could reproduce the error:

Pausing/unpausing the first vessel got me this:

[LOG 21:54:47.002] Game Paused!
[LOG 21:54:47.004] Active Vessel is moving (sqrVel = 227.915335272892). Cannot save.
[LOG 21:54:49.821] Game Unpaused!
[WRN 21:54:49.822] Can not play a disabled audio source
[LOG 21:54:58.608] Game Paused!
[LOG 21:55:01.623] Game Unpaused!
[WRN 21:55:01.624] Can not play a disabled audio source
[LOG 21:55:02.062] Game Paused!
[LOG 21:55:32.013] Flight State Captured

Then I started a second vessel and switched to the first one and got that:

[LOG 21:57:00.093] Game Paused!
[EXC 21:57:00.095] NullReferenceException: Object reference not set to an instance of an object
KerbalFoundries.KFDustFX.OnPause ()
EventVoid.Fire ()
FlightDriver.SetPause (Boolean pauseState)
PauseMenu.Display ()
PauseMenu.Update ()
[LOG 21:57:02.916] Game Unpaused!
[WRN 21:57:02.917] Can not play a disabled audio source
[EXC 21:57:02.917] NullReferenceException: Object reference not set to an instance of an object
KerbalFoundries.KFDustFX.OnUnpause ()
EventVoid.Fire ()
FlightDriver.SetPause (Boolean pauseState)
PauseMenu.Close ()
PauseMenu.Update ()

Looking at the code only WheelImpactSound or WheelImpactSound.audio could cause that.

I think maybe it's time to put the sound element to rest. If we want an impact sound effect, we should really dedicate a different module to it. DustFX should be related to the effect, and not the noise. The only reason it's in there is because the original code I started with, in CollisionFX, had an impact sound feature. Considering the errors we've dealt with over the many iterations of DustFX since I merged it with KF, I think it's a bit more trouble than it's worth right now. i might be interested in tackling that as a new module, or simply extending the already established methods of playing sounds when running the wheels/repulsors with an impact effect after the Dust and GUI stuff is more or less settled.

In other news, this morning/afternoon I started trying to fix up the last thing I want for the GUI: a "save and close" button at the bottom. I managed to get one to show up, but it was not functional. I have no idea why it wouldn't function either.

Edited by Gaalidas
Link to comment
Share on other sites

I've never actually tried assembling with KIS, smjjames. The RPM indicator will be negative on one side, that's quite normal, but it wouldn't surprise me if they didn't quite work correctly when first built. A save/reload ought to fix as you've found.

My experience with tracks on minmus hadn't been good, though. The low gravity and low ground pressure didn't tend to mix well, which is, I suspect why the steering and brakes don't work so well. I'll hyperedit something similar over and have a play if I get a few minutes.

The cockpit is from the the space tug by nil2work

[removed link to defunct website]

Sadly, the IVA is unfinished and he's not been seen for some time, but it's still excellent.

Cool, I'll rip the sound out and implement in the wheel module. Will save a lot of hassle.

Yeah, the equations needed a tweak for the TS stuff to be perfect. Think I've got it nailed.

Link to comment
Share on other sites

I'm tempted to ask him if I can finish it, it's my absolute favourite for rovers. Just needs texturing and some props.

Excellent, looks like someone's having fun turning the KSC into rubble! Very nice. I must do another set of long tracks in a different style - maybe American. But then there are a lot of parts to finish!

Link to comment
Share on other sites

Lol. I don't tend to be able to do real stuff. I sort of get an idea half way through, my mind goes off on a tangent and something else comes out entirely... A rough style is about as close as I get.

If there's someone who's interested in making specific stuff, I'm always happy to take a model and do the track skinning and config wizardry, though. I have a feeling I'll end up reviving a lot of old wheels after the Unity 5 move...

Link to comment
Share on other sites

Known issue - been reported many times. There's an explanation in the OP, I believe (or there should be), but the short version is it's a KSP bug related to bounds detection on the skinned meshes the tracks use. We're working on a fix for the next release, but it's not looking to be easy.

Link to comment
Share on other sites

A small request, but could you fix the preview icons for tracks in VAB/SPH? Being so small, I unconsciously overlook them, and as I'm not familiar with the pack, finding the right tracks is trial and error.

Link to comment
Share on other sites

In the OP you'll find a link to the PartIconFixer plugin. The version info hasn't been updated, but it works fine with 1.04. It's caused by the same bug, funnily enough.

Link to comment
Share on other sites

I'm tempted to ask him if I can finish it, it's my absolute favourite for rovers. Just needs texturing and some props.

Excellent, looks like someone's having fun turning the KSC into rubble! Very nice. I must do another set of long tracks in a different style - maybe American. But then there are a lot of parts to finish!

Hey I actually did this for my self. Added two rpm MFDs as well as the interior from another one of his pods, and changed the texture inside to carbon fiber. It could use some..... ok a lot of polishing but it might give you a head start? Let me know if you get permission. Other wise I can just PM it to you if you're interested.

Link to comment
Share on other sites

Edit: A switch to KSC and back (to fix a wierd phantom screwdriver) apparently fixed the graphical issue, but I'm still having steering issues, which I don't know how much of it is attributable to just being on minmus.

You may have done this already, but:

On a low-g world like Minmus it is necessary to use the separate vehicle control bindings and not rely on the implicit forward/back/left/right from the pitch/yaw controls. If you don't, the pitch and yaw from any onboard reaction wheel overwhelm the input to the tracks or wheels.

Link to comment
Share on other sites

Yeah, that would be awesome! I'm co author - I wrote the plugin for the engines - so I'm sure he won't mind even if I don't get an answer :)

Cool, I'll send it over this evening when I'm back at home

Link to comment
Share on other sites

Cool :) I've just pm'd nli2work, but I'll crack on anyway. Too cool to let it go unfinished! The whole tug is absolutely brilliant, for those that haven't tried it.

Link to comment
Share on other sites

Cool :) I've just pm'd nli2work, but I'll crack on anyway. Too cool to let it go unfinished! The whole tug is absolutely brilliant, for those that haven't tried it.

I completely agree, and honestly I never would have known about it had you not featured it in several of your pictures. It's a shame so many good mods get lost in the fog

Link to comment
Share on other sites

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