Ludeon Forums

RimWorld => Mods => Help => Topic started by: DaemonDeathAngel on December 19, 2016, 02:30:43 PM

Title: [A16] Hiding Base Game Research
Post by: DaemonDeathAngel on December 19, 2016, 02:30:43 PM
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.
Title: Re: [A16] Hiding Base Game Research
Post by: RawCode on December 19, 2016, 09:34:22 PM
code injections only, *detour* techtree render and prevent it from rendering vanilla items.
Title: Re: [A16] Hiding Base Game Research
Post by: DaemonDeathAngel on December 20, 2016, 10:36:28 AM
When you say code injection, are you talking using assemblies to negate the game ever rendering the techtree/items at all.
Title: Re: [A16] Hiding Base Game Research
Post by: 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;
Title: Re: [A16] Hiding Base Game Research
Post by: DaemonDeathAngel on December 21, 2016, 01:06:01 AM
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?
Title: Re: [A16] Hiding Base Game Research
Post by: donoya on December 23, 2016, 04:21:52 PM
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.
Title: Re: [A16] Hiding Base Game Research
Post by: RawCode on December 23, 2016, 09:38:51 PM
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.