zingfharn Posted March 14, 2016 Share Posted March 14, 2016 (edited) 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 March 14, 2016 by zingfharn Link to comment Share on other sites More sharing options...
zingfharn Posted March 15, 2016 Author Share Posted March 15, 2016 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 More sharing options...
CaveRat Posted March 15, 2016 Share Posted March 15, 2016 If by any chance you've put those inside defaultproperties block, make sure that braces are on separate lines, like this: defaultproperties { ScreenClass=XYZ; } Link to comment Share on other sites More sharing options...
zingfharn Posted March 15, 2016 Author Share Posted March 15, 2016 Hahahaha. Yep. Learned that one the hard way. But thank you! Link to comment Share on other sites More sharing options...
Recommended Posts