Jump to content

Feature Request: New Weapons Without Coding


Tempust85

Recommended Posts

Posted

What do you mean, without coding? A config file is still a form of coding.

 

The first step in adding such a feature is creating a precise requirement. How would new weapons be defined?

 

I could see this happening, if we had enough manpower.

Posted

What do you mean, without coding? A config file is still a form of coding.

 

The first step in adding such a feature is creating a precise requirement. How would new weapons be defined?

 

I could see this happening, if we had enough manpower.

 

Sorry, what I meant was being able to add weapons in a config or .dat file instead of it being done in the code. Though it's simple enough for some people to add new weapons in the code, most people however wouldn't have a clue how to compile openjk let alone add a weapon even though there are readme's and tutorials.

Archangel35757 likes this
Posted

And would require a specific build of OpenJK for a specific weapon. A mod could just have the right config or .dat and be compatible with OpenJK out of the box, along with other weapons.

 

I'm assuming this would be for SP though? Not sure how it would work with MP.

Posted

Exactly.  Adding weapons isn't the same as merely adding a definition for the gun. Tech3 isn't built in such a way that it would not be capable of loading new weapons like this.  This isn't skyrim you know.  ;)

eezstreet and Stoiss like this
Posted

Further brainstorming: assign guns a handful of classes (pistol, rifle, shotgun, heavy, etc) so you can have preset functions, similar to NPC classes and .saber files. Or similar to what is already in weapons.dat, but with classes you can assign to new entries, in .gun files or something.

 

But yeah, sounds crazy complicated. Nice, but maybe too much.

Posted

It simply will not happen unless more of the code is decoupled from the engine, which I don't see happening with the little amount of people with good coding skills working on OpenJK. (Not me)

Posted

I don't think this is going to be possible.

 

It simply will not happen unless more of the code is decoupled from the engine, which I don't see happening with the little amount of people with good coding skills working on OpenJK. (Not me)

 

What if the weapons were compiled as a separate library that the main OpenJK code linked to?  Perhaps then an easier method could be devised for us novices to add new weapons to the library?

Posted

What if the weapons were compiled as a separate library that the main OpenJK code linked to?  Perhaps then an easier method could be devised for us novices to add new weapons to the library?

Not as simple as it sounds, especially since you need to preserve base compatibility. Both client and server need to make sure that they have the same data, otherwise there can be serious desync issues. Not only that, but the number of weapons cannot exceed 32 anyway- this is hardcoded into the structure. If you change this, then base compatibility is out the window. It's a hardcoded number which can't be changed without breaking things.

Posted

Yeah, I agree this isn't going to work if we still want to support base and maintain backwards compatibility.  It would work just fine though if you said screw base jka, but openjk can't do that since that's part of what defines the purpose of the project.

JKG Developer

  • 1 month later...
Posted

Would it be possible to load weapon damage & other values that are defined in the source code from an external config file? I like to adjust weapon damage values in my personal build of openJK, might be nice to be able to change how much health a shot takes without building from scratch.

Posted

Allow me to clarify further: in OpenJK, there are additional fields in the ext_data/weapons.dat file, specifically there is a "damage" and an "altDamage" field which you can add to alter the value.

BruceJohnJenner likes this
Posted

It would be nice if the parsers for all that was rewritten.  Doesn't need to be json because we want compat obviously, but the code is not very nice for extending support for more weapon features.

Posted

It would be nice if the parsers for all that was rewritten.  Doesn't need to be json because we want compat obviously, but the code is not very nice for extending support for more weapon features.

Go boost.spirit! :P

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...