Author Topic: Wandering Merchants?  (Read 301 times)

Legacy_Bubba McThudd

  • Sr. Member
  • ****
  • Posts: 254
  • Karma: +0/-0
Wandering Merchants?
« on: May 12, 2011, 12:05:15 am »


                Greetings all,

Anyone have any suggestions on how to best go about creating wandering merchants like in Fallout 3?  I have the wandering part down - but how best to handle the store wp?

Cheers
               
               

               
            

Legacy_TSMDude

  • Hero Member
  • *****
  • Posts: 1515
  • Karma: +0/-0
Wandering Merchants?
« Reply #1 on: May 12, 2011, 12:28:36 am »


               The store does not need to be in the same spot. We have a "room" that we store things in and in it is several stores that different merchants open up. The script to open a store just looks for the closest properly named store in the module.
               
               

               
            

Legacy_Bubba McThudd

  • Sr. Member
  • ****
  • Posts: 254
  • Karma: +0/-0
Wandering Merchants?
« Reply #2 on: May 12, 2011, 01:21:52 am »


               Ah, I did not know that.  Thanks!
               
               

               
            

Legacy_Bubba McThudd

  • Sr. Member
  • ****
  • Posts: 254
  • Karma: +0/-0
Wandering Merchants?
« Reply #3 on: May 12, 2011, 05:30:02 am »


               Ah, slight problem.  I should have mentioned that my wandering merchant is wandering over several areas.  He can't seem to access his store outside of the area where the store WP is.  Anyway around this while keeping the inventory persistent?
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Wandering Merchants?
« Reply #4 on: May 12, 2011, 05:49:28 am »


               Change the line that gets the object.  I am guessing that it is something like

oStore = GetNearestObject...

Change it to something more like.

oStore = GetObjectByTag....

that will allow allow it to get the store fome another area.
               
               

               
            

Legacy_DM_Vecna

  • Hero Member
  • *****
  • Posts: 501
  • Karma: +0/-0
Wandering Merchants?
« Reply #5 on: May 12, 2011, 06:58:26 am »


               You can also make your script create a store if none exists then destroy it at the end of the transaction. That will also fix any problems with variables on infinite items. All depends on how the end result you want.
               
               

               
            

Legacy_Bubba McThudd

  • Sr. Member
  • ****
  • Posts: 254
  • Karma: +0/-0
Wandering Merchants?
« Reply #6 on: May 13, 2011, 02:50:02 am »


               Thanks Lightfoot, that works!
               
               

               
            

Legacy_Builder_Anthony

  • Hero Member
  • *****
  • Posts: 786
  • Karma: +0/-0
Wandering Merchants?
« Reply #7 on: May 13, 2011, 04:47:10 am »


               Could you post the completed script?I know im so darn lazy.But at least i know itll work.
               
               

               
            

Legacy_MrZork

  • Hero Member
  • *****
  • Posts: 1643
  • Karma: +0/-0
Wandering Merchants?
« Reply #8 on: May 13, 2011, 04:59:45 am »


               Also, doesn't Vokarion in HotU work pretty much like Lightfoot8 described? I remember something like that when I modified his store script to randomly replenish certain items every so often. (There were also a few dead items in the script that needed fixing, IIRC.) But, the basic idea of Volky as a wandering merchant seem similar, with the added twist that he was a summonable NPC via the lamp.
               
               

               
            

Legacy_Bubba McThudd

  • Sr. Member
  • ****
  • Posts: 254
  • Karma: +0/-0
Wandering Merchants?
« Reply #9 on: May 13, 2011, 05:37:32 am »


               I now have a working wandering merchant who, along with a guard and pack horse, traverses winding forest trails through 3 large maps, setting up shop for a spell in each.  Rather like the merchants in Fallout 3, which was what I was aiming for.
I used Axe Murderers' Killer Walkway system to make the merchant wait at each of the 3 market locations for a spell, and L8s' suggestion solved the Merchant inventory problem.  Still a few kinks (merchant won't stop if you meet him between markets, so you need to shop fast) but as I get more familiar with the KWW system I reckon I'll suss it out.
Thanks for the feedback!
               
               

               
            

Legacy_Luspr

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +0/-0
Wandering Merchants?
« Reply #10 on: May 15, 2011, 09:00:59 pm »


               HOTU had the scripts you were looking for I suspect, for the Genie in a bottle.