Jump to content

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


Razchek

Recommended Posts

Snjo, is that fuel pump an infinite source or a reservoir, and if it is an infinite source, would it be possible for you to make it into a reservoir for mass resource storage at remote facilities without using large quantities of parts such as my mun base here, note up in the corner my FPS reader, 5.4 frames per second.

It's currently infinite. Could be made limited.

It wasn't previously possible because I was waiting for Raz to implement persistent values to KT, but since that won't happen, I'll just have to implement it in some other way, writing to some text files. Assuming of course I can read out what separates one fuel pump from the next. (Otherwise they would all share the same pool)

Hopefully they all have some unique identifier. Or maybe I can read the lat/long.

edit:

@snjo: you're quite nostalgic :), have you tried the IDiCEr1 mod (two "good old" internal combustion engines for planes, you have to be careful here with the speed to start the engine and keep it running)

Yeah, they are crazy! He styled them so they would match the FS biplanes too :)

Edited by Snjo
Link to comment
Share on other sites

Maybe it could be related to graphics settings in game (I use half-res tex, poor quality shadows, ... I will give my config later just for you to check if it's relevant or not to this issue) or the gfx driver/hardware. Like the bad old serious lag I have with clouds/smoke in GTA3 for example with a nv 9600M GT.

For a new/old instance, the way might be to follow the workflow when using "create" button for available assets, here you can be sure it's a new instance, I guess. The tricky part is when an existing building is modified (never did that, but also there is a dedicated action for that).

I think also using the classic boolean flag for each building may help.

@snjo: you're quite nostalgic :), have you tried the IDiCEr1 mod (two "good old" internal combustion engines for planes, you have to be careful here with the speed to start the engine and keep it running)

One reason why I'm reluctant to modify/remove existing static objects in runtime is that it might corrupt VAB/SPH scene for unknown reasons... this bug happened during my fix for launch-pad-feature. After KT tries to destroy any instances it created (that's the original logic of KT written by Raz) when reverting from flight scene to VAB, this bug will appear and all these buildings in KSC will be tilted and moved to some weird position inside the VAB/SPH.

I made a workaround to skip the destroying process and make sure the creating process is run only once even if you get into flight scene multiple times.

Link to comment
Share on other sites

It's currently infinite. Could be made limited.

It wasn't previously possible because I was waiting for Raz to implement persistent values to KT, but since that won't happen, I'll just have to implement it in some other way, writing to some text files. Assuming of course I can read out what separates one fuel pump from the next. (Otherwise they would all share the same pool)

Hopefully they all have some unique identifier. Or maybe I can read the lat/long.

edit:

Yeah, they are crazy! He styled them so they would match the FS biplanes too :)

Do you mean some sort of "instance-level" customized parameter support?

Link to comment
Share on other sites

The creation change explains why I had to move my OnStart code for the fuel pumps from the flight scene to ... unrestricted. Interesting!

The idea with persistence is that there's a module loaded onto the static, but there is no set of persistent values saved to the instance of that static/pump in the world.

Either each static should have a unique identifier, much like the runways can have a name, so that that can be read by a module which handles its own data files, or it the static reference in the cfg should be able to store a new node inside itself for custom values.

It doesn't take much, but Raz never got around to it, as far as I know.

My idea involved extending something other than MonoBehavior in order to fetch values. He did a partial job on that, but something didn't work there for me.

So for instance GasPump extends StaticModule, which in turn is extending MonoBehavior.

StaticModule lists values for world position, unique ID, persistent values etc. These are saved in the cfg file.

Link to comment
Share on other sites

The creation change explains why I had to move my OnStart code for the fuel pumps from the flight scene to ... unrestricted. Interesting!

The idea with persistence is that there's a module loaded onto the static, but there is no set of persistent values saved to the instance of that static/pump in the world.

Either each static should have a unique identifier, much like the runways can have a name, so that that can be read by a module which handles its own data files, or it the static reference in the cfg should be able to store a new node inside itself for custom values.

It doesn't take much, but Raz never got around to it, as far as I know.

My idea involved extending something other than MonoBehavior in order to fetch values. He did a partial job on that, but something didn't work there for me.

So for instance GasPump extends StaticModule, which in turn is extending MonoBehavior.

StaticModule lists values for world position, unique ID, persistent values etc. These are saved in the cfg file.

I would prefer the way to add a sub configNode inside INSTANCES{} node in the static objects' cfg.

And now I start to understand what that "Save Persistence" button means...

Link to comment
Share on other sites

I would prefer the way to add a sub configNode inside INSTANCES{} node in the static objects' cfg.

And now I start to understand what that "Save Persistence" button means...

I was wondering about that myself.

