[A16] Hiding Base Game Research

Started by DaemonDeathAngel, December 19, 2016, 02:30:43 PM

Previous topic - Next topic

DaemonDeathAngel

I have spent about two hours looking through and attempting to find a way to hide the base game research in A16Dev, but alas, I have found nothing of the sort. the only way I have found is to go into the core files and and completely remove the research defs within core. Obviously backing them up elsewhere.

Does anyone know of any other way to override them? I tried a previously used method of setting a prerequisite that did not exist, but with the new research tree style, it no longer works. I have also tried moving them off screen into the negatives, but that causes all researches to bee finished ahead of it.

RawCode

code injections only, *detour* techtree render and prevent it from rendering vanilla items.

DaemonDeathAngel

When you say code injection, are you talking using assemblies to negate the game ever rendering the techtree/items at all.

RawCode

public override void PreOpen()
{
base.PreOpen();
this.selectedProject = Find.ResearchManager.currentProj;
this.relevantProjects = DefDatabase<ResearchProjectDef>.AllDefs;
this.viewWidth = (DefDatabase<ResearchProjectDef>.AllDefs.Max((ResearchProjectDef d) => d.ResearchViewX) + 2f) * 190f;
}


this.relevantProjects = DefDatabase<ResearchProjectDef>.AllDefs;
to
this.relevantProjects = DefDatabase<ResearchProjectDef>.SelectDefsYouLike;

DaemonDeathAngel

I have no knowledge of C#. I am also working from a laptop with no internet currently as I am on vacation, so I have no means of properly learning it until I return home after new years.

If I were to send you my files thus far, could you possibly setup that little bit for me and send it back?

donoya

Quote from: RawCode on December 20, 2016, 11:57:51 PM
public override void PreOpen()
{
base.PreOpen();
this.selectedProject = Find.ResearchManager.currentProj;
this.relevantProjects = DefDatabase<ResearchProjectDef>.AllDefs;
this.viewWidth = (DefDatabase<ResearchProjectDef>.AllDefs.Max((ResearchProjectDef d) => d.ResearchViewX) + 2f) * 190f;
}


this.relevantProjects = DefDatabase<ResearchProjectDef>.AllDefs;
to
this.relevantProjects = DefDatabase<ResearchProjectDef>.SelectDefsYouLike;
What class is that in? I would assume it's the MainTabWindow_Research, but it doesn't seem to contain a relevantProjects or a viewWidth.

RawCode

i will double check is code actually from A16, but, rendering is same, list of objects to render extracted from somewhere and turned into image on screen.

to prevent some object from rendering, you simple remove it from list.