Jump to content

Randomizing Item Distributions


NCrawler

Recommended Posts

With the OnFillContainer event, I can picture very fine control of how your custom items spawn.  The function can give you the room name, container type and container just filled but what I had in mind was catagorizing the building as a whole in code to have very specific item distributions.  I have looked through the Java source a bit but have not come across any functions dealing with the building as a whole.  Here's an example of what I am taking about as I am sure that I have confused everyone:

 

I am walking around in Muldraugh and break into a home.  An event fires which gives me, as the mod author, the catagory of structure entered.  In this case it's something like "Structure_Residence".  Now, my code can run a random number and get the custom type of people who formally lived in this structure, say "Residents_Police".  Now, every time OnFillContainer is fired within this structure I can tailor my item spawning to include some law enforcement specific equipment, randomly of course.

 

Well, anyways, just throwing stuff out there.  I'm sure that it would probably be a pretty big task to fire an event for structures.

Link to comment
Share on other sites

  • 1 month later...

I'm going to bump this as it seems like an extremely interesting idea to be able to randomize certain chunks of items inside a single building, while not tied to that certain building every play through. - if I understood this correctly? :P

But if you mean just unique buildings, like the police department, then those are handled by the building types and their predetermined loot table, which I imagine will be editable in a later date via the mapping tools.

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...