Page 1 of 1

Where do I look for putting random things in containers?

Posted: Tue Sep 25, 2012 6:20 am
by HaunterV
I want to somewhat randomize what is in say a sack found in my dungeon, how do I randomize the contents? Apparently lootDrop or whatever monsters do doesn't work. Now I don't necessarily need a direct answer so much as a direction to look so I can learn by doing.

otherwise ima make like 20 sacks and roll a d20 every time i place one.

Re: Where do I look for putting random things in containers?

Posted: Tue Sep 25, 2012 6:35 am
by Edsploration
The last two code examples of Ixnatifual Tome Library post are almost exactly what you're looking for. Just use your own items instead of that list of tomes, and a sack instead of an alcove. If you still want a challenge you could expand on his method if you want and add multiple loot table functions, or a dynamic one that accepts a parameter for the chance to spawn really good loot or really bad loot.

viewtopic.php?f=14&t=3338

Re: Where do I look for putting random things in containers?

Posted: Tue Sep 25, 2012 10:08 pm
by HaunterV
Yeah i was in that thread and figured that that last scrip of the OP was exactly what i was looking for.