Aller au contenu

Photo

Alternatives loot systems?


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
K Kin

K Kin
  • Members
  • 109 messages

I've been using the Legends loot system (which is great) but I'm stuck on why it's not working now, with no errors on the compiler and everything is where it should be.

 

I tried making a new module and importing it, and still doesn't work. I contacted the owner, currently waiting for a response.

 

 

 

Is there any alternatives to a loot system? I.e. designing a drop table of chances to a certain monster.

 

I've been skimming through a bunch, will have to trial and error, but does anyone know of a loot system they use?



#2
Tchos

Tchos
  • Members
  • 5 063 messages

Yeah, the SoZ loot system.  Very flexible, including loot tables with different random percentage drop chances.  I wrote a guide on how to use it.  http://www.nexusmods...inter2/mods/273



#3
andysks

andysks
  • Members
  • 1 651 messages

I am using what they used in the OC, I think. gp_treasure_op_de(I think) holds the information but it works mainly for chests. I had to alter some of it, so that creatures won't drop broken items but the general idea is a variable on the creature for the treasure. Like, a random disposable item, some gold, both of them... information is here, from when I was asking myself for it. http://forum.bioware...of-loot-system/

 

To tell you the truth though, if I had found Tchos' system earlier, I might have used it. I read the guide some time after and I found it really simple and flexible.



#4
Tchos

Tchos
  • Members
  • 5 063 messages

Ah, of course the system I suggested is for creatures, not for containers.  But for chests and other containers, I wrote a new version of gp_treasure_op_de that uses the SoZ loot system so I can use the same kind of loot tables for containers.  You'd have to get that script from my module if you want to use it, but it works exactly the same way.



#5
K Kin

K Kin
  • Members
  • 109 messages

Yeah, the SoZ loot system.  Very flexible, including loot tables with different random percentage drop chances.  I wrote a guide on how to use it.  http://www.nexusmods...inter2/mods/273

 

Does it work with custom made items though?

 

And limits to what is dropped by x monster?



#6
Dann-J

Dann-J
  • Members
  • 3 161 messages

For my current module I developed a 'loot pool' of unique items, in the form of a chest with a unique tag located in an inaccessible part of an area. An OnDeath script assigned to various elite or unique monsters draws one item from the chest randomly and places it in the creature's inventory when it dies, deleting that item from the chest so that it only ever drops once per game.

// gb_loot_pool
//
// OnDeath script to draw from a pool of unique items

void main()
{
object oPool = GetObjectByTag("LOOT_POOL");
int i = 0;
object oCountItem = GetFirstItemInInventory(oPool);

while (GetIsObjectValid(oCountItem))// Count the items left in the pool
  {
  i++;
  oCountItem = GetNextItemInInventory(oPool);
  }
  
if (i == 0) return;// Abort if loot pool is empty

int iRnd = Random(i)+1;// Choose a random item from the pool
i = 0;

oCountItem = GetFirstItemInInventory(oPool);

while (GetIsObjectValid(oCountItem))
  {
  i++;
  if (i == iRnd)
  	{
	string sResRef = GetResRef(oCountItem);
	CreateItemOnObject(sResRef, OBJECT_SELF, 1);
	DestroyObject(oCountItem, 0.0);
	break;
	}
  oCountItem = GetNextItemInInventory(oPool);
  }

}


#7
Tchos

Tchos
  • Members
  • 5 063 messages

Does it work with custom made items though?

 

And limits to what is dropped by x monster?

 

You make the loot table yourself, and yes, it can be custom made items.  They're just blueprints like anything else.

 

Each creature can have its own loot table, if that's what you're asking.  Read the guide.