Natural Evolution Buildings


Add some very useful buildings to combat the Enemy threat, as changed by N.E. Enemies and other mods that increase Enemy difficulty. Please visit home page for more details.

Content
9 months ago
0.14 - 1.1
4.47K
Manufacturing

b [Fixed for next version] Minor icon bug with piercing firearm magazine

4 years ago

Hello. I love this mod and I'm only reporting this bug because I got plenty of time due to quarantine hehe.

It is a minor bug related to piercing firearm magazine, both iron and copper variants. It's shown only a corner of what it should be, be it in inventory/box or floor/belt.

I tried changing its icon file with Factorio's default, but I have no clue what I tried, and it obviously did not work.

Here's a screenshot: https://imgur.com/a/kYalPnU

Pi-C β˜†
4 years ago
(updated 4 years ago)

Thanks for the report. I've already fixed that for the next version. The reason is that NE is using vanilla piercing ammo, and the icon has been changed in vanilla to a bigger version. Here's an easy fix you can apply until I've got the next release ready for upload. In data-updates.lua, lines 19 and following, change from

----- Updates to Ammo
data.raw.recipe["piercing-rounds-magazine"].icon = "__Natural_Evolution_Buildings__/graphics/icons/piercing_magazine_iron.png"
data.raw.recipe["piercing-rounds-magazine"].icon_size = 32
data.raw.ammo["piercing-rounds-magazine"].icon = "__base__/graphics/icons/piercing-rounds-magazine.png"
data.raw.ammo["piercing-rounds-magazine"].icon_size = 32

to

----- Updates to Ammo
data.raw.recipe["ne-piercing-rounds-magazine-copper"].icon = "__Natural_Evolution_Buildings__/graphics/icons/piercing_magazine_iron.png"
data.raw.recipe["ne-piercing-rounds-magazine-copper"].icon_size = 32
data.raw.recipe["ne-piercing-rounds-magazine-copper"].icon_mipmaps = 1
data.raw.ammo["piercing-rounds-magazine"].icon = "__base__/graphics/icons/piercing-rounds-magazine.png"
data.raw.ammo["piercing-rounds-magazine"].icon_size = 64
data.raw.ammo["piercing-rounds-magazine"].icon_mipmaps = 4

The image should be shown completely after you apply this and restart. Hope it helps -- oh, and please continue to report bugs, even if they are only minor and even though it may still take me quite long to update. Work is progressing (albeit slowly) in the background. :-D

4 years ago

Hello! You surprised me with that quite fast reply. I paste your info and got an error that I did not took a screenshot from, but it was something with "main chunk" and starting at line 20. I tinkered with it a bit and after these alterations, it worked:

----- Updates to Ammo
data.raw.recipe["piercing-rounds-magazine"].icon = "Natural_Evolution_Buildings/graphics/icons/piercing_magazine_iron.png"
data.raw.recipe["piercing-rounds-magazine"].icon_size = 32
data.raw.recipe["piercing-rounds-magazine"].icon_mipmaps = 1
data.raw.ammo["piercing-rounds-magazine"].icon = "base/graphics/icons/piercing-rounds-magazine.png"
data.raw.ammo["piercing-rounds-magazine"].icon_size = 64
data.raw.ammo["piercing-rounds-magazine"].icon_mipmaps = 4

Maybe because you were already working on it, there's more alterations that you made? Anyway, your mod didn't break with this, and I'm fine with it!

Thanks!

Pi-C β˜†
4 years ago
(updated 4 years ago)

Sorry for the mistake! You're right, I've already made more changes (including changes to recipe names) which I didn't think about when posting the code above, so naturally this would break. Glad that you've got it working in spite of this!

Something you should keep in mind for future bug reports: The mod portal uses Markdown for formatting posts. If you want to post code, please indent each line with either 4 spaces or a tabulator (some editors allow indenting multiple lines at once)! This will prevent that the following text is changed by Markdown formatting, making it easier to copy/paste your code. The problem is, the game expects the root directory of a mod to be 2 underscores + String + 2 underscores. Incidentally, this also is Markdown code for "emphasize String", so path names get garbled. Compare, for example,

data.raw.recipe["ne-piercing-rounds-magazine-copper"].icon = "__Natural_Evolution_Buildings__/graphics/icons/piercing_magazine_iron.png"

(properly formatted as code) with

data.raw.recipe["ne-piercing-rounds-magazine-copper"].icon = "Natural_Evolution_Buildings/graphics/icons/piercing_magazine_iron.png"

(quoted text garbled by Markdown). If you do this, it will be much easier for me and other modders to fix things. :-)

4 years ago

Man I was worried that the text would be all fucked up. I had no idea how to format it, since this website has no editor, nor any GUI at all. Thank you for taking the time to teach me about it, I'll get on it!

New response