WCIF: A Secondary Hi-Tech Research Bench...?

Started by Tenshi~Akari, March 22, 2019, 08:51:26 AM

Previous topic - Next topic

Tenshi~Akari

So as the name suggests... I'm personally looking for a mod that adds an additional hi-tech bench (not replace) to the game, or at least some way to make one. I've tried patching "requiredResearchBuilding" for research defs to add a more compact 1-tile version I was working on, but of course doing that threw errors since the function itself doesn't seem to use <li> as an alternative to add more buildings... so it's currently stuck at ending its research tree pre-hi-tech bench levels.

Does anyone know of any mods that have successfully done this? Or would anybody more knowledgeable know how to get something like this up and running? Seems like it's not going to be that simple to do through just XML alone, and I've tried, but C# is really tough for me to grasp at the moment...  :-\

Bunkier

well you can do this using only xml, all you need is to modify building size and well, texture that will fit it

Canute

I am doing a similar thing with the fabrication bench, i think these big oversized workbench don't fit into all the workbenches with 3x1 size.
At the /Core/Defs/ThingDefs_Buildings/Buildings_Production.xml
you need to change (values are from the fabrication bench):
<size>(5,2)</size>
<drawSize>(7,4)</drawSize>

But for the HiTechResearchBench it is basicly the same.

Special with the drawsize you need to experiment abit until it looks good for you.


Tenshi~Akari

Hey, thanks again sma342... but just caught something while looking through the xml. This is basically what I did with my own edit. The problem I'm coming across is the research itself isn't going into the higher tiers (ex.: allowing for research of mult-anylizer & Spacer level stuff) like it would with the vanilla hi-tech bench. And that's mainly because the Research defs are looking only to the HiTechResearchBench thing def via requiredResearchBuilding. Adding any more defs to that, even with the list option, yielded me with red errors. Say for instance, I wanted to use the modded bench to research Multibarrel weapons:


<ResearchProjectDef>
    <defName>MultibarrelWeapons</defName>
    <label>multibarrel weapons</label>
    <description>Assemble miniguns.</description>
    <baseCost>2600</baseCost>
    <techLevel>Industrial</techLevel>
    <prerequisites>
      <li>GasOperation</li>
      <li>MicroelectronicsBasics</li>
    </prerequisites>
    <requiredResearchBuilding>HiTechResearchBench</requiredResearchBuilding>
    <researchViewX>9</researchViewX>
    <researchViewY>4.5</researchViewY>
  </ResearchProjectDef>


I wouldn't be able to because this line of code is where everything trips up for me: 

<requiredResearchBuilding>HiTechResearchBench</requiredResearchBuilding>

The only way I've been able to get any of that to happen was to override the vanilla bench by having my edit take its def name... but I don't particularly want to do it that way. I really need an extra bench that the Tier 3 & 4 research defs will also be available on.

Hopefully that's a little bit more clear with what I meant? Sorry if that was confusing...  :-[

pdkhang123

Quote from: Tenshi~Akari on March 22, 2019, 04:19:02 PM
Hey, thanks again sma342... but just caught something while looking through the xml. This is basically what I did with my own edit. The problem I'm coming across is the research itself isn't going into the higher tiers (ex.: allowing for research of mult-anylizer & Spacer level stuff) like it would with the vanilla hi-tech bench. And that's mainly because the Research defs are looking only to the HiTechResearchBench thing def via requiredResearchBuilding. Adding any more defs to that, even with the list option, yielded me with red errors. Say for instance, I wanted to use the modded bench to research Multibarrel weapons:


<ResearchProjectDef>
    <defName>MultibarrelWeapons</defName>
    <label>multibarrel weapons</label>
    <description>Assemble miniguns.</description>
    <baseCost>2600</baseCost>
    <techLevel>Industrial</techLevel>
    <prerequisites>
      <li>GasOperation</li>
      <li>MicroelectronicsBasics</li>
    </prerequisites>
    <requiredResearchBuilding>HiTechResearchBench</requiredResearchBuilding>
    <researchViewX>9</researchViewX>
    <researchViewY>4.5</researchViewY>
  </ResearchProjectDef>


I wouldn't be able to because this line of code is where everything trips up for me: 

<requiredResearchBuilding>HiTechResearchBench</requiredResearchBuilding>

The only way I've been able to get any of that to happen was to override the vanilla bench by having my edit take its def name... but I don't particularly want to do it that way. I really need an extra bench that the Tier 3 & 4 research defs will also be available on.

Hopefully that's a little bit more clear with what I meant? Sorry if that was confusing...  :-[
Hi, I don't know if you have found an answer to this problem yet or have lost interest in it since your post is almost a year ago but I just tried to do the same thing as you and my solution was to patch remove that <requiredResearchBuilding> line entirely instead of trying to list alternatives.
A side effect is the basic bench can then be used for Tier 3 researchs but I don't think it would be noticeable or important gameplay-wise. You will still need a bench that can link to the multi-analyzer for Tier 4; just remember to add it as a linkable facilities to your custom bench or patch remove the <requiredResearchFacilities> also.  Hope this helps  :)