What have you tried so far for the solution? It's generally easier to describe the type of system that you want into smaller problems to solve.
I would probably break this into a few problems:
1.) I would design the notion of an item template, which is used to describe the possible range of items of various stats that can appear on an item.
2.) I would then design items as being created from item templates, and create a function to generate a item with random values from that template.
3.) I would then design a system of item classes, which is just a list of templates and probability weights, in addition to the 'no drop' which will also have a probability associated to it.
4.) When I killed a monster, opened a chest, etc, I would randomly choose an item template from the item class randomly according to the probabilities, and then use the function defined in 2.) to create an item from that randomly selected template.
What I'm illustrating here is breaking the problem down into sub-problems that, at a high level that will solve a single part of the problem, each of which should be easy to solve. Then, when I need to solve one, I would break that down into further requirements.
For 1.), I might do the following
to start with and adapt the design later if I need to:
An item template should contain:
1.) The name of the item
2.) A list of properties that the item could randomly pick from (or multiple lists, depending on how I want the affix generation to occur)
2.a) Each affix can be weighted equally or according to another probability
2.b) Each affix can have additional data about them, such as a starting number and an ending number
3.) The graphic of the item.
Now I would have to adapt this list of requirements into some kind of GML code. I would use a ds_map to represent a data template, and the keys of the map to represent the information about the template. It might look something like this:
Code:
var giantAxeTemplate;
giantAxeTemplate = ds_map_create();
giantAxeTemplate[?"itemName"] = "Giant's Axe"
giantAxeTemplate[?"graphic"] = spr_giants_axe
var properties;
properties = ds_list_create();
giantAxeTemplate[?"properties"] = properties;
//I would define the properties elsewhere and reference them, if there is a common pool of them
var property;
property = ds_map_create();
properties[|0] = property;
property[?"name"] = "Strength Bonus";
property[?"relativeProbability"] = 4;
property[?"startingValue"] = 10;
property[?"endingValue"] = 15;
I hope this can help you get started on creating a complex system of randomly dropped items. Give it a go and see how far you can get.