Kamras

Member
I have the newest loot system from the Repo, works as intended. However I would like to remove the region based loot system and have the whole world randomly pull loot equally. I've attempted to remove this but somehow end up breaking the whole loot system... Is there a more direct method to achieving the above results?
 
However I would like to remove the region based loot system and have the whole world randomly pull loot equally.
Is there a more direct method to achieving the above results?


Thank you for your Question.

Came across this question in my search for answers.

I have been trying to understand the LootPack.cs file and the Regions mentioned in that file. So as I now understand it, LootPack.cs is a "region based loot system".

To bad you did not seem to get an answer, I think that to would have helped us understand LootPack.cs.
 
I forgot to post a reply to this. I actually found some suitable work arounds.
Inside LootPack.cs there is a line (around line 618 depending on your version)

Code:
public static bool IsMondain(IEntity e)

As well as other lines that reference different regions, such as Tokuno and Stygian. You can edit these sections to allow loot based on custom regions, such as this line would make all loot for Gargoyes appear only in the dungeon region

Code:
                DungeonRegion dreg1 = (DungeonRegion)from.Region.GetRegion(typeof(DungeonRegion));
                if (dreg1 != null)
                {
                    return true;
                }

There is a lot that can be done here to control what loot appears where and type using the existing lootpack system.
Now if you use custom maps, its actually entirely possible to make your own reference, IsCustMap1 as an example name
I've done this process 4 times now for different map types, and doing so i was able to control what loot each map gets based on region.

To make your own is not strait forward at all nor do i have the time to publish a walk through yet, but take a look at loot.cs and lootpack.cs and use notepad++ or Visual studio to find all the times IsMondain is referenced and see how it works, that should kind of point you in the right direction for making your own reference point for map/regions.

Now Zero is absolutely right, you can easily turn off the loot system to not provide armor/weapons etc. and just use another loot system. However to be honest, the lootpack is very well designed, any other loot system you will likely be recreating a lot of the wheel... I found a few that are watered down, but I use them to provide occasional rare drops based on events to all basecreatures.
[doublepost=1504041216][/doublepost]One of the few limitations of the lootpack.cs method that bugs me, is in the sections mentioned above, you cannot define a race and have it provide loot based on race. It seems to ignore the check. I've tried , no errors no crashes, it just doesn't work. LOL. So either my code is wrong or the limitation exist.
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back