The sub nodes sound like the absolute best solution. It would take all the guesswork and hackiness out of modules. And we want modules!

In my mind, the thing that will make Kerbtown truly meaningful, aside from awesome scenery, is interactive (or just active) stuff on the ground.

If it could use fields the same way as parts do, it would be awesome. So a [KTField] will be saved and loaded into a StaticModule/MonoBehavior automatically.

Link to comment
Share on other sites

I was wondering about that myself.

The sub nodes sound like the absolute best solution. It would take all the guesswork and hackiness out of modules. And we want modules!

In my mind, the thing that will make Kerbtown truly meaningful, aside from awesome scenery, is interactive (or just active) stuff on the ground.

If it could use fields the same way as parts do, it would be awesome. So a [KTField] will be saved and loaded into a StaticModule/MonoBehavior automatically.

You are making a hard request... :blush:

Link to comment
Share on other sites

You are making a hard request... :blush:

Would it be any fun if it wasn't?

You were talking about reflection earlier, so you probably have a better grasp on that stuff than me :) Never used Attributes like that myself.

As we like to say "It should be easy, it's just code!"

Link to comment
Share on other sites

I got another seriously annoying crash:

NullReferenceException: Object reference not set to an instance of an object

at Kerbtown.KerbTown.SaveInstances () [0x00000] in <filename unknown>:0

at Kerbtown.KerbTown.DrawMainWindow (Int32 windowID) [0x00000] in <filename unknown>:0

at UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) [0x00000] in <filename unknown>:0

I try to put my crash academy runway, on save instance => crash, other buildings are ok. This is only this one.

Unfortunately, these log data might not be very helpful, so kerbtown should be updated to produce more useful log on demand (what it try to do, what are the args, what are the results of calls, ...)

I first thought because I use a 3DSmax dummy object as the spawn point, but doing so with unity seems to be the same.

The only difference from others is a path like "\GameData\Kerbice Group\Buildings"

One more level in the directories tree than others. Poor kerbtown plug-in...

Link to comment
Share on other sites

Can someone make some simple launchpads? Just copies of the launchpad at KSC would be nice. No crawlerway, just the launchpad. If you could put one at the co-ordinates (Lat, Lon)-30.95, 136.4595 (Woomera Launch Area 5) and 5.237222, -52.760556

Thanks in advance guys :)

Link to comment
Share on other sites

the download link provided no longer works... :(

http://forum.kerbalspaceprogram.com/threads/40374-WIP-KerbTown-v0-13-Beta-Place-static-buildings-cities-launch-sites-more%21?p=1052327&viewfull=1#post1052327

EDIT:===============================================================

A request: Could someone make a rover testing area that has rough terrain kind of like the mars yard?

2549465060_1ae6ecc576_o.jpg

scarecrow_lg.jpg

MarsRover01.jpg

Edited by tygoo7
Link to comment
Share on other sites

I got another seriously annoying crash:

I try to put my crash academy runway, on save instance => crash, other buildings are ok. This is only this one.

Unfortunately, these log data might not be very helpful, so kerbtown should be updated to produce more useful log on demand (what it try to do, what are the args, what are the results of calls, ...)

I first thought because I use a 3DSmax dummy object as the spawn point, but doing so with unity seems to be the same.

The only difference from others is a path like "\GameData\Kerbice Group\Buildings"

One more level in the directories tree than others. Poor kerbtown plug-in...

Hmm... have you added the "DefaultLaunchPadTransform = ..." entry into the static's cfg?

And perhaps try removing that space in the path?

Edited by HoneyFox
Link to comment
Share on other sites

It would be nice if this was updated to 23.5.

Just saying.

+1

Hmm... have you added the "DefaultLaunchPadTransform = ..." entry into the static's cfg?

And perhaps try removing that space in the path?

yes for the 1st question.

I just put the building upper in directory tree, it's work. If it's a mere space that's messed up the plug-in... :mad::huh::confused:

Link to comment
Share on other sites

+1

yes for the 1st question.

I just put the building upper in directory tree, it's work. If it's a mere space that's messed up the plug-in... :mad::huh::confused:

Well I have no idea how that issue comes, I didn't touch any code about file path...

Link to comment
Share on other sites

Anyone else unable to open the men with ctrl-k? it opened the first time I launched ksp, but not any time after that. Also trying to really understand how to make the spawn points work. That is what I was working on right before it stopped openning up at all.

I've experienced the old version of the plugin failing to load the UI or the ctrl+k menu a few times after running the game in windowed mode and closing it by the x in the corner a few times in a row, while testing new structures. I can't remember how I fixed it, I think I just uninstalled the plugin, ran the game, closed it properly, reinstalled the plugin and then it worked.

Link to comment
Share on other sites

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