PepprmintButler Posted October 28, 2012 Share Posted October 28, 2012 (edited) Hello everyone, EDIT : I found the answer to my own question. See next post for the solution. I found what I think is the key to changing the min/max values or the camera zoom, but I'm stuck at modifying the bytecode because I can't recognize anything. Maybe someone with more experience with the bytecode can help ? Relevant code is in XComGame.upk/XcomPresentationLayer.noexport simulated function ZoomCameraScroll(bool bZoomIn, optional float Amount) { local float newZoom; Amount = 0.10; // End:0x4e Loop:False if(bZoomIn) { newZoom = CAMGetCurrentView().GetZoom() + Amount; } // End:0x83 else { newZoom = CAMGetCurrentView().GetZoom() - Amount; } // End:0xa5 Loop:False if(newZoom > 2.50) { newZoom = 2.50; } // End:0xc7 Loop:False if(newZoom < 1.00) { newZoom = 1.00; } CAMGetCurrentView().SetZoom(newZoom); } Clearly this bounds the zoom values between 1.0 and 2.5. File in the unpacked upk is XcomPresentationLayer/ZoomCameraScroll.function and has the following code : C5 68 00 00 32 55 00 00 00 00 00 00 B0 68 00 00 00 00 00 00 00 00 00 00 B3 68 00 00 00 00 00 00 1C 01 00 00 02 26 00 00 F3 00 00 00 BF 00 00 00 49 06 00 1E CD CC CC 3D 15 07 4E 00 2D 00 B3 68 00 00 0F 00 B1 68 00 00 AE 19 1B 35 0F 00 00 00 00 00 00 16 0A 00 90 A0 00 00 00 1B 71 35 00 00 00 00 00 00 16 00 B2 68 00 00 16 06 83 00 0F 00 B1 68 00 00 AF 19 1B 35 0F 00 00 00 00 00 00 16 0A 00 90 A0 00 00 00 1B 71 35 00 00 00 00 00 00 16 00 B2 68 00 00 16 07 A5 00 B1 00 B1 68 00 00 1E 00 00 20 40 16 0F 00 B1 68 00 00 1E 00 00 20 40 07 C7 00 B0 00 B1 68 00 00 1E 00 00 80 3F 16 0F 00 B1 68 00 00 1E 00 00 80 3F 19 1B 35 0F 00 00 00 00 00 00 16 13 00 00 00 00 00 00 1B 3D 63 00 00 00 00 00 00 00 B1 68 00 00 16 04 0B 53 00 00 00 02 41 02 00 32 75 00 00 00 00 00 00 I can't recognize a thing in there. Can you guys do better ? I'd really like to zoom in more on my guys ! Edited October 28, 2012 by PepprmintButler Link to comment Share on other sites More sharing options...
PepprmintButler Posted October 28, 2012 Author Share Posted October 28, 2012 So here it is. It was simple : just look for the values (I was searching for operatings, none of which I found the bytecode for). 1.0 is 80 3F2.5 is 20 40 After that it's simple :C5 68 00 00 32 55 00 00 00 00 00 00 B0 68 00 0000 00 00 00 00 00 00 00 B3 68 00 00 00 00 00 001C 01 00 00 02 26 00 00 F3 00 00 00 BF 00 00 0049 06 00 1E CD CC CC 3D 15 07 4E 00 2D 00 B3 6800 00 0F 00 B1 68 00 00 AE 19 1B 35 0F 00 00 0000 00 00 16 0A 00 90 A0 00 00 00 1B 71 35 00 0000 00 00 00 16 00 B2 68 00 00 16 06 83 00 0F 00B1 68 00 00 AF 19 1B 35 0F 00 00 00 00 00 00 160A 00 90 A0 00 00 00 1B 71 35 00 00 00 00 00 0016 00 B2 68 00 00 16 07 A5 00 B1 00 B1 68 00 001E 00 00 20 40 16 0F 00 B1 68 00 00 1E 00 00 2040 07 C7 00 B0 00 B1 68 00 00 1E 00 00 80 3F 160F 00 B1 68 00 00 1E 00 00 80 3F 19 1B 35 0F 0000 00 00 00 00 16 13 00 00 00 00 00 00 1B 3D 6300 00 00 00 00 00 00 B1 68 00 00 16 04 0B 53 0000 00 02 41 02 00 32 75 00 00 00 00 00 00 I changed these values to respectively 0.25 (80 3E) and 4.5 (90 40) -> Wham, bam, thank you m'am !Zooming at the usual max zoom 1.0http://i.imgur.com/pwlGK.jpgZooming at 0.25http://i.imgur.com/BSyxk.jpgZooming out at 4.5http://i.imgur.com/nn6U4.jpg I feel that zooming over 3.0 is pretty useless, 4.5 is probably a bit much. Next up is free rotation :thumbsup: Link to comment Share on other sites More sharing options...
rf900 Posted October 28, 2012 Share Posted October 28, 2012 Nice work! :thumbsup: Link to comment Share on other sites More sharing options...
falloutbr Posted October 31, 2012 Share Posted October 31, 2012 Hey, great work! I was wondering how to do that myself! :dance: Link to comment Share on other sites More sharing options...
Odie1974 Posted October 31, 2012 Share Posted October 31, 2012 Yeah, nice find... I added this to my game files as well... Now if only somebody could find how to get rid of that annoying bahavior when camera snaps by default to the soldier you select... Link to comment Share on other sites More sharing options...
miked79 Posted October 31, 2012 Share Posted October 31, 2012 (edited) Great job peppermint!I actually stumbled upon this last night! :) yay for us! hehehehe! Update... Figured out how to slowwwwwly rotate the camera. But the snag I have is that it resets itself after every 4 rotations. So I need to find out where that value is, and set it so it will rotate a full 360 around the slower paced camera yaws that I have. Any help will be appreciated! Edited November 1, 2012 by miked79 Link to comment Share on other sites More sharing options...
Anbar Posted November 4, 2012 Share Posted November 4, 2012 Great job peppermint!I actually stumbled upon this last night! :) yay for us! hehehehe! Update... Figured out how to slowwwwwly rotate the camera. But the snag I have is that it resets itself after every 4 rotations. So I need to find out where that value is, and set it so it will rotate a full 360 around the slower paced camera yaws that I have. Any help will be appreciated! TILT... waht we need is camera tilt so we can see where were going! Link to comment Share on other sites More sharing options...
bokauk Posted November 4, 2012 Share Posted November 4, 2012 I've made a tool to configure the camera. Free Camera Tool I don't think there's much I can do about tilt at the moment though I'm afraid. Link to comment Share on other sites More sharing options...
Anbar Posted November 4, 2012 Share Posted November 4, 2012 (edited) I've made a tool to configure the camera. Free Camera Tool I don't think there's much I can do about tilt at the moment though I'm afraid. I may Kiss you anyway.... modding in progress..... :thumbsup: (camera-snap is the bane of my life, no camera-snap is BLISS!) actually, maybe not, cant get it to work.. moving to your thread on the tool Edited November 4, 2012 by Anbar Link to comment Share on other sites More sharing options...
Odie1974 Posted November 6, 2012 Share Posted November 6, 2012 Hmm, I am using the tool and it is very handy :) But I noticed that sometimes the camera does autocenter on soldiers and sometimes it does not... Do you have any idea why it might be? Link to comment Share on other sites More sharing options...
Recommended Posts