Best way to hide vanilla researches?

Started by Caminha, January 11, 2018, 04:43:44 PM

Previous topic - Next topic

Caminha

What is the best way to definitely hide all vanilla researches? Overwriting all Defs to researches I want is a possibility but seems counterproductive.

BrokenValkyrie

This is the nuke option. You can try using xpath patch operation. https://gist.github.com/Zhentar/4a1b71cea45b9337f70b30a21d868782

It support removal of node.

Your patch might look something like this, though I hadn't removed parent node before.


<Patch>
<Operation Class="PatchOperationRemove">
  <xpath>Defs/ResearchProjectDef[defName = "RecurveBow"]</xpath>
</Operation>
</Patch>


This of course will mess up everything that has vanilla research requirement.

Why do you need hide all vanilla research?

jamaicancastle

You could look at the Humanoid Alien Race framework, it has some code that allows it to dynamically show/hide research projects based on the species in your colony. I suspect you could tweak that to simply hide a whole bunch of projects instead. That would be less destructive than patch removal, since tech requirements and all would still point to projects, just not ones that are researchable.

ethouiche

Quote from: jamaicancastle on January 11, 2018, 11:28:50 PM
allows it to dynamically show/hide research projects based on the species in your colony.

I dont remember that  :-\
Where is it ?
https://github.com/erdelf/AlienRaces/wiki

jamaicancastle

Quote from: ethouiche on January 12, 2018, 06:36:42 AM
Quote from: jamaicancastle on January 11, 2018, 11:28:50 PM
I dont remember that  :-\
Where is it ?
https://github.com/erdelf/AlienRaces/wiki
Page 9, Race Restrictions, it's the first section.

QuoteYou can easily define projects that can only be done by your race. ...
Additionally, the defined and every derived node will not be visible on the research screen until the conditions are met.

I have no idea how, but it says it does it.

ethouiche

QuoteRace restricted research is something quite useful.
You can easily define projects that can only be done by your race.

To me it means, some research needs to be done by one race and not another. It does not mean any research tree is hidden.
I am on Erdelf Discord, i will ask him. Afak it does not hide any research tree.

ethouiche

Quote from: erdelf
the framework does it
it hides in the research tree, as long as no members of that species are in the colony

My bad.