I am attempting to add lootpacks based on region with the goal of making delving into dungeons more lucrative the deeper you go; with gems increasing and gold decreasing, and with an increased chance for magic items, etc.
I have created the dungeon level regions and the lootpacks, and both work, but I hit a snag trying to add the lootpacks to the GenerateLoot method in my test mobile script:
It seems that the checks work for increasing the chance for magic items and placing gems in the mob's backpack on death, but that initial gold seems to pass through the checks and default to
AddLoot( LootPack.Average, 1 );
AddLoot( LootPack.GoldAverage, 1 );
Commenting this bit out in the above code results in a backpack not being generated for the mob, though one is generated on death, and the gems, magic items, etc are placed in it. Perhaps the gold portion does not work because the creature does not yet have a region? Is there a way to do this? Any help greatly appreciated.
I have created the dungeon level regions and the lootpacks, and both work, but I hit a snag trying to add the lootpacks to the GenerateLoot method in my test mobile script:
Code:
public override void GenerateLoot()
{
if (this.Region is DungeonLevelTwoRegion)
{
AddLoot( LootPack.AverageTwo, 1 );
AddLoot( LootPack.GoldAverageTwo, 1 );
}
else if (this.Region is DungeonLevelThreeRegion)
{
AddLoot( LootPack.AverageThree, 1 );
AddLoot( LootPack.GoldAverageThree, 1 );
}
else if (this.Region is DungeonLevelFourRegion)
{
AddLoot( LootPack.AverageFour, 1 );
AddLoot( LootPack.GoldAverageFour, 1 );
}
else
{
AddLoot( LootPack.Average, 1 );
AddLoot( LootPack.GoldAverage, 1 );
}
}
It seems that the checks work for increasing the chance for magic items and placing gems in the mob's backpack on death, but that initial gold seems to pass through the checks and default to
AddLoot( LootPack.Average, 1 );
AddLoot( LootPack.GoldAverage, 1 );
Commenting this bit out in the above code results in a backpack not being generated for the mob, though one is generated on death, and the gems, magic items, etc are placed in it. Perhaps the gold portion does not work because the creature does not yet have a region? Is there a way to do this? Any help greatly appreciated.