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

[TF2][Feature Request][Vscript] RD/PD Add,Remove,Set and Get score, and whitelist related CVAR's #6501

Open
ALIEN31ITA opened this issue Oct 31, 2024 · 2 comments

Comments

@ALIEN31ITA
Copy link

Hi, currently the score in Robot Destruction (also Player Destruction, unconfirmed) cannot be customized whatsoever via Vscript.
this limits the developing for different gamemodes based on it, or general customization to make the map unique.

Adding the score with 2 methods (First one only adding, second can Add and Remove):

- First (Whitelisted, Good to use, refuses negative values): 
create a dummy flag, with a custom `PointValue` send the input `RoundActivate` to send the points without requiring a player.
- Second (Blacklisted, Bad to use, Supports negative values): 
whitelist and edit the cvar `tf_bonuspack_score` with a desired value, 
(this is bad! if the mapper plans to use the packs, all values will be affected on them, requiring to make custom pickups!.)

The only way we can currently remove score is the second method, which also cancels the finale if one of the teams is winning, but it's not whitelisted in the cvar's file.

The Solution

Adding to the Logic 6 new Inputs with negative and positive values support for both teams:

- AddScoreRed, RemoveScoreRed, SetScoreRed
- AddScoreBlu, RemoveScoreBlu, SetScoreBlu

Or 4 Global Vscript functions to deal with that (that perhaps can work on other logics too!):

- AddTeamScore, RemoveTeamScore, SetTeamScore, (teamid, value)
- GetTeamScore()

We could also have Extra one's too such as:

- AllowFinaleRed, AllowFinaleBlu, (true/false)
- StealFromRed, StealFromBlu, (like an hourglass effect, will give an ammount to the enemy team like it got stolen)

The first one can be usefull to make players do something specific to unlock the finale.

In Short

Only Adding score is supported
but other ways to edit the score, are visual only (or blacklisted) so far, which will not make the logic entity detect changes gameplay wise.
Please, for the sake of customization, remove the DEVELOPMENTONLY flag on these cvars, or add Keyvalue counterparts to the logic itself!!

  • tf_rd_robot_attack_notification_cooldown
  • tf_rd_steal_rate
  • tf_rd_points_per_steal
  • tf_rd_points_approach_interval
  • tf_rd_points_per_approach
  • tf_rd_min_points_to_steal
  • tf_bonuspack_score
  • tf_rd_max_points_override

I hope everything has been made clear, it would really help a lot during development.
and that may be considered and released anytime soon!!

@Lizard-Of-Oz
Copy link

Lizard-Of-Oz commented Oct 31, 2024

When I first saw this, my reaction was "wait, can't you just modify m_nRedScore? I remember doing this when developing VSH and ToW_Dynamite".
Turns out, changing that NetProp works only visually - when the game adds a PD point, it uses some internal "real" value.

@ALIEN31ITA
Copy link
Author

When I first saw this, my reaction was "wait, can't you just modify m_nRedScore? I remember doing this when developing VSH and ToW_Dynamite". Turns out, changing that NetProp works only visually - when the game adds a PD point, it uses some internal "real" value.

Exactly, if a Vscript function/call would get implemented (or I/O for the logics), this would help a lot,
Visual is good, but clearly not for gameplay 👍

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

No branches or pull requests

3 participants