Author Topic: Script a Global Item  (Read 315 times)

Legacy_keyofrassilon

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +0/-0
Script a Global Item
« on: February 02, 2011, 03:23:48 am »


               In other words how would one go about making an item that would work in all modules not just a custom item build in the current module but one that could function using scripts outside of the module? I am looking to make a wand of Merchant Summoning that will summon a merchant that you can buy supplies from... Do you just copy the files to the override folder? scripts and exported erf files? How does Neverwinter pick them up? is it referenced from the characters inventory? I guess what I really need is a tutorial on how to script/create objects/npc/items that can be used globally within the game by placing them in the override folder... I already know how to do hak packs...

Thanks!
               
               

               
            

Legacy_keyofrassilon

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +0/-0
Script a Global Item
« Reply #1 on: February 02, 2011, 04:52:45 am »


               Actually what I have decided to do instead is add to the OHS Henchman system which seems easy enough to spawn a merchant... Ask the linkboy for one... I just copied the utc & script files from the editors temp folder to the override which works just fine... BUT what I need now is one of two things... A script that creates a store dynamically without playing a waypoint in a module which I suspect is useless in overrides... OR how to access a default store coded within the engine itself... What tag would this be?  I think the dynamic store would give me more control over what items are in the stores inventory...
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Script a Global Item
« Reply #2 on: February 02, 2011, 06:07:41 am »


               First, I hope this is for a single player game or the computer that is running a server. The reason is that there is no way to run a cript from te client.  



Second,  There is no way to garentee that any system will work for every module or not break someting in te module.   The more agresive you are at trying to make it work for more modules globaly the greater te cance you could break someting.  



The safest option would be to create it to work only for modules that have TAg Based Scripting turned on.  With this option there is little risk of breaking anyting.  You would do this by simply Placing your scripts in the override folder.   You would not even need the uti If the player was allowed to carry the item into the module with them.



Since all modules dont use the same module events or the same script ames for the module events it makes it hard to hook into them to run your scripts.   Even if you could there is no garrentee that you would not break something trying.  



The best option for max modules effected  and limiting the number of modules broken would be to give your wand an ability to cast a spell.  Then rewrite the spell script to handle the power of the wand in addition to its own effects.
               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
Script a Global Item
« Reply #3 on: February 02, 2011, 09:39:35 am »


               Note - If you were using resman, the item's script could be run on all modules, that a specific server runs. eg - the compiled ncs would just need to by programatically loaded during run time.



This being said, it would be the server admin's job to set it up.
               
               

               
            

Legacy_keyofrassilon

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +0/-0
Script a Global Item
« Reply #4 on: February 02, 2011, 11:58:12 pm »


               Ive actually decided to expand on the OHS Henchman system and related to a previous post, generate a supply boy which works out fine no errors or what not... I might even go further with it and see if I can combine some of the various henchmen scripts in the vault like spellcasting & dialogue...

I wonder why work hasnt went further with this system? Its simply amazing & a must atleast for single player modules...