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

Put all weapon/damage related variables into one place #101

Closed
teoman002 opened this issue Feb 15, 2019 · 1 comment
Closed

Put all weapon/damage related variables into one place #101

teoman002 opened this issue Feb 15, 2019 · 1 comment
Labels
balance To balance the gameplay

Comments

@teoman002
Copy link
Collaborator

teoman002 commented Feb 15, 2019

If I want to nerf a weapon easily (#48) I have to #include gamecontext.h (includes NerfFactor) in every weapon.
Furthermore every weapon needs the same kind of modification which is bad practice when done in each file, it is not only hard to read but makes further modifications to the weapons in the future even harder.

Thus I want to outsource all relevant variables into one place.
I suggest to use more config vars (compiler macros, #96 ) and access them during runtime from gamecontext.cpp via console.cpp to make changes according the value of NerfFactor automatically. It would need a new config file, called config_weapons in src/engine/shared

There is another approach:
src/engine/server.cpp sets weapon configs already.
e.g. SetFireDelay, SetAmmoRegenTime

I could use the design of this architecture to modify other weapon parameters like scientist mine dmg.
It would need:

  • a new struct with all weapon parameters
  • getter and setter functions
  • no console access necessary
@teoman002 teoman002 added enhancement New feature or request high priority This issue has higher priority labels Feb 15, 2019
@duralakun
Copy link
Collaborator

duralakun commented Feb 15, 2019

I suggest to use more config vars

Yes! I dont understand the rest of the issue, but i like this.
I am currently working on making a way to reset config vars automatically after a round. So we can have different kind of fun runs, defined by config vars. The more config vars we have the more we can do with them, the more fun rounds we can create.

@teoman002 teoman002 added in progress will be fixed soon balance To balance the gameplay and removed enhancement New feature or request labels Feb 15, 2019
@teoman002 teoman002 removed in progress will be fixed soon high priority This issue has higher priority labels Feb 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
balance To balance the gameplay
Projects
None yet
Development

No branches or pull requests

2 participants