Ludeon Forums

RimWorld => Releases => Mods => Outdated => Topic started by: rshingleton on December 21, 2016, 12:10:41 AM

Title: [A16] Mine It All
Post by: rshingleton on December 21, 2016, 12:10:41 AM
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)

-----------------------------------
Title: Re: [A16] Mine It All
Post by: MisterVertigo on December 21, 2016, 12:36:16 AM
Thanks for doing this, I'll check it out!
Title: Re: [A16] Mine It All
Post by: rshingleton on December 22, 2016, 12:11:44 AM
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.
Title: Re: [A16] Mine It All
Post by: 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
Title: Re: [A16] Mine It All
Post by: malloc on December 24, 2016, 08:01:42 AM
Thanks for the mod.  It's working great.
Title: Re: [A16] Mine It All
Post by: rshingleton on December 24, 2016, 09:02:56 AM
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.
Title: Re: [A16] Mine It All
Post by: rshingleton on December 25, 2016, 07:13:42 AM
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.
Title: Re: [A16] Mine It All
Post by: Rock5 on December 25, 2016, 08:24:06 AM
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.
Title: Re: [A16] Mine It All
Post by: Rock5 on January 23, 2017, 03:47:15 PM
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)
Title: Re: [A16] Mine It All
Post by: hurtavy on January 24, 2017, 02:47:37 AM
May you add the "Vein" button, when the ore is selected, like in [A14] Veinminer?

[attachment deleted by admin due to age]
Title: Re: [A16] Mine It All
Post by: 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"

Title: Re: [A16] Mine It All
Post by: CJoker3221 on January 24, 2017, 08:32:16 AM
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
Title: Re: [A16] Mine It All
Post by: Rock5 on January 24, 2017, 06:26:32 PM
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.
Title: Re: [A16] Mine It All
Post by: Rock5 on January 24, 2017, 06:45:22 PM
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.
Title: Re: [A16] Mine It All
Post by: 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.

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]
Title: Re: [A16] Mine It All
Post by: 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!
Title: Re: [A16] Mine It All
Post by: Love on May 29, 2017, 10:32:10 AM
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
Title: Re: [A16] Mine It All
Post by: Oshydaka on May 29, 2017, 01:55:25 PM
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
Title: Re: [A16] Mine It All
Post by: 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"
Title: Re: [A16] Mine It All
Post by: Oshydaka on May 29, 2017, 03:00:20 PM
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 :)
Title: Re: [A16] Mine It All
Post by: SpaceDorf on May 29, 2017, 04:02:44 PM
This looks quite unflexible, indeed.
Title: Re: [A16] Mine It All
Post by: Oshydaka on May 30, 2017, 04:09:26 PM
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 :)
Title: Re: [A16] Mine It All
Post by: 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.
Title: Re: [A16] Mine It All
Post by: Oshydaka on June 03, 2017, 04:16:35 AM
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
Title: Re: [A16] Mine It All
Post by: Ichimatsu on June 03, 2017, 03:59:00 PM
Quote from: Oshydaka on June 03, 2017, 04:16:35 AM

Download including source

Download where? o.O
Title: Re: [A16] Mine It All
Post by: Oshydaka on June 04, 2017, 04:26:27 AM
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)
Title: Re: [A16] Mine It All
Post by: Ichimatsu on June 04, 2017, 11:20:18 AM
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!  :)