ev0

[1.3.1] Hide Empty Tech Tree Nodes (for modded tech trees) v1.0.1

Recommended Posts

Hide Empty Tech Tree Nodes v1.0.1 (October 7, 2017)

Who this mod is for:

This mod is for people who use large modded tech trees, such as the awesome Community Tech Tree mod by Nertea, but don't have enough part mods installed to fill up all of the new tech tree nodes and hate the empty tech nodes. Additional features give you even more control over the tech tree.

What it does:

Main feature:

  • Adds option to hide any empty tech tree nodes, which automatically connects the resultant "hanging" tech tree lines to unhidden nodes in a logical sense.

Additional features:

  • Adds option to hide unresearched nodes, similar to Fog of Tech. Disabled by default.
  • Adds option to change all node unlock requirements to "Any" or "All".
  • Adds option to remove empty space caused my missing rows/columns of empty nodes.
  • Adds options to change the zoom settings, so you can fit your large, modded tech tree onto your screen all at once. Default minimum zoom is changed from 60% to 35%.

Feel free to further customize your tech tree using using Module Manager to suit your play style, by adding nodes, changing default node positions, etc. (with the appropriate edits!). This mod will take care of everything else.

Examples (click either picture to enter album):

Tech tree with hidden nodes

Unresearchable nodes hidden

Notes on mod behavior:

Spoiler

In order to fix some "anomalous" :wink: in-game issues with hidden tech nodes when outside of the R&D center, this mod has changed from a "visual" mod to an "active" mod. It now automatically creates a new tech tree file from your MM tech tree file, and tells the game to use this new file. It creates this new file each time you start a new game or resume an old saved game, so please add new part mods at any time without any worry! However because of the new mod behavior, there may be new bugs. Please let me know if you find any!


Some Recommended Tech Trees:

The Community Tech Tree or any number or awesome tech trees, such as

Historical Progression Tech Tree

*Engineering Tech Tree (<- see notes below)

pOpdwHo.png?1

*Notes on ETT support:

Spoiler

This mod supports tech trees in the ETT format, but does not support the Yonge's Tech Tree plugin. This simply means that the tree selection process at the beginning of a new game will do nothing. Instead, this mod reads the ETT changes done to the ModuleManager tech tree, and will change the TechRequired field for Parts from that file. The good news is that you can now use ModuleManager config files on the ETT!

The bad news is that modders who add their own nodes probably haven't accounted for the ETT because they never needed to yet, so there might be duplicate nodes (they need to add a NEEDS[!ETT] to their config file). If there are duplicate nodes in your MM tech tree, a message will display on screen and the debug log will give you a list of duplicate nodes so you can inform the modder.


Download:

SpaceDock

Source (GitHub)

Download instructions:

Download the mod folder from the SpaceDock link and place the GameData folder in your KSP directory.

Changelog:

Spoiler
  • v1.0.1 - KSP v1.3.1 update
    • Recompiled for KSP v1.3.1
    • Added .version file
  • v1.0.0
    • Added option to change research requirements to "Default", "Any", or "All"
    • Added option to remove empty space created from rows/columns of empty nodes
  • v0.8.0 - KSP v1.3.0 update
    • Fixed bug in settings menu introduced with KSP v1.3.0
    • Added localization support (settings menu) b/c why not. Includes English and Japanese translations
  • v0.7.4
    • Fixed infinite loop bug that happens when two nodes are on top of each other (might happen if you have duplicate nodes)
  • v0.7.3
    • Fixed issue with zoom options due to bug in 1.2.2 when inputs are a percent
    • Added better error output when there are duplicate nodes. Displays message on screen
  • v0.7.2 - KSP v1.2.2 update
  • v0.7.1
    • Support for the ETT. Changes TechRequired field for Parts from the Updates node
  • v0.7
    • Changed main mod behavior from "visual" to "active". Plugin now creates its own tech tree file with hidden nodes derived from your modded file, and assigns the game to use the new file. Prevents problems with part contracts and other "anomalous" bugs
    • Added option to hide unresearchable tech, similar to Fog of Tech
    • Added maximum zoom setting
  • v0.6 - KSP v1.2.1 update
    • Converted key mod settings to in-game menu (removed overrides.cfg and MM requirement)
    • Removed parents that are the only ancestors of any other parents
    • Fixed bug where PARTUPGRADE only nodes would still show if the Part Upgrades option is disabled, causing empty nodes
  • v0.5.1
    • Nodes with PARTUPGRADE tech will not hide
    • Fixed debug error when reloading tech lines
    • Changed tech tree file path to currently loaded file
    • Better support for the ETT (I think!)
  • v0.5 - KSP v1.2 update
    • Code cleanup
    • Added startNodeID
    • Added forceHideEmpty (used for the ETT)
  • v0.4 - KSP v1.1 update
    • Changed download files from HideEmptyTechNodes to HideEmptyTechTreeNodes to match post title
    • Added KSP.UI.Screens namespace (new to 1.1)
    • Removed NEEDS and FINAL from overrides file. Added FOR
    • Adjusted default HETTN zoom settings
    • Added debug config option for logs
  • v0.3 - KSP v1.0.5 update
    • Added zoom options
  • v0.2
    • Fixed some lines that intersected nodes.
  • v0.1 - Initial release.

