Aller au contenu

Photo

x0_i0_treasure


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

#1
Fyrekrest

Fyrekrest
  • Members
  • 22 messages
I am trying to work with this loot system.  I have placed all four module chests (X0_MOD_TREASURE_*), all four area chests (X0_TREASURE_*), a X0_TREASURE_MONSTER chest, even a X0_TREASURE_MONSTER_c_goblin chest.  I've double checked that my nw_c2_default9 reads #include "x0_i0_treasure".  I've populated each of the chests with a different item (ranging from potions of cure light wounds to longswords).  I've placed a bunch of goblins, logged in and drop a fireball... but all the goblins drop is a handful of coins on occasion.

I've even tried the FRW Module featuring this system (nwvault.ign.com/View.php) and repeating this process and I'm still only getting a few coins each time.  I've also tried using orcs and bugbears (in case the CR was interfering).

What am I overlooking?

Modifié par Fyrekrest, 26 janvier 2012 - 09:51 .


#2
Jezla

Jezla
  • Members
  • 173 messages
The instructions for the loot system are in the script "x0_i0_treasure" or "ch_inc_treasure" if you are using the FRW Base Mod.

Did you make sure your OnSpawn script for your monsters has the function CTG_GenerateNPCTreasure() instead of GenerateNPCTreasure() ?

#3
Fyrekrest

Fyrekrest
  • Members
  • 22 messages
Yeah, Ive made the change, but they`re still not taking effect. I`ve searched the instructions to see if I`m maybe missing a variable or something somewhere, but as far as I can tell, I`m not.

#4
Jezla

Jezla
  • Members
  • 173 messages
Are you having problems with loot in chests, the monster loot drops, or both?

#5
Fyrekrest

Fyrekrest
  • Members
  • 22 messages
The chests are behaving correctly, but not the monsters. I cannot get the monsters to drop anything more than coins.

#6
Jezla

Jezla
  • Members
  • 173 messages
I've been testing this, and so far I've not had much luck either. I did notice that the default OnSpawn script (nw_c2_default9) does not use the default parameters for the CTG_GenerateNPCTreasure() function. It defaults to TREASURE_TYPE_MONSTER, and the script has the parameter at low, med, and high. However, I removed the parameters and still got the same result you are getting. It seems as if the function to generate treasure is not returning the proper base chest for the monster treasure. I'll play around with it some more tonight and see if I can figure anything else out.

#7
Fyrekrest

Fyrekrest
  • Members
  • 22 messages
Thanks, Jezla, I appreciate the help! :)

#8
Jezla

Jezla
  • Members
  • 173 messages
Well, I'm truly stumped! I've tried it with one monster chest and three monster chests (the tagged one, the racial subtype one, and the basic one), with the chests in the same area as the monsters and in a different area. I placed 12 goblins in the mod near the start area and commenced destruction. Same results!

Either there is some error in the scripts causing the treasure generation script to default to low treasure, or we're running up against math. According to the include sript, there is an 80% chance that monsters will have no treasure, and also a percentage chance that gold will be sustituted for any items generated. So it may be that we just haven't tested with enough monsters to actually generate items from the base chests. I can't see myself placing 100 goblins in an area to test this.

Depending on what your plans for applying this system are, it may be easier just to manually control your monster loot drops via the creatures' inventories, which is what I usually do anyway.

#9
Fyrekrest

Fyrekrest
  • Members
  • 22 messages
Haha, I think I've tested with the same process, and yet I keep yielding the same results (just gold). It's a little frustrating, because it seems like it *should* work. Yet, it doesn't. Hehe. That's life, I suppose. I can definitely adjust things to compensate. I do appreciate your attempts to help though!

And on a similar note, are there any treasure systems that anyone can suggest or recommend, other than cdaulepp's?

#10
bealzebub

bealzebub
  • Members
  • 352 messages
there was a discussion about a month ago about  using gp_treasure_op_de. Maybe that will work for you.

 link

#11
Fyrekrest

Fyrekrest
  • Members
  • 22 messages
Thanks, bealzebub. More and more, it looks like that will be the system that I end up using.

A final question though: how does one adjust the number of coins that a creature drops? I've tried to adjust nw_o2_coninclude with the following lines:

// *
// * Scaling Treasure
// *
void CreateGold(object oTarget, object oAdventurer, int nTreasureType, int nModifier = 0)
{
int nHD = GetHitDice(oAdventurer) + nModifier;
int nAmount = 0;

if (GetRange(1, nHD))
{
nAmount = d4(1);
}
else if (GetRange(2, nHD))
{
nAmount = d4(1);
}
else if (GetRange(3, nHD))
{
nAmount = d4(1);
}
else if (GetRange(4, nHD))
{
nAmount = d4(1);
}
else if (GetRange(5, nHD))
{
nAmount = d4(1);
}
else if (GetRange(6, nHD))
{
nAmount = d4(1);
}
float nMod = 0.0;
if (nTreasureType == TREASURE_LOW) nMod = LOW_MOD_GOLD;
else if (nTreasureType == TREASURE_MEDIUM) nMod = MEDIUM_MOD_GOLD;
else if (nTreasureType == TREASURE_HIGH) nMod = HIGH_MOD_GOLD;

// * always at least 1gp is created
nAmount = FloatToInt(nAmount * nMod);
if (nAmount <= 0)
{
nAmount = 1;
}
//dbSpeak("gold");
dbCreateItemOnObject("NW_IT_GOLD001", oTarget, nAmount);
}

Still seems to drop default gold though. I do not want to eliminate gold drops, just alter it.

Modifié par Fyrekrest, 31 janvier 2012 - 08:47 .