Giter Site home page Giter Site logo

researchtree's Introduction

RimWorld 1.2

A better research tree.

Features

  • automatically generated to maximize readability*.
  • shows research projects, buildings, plants and recipes unlocked by each research project.
  • projects can be queued, and colonists will automatically start the next project when the current research project completes.
  • search functionality to quickly find research projects.

FAQ
Can I add/remove this from an existing save? You can add it to existing saves without problems. Removing this mod will lead to some errors when loading, but these should not affect gameplay - and will go away after saving.

Why is research X in position Y? Honestly, I have no idea. The placement of projects (nodes) is automated to minimize the number of crossings between dependancies (edges), and reduce the total length of these edges. There are many possible scenarios in which this can lead to placements that may appear non-optimal. Sometimes they really are non-optimal, sometimes they just appear to be so. See also the technical section below for more information.

Can I use this with mod X Most likely, yes. Added researches and their requirements are automatically parsed and the tree layout will be updated accordingly. ResearchPal implements a lot of the same functionality as this mod, and the research queue will likely not work correctly if both mods are loaded.

This looks very similar to ResearchPal Yep. ResearchPal is based on a legacy version of this mod that was kept up-to-date by SkyArkAngel in the HCSK modpack. I haven't worked on this mod in a long time, but I recently had some spare time and decided to give it another go. Feel free to use whichever you like better (ResearchPal has an entirely different layout algorithm). You can run both mods side by side to check out the different tree layouts, but be aware that the research queue will not work correctly if both mods are loaded.

Known Issues

  • Layouts are not perfect, if you have experience with graph layouts - please do feel free to look at the source code, and/or implement a Sugiyama layout algorithm for me that runs in C.NET 3.5 (Mono 2.0).
    Technical
    So how does this all work?

Creating an optimal layout is a known problem in the area of Graph Theory. There's serious mathematicians who've spent years of their live trying to figure out this problem, and numerous solutions exist. The group of solutions most relevant to our research tree (a directed acyclic graph, or DAG) is that derived from Sugiyama's work. Generally speaking, these algorithms have four steps;

  • layering (set the x coordinates of nodes, enforcing that follow-up research is always at a higher x position than any of its prerequisites, this is a fairly straightforward heuristic)
  • crossing reduction (set the y coordinates of nodes such that there is a minimal amount of intersections of connections between nodes)
  • edge length reduction (set the y coordinates of nodes such that the length of connections between nodes is minimal)
  • horizontal alignment (set the y coordinates of nodes such that the connections between nodes are straight as much as possible)

The final step is the hardest, but also the most important to create a visually pleasing tree. Sadly, I've been unable to implement two of the most well known algorithms for this purpose;

  • Brandes, U., & Köpf, B. (2001, September). Fast and simple horizontal coordinate assignment.
  • Eiglsperger M., Siebenhaller M., Kaufmann M. (2005) An Efficient Implementation of Sugiyama’s Algorithm for Layered Graph Drawing. Luckily, the crossing reduction and edge length reduction steps partially achieve the goals of the final step. The final graph is not as pretty as it could be, but it's still pretty good - in most scenarios.

Contributors

  • Templarr: Russian translation
  • Suh. Junmin: Korean translation
  • rw-chaos: German translation
  • 53N4: Spanish translation
  • Silverside: Fix UI scaling bug for vertical text
  • shiuanyue: Chinese (traditional) translation
  • notfood: Implement techprint requirements
  • HanYaodong: Add simplified Chinese translation

Think you found a bug?
Please read this guide before creating a bug report, and then create a bug report here

Older versions
All current and past versions of this mod can be downloaded from GitHub.

License
All original code in this mod is licensed under the MIT license. Do what you want, but give me credit. All original content (e.g. text, imagery, sounds) in this mod is licensed under the CC-BY-SA 4.0 license.

Parts of the code in this mod, and some content may be licensed by their original authors. If this is the case, the original author & license will either be given in the source code, or be in a LICENSE file next to the content. Please do not decompile my mods, but use the original source code available on GitHub, so license information in the source code is preserved.

Supporters

Are you enjoying my mods?
Become a supporter and show your appreciation by buying me a coffee (or contribute towards a nice single malt).

Buy Me a Coffee

I Have a Black Dog

Version
This is version 3.17.537, for RimWorld 1.2.2753.

researchtree's People

Contributors

53n4 avatar fluffierthanthou avatar hanyaodong avatar karel-kroeze avatar lazyrichard avatar notfood avatar rw-chaos avatar shiuanyue avatar silverside avatar templarr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

researchtree's Issues

Curious why MP support was removed?

