Based on [A15] VeinMiner [] Mine all the veins! []kaptain_kavern & Gentz & JuliaEllie
Original Thread: https://ludeon.com/forums/index.php?topic=9616.0 (https://ludeon.com/forums/index.php?topic=9616.0)
-------------------------------------------------------------------------------------------------
Description:
This is a redux of the VeinMiner by Julia Ellie. I started as a similar project for A16, but realized I was recreating the wheel. I used the original VeinMiner solution and some additions from Rock5 in the other thread along with some clean up and (hopefully) optimization.
Please let me know if there are any issues!
Dropbox Download: https://www.dropbox.com/s/gde9ymeblw9w64i/MineItAll.zip?dl=0 (https://www.dropbox.com/s/gde9ymeblw9w64i/MineItAll.zip?dl=0)
Steam Workshop Link: https://steamcommunity.com/sharedfiles/filedetails/?id=821866381 (https://steamcommunity.com/sharedfiles/filedetails/?id=821866381)
-----------------------------------
Thanks for doing this, I'll check it out!
I updated the mod some, if anyone is running it, let me know if there are any issues.
I added some bootstrapping to remove the xml def files which will hopefully make it less likely to be overridden by other mods.
I thought you fixed it but it still doesn't mark the vein if the ore is already marked. Here is a small video to show you what I mean.
https://vid.me/ehJ2
Thanks for the mod. It's working great.
Quote from: Rock5 on December 24, 2016, 06:12:10 AM
I thought you fixed it but it still doesn't mark the vein if the ore is already marked. Here is a small video to show you what I mean.
https://vid.me/ehJ2
agh. I'll check it out again. I though I fixed it too. I'll look into it tomorrow after the holiday.
Quote from: Rock5 on December 24, 2016, 06:12:10 AM
I thought you fixed it but it still doesn't mark the vein if the ore is already marked. Here is a small video to show you what I mean.
https://vid.me/ehJ2
I'm getting it to work as intended, but I rebuilt and redeployed anyway. Make sure you download the latest and delete the old one before dropping it in just to be sure. I changed the brush mesh and icon textures on this one, so it should be easy to tell if you have the right version.
The brush texture is better and I can no longer see into mountains. And, hurray, I can now see the brush when fully zoomed in! That's great.
One downside to the new brush texture is that you can't see what's under it but I know the difficulty in trying to use transparency, so if this is how you have to do it, I can live with it.
There is only one problem left which I think should, in theory, be really easy to fix. It's the ability to "see" into mountains using the vein mine brush. You can see me doing it in the first part of this video. https://vid.me/aNiN (https://vid.me/aNiN). It makes a different sound depending on if there is an open area under the click point or not. I think you need to merge the 2 parts in CanDesignateCell into one so a failure results in only one type of failure message. Anyway, I'll leave you to figure it out.
After using this a while I still have a little bug that annoys sometimes. It's a bit random as to what size the minebrush will be when I click the designator.
I couldn't see a pattern to it at first but I finally decided to look at it more carefully and work out what the problem is. It turns out that not only does it resize the brush when the minebrush is already selected but also if other designators are already selected.
To make this more clear, this is how you reproduce the problem.
1. Select the MineBrush designator for the first time. It should be orbital beacon sized.
2. Clear the designator by right clicking.
3. Select any other designator then immediately select the MineBrush again. It appears as SuneLamp sized. It should still be Orbital beacon sized.
I had a go at fixing it. I opened minebrush.dll in ILSpy and changed Designator_Minebrush.cs as follows.
Changed line 80 from
if (Find.DesignatorManager.SelectedDesignator != null && this.radius == 7.9f)
to
if ( Find.DesignatorManager.SelectedDesignator != null && Find.DesignatorManager.SelectedDesignator.defaultLabel == "Mine Brush" && this.radius == 7.9f)
May you add the "Vein" button, when the ore is selected, like in [A14] Veinminer?
[attachment deleted by admin due to age]
Quote from: Rock5 on January 23, 2017, 03:47:15 PM
Changed line 80 from
if (Find.DesignatorManager.SelectedDesignator != null && this.radius == 7.9f)
to
if ( Find.DesignatorManager.SelectedDesignator != null && Find.DesignatorManager.SelectedDesignator.Label == "Mine Brush" && this.radius == 7.9f)
This solution has one big flaw: It won't work in a language other than english ;D
Better would be to use the DefName as that stays always the same..
Sorry, I'm not at my computer right now, so can't tell the correct variant. But it is most likely something like this:
Find.DesignatorManager.SelectedDesignator.def.defName == "MineBrush"
Quote from: hurtavy on January 24, 2017, 02:47:37 AM
May you add the "Vein" button, when the ore is selected, like in [A14] Veinminer?
Oh yes, I remembered that one, its so much convenient then heading towards the menu to veinmine.
Yes, call me lazy, but I like it this way :p
Quote from: Haplo on January 24, 2017, 03:37:05 AM
Quote from: Rock5 on January 23, 2017, 03:47:15 PM
Changed line 80 from
if (Find.DesignatorManager.SelectedDesignator != null && this.radius == 7.9f)
to
if ( Find.DesignatorManager.SelectedDesignator != null && Find.DesignatorManager.SelectedDesignator.Label == "Mine Brush" && this.radius == 7.9f)
This solution has one big flaw: It won't work in a language other than english ;D
Better would be to use the DefName as that stays always the same..
Sorry, I'm not at my computer right now, so can't tell the correct variant. But it is most likely something like this:
Find.DesignatorManager.SelectedDesignator.def.defName == "MineBrush"
Actually that's the first thing I found, a reference to .def.defName, but when I tried typing .def after it it didn't auto complete it. As if it didn't have a member called .def. I'll check it again.
I couldn't get .def.defname to work but .defaultLabel should work because it's hard coded in the mod to "Mine Brush". I'll change my post above to reflect this.
rshingleton (https://ludeon.com/forums/index.php?action=profile;u=66783) doesn't seem to be active at the moment and I just finished making some awesome changes to this version of the mod. So I thought I'd share.
Here is a list of the fixes and changes:
- Fixed MineBrush size selection when clicking the designator.
- Fixed being able to use the VeinMiner to detect hidden empty paces in mountains.
- More accurate MineBrush radius increments.
- Added radius number to MineBrush mouse pointer because, why not.
- Added note about sunlamp size and beacon size to MineBrush pointer.
- Changed MineBrush designator circle to regular round designator selector.
Mainly it's changes to MineBrush and a few other fixes. I'm quite proud of being able to change it to the regular circle selector. It wasn't easy. Typically this selector isn't visible over mountains so was of no use to us but I've figured out how to do it. :) Here's a pic.
Update for B19 by Velc[JP] available on Steam
https://steamcommunity.com/sharedfiles/filedetails/?id=1204987547 (https://steamcommunity.com/sharedfiles/filedetails/?id=1204987547)
Download including source
[attachment deleted by admin due to age]
Is anyone working on an update for this one? Or are there any alternatives for A17 that anyone knows of (I'm mainly interested in the 'mine vein' aspect')? Thanks!
Quote from: largejaroalmonds on May 29, 2017, 10:29:15 AM
Is anyone working on an update for this one? Or are there any alternatives for A17 that anyone knows of (I'm mainly interested in the 'mine vein' aspect')? Thanks!
https://ludeon.com/forums/index.php?topic=9616.msg328576#msg328576
Quote from: Rock5 on February 18, 2017, 12:12:11 AM
rshingleton (https://ludeon.com/forums/index.php?action=profile;u=66783) doesn't seem to be active at the moment and I just finished making some awesome changes to this version of the mod. So I thought I'd share.
Here is a list of the fixes and changes:
- Fixed MineBrush size selection when clicking the designator.
- Fixed being able to use the VeinMiner to detect hidden empty paces in mountains.
- More accurate MineBrush radius increments.
- Added radius number to MineBrush mouse pointer because, why not.
- Added note about sunlamp size and beacon size to MineBrush pointer.
- Changed MineBrush designator circle to regular round designator selector.
Mainly it's changes to MineBrush and a few other fixes. I'm quite proud of being able to change it to the regular circle selector. It wasn't easy. Typically this selector isn't visible over mountains so was of no use to us but I've figured out how to do it. :) Here's a pic.
(https://ludeon.com/forums/index.php?action=dlattach;topic=28330.0;attach=19142;image)
Download including source
Hi.
Is it possible to have rebind rotation key ?
i'd like to use A and E to rotate, instead of Q and E (azerty keyboard ^^)
Thanks
@Oshydaka
Indeed it is possible.
Just open the Options Menu.
In the middle of the first row, next to "game volume" there is a button called "keyboard configuration"
Quote from: SpaceDorf on May 29, 2017, 02:10:07 PM
@Oshydaka
Indeed it is possible.
Just open the Options Menu.
In the middle of the first row, next to "game volume" there is a button called "keyboard configuration"
Indeed, there is the rotate left / right option, but in the mod, the values are hard coded :
(http://i.imgur.com/4xYHE7N.png)
File : Designator_MineBrush.cs
It would be better if those were bound to rotate keys, not hard coded :)
This looks quite unflexible, indeed.
Quote from: SpaceDorf on May 29, 2017, 04:02:44 PM
This looks quite unflexible, indeed.
Well, yeah...
I ended up downloading visual studio and changed it myself :)
Oshydaka,
Is it possible to link the source? I'd like to modify this for terrain editing.
Thanks.
Quote from: iconeo on June 02, 2017, 04:49:33 PM
Oshydaka,
Is it possible to link the source? I'd like to modify this for terrain editing.
Thanks.
Sources are in the download linked page 1 (MineItAll_Modded by Rock5.7z)
You'll find the source folder with .sln project and all files in this archive
Quote from: Rock5 on February 18, 2017, 12:12:11 AM
rshingleton (https://ludeon.com/forums/index.php?action=profile;u=66783) doesn't seem to be active at the moment and I just finished making some awesome changes to this version of the mod. So I thought I'd share.
Here is a list of the fixes and changes:
- Fixed MineBrush size selection when clicking the designator.
- Fixed being able to use the VeinMiner to detect hidden empty paces in mountains.
- More accurate MineBrush radius increments.
- Added radius number to MineBrush mouse pointer because, why not.
- Added note about sunlamp size and beacon size to MineBrush pointer.
- Changed MineBrush designator circle to regular round designator selector.
Mainly it's changes to MineBrush and a few other fixes. I'm quite proud of being able to change it to the regular circle selector. It wasn't easy. Typically this selector isn't visible over mountains so was of no use to us but I've figured out how to do it. :) Here's a pic.
(https://ludeon.com/forums/index.php?action=dlattach;topic=28330.0;attach=19142;image)
Download including source
Quote from: Ichimatsu on June 03, 2017, 03:59:00 PM
Download where? o.O
Previous page, message by Rock5
(http://i.imgur.com/vW5OYWA.png)
Quote from: Oshydaka on June 04, 2017, 04:26:27 AM
Previous page, message by Rock5
Sorry, I seem to be going blind and the whole forum having only 3 colors really doesn't help. Thank you, kind sir! :)