[MOD 0.12.x] Map Labels - Add labels to resources on the map
Posted: Sun Mar 27, 2016 5:28 pm
by DonovanHawkins
Type: Mod
Name: Map Labels
Description: Add labels to resources on the map
License: MIT
Version: 0.1.0
Release: 2016-03-27
Tested-With-Factorio-Version: 0.12.29
Category: Helper
Tags: User-Interface, Accessibility
Download-Url: http://www.cephira.com/Temp/MapLabels_0.1.0.zip
Long description
Long description
Adds a label (actually an invisible train station) to each resource patch on the map. To use, just click on the Map Labels button and wait a few seconds (longer on large maps). There are a few things that can be tweaked from config.lua including the names used for resource labels and the ability to disable labels for specific resources. Note that you should prefix resource names with a tilde (~) in order to force the dummy train stops to the bottom of the train stop list.
Sample image (includes resources from Bob's Ores and Peace Mod):
Known issues
Known issues
Resource patches are analyzed in real-time when you click the button and are not updated unless you toggle the labels off and back on. This could be done in the background and remembered/updated.
Some patches that fall on the region boundary used for analysis end up with more than one label. These boundaries need to be aligned with the resource generation to prevent this.
Resource names appear on the train stop list and are not localized. These are limitations of the game caused by the need to use train stops as labels.
Each oil well gets its own label. I would need to add a per-resource search distance to prevent this (setting the global search distance is very slow).
The map must be refreshed (brief flashes) when labels are enabled/disabled. This is a limitation of the game.
Version history
Version history
0.1.0 (2016-03-27): First release
License
License
The MIT License (MIT)
Copyright (c) 2015 Donovan Hawkins
trans.png is from RailTanker mod Copyright (c) 2015 jamesofarrell
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Re: [MOD 0.12.x] Map Labels - Add labels to resources on the map
Posted: Sat May 07, 2016 10:06 am
by scherzeking
Nice Mod. However when I try to rename the ores it will not change anything.
When I edit your example:
--ResourceDisplayName[ "iron-ore" ] = "~Iron ore"
into this: ResourceDisplayName[ "iron-ore" ] = "~Eisen"
I do get a error before loading the game. And when I leave the first thing (ResourceDisplayName = {}) nothing will change.
help?
Re: [MOD 0.12.x] Map Labels - Add labels to resources on the map
Posted: Sat May 07, 2016 10:37 am
by Pandemoneus
scherzeking wrote:Nice Mod. However when I try to rename the ores it will not change anything.
When I edit your example:
--ResourceDisplayName[ "iron-ore" ] = "~Iron ore"
into this: ResourceDisplayName[ "iron-ore" ] = "~Eisen"
I do get a error before loading the game. And when I leave the first thing (ResourceDisplayName = {}) nothing will change.
help?
You have to leave the first line ResourceDisplayName = {} as it is. It declares and defines the variable ResourceDisplayName so you can fill it with stuff. An example file would look like this:
Re: [MOD 0.12.x] Map Labels - Add labels to resources on the map
Posted: Sat May 07, 2016 12:22 pm
by steinio
:thumbs up:
Thanks to this mod i found uraninite at last.
Could you please change the button to a smaller one (maybe with an icon) ?
Edit: Is it possible to place the label a bit far from the ressource and make the train stop visible so i can use it?
Greetings steinio
Re: [MOD 0.12.x] Map Labels - Add labels to resources on the map
Posted: Mon May 09, 2016 10:42 am
by scherzeking
Pandemoneus wrote:
scherzeking wrote:Nice Mod. However when I try to rename the ores it will not change anything.
When I edit your example:
--ResourceDisplayName[ "iron-ore" ] = "~Iron ore"
into this: ResourceDisplayName[ "iron-ore" ] = "~Eisen"
I do get a error before loading the game. And when I leave the first thing (ResourceDisplayName = {}) nothing will change.
help?
You have to leave the first line ResourceDisplayName = {} as it is. It declares and defines the variable ResourceDisplayName so you can fill it with stuff. An example file would look like this:
-- Preferred names for resources on map, or blank to hide (default is to replace non-alphanumeric characters with space, upper-case the first letter, and prepend a tilde)
Re: [MOD 0.12.x] Map Labels - Add labels to resources on the map
Posted: Tue Jun 21, 2016 10:46 am
by Ranakastrasz
Would be nice if each ore patch looked for nearby patches as well, within ~10 tiles, and merged them together, reducing number of icons.
Edit:
Also, would be preferable if it scanned the map gradually, rather than all at once, since it lags the game out.
Re: [MOD 0.12.x] Map Labels - Add labels to resources on the map
Posted: Sat Jun 25, 2016 3:11 pm
by maggi321
Very great mod! I guess it makes playing with many ores like in Bobs mod much more playable.
Is it possible to make the labels undestroyable by the natives?
Right now I sometimes get Alerts from biters destroying some of the resource labels, which is really annoying.
Re: [MOD 0.12.x] Map Labels - Add labels to resources on the map
Posted: Wed Jun 29, 2016 9:50 am
by PiggyWhiskey
maggi321 wrote:Very great mod! I guess it makes playing with many ores like in Bobs mod much more playable.
Is it possible to make the labels undestroyable by the natives?
Right now I sometimes get Alerts from biters destroying some of the resource labels, which is really annoying.
It definitely makes searching for ores with Bob's easier.
I've only noticed them attacking when I'm near them. Close enough to trigger path finding to the player.
Re: [MOD 0.12.x] Map Labels - Add labels to resources on the map
Posted: Wed Jun 29, 2016 4:23 pm
by Bizobinator
Are there any plans to update it for 0.13.1?
Re: [MOD 0.12.x] Map Labels - Add labels to resources on the map
Posted: Wed Jun 29, 2016 4:53 pm
by maggi321
I've created a 0.13.1 working version for personal purposes. I also changed the owner force of the invisible train stations to "neutral", which may remove the possibility of natives destroying it, but I didn't really have time to test it yet. I will share my version here, that other impatient people like me can use it, until the original author releases an update.
Re: [MOD 0.12.x] Map Labels - Add labels to resources on the map
Posted: Wed Jun 29, 2016 9:48 pm
by PiggyWhiskey
Has 0.13 been released already?
Didn't they say it would break most mods.
What changes did you make? Apart from changing it to neutral. (does that change work in 0.12?)
Edit: I'm an idiot. I forgot the releases go to beta in steam and from the website.
I was expecting my normal steam to update to 0.13 automatically
Re: [MOD 0.12.x] Map Labels - Add labels to resources on the map
Posted: Thu Jun 30, 2016 7:00 am
by maggi321
I only changed it to neutral and added the mandatory "factorio_version": "0.13.0" to the info.json file. I guess the change to neutral should also work in 0.12, but I didn't test it.
Re: [MOD 0.12.x] Map Labels - Add labels to resources on the map
Posted: Thu Jun 30, 2016 9:31 pm
by Ranakastrasz
You could add the invulnerable tag instead. Can't recall what its called.
Re: [MOD 0.12.x] Map Labels - Add labels to resources on the map
Posted: Thu Jun 30, 2016 9:34 pm
by orzelek
When spawning the tag you can set it's destructible flag to false - biters won't touch it.
Re: [MOD 0.12.x] Map Labels - Add labels to resources on the map
Posted: Sun Jul 03, 2016 5:26 pm
by steinio
maggi321 wrote:I've created a 0.13.1 working version for personal purposes. I also changed the owner force of the invisible train stations to "neutral", which may remove the possibility of natives destroying it, but I didn't really have time to test it yet. I will share my version here, that other impatient people like me can use it, until the original author releases an update.
Thank you.
Re: [MOD 0.12.x] Map Labels - Add labels to resources on the map
Posted: Mon Jul 04, 2016 10:25 am
by Templeo
When do you release a working version for 0.13 for the rest of us? or have i missed something ?
EDIT: silly me, never mind. Thank you alot maggi321! -though, can't seem to find the "Map Label button" ?
Re: [MOD 0.12.x] Map Labels - Add labels to resources on the map
Posted: Mon Jul 04, 2016 5:44 pm
by ukezi
I also can't find the button. it is not in the upper left corner. I'm useing bob's modpack.
EDIT: the button appears in a new game. how ever it is not showing in an old one is a riddle to me.