I've been working on multiplayer support on MP Compat as I simply can't handle using the vanilla research tree on modded playthroughs, and it was suggested when I did a PR that I try a PR for this project directly as it's still supported, and when going to add SyncMethod into some of the Queue methods I was surprised to see a commented out SyncMethod attribute already present, and as it turns out my solution was very similar to an older commit that seems to have been long commented out since.

Was wondering why this was reverted, if there was any issues discovered with SyncMethods for the queue and a SyncWorker to handle ResearchNodes that haven't become apparent in hours of my testing. In my experience its made the research tree perfectly usable in MP.

Thanks!

No indication of missing research equipment (techprints).

Mousing over a tech missing a multi-analyzer or high-tech bench works correctly but if the prerequisite is "x techprints applied" I could not find any indication of that using the research tree. I verified that it should show up but removing the mod and checking with the vanilla research tab.

Queue not showed after reload/relaunch

I think it is pretty much self explanatory - the queue is shown empty after loading the game again if you had queue when exiting the game (but research still works as queued).
A minor problem, nothing too game breaking.

remove debug logging

Reported by: sidfu1
Description:
hmm i keep getting alot of debug info. on the 1.0 version is any debuging commands left enabled by accdent?

cannot continue research part of tutorials

JSJosh.holy™ [Frankson Otra] 13 Dec, 2019 @ 1:44am
This mod makes it so the 'select research' step of the tutorial never continues, choosing a research in the new menu does not count for the step.

Icons disappear inside of research tree when at a certain zoom distance

A lot of mods(more added today and since then there is an issue so probably related to 1 of them but error itself comes specifically from the research tree mod so posting it here)

