Jump to content

SP: Prevent NPC weapon drops


Recommended Posts

Posted

Hi all,

 

Quick scripting/modding question. I'm wondering if there is any way to prevent NPCs from dropping weapons when they die. I'm wondering if there is a way to do this via scripting?

 

I've tried adding a no weapon command in the deathscript, but it didn't work sadly!

 

Also, I'm totally fine with a solution that removes weapon spawns/items outright! This fix is to help me with a project I'm working on with a high volume of NPCs. When they all drop guns, the game lags as the game continues to render every weapon drop as they pile up!

 

Anyway, thanks everyone!

Posted

Hi all,

 

Quick scripting/modding question. I'm wondering if there is any way to prevent NPCs from dropping weapons when they die. I'm wondering if there is a way to do this via scripting?

 

I've tried adding a no weapon command in the deathscript, but it didn't work sadly!

 

Also, I'm totally fine with a solution that removes weapon spawns/items outright! This fix is to help me with a project I'm working on with a high volume of NPCs. When they all drop guns, the game lags as the game continues to render every weapon drop as they pile up!

 

Anyway, thanks everyone!

sorry for what i know, is possible to do only with little coding hack. i did on my code, but now i not remember now. i need to check about that.

therfiles likes this
Posted

Perhaps he remembered the SET_WEAPON command which has a drop option. So probably either coding, or you could try out with the shader system/nodrop. I think I experimented with it in the past, and if I remember correctly it basically made all weapons (maybe items too) touching the ground disappear, including lightsabers.

therfiles and Asgarath83 like this
Posted

Perhaps he remembered the SET_WEAPON command which has a drop option. So probably either coding, or you could try out with the shader system/nodrop. I think I experimented with it in the past, and if I remember correctly it basically made all weapons (maybe items too) touching the ground disappear, including lightsabers.

I didn't know this function. Cool! D:

Posted

I think you can also use the set-weapon command in icarus to none and that should work as well. Just create a spawnscript and it should work.

Posted

I think you can also use the set-weapon command in icarus to none and that should work as well. Just create a spawnscript and it should work.

But in that way NPC should spawn unarmed and so how attack player? o.o i am sorry for late of my answer but has passed years and i need to remind me how i disabled on my code weapon dropping basically for 90% of weapons of JKA (instead, i unlocked for others like tusken rifle with the same way... mmm). i think it require really a little AI hack because what he need is NPC not drop weapons, exactly like noghri stick users, tusken rifle and tusken staff users. many of these weapons never drops.

@@therfiles , if the radiant shader system \ nodrop solution not work, you can ever search on OPEN JK all entries about these weapons, sure you will find the part about weapon dropping. can you check also my tutorial about making weapon on single player. maybe can help you to find the various functions.

therfiles likes this
Posted

@@Ramikad, @@Asgarath83 - the system/nodrop solution was brilliant! Thanks for suggesting it! While it required a bit of finessing required (there was a few medpack/shield spawns that had to be moved out of reach of the nodrop zones), the technique worked great and seems to optimize the level! Thank you for your knowledge and time. It's amazing what surprises this game still has after all this time lol

 

And yeah, they have to have weapons. It's all about what they do when they die. And for some reason, the deathscript doesn't kick in before they have already dropped their gun.

Asgarath83 likes this
Posted

@@Ramikad, @@Asgarath83 - the system/nodrop solution was brilliant! Thanks for suggesting it! While it required a bit of finessing required (there was a few medpack/shield spawns that had to be moved out of reach of the nodrop zones), the technique worked great and seems to optimize the level! Thank you for your knowledge and time. It's amazing what surprises this game still has after all this time lol

 

And yeah, they have to have weapons. It's all about what they do when they die. And for some reason, the deathscript doesn't kick in before they have already dropped their gun.

I am glad it works wirthout coding. too many time only way to  fix JKA issue is coding. sigh.

the alternativa was disable the chunk of code that dropping weapons from NPCs. i did in past and infact all my npc drops only explosive, tusken rifle, tusken staff and two new weapons i added (WP_BLOODGUN and WP_CANNON ) but i forgive how i did it and in what chunks of code there is the edit. my shame >.< 

therfiles likes this

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...