Author Topic: Area Specific Loot Spawns  (Read 370 times)

Legacy_Entreri MoonBlade

  • Jr. Member
  • **
  • Posts: 63
  • Karma: +0/-0
Area Specific Loot Spawns
« on: October 12, 2010, 10:47:51 pm »


               I do not know if this has ever been asked but is it possible to create area specific loot spawns? My module already has a loot system in place but I was wondering say in an elven area if it's possible to find elven things, art, weapons etc. and say in a dwarven area you'd find race specific loot as well?
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Area Specific Loot Spawns
« Reply #1 on: October 12, 2010, 11:12:19 pm »


               It is possible yes. But if your loot system is not set up or scripted for it, then it would probably take a lot of work to get your system to spawn loot that way or you would need a new system all together.
You could do it a couple ways. But again it completely depends on your loot system.

-Use GetArea function. If Area == xxx then spawn xxx treasure.

-Use OnEnter of the area to set a local variable on the player then check for that variable.
Or you could preset variables on creatures in the toolset to determine what treasure will spawn. Either of these methods would just use GetLocal???. If GetLocal??? == xxx then spawn xxx treasure.

-You could also just create your own mini simple loot system for the specific areas. Maybe just have a script with a bunch of random palette items. Roll a 1 and you get xxx item. Roll a 2 and get xxx item, etc..
               
               

               


                     Modifié par GhostOfGod, 12 octobre 2010 - 10:14 .
                     
                  


            

Legacy_Entreri MoonBlade

  • Jr. Member
  • **
  • Posts: 63
  • Karma: +0/-0
Area Specific Loot Spawns
« Reply #2 on: October 12, 2010, 11:43:54 pm »


               *nods* Cool! I was hoping it was possible. And no my system is no where near set up to do that. unfortunately lol...Actually the system I use is a custom DMG style random table generated system. So scripting in a sub system would still be a lot of work and anything random from the pallette wouldn't be precise enough either I wouldn't think but I may be wrong. On a sidenote as well creatures in module generally do not drop loot other than possibly a few coins.
               
               

               
            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0
Area Specific Loot Spawns
« Reply #3 on: October 13, 2010, 12:21:49 am »


               Enteri MoonBlade:

I think the "random palette items" GhostOfGod is referring to toward the end of his post is picking from a list of resrefs for "elven" items that are in your item palette.  You can very easily have a script that will randomly contain and pick from such a list.

You could add this functionality to your NPCs' onspawn script, checking for a simple integer on the spawning area itself (for instance, add an integer called "ELF_AREA" with a value of 1 to each of your "elven" areas).  If the integer is there, do one or more random draws from the predefined list of resrefs for "elven" items.
               
               

               


                     Modifié par The Amethyst Dragon, 12 octobre 2010 - 11:22 .