Author Topic: Help Scripting -- "Arrow Materializing"  (Read 322 times)

Legacy_The6thMessenger

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Help Scripting -- "Arrow Materializing"
« on: May 30, 2015, 02:07:32 am »


               

Hello, can anybody help me? You see i always had been disappointed with Arcane Archer class not having that much abilities, and so i thought of why they didn't gave it a better ability, then i came up with it; Arrow Materialization. It will replace the Imbue Arrow feat.


 


Arrow Materialization will unequip your currently-equipped arrow and then creates a special arrow equipped in your slot. If such arrow is unequipped, it is destroyed from your inventory, and will be available once you materialize again.


 


The stack size is equal to the current uses/day, and it goes down as the arrow stack is depleted when on use. It starts off 99 arrows as the stack size, while special arrows will only be 11, or 1/9 arrows of the charge, even more special arrows are 1/11. The stack is shared of all materialized arrow types.


 


The Menu will be your average conversation panel. Basically the ability will just give you an undroppable arrow, and equip it. If you decide to materialize a different arrow, it will just destroy your last materialized arrow.


 


I am well versed in JASS of WC3, but i could not get the Impact Script of NWN, can someone help me?


 


I think i know how it would go on WC3, but just not in NWN.



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
Help Scripting -- "Arrow Materializing"
« Reply #1 on: May 30, 2015, 08:03:24 am »


               

In outline: you can achieve almost all of this by changing the spell script x1_s2_imbuearrow to do what you want.


 


You'll also need to add a line to the module's OnPlayerUnEquipItem event - if the item tag is one of the special arrows, destroy it.


 


The Lexicon is a good guide to scripting, especially the Lyceum section.


 


Tweak line 450 of feat.2da and line 600 of spells.2da as necessary to match your new requirement. Unfortunately, the feat / spell descriptions are references to the .tlk file. As this is a big file, modders often opt to live with the existing descriptions, unless it's part of a much larger project that justifies a custom .tlk file.



               
               

               
            

Legacy_Savagefool

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +0/-0
Help Scripting -- "Arrow Materializing"
« Reply #2 on: May 30, 2015, 12:16:35 pm »


               

Or, make a kit that does essentially the same thing.


On kit use,


produce x amount of arrows, where x is the local integer based on AA level.


Reset x on cleintleave and clientrest.


if y is present when z is equiped or in the inventory, delete y and replace with z.


else create z. Equip in slot INVENTORY_SLOT_AMMO.


 


You get the idea.



               
               

               
            

Legacy_The6thMessenger

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Help Scripting -- "Arrow Materializing"
« Reply #3 on: May 30, 2015, 10:59:48 pm »


               


Or, make a kit that does essentially the same thing.


On kit use,


produce x amount of arrows, where x is the local integer based on AA level.


Reset x on cleintleave and clientrest.


if y is present when z is equiped or in the inventory, delete y and replace with z.


else create z. Equip in slot INVENTORY_SLOT_AMMO.


 


You get the idea.




 


Well yes, but the point is an ability exclusive to AA.


               
               

               
            

Legacy_The6thMessenger

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Help Scripting -- "Arrow Materializing"
« Reply #4 on: May 30, 2015, 11:02:03 pm »


               


In outline: you can achieve almost all of this by changing the spell script x1_s2_imbuearrow to do what you want.


 


You'll also need to add a line to the module's OnPlayerUnEquipItem event - if the item tag is one of the special arrows, destroy it.


 


The Lexicon is a good guide to scripting, especially the Lyceum section.


 


Tweak line 450 of feat.2da and line 600 of spells.2da as necessary to match your new requirement. Unfortunately, the feat / spell descriptions are references to the .tlk file. As this is a big file, modders often opt to live with the existing descriptions, unless it's part of a much larger project that justifies a custom .tlk file.




 


Okay, thank you but can you make the lines? At least something to start with? I just could not get the arrow remove right. I couldn't find a way to detect when arrows are removed and to distinguish items.