• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Setting
D'oh! Well, at least you have the camera height working right now... my change still has to go into a build, through a full QA cycle, and get packaged up with other changes, before it makes it out to y'all.

Answers:
  1. I have no clue, but I forwarded this to our technical artist to see what he has to say.
  2. That is a bug - it's just not correctly checking that setting in the settings menu. I appreciate the reminder... it got me looking into that bug, and I think I found where it's happening.
    1. If you do want to try to mess with this... I don't actually know the extents of your magical modding powers, but there is a function called TurnEventNotification.OnFirstContact(MessageCenterMessage message). If you could somehow stop that from firing at all, the camera wouldn't zoom over; but, you'd also lose the notification that says "Enemy Contact"
    2. Alternately, you could look for CameraControl.SetMovingToGroundPos(Vector3 i_dest, float screenRatio = 0.95f). If you stopped that, it would fix this issue; but it would also break the ability to middle-click on a spot to focus on it, or click on screen edge indicators, or objectives. Probably the first change would be less invasive.
btw we are all super impressed by what the mod community has been able to pull off so far!

MinAngle is something that VERY much interests me. Being able to tilt the camera up past the horizontal plane is something that would really make the game better. I couldnt get it to work with the maxheightsetting CamZoom mod tho. So I hope this makes it thru QA fast.
 
MinAngle is something that VERY much interests me. Being able to tilt the camera up past the horizontal plane is something that would really make the game better. I couldnt get it to work with the maxheightsetting CamZoom mod tho. So I hope this makes it thru QA fast.

Be warned, that may be one of the things that will break the camera... I think if you tip it up to where it can't "see" any terrain with a raycast at center screen, it will think it's out of bounds and stop responding to camera pan input.
 
A strange thing happened when I used SHIFT+CTRL+U to remove the UI to get some cool screens. The camera 'wonked out' and I was able to tilt up. I managed to get the pix I was looking for! Panning up toward the sky was very nice and so less frustrating. I cant say how irritated I get when my opponent is on a hill and I cant tilt up to see them. And I say the camera went wonky because I couldnt double click on my pilot portraits and have the camera center on them anymore. Also, the camera edge push stopped working, so I had to start using the WASD keys. Exiting and reloading the game fixed this and I was unable to duplicate, quite to my dissatisfaction.

I'll personally send you $20 paypal if you give the game up tilt at least 45` skyward past the horizontal plane. It's worth twenty dollars for the incredible frustration I experience having to whip the camera in all directions in order to see something on a hill that otherwise would only have take a right click and a bit of mouse movement to tilt up to see...
 
@HBS_TwoCents
  1. There is a very clear, ugly fog-line drawn a fixed distance from the camera. You can see it here: https://staticdelivery.nexusmods.com/mods/2388/images/160/160-1527278294-2076956669.jpeg can you open up the variable that sets the distance at which this is drawn? I'd love to push it waaaay back or eliminate it entirely.
Hey @agris, do you know if there was other modding (esp. anything graphics related) going on to produce that screenshot? I was looking at this with our tech artist, and he said the way the fog works should not produce a line like that: "...fog is always rendered as a volume that fits the camera frustum. Unless they did something to change the clip planes?"

Here I'm not seeing a fog line no matter how far out I zoom:

upload_2018-5-29_14-10-59.png
 
A strange thing happened when I used SHIFT+CTRL+U to remove the UI to get some cool screens. The camera 'wonked out' and I was able to tilt up. I managed to get the pix I was looking for! Panning up toward the sky was very nice and so less frustrating. I cant say how irritated I get when my opponent is on a hill and I cant tilt up to see them. And I say the camera went wonky because I couldnt double click on my pilot portraits and have the camera center on them anymore. Also, the camera edge push stopped working, so I had to start using the WASD keys. Exiting and reloading the game fixed this and I was unable to duplicate, quite to my dissatisfaction.

