[0.18.9] item that can place entity ignores localised name - sometimes

This subforum contains all the issues which we already resolved.
Honktown
Smart Inserter
Smart Inserter
Posts: 1045
Joined: Thu Oct 03, 2019 7:10 am
Contact:

[0.18.9] item that can place entity ignores localised name - sometimes

Post by Honktown »

Made a mod: https://mods.factorio.com/mod/fill-storage-tanks and noticed something strange in the image I was adding to the gallery, that the pick-up name didn't match the item name:
tall image
There's a former, potentially related thread (and a few others on the topic of entity vs item):
viewtopic.php?f=11&t=75419&p=455565

I'd expect if I specify an item's localised name, it gets the localised name I specified. The item has the correct localised name when being picked up (it replaces the storage tank in buffer via control logic). Another mod, Market (by OwnlyMe), shows the localised names correctly. In my inventory however, every one of the items specified with a different localised name is just "Storage tank". Recipes describe a result as "Storage tank", but an ingredient by it's localised item name:
fill and empty recipes
Doing

Code: Select all

/c game.player.print(game.item_prototypes["water-storage-tank"].localised_name)
tells me "Water Storage tank".
I have mods! I guess!
Link
Rseding91
Factorio Staff
Factorio Staff
Posts: 14708
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.18.9] item that can place entity ignores localised name - sometimes

Post by Rseding91 »

Thanks for the report however I don't know what you're saying is wrong.

Can you please show in simple terms what is happening vs what you expect to happen?
If you want to get ahold of me I'm almost always on Discord.
Honktown
Smart Inserter
Smart Inserter
Posts: 1045
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: [0.18.9] item that can place entity ignores localised name - sometimes

Post by Honktown »

Rseding91 wrote: Fri Feb 28, 2020 12:56 am Thanks for the report however I don't know what you're saying is wrong.

Can you please show in simple terms what is happening vs what you expect to happen?
I expect the items to be named as they are - all the localised names match the style of fill barrels, what I am emulating, but larger.

What I expect: a water storage tank to be called a water storage tank, not "storage tank". A sulfuric acid storage tank to be called "sulfuric acid storage tank", not "storage tank". I have a fluid storage tank for all the same fluids as barrels, but every item has the exact same name. I disagree with how these items are named in this image:
fill-tanks.png
fill-tanks.png (57.57 KiB) Viewed 3958 times
As you may imagine if color is the only thing distinguishing 5-20+ fluids it gets confusing, fast.

The naming style is presented differently in different situations:
item localised name:
a) mods that present the item
b) flying text when being given the item (putting the item into an on_player_mined_entity buffer)
c) item as ingredient

storage-tank localised name:
a) inventory
b) result of recipe
c) filters
I have mods! I guess!
Link
Rseding91
Factorio Staff
Factorio Staff
Posts: 14708
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.18.9] item that can place entity ignores localised name - sometimes

Post by Rseding91 »

Your screenshot looks a lot like the recipe GUI, which has nothing to do with item names and uses the recipe prototype localised name if one is defined.

I don't think there's any bug here. The base game uses the same kind of logic for filling/emptying barrels and all of that works correctly.

Until you can show some base-game error I'm going to move this to modding help.
If you want to get ahold of me I'm almost always on Discord.
Honktown
Smart Inserter
Smart Inserter
Posts: 1045
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: [0.18.9] item that can place entity ignores localised name - sometimes

Post by Honktown »

Alright then. Anyone know how I make items stop using an entity name, and use their actual localized_name?
Attachments
ss.jpg
ss.jpg (1.03 MiB) Viewed 3949 times
I have mods! I guess!
Link
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3334
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [0.18.9] item that can place entity ignores localised name - sometimes

Post by boskid »

If i understand correctly, what you want is this:
81736-what-expected.png
81736-what-expected.png (15.97 KiB) Viewed 3938 times
It looks that there are 2 different localised strings for your item: one of item itself and one taken from place result. By how it is implemented currently, name from place result takes priority. Fix is easy but i will ask twinsen.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3334
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [0.18.9] item that can place entity ignores localised name - sometimes

Post by boskid »

It is fixed(changed) for 0.18.10

Code: Select all

  Changes:
    - Item localised name takes priority over place-result localised name when showing item's tooltip. (https://forums.factorio.com/81736)
Honktown
Smart Inserter
Smart Inserter
Posts: 1045
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: [0.18.9] item that can place entity ignores localised name - sometimes

Post by Honktown »

Friggin yessssss. Sweet.
I have mods! I guess!
Link
Post Reply

Return to “Resolved Problems and Bugs”