1. I've been searching around for ways of not only spawning BP's, (through id's, etc.) but i can't find any information relative to the current build.

    I'm under the impression that they have been removed from the build and the only way they are currently visible (when crafted through the research table) is through some Unity coding that i don't have access to.

    But i feel that that IF that isn't the case, then i should be able to request item BP id's due to them simply being accessible through the research bench and if i can access those a way of identifying BP id's from ITEM id's then i can implement them in a loot table to restore BP farming.

    And anyway, Mailbox, Table and Spike BP's currently DO drop in barrels, so i believe there has to be a way to access them!

    If anyone has any information on accessing BP id's i would love some help!

    Thanks!
     
  2. Blueprints don't have their own items, they're derrived from a base. Look at Simple Loot's methods.
     
  3. Funny you say that ahah, I've spend the last couple hours revising Simple Loot's code, completely understand the bases and how they have their specific blueprint properties applied to the original "blueprint" item.

    What i don't quite understand (due to pretty shitty GTA modding coding skills, lol) is why when i add (other) items to either the multiplier or the rarity lists, (other than components) they don't drop with barrels, crates, etc.

    But after experimenting around and stuff I believe the multiplier only applies to pre-set item categories (that are presumable defined by facepunch; like components, guns, clothes, etc.)? something to do with the FindItemDefinition call?

    For example: if i were to add "metal.facemask" 1; to the "ItemRarities" or config/SimpleLoot.json under the "Multipliers" list, they would not spawn because those only determine values for items in categories that were called; like components.

    If only components and their id's are collected when figuring out what to be multiplied, then any other item wont be collected until their respective crate, etc. calls for them to be spawned, like elite crates spawning items guns vs. normal crates spawning components, etc.

    Unfortunately my Visual Studio is way outdated when i went to look at the Rust github files to try and figure it out for myself if spawns were devised into categories or not preventing me from using looking at definitions, so i can only presume due to what i saw in game. My Visual Studio should be updated tomorrow ahah :(

    I was thinking on doing something like this:

    Code:
    lootContainer.PopulateLoot();
                foreach (var item in lootContainer.inventory.itemList.ToList())
                {
                    if(itemid in ReadData(ref ItemRarities, "ItemRarities"))
                (
                   
                    var itemBlueprint = ItemManager.FindItemDefinition(item.info.shortname).Blueprint;
                    if (configuration.ReplaceItems && itemBlueprint != null && itemBlueprint.isResearchable)
                    {
                        var slot = item.position;
                        item.RemoveFromWorld();
                        item.RemoveFromContainer();
                        var blueprint = ItemManager.CreateByName("blueprintbase");
                        blueprint.blueprintTarget = item.info.itemid;
                        blueprint.MoveToContainer(lootContainer.inventory, slot)
                    }
    And using "ItemRarities" as a whitelist for blueprint loot spawns? So that all items that i add to the rarities list would be the ones that spawn and the ONLY ones that spawn?

    then this piece of code:

    Code:
    public Dictionary<string, object> ItemRarities = new Dictionary<string, object>();            public Data()
                {
                    ReadData(ref ItemRarities, "ItemRarities");                foreach (var itemDefinition in ItemManager.itemList)
                    {
                        object rarity;
                        if (ItemRarities.TryGetValue(itemDefinition.shortname, out rarity))
                        {
                            itemDefinition.rarity =  (Rarity) Convert.ToInt32(rarity);
                            continue;
                        }                    ItemRarities.Add(itemDefinition.shortname, itemDefinition.rarity);
                    }                SaveData(ItemRarities, "ItemRarities");
                }
    Could serve to keep rare blueprints out of standard barrels, etc. (if a gun were to spawn on launch crates, then it will be the gun but as a BP instead?)

    Then presumably all other items that aren't in the "ItemRarities" file would follow the default vanilla loot table... and then afterwards use the "ItemRarities" to blacklist multiplied loot like components, etc.

    Sorry if this is completely wrong, as i said i've currently got no way of investigating how those items are gathered for those lists and can only presume with very average coding skills xD

    Any help is appreciated! Thanks!
     
  4. At the moment Simple Loot doesn't edit loot tables. It only modifies existing loot. I would like to expand it though it's not my top priority at the moment.

    EDIT: Those changes could be made in a separate file. Also, I would advise against reading the data file every time loot is spawned.
     
  5. Thanks so much for the reply!

    Yeah i was a bit skeptical about the "read" call, never seen or used it before!
    [DOUBLEPOST=1508308895][/DOUBLEPOST]Alright so i finally got my VS installed and straight away i stumbled across this:

    I believe this confirms what i was thinking and now all i have to do is modify it to work

    (Currently in your release "item.category" is set to ".Components")

    Code:
                    foreach (var itemDefinition in ItemManager.itemList.Where(x => x?.category == ItemCategory.  All   ))
                    {
                        if (itemDefinition.shortname == "bleach" || itemDefinition.shortname == "ducttape" ||
                            itemDefinition.shortname == "glue" || itemDefinition.shortname == "sticks")
                            continue;                    if (Multipliers.ContainsKey(itemDefinition.shortname))
                            continue;                    Multipliers.Add(itemDefinition.shortname, 1);
                    }
     
  6. No need for the LINQ in that case. Also, you can add whatever you'd like, just the default config is components.