I'll personally send you $20 paypal if you give the game up tilt at least 45` skyward past the horizontal plane. It's worth twenty dollars for the incredible frustration I experience having to whip the camera in all directions in order to see something on a hill that otherwise would only have take a right click and a bit of mouse movement to tilt up to see...

CTRL+SHIFT+U is right next to CTRL+SHIFT+I, which puts the camera into "debug mode", and is designed more for someone using a game controller to make smooth camera movements. It sounds like that's probably what happened - it just rotates around the current camera position, and a lot of the camera functionality you're used to wouldn't work, like clicking on a portrait.

Also, it would take WAYYY more than $20 to get me to completely rewrite the camera, which is more or less what that would take... but I'll keep this problem statement in mind as I continue making camera tweaks :)
 
I'm looking forward to the inclusion of those new constants! There are some good mods to use to adjust the camera zoom, but having easy access to all of those values will be amazing.
 
CTRL+SHIFT+U is right next to CTRL+SHIFT+I, which puts the camera into "debug mode", and is designed more for someone using a game controller to make smooth camera movements. It sounds like that's probably what happened - it just rotates around the current camera position, and a lot of the camera functionality you're used to wouldn't work, like clicking on a portrait.

Also, it would take WAYYY more than $20 to get me to completely rewrite the camera, which is more or less what that would take... but I'll keep this problem statement in mind as I continue making camera tweaks :)

Yup, you called it, that's exactly what happened. Okay, so what is the limit of 'above horizontal tilt' for the camera that the engine won't "see" any terrain with a raycast at center screen and think it's out of bounds and stop responding to camera pan input? I'd like to see SOME upwards tilt. C'mon, you've experienced it too; a Mech on a hill that is above you and you just want to tilt up to see it rather than reset the whole camera, height, zoom and perspective, which is a pita. Oh, did I mention this: http://forum.paradoxplaza.com/forum/index.php?threads/targeted-melee-strikes.1101987/#post-24305545
 
Hey @agris, do you know if there was other modding (esp. anything graphics related) going on to produce that screenshot? I was looking at this with our tech artist, and he said the way the fog works should not produce a line like that: "...fog is always rendered as a volume that fits the camera frustum. Unless they did something to change the clip planes?"

Here I'm not seeing a fog line no matter how far out I zoom:

View attachment 374390

I'm positive I have not changed anything regarding graphics or clipping planes either with mods or my code. It works by intercepting all calls for MaxHeightAboveTerrain and replacing whatever value you (HBS) set it to in the Prefab with my own.

I think you didn't see the line because you're too zoomed out. This fog line appears to be drawn a fixed distance from the camera, so it requires a non-90 degree tilt (edit: as in, the camera should not be perfectly orthogonal to the ground plane, otherwise there will not be a threshold for the line to be drawn, there will be no fog and then all fog as you go from zoomed-in to zoomed-out) and zoomed in/out enough such that it's traversing the viewable area. At excessive amounts of zoom-out, you've exceeded the threshold for it to be drawn so the entire map is covered in it, as you demonstrated in your image.

Load the attached saved game, the perspective / angles are all correctly setup. Zoom in entirely and then out (slowly), you don't need to exceed 1200 to see the line drawn across the screen. There are no mod dependencies in that save, it's from steam public v1.04.

I've seen this behavior in other maps as well, but perhaps it is a map-related bug in the fog rendering.
 

Attachments

  • 9b1af2be-ec91-43d7-a5e9-0cc6f144a45e.sav
    1,1 MB · Views: 6
Hey @HBS_TwoCents

I'm trying to stop all instances of mundane enemy action taking camera control away from the player - in pursuit of that, I've disabled it when the enemy is first spotted and we transition to combat (isEnemyContactSuppressed set to true in TurnEventNotification) and when new blips enter the radar (NewEnemyContactSuppressed set to true in ActorMovementSequence.OnBlipAcquired).

