Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration of Cinematics - MoveTo functionality #6570

Draft
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

Garanas
Copy link
Member

@Garanas Garanas commented Dec 1, 2024

Description of the proposed changes

Integrates a portion of the functionality from my old Cinematics mod. This UI mod provides greater control over the camera. It enables you to make smooth transitions that you also see in the campaign via hotkeys.

This pull request only contains the functionality surrounding the MoveTo function of the UserCamera. It is not feature complete, but it is a great start.

The mod was limited in its feature set. This integration extends upon the mod:

  • (1) You can now have more than 2 points to animate between. This integration allows you to make, animate and store arbitrary-sized sequences of camera positions.
  • (2) You have full control over the sequence. You can append, insert, overwrite and remove camera positions to the sequence.
  • (3) You have full manual control over the animation of the sequence. You can animate between cameras and/or jump.
  • (4) You can store/read a sequence to/from the preference file. You can store up to three sequences.

This introduces various new hotkeys in a new Cinematics category:

image

There is a special hotkey to setup the hotkeys to interact with the functionality. It is the first hotkey of the Cinematics tab. This applies the following layout:

-- clear it out
['CTRL-SHIFT-BACKSPACE'] = keyActions.cinematics_move_to_clear,

-- navigate between sequences
['Q'] = keyActions.cinematics_move_to_jump_backward,
['W'] = keyActions.cinematics_move_to_jump_current,
['E'] = keyActions.cinematics_move_to_jump_forward,

-- add, insert, overwrite and remove camera orientations
['A'] = keyActions.cinematics_move_to_add,
['S'] = keyActions.cinematics_move_to_insert_at_index,
['D'] = keyActions.cinematics_move_to_overwrite_at_index,
['BACKSPACE'] = keyActions.cinematics_move_to_remove,
['DELETE'] = keyActions.cinematics_move_to_remove_at_index,

-- animation
['Shift-Q'] = keyActions.cinematics_move_to_animate_forward,
['Shift-W'] = keyActions.cinematics_move_to_animate_backward,
['Shift-E'] = keyActions.cinematics_move_to_jump_and_animate_forward,
['Shift-R'] = keyActions.cinematics_move_to_jump_and_animate_backward,

-- store/retrieve from preference file
['1'] = keyActions.cinematics_move_to_store_01,
['2'] = keyActions.cinematics_move_to_store_02,
['3'] = keyActions.cinematics_move_to_store_03,

['ALT-1'] = keyActions.cinematics_move_to_retrieve_01,
['ALT-2'] = keyActions.cinematics_move_to_retrieve_02,
['ALT-3'] = keyActions.cinematics_move_to_retrieve_03,

The layout does not interfere with the hotkeys that are stored in your preference file. The overwrite lasts until you restart the game.

The modules are isolated from the rest of the source code. They are only loaded when you interact with the hotkeys. Therefore there is no memory/performance impact to the average user.

The modules have full support for hot reload-like functionality. If you make changes the sequence you had in memory is copied from the old module to the new module.

Testing done on the proposed changes

Run the game and hit all the hotkeys.

cinematics-01.mp4

Additional context

I strongly believe this should be integrated. I get several messages a year with questions about camera control and how to run/use the Cinematics mod. By integrating it we remove all these questions: the features are just available and they just work.

The ability to make smooth transitions is key to make interesting (YouTube) content.

Two examples of channels that use the mod:

Checklist

  • Changes are annotated, including comments where useful
  • Changes are documented in the changelog for the next game version

@Garanas Garanas added the feature: hotkeys related to miscellaneous hotkeys label Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: hotkeys related to miscellaneous hotkeys
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant