[MOD 0.12.12+] YARM (Yet Another Resource Monitor) v0.7.17

Topics and discussion about specific mods
waduk
Filter Inserter
Filter Inserter
Posts: 372
Joined: Tue Feb 10, 2015 5:44 pm
Contact:

Re: [MOD 0.12.7+] YARM (Yet Another Resource Monitor) v0.6.20

Post by waduk » Fri Oct 02, 2015 7:28 am

Hehe,..now that's something i can smile about :D

Ahh,..so that's how it works. I guess i must learn how to customized RSO then, to generate small yet rich ore fields (the default is generating bigger and richer the further we go)
Thank you !

User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 278
Joined: Mon Feb 11, 2013 7:25 am
Contact:

Re: [MOD 0.12.7+] YARM (Yet Another Resource Monitor) v0.6.20

Post by Narc » Fri Oct 02, 2015 8:04 am

waduk wrote:Ahh,..so that's how it works. I guess i must learn how to customized RSO then, to generate small yet rich ore fields (the default is generating bigger and richer the further we go)
We're talking about fractions of milliseconds every 60 seconds here; don't waste your time on an optimization you don't know you need.

waduk
Filter Inserter
Filter Inserter
Posts: 372
Joined: Tue Feb 10, 2015 5:44 pm
Contact:

Re: [MOD 0.12.7+] YARM (Yet Another Resource Monitor) v0.6.20

Post by waduk » Fri Oct 02, 2015 8:52 am

Narc wrote:
waduk wrote:Ahh,..so that's how it works. I guess i must learn how to customized RSO then, to generate small yet rich ore fields (the default is generating bigger and richer the further we go)
We're talking about fractions of milliseconds every 60 seconds here; don't waste your time on an optimization you don't know you need.
Hehe,..thanks :oops:

PiggyWhiskey
Fast Inserter
Fast Inserter
Posts: 240
Joined: Wed May 13, 2015 5:28 am
Contact:

Re: [MOD 0.12.7+] YARM (Yet Another Resource Monitor) v0.6.20

Post by PiggyWhiskey » Fri Oct 02, 2015 11:29 am

Narc, I'm loving this mod. its good to have something more than just an unofficial update.

Its smooth, intuitive and amazing to work with. Even better that it points out the direction the field is.

I encountered a weird bug today.
The console was spammed with "Invalid color value (resmon.lua line 455)
It was for a Bob's Mods tin ore field that was being punished by miners and god module 5's. It happened just as the field finished.
The name also changed to weirdness.
Edit:
Just noticed there was a new version. Downloaded it, but the affected line wasn't changed. So I assume the bug still exists.

Also, it might be of note that I had TimeButtons installed and running at 5x speed while I was in a train. Might be helpful....might not....

Edit2: I tried to replicate the bug from the autosave, and couldn't. (Still have it saved though)
Perhaps I lost some ticks while speeding the game which happened to be the one the Tin-Ore was saved on?

User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 278
Joined: Mon Feb 11, 2013 7:25 am
Contact:

Re: [MOD 0.12.7+] YARM (Yet Another Resource Monitor) v0.6.20

Post by Narc » Fri Oct 02, 2015 11:55 am

PiggyWhiskey wrote:I encountered a weird bug today.
The console was spammed with "Invalid color value (resmon.lua line 455)
It was for a Bob's Mods tin ore field that was being punished by miners and god module 5's. It happened just as the field finished.
The name also changed to weirdness.
That's... funky. At a guess, if miners go fast enough, they can make a resource go negative for a tick before it's removed, and the site just happened to update at the wrong moment.

I can add some clamping for negative color components, but I find the other utterly baffling -- I suppose "-1.$" could be negative infinity, but the site amount remaining is clearly zero. Here, give this in-dev package a try. It's got the clamping that should at least prevent the errors from popping up.

Negative infinity percent?! :shock:

PiggyWhiskey
Fast Inserter
Fast Inserter
Posts: 240
Joined: Wed May 13, 2015 5:28 am
Contact:

Re: [MOD 0.12.7+] YARM (Yet Another Resource Monitor) v0.6.20

Post by PiggyWhiskey » Fri Oct 02, 2015 12:01 pm

I'll try that download even though I couldn't replicate it.

If it's negative infinity, does that mean it bounces back around to positive infinity? Free Tin! :P

User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 278
Joined: Mon Feb 11, 2013 7:25 am
Contact:

Re: [MOD 0.12.7+] YARM (Yet Another Resource Monitor) v0.6.20

Post by Narc » Fri Oct 02, 2015 12:26 pm

PiggyWhiskey wrote:If it's negative infinity, does that mean it bounces back around to positive infinity? Free Tin! :P
:lol: A bug like that did exist: https://forums.factorio.com/forum/vie ... 30&t=15567 -- I still have a couple of -1 ore spots in my world that I debug-created to see for myself. I refuse to mine them, though, since they effectively amount to infinite (and very cheated) ore.

I suspect you have about a 1/600 chance to reproduce the issue; the important part is that you should be able to remove the offending site if it happens again.
Last edited by Narc on Fri Oct 02, 2015 8:56 pm, edited 1 time in total.

Talguy
Fast Inserter
Fast Inserter
Posts: 104
Joined: Tue Apr 29, 2014 8:54 pm
Contact:

Re: [MOD 0.12.7+] YARM (Yet Another Resource Monitor) v0.6.20

Post by Talguy » Fri Oct 02, 2015 7:36 pm

Would it be possible to colorize the ore type by their respective map color? This is because it would then be easier to distinguish the different ore types, for obvious reasons.

Untested, but from what I can see the following should work:
el = sites_gui.add{type="label", name="YARM_label_ore_name_"..site.name,
caption=site.map_color}
el.style.font_color = color
if not player_data.current_site then
player_data.current_site = {
added_at = game.tick,
surface = entity.surface,
force = player.force,
ore_type = entity.name,
map_color: entity.map_color,
ore_name = game.get_localised_entity_name(entity.name),
entities = {},
initial_amount = 0,
amount = 0,
extents = {
left = entity.position.x,
right = entity.position.x,
top = entity.position.y,
bottom = entity.position.y,
},
known_positions = {},
next_to_scan = {},
scanning = false,
}

if resmon.is_endless_resource(entity.name, entity.prototype) then
player_data.current_site.minimum_resource_amount = entity.prototype.minimum_resource_amount
end
end

Peter34
Smart Inserter
Smart Inserter
Posts: 1091
Joined: Mon Nov 10, 2014 12:44 pm
Contact:

Re: [MOD 0.12.7+] YARM (Yet Another Resource Monitor) v0.6.20

Post by Peter34 » Fri Oct 02, 2015 7:56 pm

Can this mod cover Crude Oil Patches?

And can it output to Wire Signals? I'd like to have some big luminuous Nixie Tubes to show the remaining ore in my main fields, and play with the interface minimized...

User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 278
Joined: Mon Feb 11, 2013 7:25 am
Contact:

Re: [MOD 0.12.7+] YARM (Yet Another Resource Monitor) v0.6.20

Post by Narc » Fri Oct 02, 2015 8:50 pm

Talguy wrote:Would it be possible to colorize the ore type by their respective map color? This is because it would then be easier to distinguish the different ore types, for obvious reasons.
Yes, that sounds good. Since you seem to have the right idea with the code (but, hint, you don't want to change the caption -- the color is nearby), I'll gladly review your pull request; lacking one, I'll get around to it when I get around to it (which will probably be when the settings screen finally makes an appearance).

Peter34 wrote:Can this mod cover Crude Oil Patches?
Yes. Crude oil (or any other fluid -- also tested with spring water), endless ores, probably deep ores, too. The meaning of the percent-remaining display changes when an endless resource is detected, such that it will show 0% when all the entities comprising the site are at their minimum production rate.
Peter34 wrote:And can it output to Wire Signals?
No, there is not currently an in-world entity to output circuit signals from. Take a look at Choumiko's Resource Combinators for that (though I haven't tried them myself, having no need for such).

JyeGuru
Inserter
Inserter
Posts: 21
Joined: Thu Sep 11, 2014 3:59 am
Contact:

Re: [MOD 0.12.7+] YARM (Yet Another Resource Monitor) v0.6.20

Post by JyeGuru » Sat Oct 03, 2015 7:06 am

I ran into a bug I didn't see mentioned in the thread - YARM doesn't pick up all of the squares of a resource patch.
Not sure if it's because I'm in 12.10, but it's not hard to just click the extra ones (if I notice) anyway.
However, sometimes there's ONE square that just refuses to work - clicking it deselects all the currently selected bits.
See below for examples of both in a coal patch.

Example: http://i.imgur.com/nVaLdmY.gifv
Save Game+Mods: https://www.dropbox.com/sh/68u389ewsp4s ... L6wla?dl=0
Version: 12.10

User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 278
Joined: Mon Feb 11, 2013 7:25 am
Contact:

Re: [MOD 0.12.7+] YARM (Yet Another Resource Monitor) v0.6.20

Post by Narc » Sat Oct 03, 2015 9:02 am

YukiHyou wrote:I ran into a bug I didn't see mentioned in the thread - YARM doesn't pick up all of the squares of a resource patch.
Huh. Yeah, that's pretty fucky. I'll take a look at it, thanks for the files.

waduk
Filter Inserter
Filter Inserter
Posts: 372
Joined: Tue Feb 10, 2015 5:44 pm
Contact:

Re: [MOD 0.12.7+] YARM (Yet Another Resource Monitor) v0.6.20

Post by waduk » Sat Oct 03, 2015 10:17 am

Hi Narc, if you want to add custom color like Talguy suggested, i suggest just color code a portion of the table, not the whole line.
I like the idea but i don't want to lose the current color warning.
In case you didn't know what i'm saying (due my lack english), here's the mockup i made in Photoshop.
Ignore the color i choose, i just rough made that to get the idea across.
Image

User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 278
Joined: Mon Feb 11, 2013 7:25 am
Contact:

Re: [MOD 0.12.7+] YARM (Yet Another Resource Monitor) v0.6.20

Post by Narc » Sat Oct 03, 2015 10:21 am

waduk wrote:Hi Narc, if you want to add custom color like Talguy suggested, i suggest just color code a portion of the table, not the whole line.
I have no idea why you'd think we were discussing doing it any other way.

waduk
Filter Inserter
Filter Inserter
Posts: 372
Joined: Tue Feb 10, 2015 5:44 pm
Contact:

Re: [MOD 0.12.7+] YARM (Yet Another Resource Monitor) v0.6.20

Post by waduk » Sat Oct 03, 2015 10:33 am

Narc wrote:
waduk wrote:Hi Narc, if you want to add custom color like Talguy suggested, i suggest just color code a portion of the table, not the whole line.
I have no idea why you'd think we were discussing doing it any other way.
Just worry..hehehe :D

Talguy
Fast Inserter
Fast Inserter
Posts: 104
Joined: Tue Apr 29, 2014 8:54 pm
Contact:

Re: [MOD 0.12.7+] YARM (Yet Another Resource Monitor) v0.6.20

Post by Talguy » Sat Oct 03, 2015 1:13 pm

Narc wrote:
Talguy wrote:Would it be possible to colorize the ore type by their respective map color? This is because it would then be easier to distinguish the different ore types, for obvious reasons.
Yes, that sounds good. Since you seem to have the right idea with the code (but, hint, you don't want to change the caption -- the color is nearby), I'll gladly review your pull request; lacking one, I'll get around to it when I get around to it (which will probably be when the settings screen finally makes an appearance).
I'm an idiot, I meant to actually replace the color :D

However, even when fixing the code, the text shows up white as map_color is part of Lua/Resource (I think). Not sure how to get the map color now. As an alternative, you could maybe prepend the icon instead, but not sure how to add an icon to the factorio GUI controls :S

EDIT: Maybe ask Outsider (advanced logistics system)
waduk wrote:Hi Narc, if you want to add custom color like Talguy suggested, i suggest just color code a portion of the table, not the whole line.
I like the idea but i don't want to lose the current color warning.
In case you didn't know what i'm saying (due my lack english), here's the mockup i made in Photoshop.
Ignore the color i choose, i just rough made that to get the idea across.
Image
Exactly what I was aiming for!!

JyeGuru
Inserter
Inserter
Posts: 21
Joined: Thu Sep 11, 2014 3:59 am
Contact:

Re: [MOD 0.12.7+] YARM (Yet Another Resource Monitor) v0.6.20

Post by JyeGuru » Sun Oct 04, 2015 10:40 am

Found another bug for you!

The invisible "remote viewing" things that are on the ore patches are targets for biters.
This means they end up attacking the beacon in the middle of the ore patch instead of the miners a lot of the time.
Additionally, even after deleting the ore patches from the sidebar, the remote viewer thing stays there - and is still a target.

Screenshots:
https://www.dropbox.com/s/3iwxwig6cto5x ... 8.png?dl=0
https://www.dropbox.com/s/a78ruan0sxtkg ... 9.png?dl=0

Is there a command that can be used to clear or reset these things? It's kinda "cheating" that the biters go and gang up on them instead of continuing to the base.

Edit: Added second screenshot
Last edited by JyeGuru on Sun Oct 04, 2015 12:00 pm, edited 1 time in total.

waduk
Filter Inserter
Filter Inserter
Posts: 372
Joined: Tue Feb 10, 2015 5:44 pm
Contact:

Re: [MOD 0.12.7+] YARM (Yet Another Resource Monitor) v0.6.20

Post by waduk » Sun Oct 04, 2015 11:02 am

YukiHyou wrote:Found another bug for you!

The invisible "remote viewing" things that are on the ore patches are targets for biters.
This means they end up attacking the beacon in the middle of the ore patch instead of the miners a lot of the time.
Additionally, even after deleting the ore patches from the sidebar, the remote viewer thing stays there - and is still a target.

Screenshot: https://www.dropbox.com/s/3iwxwig6cto5x ... 8.png?dl=0

Is there a command that can be used to clear or reset these things? It's kinda "cheating" that the biters go and gang up on them instead of continuing to the base.
Btw, what is that green circle thing ?

PiggyWhiskey
Fast Inserter
Fast Inserter
Posts: 240
Joined: Wed May 13, 2015 5:28 am
Contact:

Re: [MOD 0.12.7+] YARM (Yet Another Resource Monitor) v0.6.20

Post by PiggyWhiskey » Sun Oct 04, 2015 11:07 am

waduk wrote: Btw, what is that green circle thing ?
They are enemy_expansion_chunk_candidates

It's potential location the biters will move to when the expand.
Press F4 and it's down the bottom.

It's semi-cheating as you can see where biter bases are all time. Even without radar

waduk
Filter Inserter
Filter Inserter
Posts: 372
Joined: Tue Feb 10, 2015 5:44 pm
Contact:

Re: [MOD 0.12.7+] YARM (Yet Another Resource Monitor) v0.6.20

Post by waduk » Sun Oct 04, 2015 11:38 am

PiggyWhiskey wrote:
waduk wrote: Btw, what is that green circle thing ?
They are enemy_expansion_chunk_candidates

It's potential location the biters will move to when the expand.
Press F4 and it's down the bottom.

It's semi-cheating as you can see where biter bases are all time. Even without radar
Thanks, i have further question, but will PM you instead. Didn't want to ruined this thread with non YARM related question.

Post Reply

Return to “Mods”

Who is online

Users browsing this forum: Bing [Bot], jamesthe1st