Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Weapons defined in text files / de-harding weapons [feature debate]

#33
Poke-poke. I'm still planning on coding this feature and quite excited about it, but waiting on more input so far. The latest plans for my approach are as follows:

1 - Make a new qc file and move all attack functions and projectile code there, from all weapon files (simply relocate the code without modifying it). eg: If the shotgun's primary attack is located in w_shotgun.qc in a function called Attack1() which is called when you press fire1, move that to projectiles.qc as Shotgun_Attack1, and have the code in w_shotgun.qc call that function when primary fire is pressed.

2 - Once that's done for all weapons, I'll merge all attacks that can be combined into single functions with neutral names that take parameters. eg: If the crylink primary and hagar secondary use the same projectile pattern to spawn projectiles, combine the code that spawns both. While the laser primary and electro primary should be able to use the same function with different effects. The end point is any projectile logic being customizable and reusable.

3 - Turn how each weapon spawns and uses projectiles into cvars, which define what function they address and how. This adds additional cvars to all weapons in balance.cfg specifying hitscan or splash damage, the projectile pattern, the projectile model and sounds to use, etc.

I'd like to hear more about what others think of this approach and if I should use a different method here. But please refrain from comments such as "It won't happen because it's too much work and it will be hard for us to maintain". If no one else volunteers, I'll be doing all the work. As for it being hard to maintain, quite the contrary... there will be less code in one file instead of each weapon's file containing those logics (some repetitive), while it should not require any special maintenance once it's ready. The feature won't affect those who don't care about it, just help a huge amount with modding and custom configurations.
Reply



Messages In This Thread
RE: Weapons defined in text files / de-harding weapons [feature debate] - by MirceaKitsune - 10-07-2012, 06:14 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Speech to text, or almost voice chat oblector 0 2,869 06-30-2022, 06:29 PM
Last Post: oblector
  New feature review/test: Private Server List BuddyFriendGuy 17 25,451 01-07-2016, 08:05 AM
Last Post: BuddyFriendGuy
  missing shader files BuddyFriendGuy 0 4,101 07-05-2015, 07:19 PM
Last Post: BuddyFriendGuy
Question Text right to left (xonotic menu) kariminf 5 9,396 07-08-2013, 06:00 AM
Last Post: Mr. Bougo
  What is the general consensus on "dodging"? (UT's greatest feature IMO) ambition 7 9,336 01-26-2013, 02:42 PM
Last Post: lda17h
  Game key bindings working while typing text AviyaL 3 7,321 09-23-2012, 05:35 AM
Last Post: Mr. Bougo
  Bone based damage system (feature vote and debate) MirceaKitsune 42 60,258 05-17-2012, 01:29 AM
Last Post: CuBe0wL
Question media source files of vehicles? poVoq 13 14,054 02-21-2012, 06:16 PM
Last Post: tZork
  [SOLVED] How does the decompression of files within pk3s work? joshbeck 3 7,146 09-29-2011, 09:28 PM
Last Post: joshbeck
  A new feature for singleplayer campaign ThePWTULN 6 8,616 09-21-2010, 11:25 AM
Last Post: ThePWTULN

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-