Glad you liked it. The main issue you will encounter adding a new mineral is that the interface chooses what minerals are to be mined, so if you want to make your new mineral and have it work like the others then its a bunch of work writing menu code. Most of the changes you'll need to make are in plugin.zanzal.droneminer.menu.
At the top you will need to add new field things like:
Code: Select all
$IDX_CUSTOMMINERAL = 49 // Analogous to $IDX_ORE = 6
$IDX_CUSTOMMINERALCOUNT = 48
$IDX_CUSTOMMINERALSALES = 47
$IDX_CUSTOMMINERALSTOCK = 46
These are entries in $var[] which is a 50 element array. You might consider putting custom stuff at the end of the array to make it compatible with future versions of drone miner.
Then modify copious amounts of menu code to add your own stuff, for example anywhere you see $IDX_ORE or $ore.setting or $ore.stock* you'll need to include your version.
Most Important - At the very bottom of the script you'll see something like:
Code: Select all
skip if $ice.setting == 0
append {Ice} to array $minerals
This is what tells the script what minerals are valid targets. You'll also want to look at:
plugin.zanzal.drone.*
plugin.zanzal.droneminer.*
For each script you'll want to check for $IDX_ORE, $IDX_ORESTOCK, $IDX_ORECOUNT, $IDX_ORESALES at the top of the script. If they are present then you'll need to make changes accordingly similar to how you did the menu.
I recommend using the X-Studio/X-Studio-2 to make these changes. The in-game script editor will take months.
Minimalist approach - you could in theory just force your mineral to be mined by adding a line by itself at the bottom of plugin.zanzal.droneminer.menu.xml:
Code: Select all
append {Customium} to array $minerals
Adding it to the end of the $minerals array will tell the script to mine that mineral. If you did that the script would include your mineral all of its mining operation. If you want to sell that mineral you'd need to modify plugin.zanzal.droneminer.trading.xml line 45 and insert:
Code: Select all
append {Customium} to array $all.minerals
{Customium} is just a silly placeholder for your new mineral type.
You might try the minimalist approach first and see where that gets you. If the script works well with just adding the mineral to the appropriate array then it might be worth making all the menu and sales/count tracking changes as well.