07-11-2012, 01:44 PM
In 9 days I'll be going to the seaside for approximately 3 weeks. I'll have my laptop with Xonotic on it, but am not planning to code there. I wish to begin work on this change when I return, and wanted to revive the topic until then and also to post an update.
Since the final decision is to do this with cvars and not a text file, I'm suggesting a two step solution. The first change can even be merged before the second one is ready. Those are:
First, turn projectiles into cvars while leaving weapons hard coded. This would basically complete the existing balance settings... since you can already tell a weapon the damage, speed, spread, etc. of its projectiles, but will also be able to specify what projectile is spawned. That means making the Rocket Launcher shoot bullets, the UZI to spawn grenades, or anything an admin wishes to do on their server.
The second step would be de-hardcoding weapon definitions so weapons themselves can be cvared, allowing admins to fully remove guns and create their own. There would no longer be a Rocket Launcher, Electro, Shotgun, etc. in the code, just a file which reads cvars and creates weapons when the server starts, assigning them to the chosen weapon slot and spawn entities of the map.
The first part will be easy, and mainly requires moving projectile logics to a common file then choosing which and how to use based on cvars. I think I can do this one on my own. The second part will be quite difficult, as weapons will need to be removed from the code and flexible removal / addition of new ones must be allowed.
I'd like to know who's willing to help with this part once it's time (probably some months from now). Also who else supports the feature or plans to use it, so I know if to get started sooner or later. Again, this is possible to do with a bit of work, and will not affect players or change anything by default (just make it possible for people who mod Xonotic to customize weapons without editing the code). Please post your thoughts in the meantime.
Since the final decision is to do this with cvars and not a text file, I'm suggesting a two step solution. The first change can even be merged before the second one is ready. Those are:
First, turn projectiles into cvars while leaving weapons hard coded. This would basically complete the existing balance settings... since you can already tell a weapon the damage, speed, spread, etc. of its projectiles, but will also be able to specify what projectile is spawned. That means making the Rocket Launcher shoot bullets, the UZI to spawn grenades, or anything an admin wishes to do on their server.
The second step would be de-hardcoding weapon definitions so weapons themselves can be cvared, allowing admins to fully remove guns and create their own. There would no longer be a Rocket Launcher, Electro, Shotgun, etc. in the code, just a file which reads cvars and creates weapons when the server starts, assigning them to the chosen weapon slot and spawn entities of the map.
The first part will be easy, and mainly requires moving projectile logics to a common file then choosing which and how to use based on cvars. I think I can do this one on my own. The second part will be quite difficult, as weapons will need to be removed from the code and flexible removal / addition of new ones must be allowed.
I'd like to know who's willing to help with this part once it's time (probably some months from now). Also who else supports the feature or plans to use it, so I know if to get started sooner or later. Again, this is possible to do with a bit of work, and will not affect players or change anything by default (just make it possible for people who mod Xonotic to customize weapons without editing the code). Please post your thoughts in the meantime.
