Jump to content

Some help modding the camera zoom values ?


PepprmintButler

Recommended Posts

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 by PepprmintButler
Link to comment
Share on other sites

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 3F

2.5 is 20 40

 

After that it's simple :

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 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.0

http://i.imgur.com/pwlGK.jpg

Zooming at 0.25

http://i.imgur.com/BSyxk.jpg

Zooming out at 4.5

http://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

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 by miked79
Link to comment
Share on other sites

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

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 by Anbar
Link to comment
Share on other sites

  • Recently Browsing   0 members

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