keo718 Posted August 6, 2002 Share Posted August 6, 2002 There are mods which turn lightsaber into swords and other weapons. Is it possible to implement such weapon changes(example: The Royal Guard's force pike), without completely replacing sabers, even to make them selectable as different hilts? Link to comment Share on other sites More sharing options...
Emon Posted August 6, 2002 Share Posted August 6, 2002 Sure. I don't know how, but sure. Link to comment Share on other sites More sharing options...
keo718 Posted August 7, 2002 Author Share Posted August 7, 2002 Hmm. Thats great news. Does anyone plan on doing this? This would bring a great deal of variety to the game I think. Link to comment Share on other sites More sharing options...
icepool Posted August 7, 2002 Share Posted August 7, 2002 This is kind of funny. I was messing around with this today. I wanted the yuuzhann vong model to have a metal sword instead of a saber and the thing is it worked but the sound files replaced the lightsaber files so in the long run it didn't work so I gave up cause I ran out of time. So I definately believe its possible. Link to comment Share on other sites More sharing options...
keo718 Posted August 7, 2002 Author Share Posted August 7, 2002 I guess this is where the "different saber sounds" concept comes into play. I recall Dest and/or Jai De Herr stating that it was possible. Or perhaps the weapons need not replace the lightsaber, rather just be added. Link to comment Share on other sites More sharing options...
ASk Posted August 7, 2002 Share Posted August 7, 2002 to add a new weapon to jk2 you would have either: a) remove one of the existing ones, breaking the bots horribly and other parts possibly as well, then add a new one b) change an existing weapon to be used as a saber. all "a" applies. c) use one of two methods of overcoming the 16 weapons limit and either lose the max ammo count (lower it to only 255) or lose the powerups. This may not happen as saber does not need ammo, so no new type of ammo is needed, but every function that checks for Player having a weapon/Giving a weapon to him needs to be replaced by another function call that will pack/unpack the two words into a d-word and then check against it. Link to comment Share on other sites More sharing options...
Chewcaca_Dookie Posted August 8, 2002 Share Posted August 8, 2002 Wow! I didn't know that! Thanks! Link to comment Share on other sites More sharing options...
Mr.EFF Posted August 12, 2002 Share Posted August 12, 2002 Originally posted by Chewcaca_Dookie Wow! I didn't know that! Thanks! You scare me. Link to comment Share on other sites More sharing options...
Joben Posted August 12, 2002 Share Posted August 12, 2002 a "d-word"? ...you meen like damn? Link to comment Share on other sites More sharing options...
ASk Posted August 12, 2002 Share Posted August 12, 2002 obviously you are no programmer basic data sizes: byte word=2 bytes dword=2 words Link to comment Share on other sites More sharing options...
Yun the Sith Posted August 17, 2002 Share Posted August 17, 2002 Originally posted by ASk use one of two methods of overcoming the 16 weapons limit and either lose the max ammo count (lower it to only 255) or lose the powerups. This may not happen as saber does not need ammo, so no new type of ammo is needed, but every function that checks for Player having a weapon/Giving a weapon to him needs to be replaced by another function call that will pack/unpack the two words into a d-word and then check against it. Why in the heck do they have a max weapon limit, and what does it mess up when you go over. Link to comment Share on other sites More sharing options...
ASk Posted August 17, 2002 Share Posted August 17, 2002 They have the limit from 2 reasons: a) Even without the other limitation, weapon data is stored in a 4 byte variable where each bit represents a weapon. SO that would mean 32 weapons max. (Perhaps more if you use techniques similar to overcoming the 16 weapon limit) b) Now the bad part: in order to lessen the net bandwidth, the engine only transfers the first 16 bits of the variable. That brings us to 16 weapons limit. Possible solutions: Making another 32bit variable and use techniques of bit packing and unpacking (2 16-bit to 32 bit and vice-versa). This presents a problem if every weapon uses a different type of ammo (or total ammo types is greater than 16). In that case you could use a powerups array to store the ammo count, leaving you without them. The second solution would be using 1 byte of the ammo variable to store more types of ammo. That would leave you with 255 max ammo for each and every weapon. IF you go over the limit without compensating, the game will crash. It will issue an Illegal Operation (most likely Access Violation, since we use too much memory space) just before the map finishes loading the general data and starts loading the clients. Link to comment Share on other sites More sharing options...
Primesghost Posted August 19, 2002 Share Posted August 19, 2002 Just a quick question, I haven't looked at the weapon code much yet so forgive me if I would spot this as soon as looking at it. If the netcode is limiting the amount of info from the variable being passed (i.e. half of the variable's memory capacity) in order to save on lag, couldn't we isolate that bit of code and increment it upwards based on the amount of new weapons we want to add? I'm glad you explained this Ask. I knew there was a 16 weapon limit in the Quake 3 engine and I knew the work-arounds, but I never had someone paint a target on why it wouldn't work for me before, now I know what I'm hunting for . Link to comment Share on other sites More sharing options...
keo718 Posted August 19, 2002 Author Share Posted August 19, 2002 Another weapon question. Is it possible to have a gun in each hand even as it is to have a lightsaber in each hand? That would work nicely for the Fetts. And if someone wanted to make his blaster, they could just replace one of the less desirable default weapons. Link to comment Share on other sites More sharing options...
ASk Posted August 19, 2002 Share Posted August 19, 2002 it's not the netcode It's built-in into the engine Link to comment Share on other sites More sharing options...
Primesghost Posted August 19, 2002 Share Posted August 19, 2002 What do you mean buit-in? It's gotta be coded somewhere. Think you could give me an idea of where it's coded? Link to comment Share on other sites More sharing options...
ASk Posted August 20, 2002 Share Posted August 20, 2002 the game EXE It's the engine design, not the added netcode. You can't find it anywhere in the source..people tried for months with Q3A. Link to comment Share on other sites More sharing options...
Commodus Posted August 20, 2002 Share Posted August 20, 2002 Then how come Generations Arena has around 40 weapons (40 > 32) and has powerups? Link to comment Share on other sites More sharing options...
ASk Posted August 20, 2002 Share Posted August 20, 2002 a) they may have limited the ammo amount b) some weapons may share ammo if you have 128 weapons that use 1 type of ammo, you just need to code the pack/unpack function for it. The problem arises when you have more than 16 types of ammo, because that struct is in playerstate_t, hence unchangeable. Link to comment Share on other sites More sharing options...
Jaii der Herr Posted August 20, 2002 Share Posted August 20, 2002 If you use a clip design you could use many weapons and ammo types too. You can even add a STAT_NEWWEAPON were u can set the flags for new weapons... Link to comment Share on other sites More sharing options...
keto Posted August 21, 2002 Share Posted August 21, 2002 that sounds good for a magic system (if going for a fantasy themed mod) as mana coudl be a singular ammo type and that makes the possiblities for 128 spells that all use varying amounts of mana. this i think woudl also be applicable to the dbz mod as i beleive they would use "ki" for their special attacks another question is how more sabers-like weapons woudl affect the memory size. specifically for having swords, hammers, axes, etc. sure the JediMod selectable hilt works for the look of it but what about the difference in damage between a rusted short sword and a great spiked maul. is there a way to add more saber-like weapons? and how would it differ from the possible adding other other weapons that use ammo types? thanks, -keto Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.