#Tech Tree Manager + Editor
1 messages · Page 1 of 1 (latest)
Tech Tree Manager + Editor
features:
- Tech Tree Manager
-
- Tree Manager - User can select the tree they want to use
-
- No code required - all done with json files
-
- Horizontal scroll
-
- mouse wheel support
-
- Node hiding - unlock requirements, previous nodes, location event, science points
- Editor
-
- Web based
-
- Part importer - so modded parts can also work
-
- TTM json file or Patch Manager file
-
- localisation generation
-
- KWP support - edit and test in game + live reload
Whoa you're so quick !!! Excellent
localisation added
started work on the node editor now
the last box there is a multi select so you can pick what nodes is required to unlock the node
Are you planning on adding colors to the nodes to represent the different tiers? (Like Rimworld's Research Tree mod)
thats a cool idea. maybe in the future.
This part of the editor now works and can now update required nodes
node positions added
you can find the editor at https://ttm.kerbal.wiki/
mod release later today
@dreamy juniper if you could make a JSON to PM converter js lib I can add that to this.
That wouldnt be too hard
Aaaa
Could you add the ability to edit the unlocked parts
yes thats the next stuff to add
I want to do a drag and drop thing but for now I will just do the multi selector
Mostly cuz if I add the patch manager output, I'm going to use this for my mod
And I need to start working on a web gui for missions soon
Because hand writing missions is hard
later today I will move the ttm editor repo to the ksp2community repo
do we have a parts list
I'd just make the parts editor a multiline text box tbh
just need a json file of all the games parts
The reason I say this is modded parts
hmmm
So you want a javascript library to convert a json file to a pm patch
That isnt too hard, just need to remember how to write a javascript library
yes or just a function would do
Its not like I havent already written it once in C# lol
XD
For KSP2 unity tools
will also be helpful for the mission editor.
The mission editor is gonna be aaaa
I need to write it, but its going to be a pain
part editing added with text box. will change to a drag and drop later.
Gotcha, ill work on the pm stuff when I get out of bed
I should get back to work tbh
2 main things left to do with the editor:
- node add and remove
- localisation save (for name and description)
Secondary tasks:
- new tech tree button (creates blank tree)
- Part selector, drag and drop
- part importer
The UI is very broken for me?
ahh yeah 1440p if that helps
It does
Cool. ruleset, name, is_new=false, constructor_args=[] can you let me know what these do
Okay so ruleset is the :science at the start of the patch
console.log(json_to_pm(tNode_2v_electronics_02,"science","tNode_2v_electronics_02")) which I pass in as science here
name is the #tNode_2v_electronics_02
is_new is if this is creating a new asset that doesn't already exist
and constructor_args are the arguments to @new() passed in that case
So if I do this console.log(json_to_pm(tNode_2v_electronics_02,"science","tNode_2v_electronics_02",true,["tNode_2v_electronics_02"]))
@new("tNode_2v_electronics_02")
:science {
Version: 9;
ID: "tNode_2v_electronics_02";
NameLocKey: "Science/TechNodes/Names/tNode_2v_electronics_02";
IconID: "ICO-RDCenter-Power-24x";
CategoryID: "";
HiddenByNodeID: "";
DescriptionLocKey: "Science/TechNodes/Descriptions/tNode_2v_electronics_02";
RequiredSciencePoints: 2300;
UnlockedPartsIDs: [
"generator_0v_thermoelectric_radioisotope",
"storage_2v_battery_electricity",
"antenna_1v_dish_ra-100",
"antenna_1v_dish_88-88",
"fuelcell_1v_array"
];
RequiredTechNodeIDs: [
"tNode_2v_electronics_01"
];
TierToUnlock: 0;
TechTreePosition: {
x: 3600,
y: 530
};
}
I get this
is_new also removes the name selector
next thing. is the PM all one file or multiple.
also what path do you want for the zip export.
for the ttm file I do /assets/techtree
do /patches/tech_tree.patch and make it one file
ok cool
and don't use the @is_new stuff, only use that if its an added tech node off of the stock
I will add a system for that when the add and remove buttons are added.
alright, then I'll also add the syntax for removing a node with PM (because if you remove stock nodes, you need to do that)
also, is it possible to add a click and drag to the tech tree editor aaa
Cuz I keep trying to do that
for scrolling that is
I did try to add that but it didnt work. I also have done that XD
will add it later as a secondary task
Also would be nice to always have that sidebar to the side when editing later nodes
true
got lots to fix later I see
this look correct?
That looks right yeah
cool will push the change now
Node adding now works
also added the localisation creation
@dreamy juniper how does the localisation work for patch manager?
PM doesnt touch it, you change the keys and you have a normal localization file like usual
ok so you want the localisation file to be exported for pm as well
Sure
what folder path do you want for the local files
localizations
so localizations/local.csv?
yes
if this next test goes well I will push that update
update pushed
(update has add and remove node + localisation for TTM and PM)
import tree is broken. will fix it tomorrow.
has anyone done a probes before crew type of techtree already?
Im working on that
Also have custom missions planned for it as im moving around missions
feel like the stock tree is way too unbalanced
there is a custom mission planner already?
Lets just say I work fast.
wow
now we just need kopernicus in ksp2 and we can start working in rp1 in ksp2 lmao
Also need a funding system for rp1 but of all things, that should be the easiest
(ofc its not just that haha)
There is actually a lot to it
anyone planning on actually adding that
Id love rp1 in ksp2
yeah yeah
Not atm
lmao
you guys are bloody quick at making these kinds of mods
well any kind
Well in all honesty, its just find type of asset, add module to patchmanager, and voilia, at least for my tech tree stuff
i see
btw how is your lets call it contract configurator used, like you need to know any programming language or it is more intuitive to use
It uses a dsl I wrote for patch manager, its a bit unintuitive just cuz of how the missions are structured in game
Lemme grab an example
ah
sure
@new("munar_impactor")
:missions {
MissionGroup: "";
name: "WMCC/MunarImpactor/Name";
description: "WMCC/MunarImpactor/Description";
GameModeFeatureId: "ExplorationMissions";
type: "Secondary";
Owner: "Agency";
state: "Inactive";
* > missionStages {
+_0 {
name: "Check";
description: "";
Objective: "WMCC/MunarImpactor/Objective";
MissionRewardType: "None";
DisplayObjective: true;
+PropertyCondition {
RequireCurrentValue: true;
PropertyTypeAQN: get-property-watcher("IsDestroyedByCbCollision");
Inputstring: "Mun";
TestWathedBool: true;
propOperator: "EQUAL";
isInput: true;
}
}
+_1 {
name: "Mission Complete";
description: "";
Objective: "";
* > MissionReward {
+SciencePoints {
RewardAmount: 40.0;
}
}
* > actions {
+MissionResolutionAction {
MissionResolution: "Complete";
StageEvent: "Play_mission_alert_primary";
}
}
IgnoreExceptionBranches: true;
}
}
currentStageIndex: 0;
Hidden: false;
MissionGranterKey: "MissionGranterProbodobodyne";
TriumphLoopVideoKey: "reward_mission_tier1";
VisibleRewards: true;
pendingCompletionTest: false;
maxStageID: 2;
uiDisplayType: "Default";
* > ContentBranches {
+Brief {
+MissionCharacterDialogAction {
CharacterNameLocKey: "Missions/CharacterName/Keri";
CharacterIconKey: "keri_neutral";
* > Dialogs {
Entries: [
create-dialog("WMCC/MunarImpactor/Brief1"),
create-dialog("WMCC/MunarImpactor/Brief2"),
create-dialog("WMCC/MunarImpactor/Brief3","keri_happy"),
create-dialog("WMCC/MunarImpactor/Brief4","keri_happy"),
];
}
}
}
+Debrief {
+MissionCharacterDialogAction {
CharacterNameLocKey: "Missions/CharacterName/Keri";
CharacterIconKey: "keri_neutral";
* > Dialogs {
Entries: [
create-dialog("WMCC/MunarImpactor/Debrief1","keri_happy"),
];
}
EventTypeOnClosed: get-message("SpawnTriumphWindow");
StageEvent: "Play_mission_alert_primary_returned_to_missionControl";
}
}
+OnSubmit {
}
}
MissionSaveAssetKey: "";
}
For a munar impactor mission
Yeah
haha
But, me and munix are planning on making a web based editor for these
like the one for the techtree manager?
yes
that would actually be great
i have a couple of ideas now that i know this is possible
man if you are doing this without official mod support
i cannot wait once you get official mod support
Official mod support should be IG hiring me and munix (/hj)
lmao
i mean they hired nertea, blackrack and triggerau
But like really, I've written way too much of the framework to make modding this game feasible lmao
i really should learn how to mod this game lmao
alr gl w that
you mean like my kapitalism mod?
are you actually making that?
yep. I have hated the fact that exploration wont have any funds system.
yeah
man you really went all out like 2 days after the update lmfao
anyways
looking forward to that
been a bit longer than 2 days #1039965578754007060 message
bruh
@dreamy juniper im going to make improvements to the part selector. will add your request to it first.
the selector has the names, the node uses the id
awesome
@twilit wedge I have a suggestion for you, could you add a field to edit the node ID
I could yes
because if I'm exporting a new tech tree to PM, I don't want other mods to have to use the GUID to reference them
I will add an advanced dropdown for extras like that
thats now implemented. took a while to do since the ID had to be updated in multiple places, like every tech node that requires it...
Alright, thank you!
And to add to your todo list of suggestions, allowing to choose the filepath being saved at
probably will have to add a popup model
cus pm and TTM have 2 different default paths
I could make a settings page where you can change the defaults
I meant to change it from techTree.zip
oh the file name
ye I could add a project name at the top
and maybe even a version indicator
You also need to move the top bar
ah yes
fixed
Thanks!
Another bug to report, this layering and shfiting needs to be changed
yep I fixed that after the other fix
I'm just cross referencing the stock one for now
well that was easy its just 1500
have you pushed the update?
Literally unusable
Months even
fix pushed
Hows the time travel?
oh the things I have seen
Another suggestion, make the new node button auto select the created node
change pushed should update soon
Also, bug I just encountered, the localization autogen doesn't support commas in the node name
im not sure how I would fix that
Auto escaping the terms that have commas in ""
And then also removing those quotes when reading
the problem stems from the csv to json
try now?
for some reason now I can't select half of the early nodes
huh
or half of the nodes in general
It still broke the save I had aaa
what happens if I remove the localization file?
will it crash, or will it just generate its own localization
wait is the problem on ksp?
no
I haven't tested this in KSP yet
Aaaaa it should rebuild from english
And when I load it I get this error as well
could I get that tree so I can take a look
the first one I manually deleted the localization file
the second was manually edited to remove commas
let me give you all 3
this is the error I get when trying to select a node
I see the issue
and somehow the english value gets parsed as null
ok pushing the fix
thank you
ahh, makes sense
ok fix is now live
got it
im going to add a search to the part dropdown
@twilit wedge the auto select node on creation is being very buggy
whats the issue?
It's editing the wrong node
hmmm
like it shows as selected but
I cant seem to replicate
Alright, I'll try and see if I can
search added
works for both name and id of part
any new issues I will fix later today
plans for later today:
- update node lines to match closer to what the game does
- Part export (mod side) and import (editor side) - will be a zip file with part json files & part localisation file
- Add tier option to node editor
- Add Hidden by option to node editor
- Add IconID and Icon list to editor
- look into CategoryID
Can this be used to add modded parts to the tech tree?
yes
mod: vertical scroll added. now adding a start position option.
Amazing. There are various mods that still inherently work such as KESA. But obviously don't in Exploration due to having no tech tree location.
ye tech tree stuff can be added outside of the mod
I will be pushing an update to the mod soon that will add the .nodeupdate .nodereduce and .nodedetete files to ttm. this will allow you to add parts to node, remove parts from nodes and delete nodes entirely without needing a whole tech tree.
Next update for TTM mod soon
Vert scroll
.nodeupdate .nodereduce and .nodedetete files
node update config added to enable / disable the ability to update nodes. useful for tech trees that are made for a specific set of mods or for competition.
also @dreamy juniper if you let me know how the add and remove for pm works I can add the node export options in for that as well.
Adding is quite simple
:science #node_id {
UnlockedPartIds: +[/* added parts in */];
}
Or however that field is named
Removing requires a builtin function
Lemme quickly do it one way
@use "builtin:list";
@function not-in($values) {
@return @function($check) {
@each $v in $values {
@if ($v == $check) {
@return false;
}
}
@return true;
};
}
:science #node_id {
UnlockedPartIds: $value:filter(not-in([/* ... */]));
}
I really need to add a list.remove and a list.remove-all method
Expect that in a future update to PM
Yeah definitely expect in the next update to PM, for that to be much simpler
should I wait for the next update then?
Sure
Ill release it like tomorrow
cool
Itll change the second to
@use "builtin:list";
:science #node_id {
UnlockedPartIds: $value:remove-all([/* parts */]);
}
cant you get it to just use a - instead of a +
would make way more sense
welp I think thats all the main stuff for TTM done. I can now go back to Kapitalism
Looking forward to the probes before crew rebalance of the tech tree + missions
ye @dreamy juniper is making that tree
@twilit wedge I'm going to be updating PM today, so I'm going to change a few things around
Some new features being unquoted strings because SCSS allows that
:science #node_id {
UnlockedPartIds +: [/* added parts */];
}
:science #node_id {
UnlockedPartIds -: [/* removed parts */];
}
And this is how adding/removing parts will be like
(moving the +/-/*// to the other side of the :)
Hey guys, issue with this mod, I am getting a freeze on loading in my save, frozen with the caption of Loading jool_science_regions_baked_map
version 0.0.3
lmao exactly the same type of bug that we had in Patch Manager
the mod is searching for the folder "assets/techtree" in the folder of Community Fixes, but there is none
need to add a Directory.Exists(...) check before trying to access the folder @twilit wedge
happens to all of us 😆
It legit happened to me
just a few hours ago
glad munix was able to make the relase
welp thats an unexpected 0.0.4 build done
thanks @wide silo the update will be pushed soon.
the problem was within the .nodeupdate .nodereduce .nodeadd part that was added last update.
cool
for adding
:nodes #node_id {
UnlockedPartsIDs +: [ /* part ids as strings */ ];
}
For removing
:nodes #node_id {
UnlockedPartsIDs -: [ /* part ids as strings */ ];
}
And for updates you can combine the two (in 2 separate statements)
ok cool. im going to need to update the tree editor to have it figure out the changes.
almost published the update with another bug
ok welp onto 0.0.5 since It still is broken...
removed node update add and reduce. will be added back in a future update
a fix for the tech tree that I need to add in is the requirements. it only lists one on the left panel
@pale sand fyi noticed you had an issue added for the same thing #🟣ksp2-community message.
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.
Yep
Though I would probably leave this one for TTM, considering it's not actually an issue in stock
At least I'm not aware of there being multiple requirements for any stock nodes
well not yet anyway. maybe they might in the future since it is setup to do it.
they even have built in node hiding.
but if they do add a node with multiple in the future they will probably fix it them selfs.
Yeah, that's what I was thinking
that fix was easy. but now the text goes behind the ui
just need to fix the rect of that text area
or not?
probably
rect was not the solution. I just changed the positions and it can now fit 3 without overflow
I doubt more than 3 will be needed
@pale sand that is now done. took a bit to get it to do what I wanted
How do you import parts to this tech tree editor? There's an 'import part' button that doesn't appear to do anything.
thats correct the import part button does nothing, as theres no export option in the mod yet.
thanks for that fix
theres also this when the parts list is long in a tech node, not sure if anyone else has encountered it yet
are u interested in that for ur mod as well?
yep I can create a fix for that. will work on that tonight.
not actually experienced it yet so if you have a tech node example you want to send me so I can test it that would be great.
ok awesome
hey @dreamy juniper working on the pm part add and remove, would this work?
seems 16 is the max parts they allow in a node before that happens
on 1080p at least
Yes, that would
so maybe a scroll area?
cool pushed the editor update
ye ksp used a scroll bar, i guess u could also rescale the icons if that doesnt work
hmm maybe icon resize until a point and then scroll.
@dreamy juniper if it was an empty list would it still work?
:nodes #tNode_1v_start {
UnlockedPartsIDs +: [ ];
UnlockedPartsIDs -: [ "fin_0v_procedural" ];
}
lets say like that.
Quick FYI for part mod creators:
PM node update generation has been added to the editor.
add or remove parts from a node then click the PM Node Update button and that will give you a patch for that node in a zip file with the correct structure for you to drag and drop into your mod.
@shrewd dawn @glad hollow @reef latch @twilit zenith
Any idea why the node names aren't showing up in game if I rename stock tech nodes?
what button are you pressing to export?
I tried both
The tech tree worked both through PM and TTM but the names remained as they were in stock
could the localization be cached somewhere and not updating?
if you create a new node does that one rename correctly?
hmm ok so it sounds like the stock local is not being overwritten.
will add, "look into localization overwrite" to tomorrows todo.
Ah sounds like a problem we solved with spacewarp
You have to put the localization file first in the sources list
thanks for the info, still will be a tomorrow job since im not at my computer atm.
Im trying to use TTM + the editor, but Im having issues with my game getting stuck on the loading screen after loading a save
This is the tree I exported and am trying to load
Okay sorry, I got it working actually. For some reason when I exported it the first time, it generated without an assets folder, and when I exported it again, it did generate the assets folder
hmmmm thats odd
Is there any kind of repository for custom tech trees?
It seems that when the tree is loaded through the TTM (rather than through PM) mods that add their own tech tree patches (like the KLSS) can't add their parts to the tech tree anymore. Is this known?
Yes, because this completely side steps PM's way of adding parts
if you use a custom tree instead of default that will happen. if your making a custom tree then use ttm, if your just editing the stock tree use PM
make sure the config is on default and pm will work again.
Its not too hard to make a custom tree with PM as well, just have to write a patch to remove all stock nodes, which is quite simple if you prefix all your node names with something
could technically add that into the editor. similar to this #1186780327054684320 message
Yeah, but that would probably still break mods that add parts to stock tree right? Cause the IDs would change.
Yes, but then pm patches could be used to add their parts to the created nodes
yes, but thats up to the part mod creator or the person who creates the custom tree to add the parts.
Like I do with the PR I made to KLSS to add its nodes into WMCC
^
TTM editor todo list
- fix json to csv and csv to json
- Part import
-
- add export option to mod
-
-
- export part IDs
-
-
-
- export part local
-
-
-
- export part icon
-
- Part icons
- Drag to move nodes
- Background image editor
- Dedicated mode switcher for TTM and PM (reduce clutter and confusion)
- Improve docs
- update styles to match the game ui better
- add unlock: method calling
- add compare to the export to pm button to remove stock nodes if not present in tree.
- move from gh pages to my dedicated
- put current tree into localstorage so it stays after reload
- add option to save tree to github
- plugin api > ability for plugins to be made for the editor.
- options page
Dedicated mode switcher
I use the ttm export to save my progress even if Im working for PM
will keep that button for pm mode but will just name it save.
actually I probably wont add in the mode switch until the plugin api is added. since thats when it will be needed most.
@twilit wedge I'm experiencing a strange bug with TTM where Tech node descriptions are being cut off
what should the text be?
Here's an example
"Heavily impacted by damage, these reaction wheels were only able to be repaired due to detailed blueprints stored in one of the surviving Borealis data-banks."
It appears to not be escaping commas properly
Not really, but I can just not write the flavor text until you can fix it
yay or nay
You are escaping backslashes
well thats the way I plan to. cus it all goes into a CSV
If I add one backslash and then reimport, it imports as this
To escape a comma, you have to wrap the line in quotes
to escape quotes you have to doo ""
but then you have to unescape all of this on import
If I try wrapping it in quotes
It tries to escape the quotas with backslashes
And importing that then results in this
So yeah, escaping characters seems borked
Aside from that weirdness though this editor has generally worked very well for me. I've been able to make steady progress on my tech tree because of it
right added that to my todo list...
I'm saying how the game expects stuff to be formatted, not how this tool works, it was a comment more for shadow
And its the entire loc string that should be wrapped in quotes as well for reference
Ah
Which it seems to be automatically
I think its this thats breaking it https://github.com/Bit-Studios/TechTreeManagerEditor/blob/44736cb709c0380de7139dff590a8c21aa83b609/index.html#L177
I'll stick all the descriptions into a text document for now, and when you can get around to fixing it, I'll just copy and paste them back in. I was concerned that the descriptions were lost but they aren't
Re this: It somehow fixed itself. Was it thanks to a mod loader update?
well, not the mod loader, but SpaceWarp 1.8 did have a localization update, including support for overriding stock localization terms
going to need to remake the json to csv and csv to json stuff.
TTM editor now has basic plugin support.
example plugin https://github.com/Bit-Studios/ttm-example-plugin
how to use. copy the raw url of the plugin.json file and paste into plugin url box
@lilac lantern I assume the changes by munix have worked?
Thanks!