The last piece is the camera panning over to enemy movement when the enemy is already on radar/LOS, and combat has already started. I would like to return control of the camera to the player, so that they can fully manipulate it during these scenes (I have all cinematics disabled). Do you have any suggestions for where to start? I don't want to disable new objectives moving the camera, or buildings being destroyed or anything like that - I want to instantly RestorePlayerCamera() when there is enemy movement on radar / in LOS, but I cannot find the routine that takes over control over the camera for that specific case.

Cheers!

edit: nullifying the output of ActorMovementSequence.showCamera gives us back camera control during enemy attacks, yet I feel there's a more surgical way to do it.
 
Last edited:
In addition, when cinematics are playing, at least unlock the rotate camera and zoom functions. Many times the cinematic camera will place the viewer behind a tree or hill and we cant see anything. If partial camera control were unlocked during cinematics, we could at least rotate the camera and zoom into whatever it is locked on to.
 
In addition, when cinematics are playing, at least unlock the rotate camera and zoom functions. Many times the cinematic camera will place the viewer behind a tree or hill and we cant see anything. If partial camera control were unlocked during cinematics, we could at least rotate the camera and zoom into whatever it is locked on to.

And I'd like to be able to rotate and zoom the camera while my own mech is firing, so I can see what all that weapons fire looks like as it departs for downrange.
 
Yeah, I think with cinematics camera, it doesnt need to be hands off... Just locked unto the target so all we can do is rotate around the target and zoom in and out. The same can be said of the over the shoulder firing cam. Sure, 'anchor' the camera around the target that's firing, but let us rotate around that cam target and zoom in and out.
 
CamZoom mod alters "MinAngleSetting": 1, but I cant seem to go negative on that number. Any number past zero causes the camera to 'reset' to the MaxAngle setting. Can we stop this behavior? I'd like to see some negative tilt beyond the horizontal plane skyward. I think that the default was 10. So by setting at 0 you can at least get 11` of tilt you were not able to before.
 
CamZoom mod alters "MinAngleSetting": 1, but I cant seem to go negative on that number. Any number past zero causes the camera to 'reset' to the MaxAngle setting. Can we stop this behavior? I'd like to see some negative tilt beyond the horizontal plane skyward. I think that the default was 10. So by setting at 0 you can at least get 11` of tilt you were not able to before.

I think I mentioned somewhere else - the camera depends on having valid terrain at the center of the screen, so it can raycast and figure out how far away it is from its focal point. It also rotates around its focal point, rather than around the position of the camera, so if you keep rotating you would actually have to shove the camera into the ground, or else abruptly change the method of rotation at some sort of boundary... You're not the first person to want to rotate up like that though :)
 
Actually that's a pretty good approach! Disabling cameras during enemy movement is something I never implemented, but it's on the list of "in success" stuff.
Cool, yeah - after more digging, I found that the only things that depend on it are regular combat actors including allies and your mechs, so it's pretty awesome to keep camera control through all their actions. All the cinematic and other scripted (i.e. mission-based) camera zooms still worked.

Something to consider for the variables you're opening up - BattleTech.CameraControl.ForceMovingToGroundPos has that fixed 0.8f scalar on Min + Max zoom height. When we're increasing the max zoom a lot, this function doesn't look good when executed - like when we double click on our MechWarriors. The camera is too far zoomed out. If feasible, you might want to create a variable for the 0.8f and open it up in the constants.json.

I think your original approach of
CameraControl.ForceMovingToGroundPos said:
this.smoothToGroundPosCamDest = i_dest - this.cTrans.forward * ((this.MinHeightAboveTerrain + this.MaxHeightAboveTerrain) * 0.8f)
looks quite good, with the (20[Min]+520[Max])*0.8 = 432. Aesthetically it's a sweet spot imo. So I'm letting users of my mod specify their own scalar in place of 0.8, but I'm also giving them the option of it being autocalculated such that the scalar always produces 432 from (Min+Max)*x.

That's probably too granular, but I thought I'd share.

Also, it's a PITA to replace these 'magic numbers'. :shakesfist:
 
Last edited: