Jump to content

Miscellany Shops


Recommended Posts

I'm attempting to program a miscellany shop, and it isn't going well. I got up to the point where the add_item commands look like this: add_item_to_shop(3,(get_ran(1,min,max)),(get_ran(1,1,5)));

I thought this was pretty nifty on my part... until I actually tried to make the shopkeeper sell me stuff more than one time. I need a way to *completely* re-initialize a miscellany shop every time I call it, and I can't figure out how to do it. Any ideas, tips, discussion on this?

Link to comment
Share on other sites

  • 2 weeks later...

The shop doesn't need to change every time you shop there. It just needs to change every x ticks. I don't think most people would notice if the shop repeated its pattern every 20-30 days. You can set that up with a quick while loop or two.

Small scenarios are over in a week or two of game time. Larger ones could see repeats.

On the other hand, miscellany shops selling ANY item can be a bad idea. Crafty players can use them to outfit the whole party with Blessed Plate and similarly powerful items.

Link to comment
Share on other sites

One thing I'd recommend is running the get_ran part outside of the add item command. It depends on your scenario, but if you add a new item that is plot critical, you want to check to make sure that random chance doesn't make it appear in this shop and to do that you would need to make the random item generation a loop, that checks that the item number isn't a plot item, and then it can add it to the store. Otherwise just doing a loop over the course of 20-30 game days like suggested earlier seems like the best way to implement this.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...