Author Topic: Custom ranged weapons - they work, with some tweaks...  (Read 392 times)

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Custom ranged weapons - they work, with some tweaks...
« on: July 28, 2014, 11:10:17 am »


               

Im not sure whether someone came up with this already or not, but I havent heard anything like that before so here is how to get custom ranged weapon working.


 


1. add unlimited ammo property - this allowed my custom ranged weapon to fire, but the weapon was destroyed after first shot so I didn't gave up...


2. add a AssignCommand(oItem,SetIsDestroyable(FALSE)); line into OnEquip for your custom content base item - this workarounded the destruction and I was able to shoot with this weapon as if it was normal weapon


 


However, I did not tested this thoroughly. It might be possible this is somehow hardcoded into repeating crossbow which I recovered from core game files and tested this with it.


repeatingxbow.jpg



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Custom ranged weapons - they work, with some tweaks...
« Reply #1 on: July 28, 2014, 12:29:47 pm »


               

in baseitems.2da, what do you have set for the RangedWeapon column which determines the ammo type? It is my understanding that you can point to any item type as ammo, but it has to be equipped to be used. Grenades and thrown items point to their own item type, while bows, crossbows, and slings point to their ammo type.



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Custom ranged weapons - they work, with some tweaks...
« Reply #2 on: July 28, 2014, 12:31:50 pm »


               

If you want a plasma pack, you might try setting the plasma pack ammo type to not destroyable if that works. Then you can make sure a plasma cannon has the proper ammo while at the same time not actually using up the ammo.