Skip to content

Comments

Add console execution intercept callback with command consumption#427

Closed
VodoXleb wants to merge 2 commits intothemrdemonized:all-in-one-vs2022-wpofrom
VodoXleb:all-in-one-vs2022-wpo
Closed

Add console execution intercept callback with command consumption#427
VodoXleb wants to merge 2 commits intothemrdemonized:all-in-one-vs2022-wpofrom
VodoXleb:all-in-one-vs2022-wpo

Conversation

@VodoXleb
Copy link
Contributor

No description provided.

@Xottab-DUTY
Copy link
Contributor

This functionality isn't good, console should be above the scripts where a modder can do everything, including something bad.
I believe we should not give an ability to intercept console calls.

@erepb
Copy link
Contributor

erepb commented Feb 10, 2026

wonder what is the usecase

@themrdemonized
Copy link
Owner

I agree, that can lead to annoying stuff from 3rd party and can spiral out of control

@Xottab-DUTY
Copy link
Contributor

wonder what is the usecase

In the past, old mods used to check some console values and revert them if user has changed the values, e.g. to prevent the user from activating cheats or cheaty commands, to adjust graphics settings during gameplay (e.g. reduce visibility distance when a player entered some area, boost cam_inert when player is drunk, etc.)
Since we have engine sources, it's better to implement such gameplay features and restrictions via a dedicated functionality.
E.g. user can change cam_inert, but the actual camera inertia value would use a different variable in the code, not tied to the console, thus won't be changed because the player is drunk. In fact, a mod won't need to touch/check cam_inert at all then.

It would be good if @VodoXleb would tell us the use case, then we probably could help with an alternative solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants