Jump to content

[WIP] KerbTown v0.13 Beta - Place static buildings, cities, launch sites & more!


Razchek

Recommended Posts

Well, it seems that even if I set visibilityrange to something like 50000000, the objects get cutoff by the camera when I go more than 500km away or so. I wonder how we can see the Mün from Kerbin then?

The Mun isn't a PQSCity. :P 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.


Maybe I'm missing something, but is there no way to retrieve the values used to create the static in a module on the static? Say I want to check what altitude and CelestialBody a static is at, a value used in placement, is that even stored in a module on the object, or is it just placed as an empty gameObject?

An extension like suggested above could include a reference to either the Kerbtown.KerbTown.StaticObject which has all the values, or have all the values given to it, like in a partmodule.

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;


Im kinda new to this kerbtown thing now.

Everytime i try to place my pad it displays this.

http://i.imgur.com/PND6aN5.png

And when i select the pad now it shows this.

http://i.imgur.com/peQo8fD.png

HALP

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.

Link to comment
Share on other sites

The Mun isn't a PQSCity. :P 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.

I set the visibility range to 50,000 KM as mentioned, and am in LKO, so same SOI, only about 500km away. So I don't see why either of these wold make it disappear.

Link to comment
Share on other sites

WVtcDP1.png

Obviously the texture is not very good yet, but the fuel pump code is complete. Each fuel pump in the picture can fill a different kind of fuel, so you can set the left one to fill LiquidFuel, and the right one to fill Oxydizer/Electricity/Kethane or whatever.

You activate the pump by clicking on it when you get close, and that GUI shows up. If you are out of range, it shuts down, and only check a single bool (in FixedUpdate and OnGUI), so as not to overload the system if there's a whole load of these all over the place.

Gonna fix the texture tomorrow, in the meantime, try it out:

Download

Link to comment
Share on other sites

WVtcDP1.png

Obviously the texture is not very good yet, but the fuel pump code is complete. Each fuel pump in the picture can fill a different kind of fuel, so you can set the left one to fill LiquidFuel, and the right one to fill Oxydizer/Electricity/Kethane or whatever.

You activate the pump by clicking on it when you get close, and that GUI shows up. If you are out of range, it shuts down, and only check a single bool (in FixedUpdate and OnGUI), so as not to overload the system if there's a whole load of these all over the place.

Gonna fix the texture tomorrow, in the meantime, try it out:

Download

That is pure awesome!

Link to comment
Share on other sites

I set the visibility range to 50,000 KM as mentioned, and am in LKO, so same SOI, only about 500km away. So I don't see why either of these wold make it disappear.

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!

Please help me with my case, if i go another hour of attempting to fix the problem ill go ballistic!

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.

Link to comment
Share on other sites

I want to know what the easter egg on eve is.

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.

Link to comment
Share on other sites

Sorry I keep throwing my random creations in here, I hope you don't mind.

Cave test.

x3tp.png

DON'T TELL RAZCHECK I CHEAT... oh wait.

wsyf.png

I tried making a launchpad on top of the VAB for the Helipad.

And Kerbin rejected my pad.

Like in Danny's video.

fc70.png

Link to comment
Share on other sites

Yep, tried it with everything.

The problem that I faced that I could not overcome was the speed at which the game itself can follow a kerbal. The camera would track the elevator to a certain height and then stop. I then went and used the lazor plugin (I think it was lazor) to allow the 2.5km viewing distance to be exceeded, but this did not have any effect on how fast or how far a camera will track a kerbal from a fixed position (the fixed position being the base of the elevator)

But I must say, all this talk has got me fired up again and I hate when I can't solve a problem, so I am now going to go test a new theory that I have... There are parts that did not exist in the game when I tried it last, so my hope is a command chair could solve my issue, Ill post results shortly. I also have some shots to post for something im making to donate to the kerbtown pack, just at work at the moment trying to get these last couple hours to go faster...

Was thinking about this a bit and may have a solution, albeit probably not the best one...

You say the issues was with camera tracking once the Kerbal got above X meters from the elevator base. Why not split the elevator? Multiple sections, each with its own platform, staggered so the kerbal can walk from one platform thats raised, to the next in lowered position. That little walk should reset everything camera-wise, the next animation starts and it should use just that sections base as fixed position.

Link to comment
Share on other sites

Couple things I thought about related to kerbtown, not sure if someone mentioned this in the thread: So you can place objects with the mod, custom models of buildings or whatever you want... what about craft files? What if you could construct a building out of parts in the now very roomy SPH and place the craft where you want.

What about a "portal" you could place somewhere in the world, choose a part, and spam a key to spawn the chosen part. Then, if you have gone and modified the part beforehand to be "grab-able" or magnetic using KAS, you could just build your stuff right there by hand or crane?

Link to comment
Share on other sites

As part of solving the runway launch selection problem, I assume each instance will get an ID, which could be used by a module. But to make things even easier, are you planning on including module persistent values in each instance as well?

The way each instance is stored in the GameData, independent of save games, means we'll have to figure out a system for storing persistent values in each saved game per instance. In my case I'm thinking of storing fuel amounts on fuel pumps etc. But also more general thing like remembering if an elevator was up or down when you last visited a location. Given that you already cracked the nut of storing and reading the nodes and KSPFields, this might be something you are already planning, so I thought I'd check before doing something silly.

Link to comment
Share on other sites

Couple things I thought about related to kerbtown, not sure if someone mentioned this in the thread: So you can place objects with the mod, custom models of buildings or whatever you want... what about craft files? What if you could construct a building out of parts in the now very roomy SPH and place the craft where you want.

What about a "portal" you could place somewhere in the world, choose a part, and spam a key to spawn the chosen part. Then, if you have gone and modified the part beforehand to be "grab-able" or magnetic using KAS, you could just build your stuff right there by hand or crane?

I was thinking of something similar. It would be nice if you could build stuff on a planet with parts and have it converted to a static object when completed.

Link to comment
Share on other sites

I was thinking of something similar. It would be nice if you could build stuff on a planet with parts and have it converted to a static object when completed.

You could also pair this with a mod like extraplanetary launchpads: you could spawn construction parts at your construction building, but only if you have the spare metal/spare parts to do it.

Link to comment
Share on other sites

Hay guys, this mod is exactly what I wanted!! I was looking for an easier way to place custom made airfields around Kerbin and now I found it =)

Here is my first import of an Edwards AFB/Area 51/Mojave-like airbase. So far it has 2 runways, it satisfies my needs. One long paved runway for shuttle landings and a dry lake-dirt 7000m runway for emergencies or experiments. There is a tiny ATC tower in the pic, but I have to fill the base with other buildings. These are my first imports so don't look at models and textures, these are just quick tests =)

qu3hdQb.jpg

Another thing I tried making is a Kerbin City International airport. I was experimenting with proper runway lights but the textures bleed all the time and you can't really see the lights from the distance.

m38OgaU.jpg

1VPmOle.jpg

1AfcBtH.jpg

I am intending to make a few airports in KSC's reach so you can fly your own airlines between them, and also I want to make factories and assembly plants like Rockomax and Probodobodyne, so you can transport payload from them to KSC for launches.

The biggest problem I find are the textures. There are anti aliasing issues and lag on repeating textures. Also there is no shader with blending maps, or multiply/add maps so you can make multi-layered textures that look good both from far away and close up, just like it is used on KSP terrain. I have to chose between making giant textures, repeating textures, or small textures that cover everything but look terrible in the close-up

Link to comment
Share on other sites

Those all look really good so far though. I haven't messed with custom runways at all, are they made with just a standard mesh collider?

You can actually use normal (non convex) mesh colliders for statics...it really helps in design, dont have to build around colliders or risk highpoly to get proper collision

Link to comment
Share on other sites

You can actually use normal (non convex) mesh colliders for statics...it really helps in design, dont have to build around colliders or risk highpoly to get proper collision

Yes, I've used mesh collider without ticking convex and it works correctly, no issues so far.

The only thing I find a problem with KerbTown is that you can't add more than one spawn point per object. If I have an airport, I want to make one spawn point on one end, other on other end of the runway and I want to add spawn points on gates/parking spots but KSP will read only one of them. The other thing is that if you make 2 same objects and mark only one as a spawn point, KSP is confused and tends to spawn on the other airport too. Would it be possible to solve these issues in the next version?

Edited by nothke
Link to comment
Share on other sites

Yes, I've used mesh collider without ticking convex and it works correctly, no issues so far.

The only thing I find a problem with KerbTown is that you can't add more than one spawn point per object. If I have an airport, I want to make one spawn point on one end, other on other end of the runway and I want to add spawn points on gates/parking spots but KSP will read only one of them. The other thing is that if you make 2 same objects and mark only one as a spawn point, KSP is confused and tends to spawn on the other airport too. Would it be possible to solve these issues in the next version?

Last I heard Razchek was working on the supporting multiple of the same launchpad, if its possible at all I'm sure he will get it implemented....that guy works voodoo when it comes to code.

About some of the texture issues you mentioned before...

Honestly tiling small textures is best way i have found so far to do huge objects. Still not perfect, and adds tiny bit to overall tris count...but better than streached or shmoooshed lookin textures imo.

For the bleeding here is what I do (and again im noob at all this, so probably much better way to do it). I use smart project to map every mesh at first. This lets you set a margin between the islands that are mapped. If you keep that 3-4 pixels gap between island it kills texture bleeds. And even if you go back to select certain faces to unwrap on a mesh, if ya do the smart project first it will still use setting from that when you reselect.

Link to comment
Share on other sites

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