Jump to content

how to replicate gun case functionality


Nilands

Recommended Posts

Struggling to replicate Gun case behaviour in a mod. As far as I understand it, Gun Cases are distributed via ProceduralDistributions. This part I managed to get working.

But the second part, getting items to then spawn WITHIN those Gun Cases completely escapes me. In Vanilla that seems to be handled by Distributions but I can't replicate it, the case always comes out empty, anyone know how to make container items spawn specific loot?

Link to comment
Share on other sites

got it in the end, not even entirely sure how. I think the general gist of it is to 

 

local distributionTable = {

    yourcontainer = {
        rolls = 1,
        items = {
            "youritem", 200,
            "youritem", 200,
            "youritem", 200,
        },
        junk = {
            rolls = 1,
            items = {
                
            }
        }
    },
}


table.insert(Distributions, 1, distributionTable);

--for mod compat:
SuburbsDistributions = distributionTable;

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...