Feelx234 Posted February 28, 2016 Share Posted February 28, 2016 (edited) Hi there, I tried to override the Dropship loading screens to make them more interesting.Interestingly though, I managed to override the UIDropShipBriefing_MissionStart class on the first attempt. Then I tried the overriding the class UIDropShipBriefing_MissionEnd but none of the overrides took place. Is that a bug with the override mechanic or am I just not making the right changes? The first override attempt (successfull) // Dummy override class class Banana extends UIDropShipBriefing_MissionStart; var string str; function UpdateBriefingScreen() { str="Banana"; // Just override all strings with "Banana" MC.BeginFunctionOp("updatePreBriefing"); MC.QueueString(str); MC.QueueString(str); MC.QueueString(str); MC.QueueString(str); MC.QueueString(str); MC.QueueString(str); MC.QueueString(str); MC.QueueString(""); MC.QueueString(""); MC.QueueString(""); MC.QueueString(str); MC.QueueString(str); MC.QueueString(str); MC.QueueString(str); MC.EndOp(); } The second override attempt (fail=not showing Apple anywhere in during heading home from any mission) // Dummy override class class Apple extends UIDropShipBriefing_MissionEnd; var string str; // Constructor simulated function InitScreen(XComPlayerController InitController, UIMovie InitMovie, optional name InitName) { str="Apple"; MC.BeginFunctionOp("updatePostBriefing"); MC.QueueString(str); MC.QueueString(str); MC.QueueString(str); MC.QueueString(str); MC.QueueString(str); MC.EndOp(); SetTimer(1.0f, true, nameof(Update)); MC.SetNum("_xscale", 172); MC.SetNum("_yscale", 172); Show(); } Both overrides show up correctly in the XComEngine.ini.Any ideas why this behaviour is as it is? Can anyone reproduce something similar? Edited February 28, 2016 by Feelx234 Link to comment Share on other sites More sharing options...
Amineri Posted February 28, 2016 Share Posted February 28, 2016 It could be that your override is working, but that the data set in InitScreen is being overwritten in the Update function in that latter. Link to comment Share on other sites More sharing options...
Feelx234 Posted February 28, 2016 Author Share Posted February 28, 2016 (edited) It could be that your override is working, but that the data set in InitScreen is being overwritten in the Update function in that latter.Don't think so the update function is only dealing with the tips & the press any button to continue button. In addition it's identical to the update function of the UIDropShipBriefing_MissionStart for which the hack is working all fine. simulated function Update() { if (PC.bSeamlessTravelDestinationLoaded) { LaunchButton.bIsVisible = true; MC.FunctionString("updateLaunch", m_strPressKeyToContinue); SetTimer(0.0f); } else { TipCycle = (TipCycle + 1) % 10; if (TipCycle == 0) { MC.FunctionString("updateTip", GetTip(eTip_Strategy)); } } } Also there is no difference in how there are created in XComPlayerController TacticalGRI = `TACTICALGRI; if(TacticalGRI != none) { BriefingScreen = Spawn(class'UIDropShipBriefing_MissionStart', self); UIDropShipBriefing_MissionStart(BriefingScreen).SetMapImage(MapImagePath); } else { BriefingScreen = Spawn(class'UIDropShipBriefing_MissionEnd', self); } I am totally at a loss here Edited February 28, 2016 by Feelx234 Link to comment Share on other sites More sharing options...
Amineri Posted February 28, 2016 Share Posted February 28, 2016 Can you paste in the config file where you are defining the overrides? It could be something in there... Link to comment Share on other sites More sharing options...
Feelx234 Posted February 28, 2016 Author Share Posted February 28, 2016 Here is the XComEngine.ini [Engine.ScriptPackages] +NonNativePackages=ExampleClassOverride [Engine.Engine] +ModClassOverrides=(BaseGameClass="UIDropShipBriefing_EndMission", ModClass="Apple") [Engine.Engine] +ModClassOverrides=(BaseGameClass="UIDropShipBriefing_MissionStart", ModClass="Banana") Link to comment Share on other sites More sharing options...
Amineri Posted February 28, 2016 Share Posted February 28, 2016 Try not duplicating the header... that is, try : [Engine.Engine] +ModClassOverrides=(BaseGameClass="UIDropShipBriefing_EndMission", ModClass="Apple") +ModClassOverrides=(BaseGameClass="UIDropShipBriefing_MissionStart", ModClass="Banana") Link to comment Share on other sites More sharing options...
Feelx234 Posted February 28, 2016 Author Share Posted February 28, 2016 Try not duplicating the header... that is, try : [Engine.Engine] +ModClassOverrides=(BaseGameClass="UIDropShipBriefing_EndMission", ModClass="Apple") +ModClassOverrides=(BaseGameClass="UIDropShipBriefing_MissionStart", ModClass="Banana") Still not there, no change at all... Have tried it both way round too Link to comment Share on other sites More sharing options...
Amineri Posted February 28, 2016 Share Posted February 28, 2016 Hmm, this is mysterious, since I've got stuff that overrides multiple classes in a single mod, and is working without this issue. My next step would be to add `LOG calls in your override code as another check to make sure that it's not actually overriding. Link to comment Share on other sites More sharing options...
Feelx234 Posted February 28, 2016 Author Share Posted February 28, 2016 (edited) Hmm, this is mysterious, since I've got stuff that overrides multiple classes in a single mod, and is working without this issue. My next step would be to add `LOG calls in your override code as another check to make sure that it's not actually overriding. Included 'log calls in both apple and banana. For banana( start mission dropship) all worked fine but for the end mission dropship nothing showed up. Also put the 'log command in the update functions. Showed up in Banana but not in apple. Could it bve that override does not work if only simulated functions are overriden? Edited February 28, 2016 by Feelx234 Link to comment Share on other sites More sharing options...
Recommended Posts