wghost81 Posted November 27, 2013 Author Share Posted November 27, 2013 Thanks. SplitString might do the trick and it is actually used in existing code, which means free bytecode example. :smile: But I don't know if I can fit it inside the last function to call 'Localizer', which seems to be UIBriefing.StartBriefing. Need to think about this. :smile: Link to comment Share on other sites More sharing options...
Anbar Posted November 28, 2013 Share Posted November 28, 2013 Quick Q - what's the change required to turn meld canisters back on? (from false to true) messing around with balance in marathon also.... would it be feasible, down the line, to have meld canister show up by mission type i.e. within saucer missions? Link to comment Share on other sites More sharing options...
wghost81 Posted November 29, 2013 Author Share Posted November 29, 2013 (edited) If you want to turn canisters on, you will also need to disable meld collection from artifact. First two changes with comments{ in XGBattleDesc.ShouldSpawnMeldCanisters: true -> false }turn off meld canisters on maps. Change with this comment{ XGBattle.GetRecoveredMeldAmount }allows to collect meld from artifacts. And these three{ This is Meld amount per Alien Food. Change 01 to whatever value you like (hex-value). } { This is Meld amount per Alien Stasis Tank. Change 02 to whatever value you like (hex-value). } { This is Meld amount per Alien Surgery. Change 03 to whatever value you like (hex-value). }are used to tweak constants in XGBattle.GetRecoveredMeldAmount. So if you want canisters back, you need to remove all these changes and leave only XGSummaryUI.CollectArtifactsFromDeadAliens plus all its constants. UPD:UPK_FILE=XComGame.upk OFFSET=10031542 [MODDED_HEX] { This is amount of Meld granted for Alien Base Assault. Change 32 (hex, 50 in dec) to whatever value you like (hex-value). } 32This also needs to be removed, since offset is valid for modded version only.END UPD To change mission types for which Meld canisters are placed on maps, you need to re-write XGBattleDesc.ShouldSpawnMeldCanisters function:event bool ShouldSpawnMeldCanisters() { switch(m_iMissionType) { // End:0x18 case 2: // End:0x1D case 3: // End:0x24 case 4: return true; // End:0x3F case 11: // End:0x3F if(m_eCouncilType == 30) { return true; } // End:0xFFFF default: return false; } //return ReturnValue; }Cases 2, 3 and 4 are abduction, crashed UFO and landed UFO missions and m_eCouncilType == 30 is Meld tutorial. UPD:Uploaded an alternative mod version, which keeps Meld canisters and in addition allows to collect Meld from alien corpses. See optional files. Edited November 29, 2013 by wghost81 Link to comment Share on other sites More sharing options...
wghost81 Posted November 30, 2013 Author Share Posted November 30, 2013 UPD: added a new modlet to optional files section, which turns off Meld canisters on Abduction missions, leaving them on UFO missions only. Link to comment Share on other sites More sharing options...
yeehaws Posted December 3, 2013 Share Posted December 3, 2013 (edited) Is it possible to turn off Fog of War on meld containers? I don't enjoy missing meld because I headed in the wrong direction/did not scrutinize FoW for meld container outlines. This allows me to plan ahead more. Edit: Alternatively, the orange meld signal should trigger always, which seems pretty random unmodded to me. Edited December 3, 2013 by yeehaws Link to comment Share on other sites More sharing options...
wghost81 Posted December 3, 2013 Author Share Posted December 3, 2013 Theoretically, it can be done. Link to comment Share on other sites More sharing options...
wghost81 Posted December 4, 2013 Author Share Posted December 4, 2013 Quick hack to show arrows with counters (copy/paste to text file, install with ToolBoks custom mod): MOD_NAME=Meld Arrows Always Visible AUTHOR=wghost81 aka Wasteland Ghost DESCRIPTION=Meld Arrows Always Visible Version: 1.0p1 Compatible with XCOM Enemy Within versions: - Patch 1 (Changelist: 398180) UPK_FILE=XComGame.upk OFFSET=6164411 [MODDED_HEX] { jump if -> goto } 06 This will show Meld Arrows from the beginning, but won't update interface until you actually see canisters and still attempt to give you visual cues on canisters location. Making it work better will require to set bVisibleToSquad to true, but there is simply no place to put this code into. And actual visibility is calculated through native function. Link to comment Share on other sites More sharing options...
wghost81 Posted December 4, 2013 Author Share Posted December 4, 2013 Silly me :smile: I could replace native function call with explicit variable value definition. :smile: MOD_NAME=Meld Arrows Always Visible AUTHOR=wghost81 aka Wasteland Ghost DESCRIPTION=Meld Arrows Always Visible Version: 1.0p1 Compatible with XCOM Enemy Within versions: - Patch 1 (Changelist: 398180) UPK_FILE=XComGame.upk OFFSET=7760674 [MODDED_HEX] 86 61 00 00 76 5F 00 00 00 00 00 00 71 61 00 00 DA 4A 00 00 00 00 00 00 72 61 00 00 00 00 00 00 EC 00 00 00 44 1C 00 00 { 2B } 2F 00 00 00 1F 00 00 00 1C DA 4A 00 00 00 72 61 00 00 16 1C 20 FC FF FF 28 16 { 1B 15 7B 00 00 00 00 00 00 16 } 0F 2D 01 42 61 00 00 27 0B 0B 04 0B 53 00 00 00 02 09 02 00 8E 76 00 00 00 00 00 00 Works perfect so far. But if native function does something else, except for setting visibility variable, there might be some problems. Report here if you encounter any. Link to comment Share on other sites More sharing options...
Amineri Posted December 4, 2013 Share Posted December 4, 2013 Getting around native function calls can be done, but sometimes is a bit tricky. The EU patch 4 mods to rework the ammo system and the damage randomization both had to replace native function calls. The tricky part (as you say) is figuring out exactly what it is that the native function does. Link to comment Share on other sites More sharing options...
wghost81 Posted December 4, 2013 Author Share Posted December 4, 2013 (edited) Well, so far I can't see if it does anything, but visibility check. Hope, it's all it does. :smile: Anyway, it's now up to yeehaws to test this mod in-game and report any problems. Edited December 4, 2013 by wghost81 Link to comment Share on other sites More sharing options...
Recommended Posts