So i am trying to figure out how to make this happen. Basically i create a set of custom game attributes, like for exaple:
value 1: Default (no change from melee/does nothing)
value 2: 2500
value 3: 5500
value 4: 20000
Than i would want to change the minerals on the map in regards to the selected game attribute; remember this is an extension mod for melee maps, so no pre-placed units, minerals, nada, just black screen.
I have tried to do it by using triggers to change the Mineral Field's unit's behavior but it seems it's one of those behaviors that can't be changed on the fly using Catalog triggers. Keeps giving me a write error. Anyway i was thinking that maybe there would be a way to do this perhaps creating different mineral field units with different behaviors, one for each of the resource options in the game attributes and then swapping (replacing) the default Mineral Field units on the map with the modded ones. Though i kind of need some advice in how i would do this, and also, more importantly, if there is a better, more efficient way, of accomplishing such a task. The extension mod is aimed at not just this resource selection per map option but I do plan to add other options to further spice up melee custom games, so any advice is most appreciated!
@AntharisSjet: Go Blizzard used an upgrade for their Big Game Hunters extension mod. I copied their system for my own mod. Basically you need to morph the minerals into a new mineral unit that has a different behavior. I suggest downloading their mod and copying all the data. Each Game Attribute can unlock a different upgrade at the start of a match so the minerals morph to the correct version.
So basically i would need to create some morph abilities, add them to the default Mineral Field and use triggers to tell all of player 0's Mineral Fields to use a "morph to mineral field containing X amount of resources" based on the game attribute right?
Awesome. Seems to be working, though i feel like i made it a bit redundant. Here's what i made (testing wise):
Created a new mineral field with a modified behavior containing 20000 minerals.
Created a custom morph ability that has the new 20k minerals Mineral Field as a target morph.
Added the morph ability to the default Mineral Field.
Ordered all mineral fields to activate the 20k morph ability when the 20000 resources game attribute is selected.
And it works. I just wanted to clarify this is what you had intended for me to get at because upon opening the official Blizzard BGH, i do not see anything relating to an upgrade level. Just the basic mineral field behavior resources modified from 1500 to 20000. And half baked it is too, since they added x900 mineral fields in Void, so in official blizz BGH (v1.6) as it stands just now i checked, that's all they did. So with that ext mod only half of the mineral fields are affected. So is this what i was supposed to do or ... how can i automatically link a morph ability to an upgrade (level)?
I havent chacked it lately, its possible somethign changed with LotV too. Keep in mind that there's more than one mineral unit type, and you may want to upgrade all of them. Another issue I remember is the MULE validator that checks if the target unit is a mineral patch, if you don't check that MULEs will be unable to drop for the new units.