Jump to content

Razchek

Members
  • Posts

    267
  • Joined

  • Last visited

Everything posted by Razchek

  1. It's a slightly bigger cave, with some obstacles and a nice surprise at the end. This cave is a bit wet.. hopefully that'll help you find it. Edit: Eeep, double post - quick: someone reply so I don't look bad.
  2. I just tried this out, you're definitely right. The celestial bodies of course have a visibility range as well to determine when the celestial body is 'active'. Which also decides when the relative PQSCity components are active. What I will do is add some properties in the GUI to decide whether or not you want the object enabled / disabled when leaving the planet after the vis range is hit. They will be in the next update. Until then, hold tight! Can you try loading your object as a part (create another config in the same directory). Let me know if that works. Either way, would you be able to send me your part folder for that object (config + model + textures) so I can more easily determine the problem? In the config it appears as if the GDB has loaded the model without an error but instantiating it is causing the issue. I'd like to find out at what point and why, so I can fix this problem for you or help you fix it.
  3. The Mun isn't a PQSCity. It's a celestial body. PQSCity objects are only visible when you're in the celestial body's sphere of influence (where you placed the object) and also within it's visibility range. Good idea. For now just retrieve the PQSCity component. E.g. PQSCity pqsCityComponent = this.gameObject.GetComponent<PQSCity>(); var altitude = pqsCityComponent.repositionRadiusOffset; var mainBodyName = pqsCityComponent.sphere.name; Most likely an issue with your object. For some reason the model may not be getting instantiated by the GameDatabase loader. Post your \KSP_Data\output_log.txt file for me to take a look at and I can hopefully tell you what it is.
  4. Btw, we're still looking for an additional programmer. Check out the KerbTown thread if you're interested in helping with code for the quests. It would definitely help progress the content a bit faster!
  5. Keep up the good work Majiir. Some nice solid coding with unprecedented functionality.
  6. For the camera issue you just rewrite the current camera class to how you feel it should respond. In KerbTown take a look at the KtCamera class file for a rough example. I emulated most of the original functionallity of the actual flight camera but control it manually (except Tilt/Pivot, I didn't find that necessary). This allowed me to clip through terrain as the minimum pitch isn't set at the terrain collision height. Just remember to enable the updates again when the vessel is switched / scene changed. As for the surface issue, detect your altitude. 0 = sea level. If you're less than that; add force up depending on whatever physics factors you want to include. Size (collider bounds) compared to mass could simulate oxygen inside the vessel making it lighter? I think keep gravity enabled and just add the force up (make the negative altitude absolute and multiply the strength of the force) when below the surface. Adjust the water effects as necessary to blur the land above, add a nice low pass filter to the audio to muffle the sound of the water (e.g. alpFilterComponent.cutoffFrequency = 1000 - (altitude * 20)). Maybe even add another filter to echo sound. There's a good hundred lines or so you could write and have a very nice underwater experience. Even less and you'll still have a nice experience lol. --Edit: Just read up on buoyancy physics. Looked a lot simpler at first, but still very doable. I might give it a go (I need to write bouyancy for KerbTown anyway). --Edit2: Found some existing work that I can adapt.
  7. At the moment the only way to do this is to edit the config after you've saved the object: Instances { ... VisibilityRange = 100000 // 100,000 KM from the Local Vector3.zero to world of the static object. ... } Would people be keen on referencing KerbTown.dll in their projects though? I don't see why not, but I feel like I'd get a negative response for that lol.
  8. Good question! It is implemented in my test builds but i'm still deciding on the best implementation method for release which is why you don't see it in the beta code yet. My current test build implementation at the moment is to instantiate objects based on the current active SOI and then having the renderers and game objects enabled relative to the visibility range. Infact it should even be possible with the native PQSCity class - but there have been issues when I've tested this.. so I'll have to do some more testing when I get time lol. I will probably end up making it optional either in the code or config to allow flexibility. I'm sure someone will find a reason to have these persist even when they're not within visibility range haha. Just on that note though. Script your timed solutions to work based on saved persistance and game time passed rather than running all the time lol.
  9. Thank you! But on this one I'm just coding everything. The visual and audible content, stories and concepts are being innovated by the team we've put together. So what we end up with will be somewhat epic. I hope everyone stays tuned!
  10. You might want to take a read of this to learn how to script with Unity: http://docs.unity3d.com/Documentation/Manual/CreatingAndUsingScripts.html Because you were copying from my source code I think you missed out the fact that Setup() events are only executed in the main class for the built in modules. It also looks like you're not looking for something to add the mouse script to. These members are referenced or executed after the built-in components have been added by KerbTown manually, rather than in the actual components. For your own code, you should be writing the script as if it was any other script in Unity. Use Awake, Start, LateUpdate, Update, etc.. Take a read of the information available on the link above for a better understanding. Anyway.. for the above to work you would add this into the MassDriver class: void Start() { Setup(); } And also you want to put the GameObject name into the ObjectName field value. Otherwise when the script is instantiated on your static object it will look for a GameObject with an empty name. Good luck! Btw, nice bridge Cooly568.
  11. None off the top of my head. Feel free to use the floating launch ground though. (Yeah, I know.. but it's just Proof of Concept) I bring to you all an easter egg placed on Eve in update 0.11.3. No other changes were made for this update. If you find the easter egg on Eve you're in for a nice surprise!! There are obstacles you must over come and a letter you must read at the end. This Easter Egg will be tweaked but remain in the stable releases. Think of this as a pre-release viewing. The location is unlikely to change. I hope you all enjoy the new content, and I look forward to hearing feedback. And as always, keep posting the content you've been placing with KerbTown!! Video preview for the Eve EE coming soon.
  12. Level of Detail based on distance isn't implemented yet, but I will push that through if the KSP dev team incorporate it into PQSCity (if they don't do it anytime soon I'll write one up). At the moment there is only one setting, and you can change the view distance in the config file after you've placed and object and saved the session. I should add that to the GUI lol. You could.. it's a matter of updating the position of the ridigbody relative to the current position of the object at the selected offset. I.e. Put a transform as a child of the elevator. This will be the transform that the kerbal position will be updated to. (Could be the elevator platform?) When a kerbal enters the elevator grab it's root transform component (and when it exits, let go of the component). Now in update you would move the transform that you parented earlier to remain under the kerbal while it's in the elevator bounds. Normally you would do this in LateUpdate or FixedUpdate, but update works better for the example below. You would also (after moving the above transform) lerp the position of the kerbal to the same position as the transform. Here's a rough example of moving the kerbal relative to the platform. private void Update() { Vector3 curPos = relativeTransform.position; // relativeTransform is the elevator platform. Vector3 deltaVec = curPos - _lastPos; // _lastPos is an external field. _lastPos = curPos; foreach (DictionaryEntry d in _kerbalsOnPlatform) // Support multiple kerbals on the platform by putting them in a dictionary or table. { var kerbalData = (Data) d.Value; Vector3 newPos = kerbalData.KTransform.position; newPos += deltaVec; kerbalData.KTransform.position = newPos; } } This is jumpy, so you still need to lerp the move - but the example is a basic idea and it works (adapted from a resource I found on the net). Make sure the platform is a kinematic rigidbody. All moving objects should update the position of any objects that want to move with it. If you wanted to be lazy, you could create a trigger collider and when the kerbal enters it you could parent it to the moving transform. Then when the kerbal exits you could remove the parent. Remember velocity is going to be a factor on either of these solutions - so you'll need to handle them appropriately.
  13. Could you pm me your part folder that contains the model and config you're having trouble with? I'd like to find out why this is occurring for you. That error your getting is when the Game Object is not active, or there are literally no renderer or collider components. But I'm guessing it's the former lol. Try creating another Floating Launch Ground and see if that works as well.
  14. That happened in 0.11.1, fixed in 0.11.2 Just to be sure you have got the latest version - download and install 0.11.2 from the first post again. I know my server rolled back a few hours not too long ago, that's been fixed since.
  15. Updated to version 0.11.2 Beta. Visibility range bug has been fixed. All static objects should now react exactly as they should. Other minor fixes were performed as well. Please redownload the plugin and the content pack (the Mun Easter Egg has been slightly modified to fix a bug that was being caused in it's new location). I know a lot of you still haven't found the Mun Easter egg and it is going to be leaving shortly, so make an effort. It's near the North Pole of the Mun, about 2-4KM away from the absolute pole. A static will move with the celestial body's rotation. That double plank bug is fixed, but as always brilliant video!
  16. Version 0.11 Beta Released Changes: KerbTown now manipulates the FlightCamera to chase selected Static Objects. KerbTown now remembers the last launch site used (if it still exists). Per-save. Added speed multipliers to the KerbTown GUI to increase the object translation speed for placing static objects. Fixed the first-flight bug where instances of objects were not always loaded. Fixed the bug that prevented rendering of objects that start further away than the visibility range. Fixed the bug that sometimes causes duplicate objects to appear. I probably forgot a bunch of things, sorry. I've added a todo list to the main post now, to help keep track of things I forget to add in my local todo list.
  17. I've found and fixed the problem for the next update. If the object is X distance (X = 100km default) away from the vessel on flight init then the GameObjects are disabled, including the PQSCity component which updates the active and visibility variables lol. So unfortunately it wouldn't re-appear when you were in range. Thank you for trying that out.
  18. You could adjust: GameSettings.AMBIENCE_VOLUME = val GameSettings.MUSIC_VOLUME = val GameSettings.SHIP_VOLUME = val GameSettings.UI_VOLUME = val GameSettings.VOICE_VOLUME = val And then apply changes with: AudioFXSettings.Apply(); Just remember to save the original values from the GameSettings variables I mentioned and then restore them later.
  19. I've already passed that stage in brain storming, these objects will not be 'flights'. Management will be from the KerbTown GUI / file editing only. The objects do not inherit Vessel or Part classes. So I guess on that note I won't be implementing those as core functions to KerbTown lol. It is a nice idea though, and another developer may create their own modules to use with KerbTown to respect the functions you mentioned. KerbTown does support extending each unique static object with whatever script a talented mind can come up with. ------- With those I can successfully replicate problem. I will see what is causing the issue and reply with a fix or implement the bug fix in the next update. Thank you again to everyone so far for the feedback, suggestions and testing during the beta stage of this addon.
  20. I have other priorities. It doesn't function as I would like it to right now. Currently the active vessel (for example a kerbal) is pulled to a vector that's at the position of the collider bounds of the gravity inducing vessel while in the sphere of gravity (Local SoI). The vector follows under the active vessel "pushing" the rigidbodies to the gravitational area. I've changed the artificial gravity engine two or three times now. And probably will a few more times before I release it. It's weeks away, not days. If in the meantime someone else releases one, then I'll drop that project. I'm in no rush.
  21. There seems to be a demand for it so it will definitely happen. Hopefully in the next few updates. I'll keep trying to replicate the issue. Can you take a look at the runway config and let me know what the instance node's Visibility range is? Are they 1000 or 100000? I noticed the URL for the runway static is Runway/runway/Runway lol.. I'll try that folder structure and see what happens as well. That is weird. Perhaps the save didn't occur. I cannot replicate this issue. Like I was saying though, there could have been an error when you clicked Save Session. If it is reoccuring for you, please upload and link your KSP_Data\output_log.txt file after the error has occurred. Also check the static configs are saving. As soon as you save, the configs are updated.
  22. I posted this awhile back: It looks a bit tidier now, but just know that it's coming.
×
×
  • Create New...