fluffy-mods / ResearchTree

Graphical research tree and queue system for RimWorld
Other
23 stars 25 forks source link

Tabbed 1.1 #41

Closed BaalEvan closed 4 years ago

BaalEvan commented 4 years ago

Rough night :P

I saw a request about Vanilla Like Research Tabs and after a few changes and hours, I made something like that. Mostly work :P Again Translation is missing, Sometimes I got "Word wrap was false at end of frame" but I have absolutely no idea how to fix this. Perhaps some settings can be added to switch between Big Tree and Tabbed Tree :)

Modded Tabs with references to "Main" Tab had FakeResearchNode which CenterScreenOnNode actual node at Main Tab.

This branch contains changes from QOL Pull Request.

Have a nice day ;)

Video Video 2

FluffierThanThou commented 4 years ago

Thank you very much for creating the pull requests! I have a love/hate relationship with this particular feature.

I hate it because the whole reason I made ResearchTree, was because I detest that vanilla took this same path. It felt (and still feels) like such a terrible cop-out. Automatic graph layout is a solved problem, and Tynan (or his developers) should have been able to implement it themselves - even if I only managed to partially do it. Simply put, there should be no reason for this feature to exist.

I love it because it's actually quite elegant - and barring some obvious flaws and shortcomings in your implementation, it does a good job. I'm also practical enough to acknowledge that for some extremely modded games, being able to split the trees up by mods is actually a useful feature.

That said, please stop working on it for now. When I'm done with Mod Manager, I intend to give Research Tree a massive overhaul. I will definitely come back to your pull request(s) and at least use them as inspiration, if not downright implement them. Any changes you make now I'll just have to redo after the overhaul, so it wouldn't make much sense.

Finally, feel free to contact me (I respond the quickest on Discord) when you want to add/change something on my mods something. That way, we can spar a bit beforehand on how to best implement it, and I can tell you what the current status of the project is.

BaalEvan commented 4 years ago

Tbh ;) I made it mostly for myself, as you can see in Video2, default tab (ALL) with all projects... is really large, and take some time to be sorted, and to find particular node from a new mod without knowing the exact name of the node. I have to make few compromises like displaying previous nodes in mod tab or using All Tab as a base for saving queue, it wasn't super easy because most of the tree logic was static, perhaps there are still bugs in the last commit but I didn't find anything. thanks to tabs scope for generating graphs is much lower. QOL-PR also was made for myself because sometimes I have like 40items in a queue and I need to research something right now and losing everything in the queue hurts.

I'm a fan of your work and didn't want to make another fork of ResearchTree I think having to choose between Research Tree and ResearchPal is enough hard choice and i spent on this feature maybe 10h with fixes for things found during gameplay, but this feature is quite useful in my opinion so I want to share with you, maybe thanks to this ResearchTree will be even better, no idea :) you can treat this PR as a proposition of changes for next Update ;)

marr75 commented 4 years ago

@FluffierThanThou your mention of an overhaul piqued my interest (and I've trying out @BaalEvan's tabbed version to see if it helps with startup times).

I read one of your comments about the long wait for "Reducing Crossing" and some research led me to the MS Automatic Graph Layout package. It's using different primitives for layout but the performance looks good, it maximizes parallelism, and it even has nice features around laying out compact graphs. I believe it would be compatible but it's been a while since I actually built a Rimworld mod specifically (from what I remember, it's a better and simpler eco-system than Kerbal Space Program, though).

Before I saw this PR, I was going to spend some time this weekend either trying to implement that in ResearchTree or just put some caching in a homebrew version (which, quick examination of the code showed me that was a little more difficult than I had thought because it looks like the style is kind of a thick object messing with its own internals rather than a functional style I could easily memoize, so it'd take a little refactoring apparently, this is true of researchpal but not ResearchTree). I was also going to look at if there was some more efficient global ordering of nodes that would save the sub-tree order operations some loops.

Anyway, just kind of wondering what you've already thought about. Thanks for any response in advance.

BaalEvan commented 4 years ago

There is a MSAGL branch of ResearchTree (I think its a default one for steam right now) and loading times are much better, but there are few issues with Edges, you can check this Issue I'm sure Fluffy will be working on some improvements in the future. For me biggest issue with Edges and MSAGL is no option to set a specific port for Edges (In-Out) and because of this edges are not directed to Left-Right edge of the node

marr75 commented 4 years ago

@BaalEvan I am, unsurprisingly, behind the two of you on the topic. This is all interesting. Thank you much.