Bug reports:

Please report if:

1) A tech line intersects/crosses a tech node

2) A tech node requires more than three nodes to unlock ("all" or "any")

3) You see something weird with the new zoom options or Fog of Tech-like options

4) Problems with new "active" mod behavior


Post Feature Complete Future Features:

1) Might try to figure out how make make tech lines curve at places other than midway between two tech nodes

2) Add option to add science points from hidden nodes to their children

License

Edited by ev0
updates

Share this post


Link to post
Share on other sites

Great mod! CTT would be harder to use without it.

Bug report: I get this line crossing through Meta-Materials:

HiJgrh1.png

My mods:

[TABLE="width: 231"]
[TR]
[TD]AsteroidDay[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]CommunityResourcePack[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]CommunityTechTree[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DatedQuickSaves[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ExtraplanetaryLaunchpads[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Firespitter[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]HideEmptyTechNodes[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]InterstellarFuelSwitch[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]JFJ5_Flags[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]KAS[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]KerbalEngineer[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]KerbalJointReinforcement[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]KIS[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]KSP-AVC[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]MechJeb2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]MechJeb2 Embedded[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ModuleManager[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]StageRecovery[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]StockBugFixModules[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TriggerTech[/TD]
[TD]KerbalAlarmClock[/TD]
[/TR]
[TR]
[TD]UmbraSpaceIndustries[/TD]
[TD]ExpPack[/TD]
[/TR]
[TR]
[TD]UmbraSpaceIndustries[/TD]
[TD]FTT[/TD]
[/TR]
[TR]
[TD]UmbraSpaceIndustries[/TD]
[TD]Karibou[/TD]
[/TR]
[TR]
[TD]UmbraSpaceIndustries[/TD]
[TD]Kolonization[/TD]
[/TR]
[TR]
[TD]UmbraSpaceIndustries[/TD]
[TD]Kontainers[/TD]
[/TR]
[TR]
[TD]UmbraSpaceIndustries[/TD]
[TD]LifeSupport[/TD]
[/TR]
[TR]
[TD]UmbraSpaceIndustries[/TD]
[TD]ReactorPack[/TD]
[/TR]
[TR]
[TD]000_USITools[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Workshop[/TD]
[TD][/TD]
[/TR]
[/TABLE]

Share this post


Link to post
Share on other sites
Great mod! CTT would be harder to use without it.

Bug report: I get this line crossing through Meta-Materials:

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

Gottcha. I'll be able to take a look at it in a couple days, I'm away from home right now.

Share this post


Link to post
Share on other sites

Ok, I think I fixed the problem. You can download the updated plugin from the Dropbox link again. Let me know if you see any other problems and I'll try to fix them before 1.1 comes.

Share this post


Link to post
Share on other sites

Is there any chance of this getting indexed by CKAN? Having to search 10 or 20 pages into the forums is less good (and mind-boggling; how does everyone using CTT not use this?)

Share this post


Link to post
Share on other sites

Having this on Kerbalstuff would be great! And thank you for making it, you saved CCT for me :)

Share this post


Link to post
Share on other sites

Whelp, I was going to wait until 1.1, then 1.05, but I went ahead and put it on Kerbalstuff. I think it's set up correctly for CKAN too, but it seems to be taking a few days. A different mod that was put on Kerbalstuff a couple days before mine is still waiting to be put into CKAN/Netkan's repository too, as seen from CKAN's github page.

Share this post


Link to post
Share on other sites
The best way to contact the CKAN admins is through the IRC chat on the #ckan channel or on their forum thread.

Thanks. On the #ckan channel, they said that the mods are added manually to CKAN after they are automatically submitted by Kerbalstuff, so it's just a matter of waiting until someone is able to take care of it.

Share this post


Link to post
Share on other sites
Thanks. On the #ckan channel, they said that the mods are added manually to CKAN after they are automatically submitted by Kerbalstuff, so it's just a matter of waiting until someone is able to take care of it.

Well, it looks like your pull request is being held back because of the proposed change to the netkan file. I fixed it up for you. This is the new pull request.

Share this post


Link to post
Share on other sites

Whoops, I thought the CKAN guys said they were going to make 1.0.4 mods available for 1.0.5. I'm waiting for 1.1 before I play again, so I didn't see that I had to update until now.

It still works. I also increased the minimum zoom so you an see your larger tech tree more easily. You can change it back to the default zoom value in the "overrides" file. Let me know if 0.35 is too low, because for me, if I tried to go lower then the KSC would become visible and clicking on the tech tree wouldn't work anymore. You can try for yourself. I'll probably add hard-coded max/min values next time.

Edited by ev0

Share this post


Link to post
Share on other sites
On 12/11/2015, 10:50:18, ev0 said:

Whoops, I thought the CKAN guys said they were going to make 1.0.4 mods available for 1.0.5. I'm waiting for 1.1 before I play again, so I didn't see that I had to update until now.

It still works. I also increased the minimum zoom so you an see your larger tech tree more easily. You can change it back to the default zoom value in the "overrides" file. Let me know if 0.35 is too low, because for me, if I tried to go lower then the KSC would become visible and clicking on the tech tree wouldn't work anymore. You can try for yourself. I'll probably add hard-coded max/min values next time.

Hi, is your mod supposed to work with Engineering Tech Tree too? I tried, but it didn't hide empty nodes. Would it be a lot of work to make your mod work for that tree too, ev0?

Share this post


Link to post
Share on other sites
8 hours ago, aluc24 said:

Hi, is your mod supposed to work with Engineering Tech Tree too? I tried, but it didn't hide empty nodes. Would it be a lot of work to make your mod work for that tree too, ev0?

It kind of works with the ETT. But you'll need to change a line in "overrides.cfg" first (in the HideEmptyTechLines folder, in the GamaData folder).

Change

@TechTree:NEEDS[CommunityTechTree]:FINAL

to

@TechTree:NEEDS[CommunityTechTree|ETT]:FINAL

I think. .... I should get rid of that NEEDS part in the future.

But you'll most likely have some tech lines intersecting some tech nodes (hopefully you won't!). I want to see if I can make it work for the ETT too, but only after KSP v1.1. The ETT is much tighter than the CTT, so I might need to find a different method to make sure that nothing intersects.

Check this post for reference.

 

Share this post


Link to post
Share on other sites
16 hours ago, ev0 said:

It kind of works with the ETT. But you'll need to change a line in "overrides.cfg" first (in the HideEmptyTechLines folder, in the GamaData folder).

Change


@TechTree:NEEDS[CommunityTechTree]:FINAL

to


@TechTree:NEEDS[CommunityTechTree|ETT]:FINAL

I think. .... I should get rid of that NEEDS part in the future.

But you'll most likely have some tech lines intersecting some tech nodes (hopefully you won't!). I want to see if I can make it work for the ETT too, but only after KSP v1.1. The ETT is much tighter than the CTT, so I might need to find a different method to make sure that nothing intersects.

Check this post for reference.

 

I just tried it like you suggested - it seems to work, there are no overlaps as far as I can see. This is great. Thank you very much.

Share this post


Link to post
Share on other sites
2 hours ago, gamerscircle said:

Does anything need to be changed with the CTT under 1.1?

Note sure. I don't have the Steam version so I can't check yet. I'll update the mod if it's broken when 1.1 hits.

Share this post


Link to post
Share on other sites
32 minutes ago, ev0 said:

Note sure. I don't have the Steam version so I can't check yet. I'll update the mod if it's broken when 1.1 hits.

Okay.. appreciate the reply.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now