Burgeoning Battle Gamma Guardian of Eternity Posted August 13, 2004 Share Posted August 13, 2004 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 More sharing options...
Well-Actually War Trall Fort Posted August 13, 2004 Share Posted August 13, 2004 Not until we can prod Jeff to implement the shopping calls listed in the BoA Suggestions thread. You can only add items with these calls, never remove. Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted August 13, 2004 Share Posted August 13, 2004 I suppose you could make a whole new shop each time you want the items to change, and then have the shop go out of business altogether once you get bored of making new shops. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Isaac Posted August 14, 2004 Share Posted August 14, 2004 You could set up a way to do this sort of automatically, but... From the docs: ...which_shop (which can be from 0 to 129) There are only 130 total shops. Link to comment Share on other sites More sharing options...
Seasoned Roamer Dark Elf Posted August 22, 2004 Share Posted August 22, 2004 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 More sharing options...
Garrulous Glaahk Isaac Posted August 23, 2004 Share Posted August 23, 2004 That's why their prices are usually exorbitant or similar to that. Link to comment Share on other sites More sharing options...
Chittering Clawbug Linthar Posted August 23, 2004 Share Posted August 23, 2004 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 More sharing options...
Recommended Posts