When at the default zoom level(fresh game go to research screen and wait a billion years(for some reason)) when you move all the way to the left and towards the top the icons disappear and it mass spams the logs with an error message(until maximum log thing is reached) which stops if you move away or zoom in or out(cant find the exact icon that it does it to

My guess is 1 if not more then 1 of the following mods might be acting weird with the mod as it only started since i added these mods

Load times of the research window and game have slowed down big time as well(Game went from 3 minutes to 15+ and research window went from 15-20 seconds to a good solid 4-5 minutes

Added mods today
Giddy-up! Ride and Roll
Avoid Friendly Fire
Giddy-up! Battle Mounts
Giddy-up! Core
Giddy-up! Caravan
Repair Workbench
Share The Load
Prisoner Harvesting
[1.0] RPG Style Inventory [V3.2]
Interaction Bubbles
Simple sidearms
Realistic Rooms
EPOE - Trader and Archotech patch
Simple Search Bar
Vanilla Fences
Dual Wield
[RF] Editable Backstories and Names [1.0]
Vanilla Factions Expanded - Core
Vanilla Factions Expanded - Medieval
Minecarts - Get Haul'n Update
Life Support
Questionable Ethics Enhanced
Vanilla Animals Expanded — Cats and Dogs
Vanilla Animals Expanded — Arid Shrubland
Vanilla Animals Expanded — Extreme Desert
Vanilla Apparel Expanded
Vanilla Armour Expanded
Vanilla Weapons Expanded
Vanilla Animals Expanded — Desert
Vanilla Furniture Expanded
Better ModMismatch Window
Vanilla Furniture Expanded - Security
Guards For Me
Character Editor
Dynamic Diplomacy

Here is the log file and such no safe file attached as it happens in any safe as mentioned before
https://gist.github.com/570303f2005d995a1a859806b1cc1450

Techprof Subpersona Core breaks queue

Problem happens when you have a que with some techs and use Techprof Subpersona Core (vanilla item) this item imidiately finishes research but tech becomes impossible to remove from a que and blocks further research

ResearchTree arrows are a mess, not arranged like it used to be for 1.0

Describe the bug

image

Expected behavior

Arrows to be well arranged, not a spaghetti mess

Steps to reproduce

  1. Install the only mod that alter the default research tab
  2. check research tab.

Other mods

Yes, but are mods I always used since 1.0 and never altered research tab, but only Fluffy ResearchTRee

Output log

Save game

Screenshots

Environment

  • OS:
  • 32/64 bits
    Win10 64bit

Game

  • 32/64 bits
  • Steam/DRM free
  • Version
    DRM free
    version 1.1.2587

Add option for vanilla style mod tabs.

This mod helps make games with large mod counts playable again. The one thing that vanilla does better is that some mods have their research separated into their own tabs on the research screen.

This actually makes some research cleaner and easier to read than when using ResearchTree because the research for each mod is naturally grouped together on it's own tab. This also means that in vanilla I can easily research all of the items from a single mod in order for better progression.

If this sort of thing can be implemented into ResearchTree then you'd have the best of both worlds. A nice, readable layout but with mod research all grouped together in it's own nice easy to find tab.

fix missing requirement message

Reported by: Ankoku_Teion
Description:
a lot of techs are locked, when i hover over them it just says "missing" (instead of saying "missing hi-tech bench" for example)

add techprint information

Reported by: Boolyman
Description:
How am I supposed to see what Techprints I have and have not installed already? Am I missing something? I looked in your mod options and I don't see anything to toggle on the "0/2" labels on the research tags, and nothing gives the information when I hover over it. WheneverI find a techprint I have to exit, disable your mod, reload, check the vanilla tree to see if I need the techprint, then exit, enable your mod, and reload the game again... its really inconvenient, so I assume I am just missing something.

Compilation error

Describe the bug
While compiling the source code for this mod (to start working on a 1.3 update) I get this error:

Delegate 'Action<Rect>' does not take 0 arguments

in MainTabWindow.cs
The only changes to the source code are the ones from #52 and updating Lib.Harmony and Multiplayer API.
Expected behavior
Successfull compilation and the mod's dll files in output folder.

Games becomes sluggish when panning the search window with mouse.

I play on linux, so I don't know if other platforms experience this issue.

Whenever I use the mouse to pan around the window, the interface becomes sluggish until panning stops. I suspect it is due to the mod trying to redraw the tree for every pixel moved.

This problems does not occurs when using the direction keys to pan around the research tree.

Do you not generate a static tree, akin to a bunch of images? This feels like the mod tries to compute the position of every single on-screen element at any given time.

Incompatible with Research Pal 1.1

Describe the bug
When both Research Tree and Research Pal are installed there are graphical issues when in the colony screen - tooltips remain on screen and the main menu is unavailable.

See - https://drive.google.com/file/d/1XxJd4eLRE-NFMbLqXzjF7cqazLZ6T9tD/view?usp=sharing

Expected behavior
I wasn't aware that both mods essentially did the same thing

Steps to reproduce
Install Research Tree (with dependencies) and Research Pal

Other mods
As above.

Output log

Save game

Screenshots

https://drive.google.com/file/d/1XxJd4eLRE-NFMbLqXzjF7cqazLZ6T9tD/view?usp=sharing

Environment

  • OS: Windows 10 Pro, 64 Bit
  • 32/64 bits

Game

  • 32/64 bits
  • Steam/DRM free
  • Version
    Steam, 1.1, Royalty DLC not installed / enabled.

Comment
It took me about 30 - 45 minutes to troubleshoot the issue. At the time I didn't relaise both mods essentially did the same thing and thus only one of the other would be required. Could you please add a comment / disclaimer to Research Tree indicating that if you have both mods installed at the same time that the user might experience issues.
Rimworld

[2.15.465] Cancelling first research project in a queue doesn't actually cancel it

If you cancel a single research project, or just the first research project in any research queue, it won't actually cancel the research project; colonists will still attempt to research it, only stopping once completed. In the queue case though, no further projects will be done which would be normal behaviour.

This is probably somewhat due to vanilla mechanics where you can't cancel research projects, and the only way to effectively do so is to disable researching in the work tab.

This was with Research Tab 2.15.465 and RimWorld 0.19.1998


Ludeon-style steps to reproduce:

  • Start a research project (make sure somebody's assigned to research and a bench is present)
  • Cancel said research project; colonist will still research that project

item prerequisites are ignored

Sorry, @fluffy. I explained myself very badly. With Royalty DLC, some new vanilla bionics need prerequisites to be available for research: one or two techprints (depends on the tech) that you need to get through quests. With the mod, those requisites are gone, so you can research these high level techs without any problem.

Improved Layout Algorithm?

I've happened across a graph layout library that seems perfect for this mod.

It's implemented in C#, .NETStandard 2.0, so there should be no problem running it in Mono, and it's under the same MIT License.

There is sample code included with the source, including a standalone graph viewer and editor.
One implementation apparently handled 15 000 edges in 10 minutes, using 4GB of ram, but it is allegedly extensible past 50 000 edges.

Binaries
https://www.microsoft.com/en-us/research/project/microsoft-automatic-graph-layout/
https://www.nuget.org/packages/AutomaticGraphLayout/

Source Code
https://github.com/microsoft/automatic-graph-layout

Using the serious mathematicians' algorithms might lead to performance increases with massive modpacks (like mine), and may create more optimal layouts.

Just thought I could bring it to your attention

ResearchTree spams the log

Describe the bug
ResearchTree spams the log with "ResearchTree :: Sterile materials progress: 0.0008273692" messages, this makes the log eventually (pretty quickly) give up logging.

Expected behavior
Might want a toggle to prevent logging or decrease the frequency of logs globally.

Steps to reproduce
Load game, let it run with active research and create a log file.

Other mods
See below, fair number of other mods.

Output log
https://gist.github.com/HugsLibRecordKeeper/3c74ca9d638757fc83c15af01f832dc1

Save game
https://www.dropbox.com/s/1x73fpvbvq8xkuu/Southeast%20Atna%20World%20Unification.zip?dl=0
This may not load due to an issue with CE Melee right now, dropping that mod should force a load without too many issues.

Environment

  • OS: Windows 10 64-bit

Game

  • 64-bit
  • Steam
  • Version 1.0

support for <hiddenPrerequisites>

Problem description
tag is ignored. Researches with tthat tag can be researched without having the hidden prerequisites fullfilled

[BUG] Locking a vanilla research node via prerequisites stalls the game

Describe the bug

If you lock a research node by adding the researchdef to its own prerequisites by editing an xml file of the Core mod (the base game) and then you open up the research tree and scroll into its view then the game locks up completely while the cpu usage jumps up to what a single thread can use at most. Likely a loop never exits.

Note: Apparently it doesnt lock up if you are fully zoomed out for some reason.

Expected behavior

What i was expecting is to be able to hide the research node which corresponds to the def i edited, which in turn should have locked all the nodes that relied on it.

Steps to reproduce

Note: research tree's "Group by techlevel" option was set to On

  1. Disable all mods except for Core and the steam version of ResearchTree, close the game.
  2. Open steamapps/common/RimWorld/Mods/Core/ResearchProjectDefs7ResearchProjects_2_Electricity.xml
  3. Add <li>Batteries</li> to the prerequisites of the Batteries def
  4. Save the file, start the game, open or create any world and click on the research button and scroll around.

Other mods

No, no other mods

Output log

The only relevant lines there are the pc specs. No lines are written which correspond to the mods.

Save game

Any save works, so this shouldnt be needed 😛

Screenshots

image
The picture shows another way to reproduce it. Zoom out fully, move the screen to the bottom right and zoom in once and it locks up.

Environment

  • OS: Win10
  • Architecture: 64bit

Game

  • Architecture: 64bit
  • Platform: Steam
  • Version: Latest (1.0.2408)

Notes
You might be wondering why i am trying to lock researches. And the answer to this is because i want to add a new feature to techadvancing which works fine using the vanilla techtree but breaks horribly with ResearchTree (and ResearchPal)

Language options are not displayed properly

Describe the bug
The game language menu retains only the previously selected language and English.
If you want all game language options to be displayed, you need to unload one of your "Research Tree" or "RuntimeGC 1.1 (unofficial)"

Expected behavior
When the game language menu is opened, all language options supported by Rimworld are displayed.

Steps to reproduce
1.loading both "Research Tree" and "RuntimeGC 1.1 (Unofficial)"
2.Click the language menu on the home screen to expand it

Other mods
002

Changing the position of "Research Tree" and "RuntimeGC(unofficial)", the game language options are also displayed abnormally

Output log
output_log.txt

Save game

Screenshots
error:
001

normal:
003

Environment

  • OS: Windows 10
  • 64 bits

Game

  • 64 bits
  • Steam
  • 1.1.2571Version

Weird Tech Tree Behavior Causing Lag

I've encountered an odd bug that creates a huge amount of space with no nodes between groups of research nodes. With all this empty space it causes the framerate to drop to 1 frame per every three or so seconds when the Research is open.

The offending mod causing this to rear it's head is the Avali mod https://steamcommunity.com/sharedfiles/filedetails/?id=1314474881

I did give them a small notice of the issue. However I felt like sharing here incase it was something that could be looked into on RT's end, as well as future proofing against this happening.

For size reference here are two comparing images with Avali turned off and on, with it fully zoomed out. Note how much space the scroll bar on the bottom says there is to the right.

https://imgur.com/a/Uq7ZUhS

(Edit: yes those lines just stretch all the way across uninterupted till the right side where they meet nodes.)

If I were to guess just how far it would stretch. At normal zoom, starting from the left side of my monitor, it would stretch all the way to my neighbor's house... across the street.

The Avali mod also causes some odd errors pop up as well when you open the Research Tree. Several items with a lower techlevel than one of it's prerequisites. An item that doesn't appear on it's specified layer. As well a red error within FluffyResearchTree.Tree.Swap

Which can be seen at the end of the output_log.txt here

output_log.txt

And for the ModsConfig.xml just in case
ModsConfig.xml

Hope this helps.

Required research points above 1,000,000 shows incomplete

Using latest version. Found that research with more than 1,000,000 points required
can only show last 6 digits. Happens on SS Researchable Stat Upgrades after around 32nd iteration on infinite research ( sounds like Factorio, right?).

1 FPS on research menu

output_log.txt

I have 60FPS on the game, but only 1FPS in the research menu.
There is my output_log
I couldn't send the other two files because it said unsupported files.
I am completely clueless as to why they didn't work, but I do use a lot of mods so it probably is a mod clashing with another.

I am Andrew226 on steam

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.