Lucius

Tying tech tree nodes to VAB level?

Recommended Posts

Hi all,

Been wrapping my brain around the idea of tying certain tech tree nodes to the "level" of your VAB, not sure where to start.

Is this possible through an already existing mod? I can't see that custombarnkit would permit it, but i am not that experienced. I'd just like to be able to say "xyz tech research" requires "vab 1 or 2 or 3" etc built.

 

If someone could point me in the right direction to get kicking, i'd really appreciate it.

Share this post


Link to post
Share on other sites

The only mod I know of that unlocks tech nodes and parts without interacting with the R&D building is Contract Configurator. I have no idea how it does it, but it does.

If I were to try to do something like this, I'd start by poking around there.

 

Share this post


Link to post
Share on other sites

hmmm interesting, i suppose there are the green monoliths that also "unlock" techs if you discover them, i wonder if there is something to that concept as well...

 

It feels like it should be something as simple as a modulemanager addon, i wonder if MM can "tap into" something like that, if i asked around on their thread maybe?

Share this post


Link to post
Share on other sites

You can't do something like that trough ModuleManager.
Even trough a plugin, the KSP API doesn't seem very helpful. The easiest way would be to subscribe to the OnTechnologyResearched GameEvent and "undo" the tech unlock if your custom conditions aren't met, but this is likely to require a bit of hacking around to properly revert the game state. But maybe the RDTech.OperationResult object exposed by OnTechnologyResearched can be modified when the event is fired, this would be great.
Otherwise, maybe there is a way to force the "available" state of the RDTech objects, that would be the cleanest approach and maybe it's the easiest way if the stock code that handle this state is cooperative.
Also, there is a third option : hack the RnD tree GUI GameObjects to override the click events and call your own method.

Share this post


Link to post
Share on other sites
On 6/9/2019 at 8:49 AM, Lucius said:

Hi all,

Been wrapping my brain around the idea of tying certain tech tree nodes to the "level" of your VAB, not sure where to start.

Is this possible through an already existing mod? I can't see that custombarnkit would permit it, but i am not that experienced. I'd just like to be able to say "xyz tech research" requires "vab 1 or 2 or 3" etc built.

 

If someone could point me in the right direction to get kicking, i'd really appreciate it.

The fork of CustomBarnKit for RO does have the ability to gate building levels behind tech tree unlocks. I haven't looked at the code, but maybe by looking at it and reverse engineering it, you can accomplish your goal. 

Share this post


Link to post
Share on other sites

Hey, first off -

Gotmachine, Pap, thank you so much for the work you put into the KSP community, i'm an adherent of quite a few things you've touched so, since you're here anyways i just want to say thnak you so much.

 

Second off-

I have thought about a few hacky ways -

custom barn kit style, locking science levels behind a different building, so say nothing past 45sci cost can be purchased at VAB level 1

KCT style,maybe even as an addon to KCT , checking as you said on the actual click of a science node to inject a "no go" if other building levels aren't at what's required for a node.

Maybe what i'm having trouble getting my mind around is more of "how do i flag specific tech nodes". How do i say "xyz tech node requires this or that". I can lock based on their science cost but i was hoping for a more elegant solution.

Share this post


Link to post
Share on other sites
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.