Jump to content

Adding new research alongside a mod which alters workshop / extending multiple classes


zingfharn

Recommended Posts

So I build this: http://steamcommunity.com/sharedfiles/filedetails/?id=643812550

 

It pushes mod and PCS crafting into the workshop using a bastardised builditems extension*. I've done it through extending the workshop, and having an override in XComEngine.ini, which I fear isn't the most elegant way to do this. It's pretty much chewing gum and string at this point, but it holds together.

 

+ModClassOverrides=(BaseGameClass="UIFacility_Workshop", ModClass="UIFacility_WorkshopExtra")

Now I want to move PCS crafting to the Lab (makes building a lab in any way pointful), and add some new research items.

 

I could just extend the lab in the same way I've extended the workshop, but I'd like to back off from that, because other lab mods will clash with it. I'm also a bit of a loss as to how is best to add new research items. I can see the tech template, and how to create them - I'm just not sure exactly how I would tell the game to create the new tech templates in the best way.

 

I've looked at screenlisteners, but I'm not sure how to actually instantiate them. Do I just create a new class which extends UIScreenListener and do an OnInit()? Will that automatically be created by the game?

 

Sorry for the dumb questions, and thank you in advance.

 

*p.s. Firaxis have done SO MUCH hard coding for only proving ground items potentially have a time element. It's a nightmare.

Edited by zingfharn
Link to comment
Share on other sites

Ended up using a screenlistener, and hooking it to UIFacilityGrid.

 

Sidenote, setting this in default properties

ScreenClass = class'UIFacilityGrid';

still has it firing on *everything*. I've looked at various mods, and they alternately use ScreenClass = class'xyz' and ScreenClass = xyz. Neither worked for me, so if anyone has a tip there, it'd be most welcome.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...