New weapon types in JKA -1 reply

Please wait...

Guest

I didn't make it!

0 XP

 
#1 7 years ago

Hello everyone, I'm new here. I'm starting moder, and so far I can make and mod sabers, guns, skins, fxes and maps. If there someone who knows how to make a new weapon, not just remodeling but a fully new one? If you know how please tell me. P.s.: sorry for my probably bad English.




DarthStevenus

GF is my bext friend *hugs GF*

50 XP

18th December 2009

0 Uploads

909 Posts

0 Threads

#2 7 years ago

That's not possible in single player. It might be possible in multi player, but I'm not too sure about it.




Raz0r

Worse than most terrible

50 XP

27th September 2006

0 Uploads

6,737 Posts

0 Threads

#3 7 years ago

Er, depends what you mean, really.

Adding an entirely new weapon without replacing one: Impossible in both SP and MP (Technically possible, but I won't go there, neither should you) Replacing a weapon's model: Possible in SP and MP Modifying a weapon's behaviour (e.g. faster projectile, more damage): Somewhat possible in SP, possible in MP with programming




Guest

I didn't make it!

0 XP

 
#4 7 years ago

I want it in MP and I know it's possible. Just look at mods like "Ninja mod" and MB2. There are a lot of new weapons in MB2 and pistol (not blaster_pistol or bryar) in Ninja mod. All I know is it's a coding and the answer is somewhere in g_weapon.c, bg_weapons and cg_weapoinit.c.




Raz0r

Worse than most terrible

50 XP

27th September 2006

0 Uploads

6,737 Posts

0 Threads

#5 7 years ago

What MB2 did is a neat trick that will substitute weapons based on the players team and class. It's using the same WP_ slot, but the functionality, effects, model etc are substituted.

This means they can't use the 'new' weapons as-well as the original ones, as it's the same weapon slot.

The reason for the WP_ slot limitation is because of the networking code in the engine. playerState_s::ammo[] is an integer array with MAX_WEAPONS (19) elements. Resizing this will mean it won't match the struct in the engine (catastrophic results, other fields won't be aligned) On top of this, I believe playerState_s::stats[STAT_WEAPONS] is networked with 19 bits

I'm unaware of what Ninja mod did. That was by Rich Whitehouse, right? He actually worked on JK2 and JA when he was with Raven, I'm sure he came up with an elegant solution to the limitation.

If you want/need more help, you should pop by the JACoders IRC channel. irc.arloria.net/#JACoders




Guest

I didn't make it!

0 XP

 
#6 7 years ago
Raz0r;5560691playerState_s::ammo[] is an integer array with MAX_WEAPONS (19) elements.

uh.. I thought it's limitation of currently carrying items. Rich Whitehouse told me he didn't remember how to do it because of it was too long way to remember. Ok, I will ask on Arloria, thx.