How to set the "description" of "shortcut"?
How to set the "description" of "shortcut"?
Adding 'description=' to the prototype is not acceptable
Adding [shortcut description] in the 'locality' does not work either
May I ask how to set it up? thank you
Adding [shortcut description] in the 'locality' does not work either
May I ask how to set it up? thank you
Re: How to set the "description" of "shortcut"?
Within the prototype it is:
And in the locale it is:
You can freely choose the name of the category.
Code: Select all
localised_name = {"Category.name of shortcut"},
Code: Select all
[Category]
name of shortcut="locale"
My Mods: Picklocks Fusion Power | Picklocks Inserter | Picklocks Lithium Polymer Accumulator | Picklocks rocket silo stats | Picklocks Set Inventory Filters | Picklocks QuickBar Import/Export | Picklocks Nauvis Cliff-Explosives
Re: How to set the "description" of "shortcut"?
Thank you, friend, but what you said is a localized name. Just add it to [shortcut name]. What I want is a "description", which is a long explanation below the namepicklock wrote: ↑Sat Nov 02, 2024 12:01 pm Within the prototype it is:And in the locale it is:Code: Select all
localised_name = {"Category.name of shortcut"},
You can freely choose the name of the category.Code: Select all
[Category] name of shortcut="locale"
Re: How to set the "description" of "shortcut"?
Below the name of what and where, specifically?
Text in item card, like this extra on screenshot, is added in locale>%lang_code%>%your_mod%.cfg in:
[entity-description] for already-placed things in the world,
[item-description] for your inventory items.
Modifying prototypes is NOT required. Locale modifiers will "attach" themselves to items just fine.
Sample mode: https://mods.factorio.com/mod/novice-qm-helper
Text in item card, like this extra on screenshot, is added in locale>%lang_code%>%your_mod%.cfg in:
[entity-description] for already-placed things in the world,
[item-description] for your inventory items.
Modifying prototypes is NOT required. Locale modifiers will "attach" themselves to items just fine.
Sample mode: https://mods.factorio.com/mod/novice-qm-helper
Re: How to set the "description" of "shortcut"?
Sorry, my friends. I didn't express myself clearly. My English is not good, so I can only rely on machine translation
I just want to add a 'description' to the 'shortcut' in the 'local', for example:
[item-name]--------[item-description]
[entity-name]-------[entity-description]
[shortcut-name]--------????
I just want to add a 'description' to the 'shortcut' in the 'local', for example:
[item-name]--------[item-description]
[entity-name]-------[entity-description]
[shortcut-name]--------????
Re: How to set the "description" of "shortcut"?
Only that we are talking about the same thing. For me, these are shortcuts in my picture. And for me, the name is the description.
And you can define these as I have already described.
And you can define these as I have already described.
- Attachments
-
- shortcut.png (5.18 KiB) Viewed 290 times
My Mods: Picklocks Fusion Power | Picklocks Inserter | Picklocks Lithium Polymer Accumulator | Picklocks rocket silo stats | Picklocks Set Inventory Filters | Picklocks QuickBar Import/Export | Picklocks Nauvis Cliff-Explosives
Re: How to set the "description" of "shortcut"?
Knowing "where" would still do no harm.sdgmlj wrote: ↑Sat Nov 02, 2024 1:12 pm Sorry, my friends. I didn't express myself clearly. My English is not good, so I can only rely on machine translation
I just want to add a 'description' to the 'shortcut' in the 'local', for example:
[item-name]--------[item-description]
[entity-name]-------[entity-description]
[shortcut-name]--------????
[item-description] is being used for basic descriptions (like "Blueprint" button from screenshot above, it can be seen in base/locale/en/base.cfg).
Is expected to work well for 90% of description-added needs.
[controls-description] is used for (i) tooltips in Settings > Controls menu. No prototype change seem to be required either, only prototype name match with entry in [controls].
More advanced things, like tooltip for "Create spidertron remote" , are probably not exposed anywhere yet. Can't seem to find in exposed parts how it is done currently so cannot replicate it for custom keys.
Re: How to set the "description" of "shortcut"?
Thank you, what I want to know is, can only change 'name'? Because that would make the name very long and not very attractive, I would like to have a detailed explanation on the new feature I added, as it would be very long...
If there is no other way, the only option is to change the name
Re: How to set the "description" of "shortcut"?
Thank you, I'm glad I made myself clear and you understand what I mean. And the method I want may not be feasible, I understand. Thank you again and good luckEustaceCS wrote: ↑Sat Nov 02, 2024 2:08 pmKnowing "where" would still do no harm.sdgmlj wrote: ↑Sat Nov 02, 2024 1:12 pm Sorry, my friends. I didn't express myself clearly. My English is not good, so I can only rely on machine translation
I just want to add a 'description' to the 'shortcut' in the 'local', for example:
[item-name]--------[item-description]
[entity-name]-------[entity-description]
[shortcut-name]--------????
[item-description] is being used for basic descriptions (like "Blueprint" button from screenshot above, it can be seen in base/locale/en/base.cfg).
Is expected to work well for 90% of description-added needs.
[controls-description] is used for (i) tooltips in Settings > Controls menu.
Screenshot From 2024-11-02 17-11-49.png
No prototype change seem to be required either, only prototype name match with entry in [controls].
More advanced things, like tooltip for "Create spidertron remote"
Screenshot From 2024-11-02 16-48-30.png
, are probably not exposed anywhere yet. Can't seem to find in exposed parts how it is done currently so cannot replicate it for custom keys.
Re: How to set the "description" of "shortcut"?
Check out PrototypeBase, which is inherited by all other prototypes. What you need isn't localised_name, but localised_description!
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: How to set the "description" of "shortcut"?
Pi-C wrote: ↑Sat Nov 02, 2024 2:41 pmCheck out PrototypeBase, which is inherited by all other prototypes. What you need isn't localised_name, but localised_description!
Code: Select all
type = "shortcut",
name = "abc",
order = "abc",
localised_description = "aaaaaa",
Re: How to set the "description" of "shortcut"?
No, it's not invalid! Enter this on the chat console:sdgmlj wrote: ↑Sat Nov 02, 2024 2:53 pmYou completely understand what I mean, but 'localised_description' is invalid in 'shortcut'Code: Select all
type = "shortcut", name = "abc", order = "abc", localised_description = "aaaaaa",
Code: Select all
/c game.print(prototypes.shortcut.abc.localised_description)
The real problem seems to be that only localised_name will ever be shown when you hover the shortcut with your cursor. So this looks more like a feature request to implement a way to display the localised description.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: How to set the "description" of "shortcut"?
Firstly, thank you very much for helping me solve this problem. I would like to ask, is it never possible to achieve mouse hover display through scripts?Pi-C wrote: ↑Sat Nov 02, 2024 3:38 pm No, it's not invalid! Enter this on the chat console:For the shortcut defined above, the command will print "aaaaaa".Code: Select all
/c game.print(prototypes.shortcut.abc.localised_description)
The real problem seems to be that only localised_name will ever be shown when you hover the shortcut with your cursor. So this looks more like a feature request to implement a way to display the localised description.
Re: How to set the "description" of "shortcut"?
There is on_gui_hover, but I'm not sure it will work with vanilla GUIs.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: How to set the "description" of "shortcut"?
Thank you, my friend. Although my questions are boring, I always receive your enthusiastic responses. I am truly grateful and wish you happinessPi-C wrote: ↑Mon Nov 04, 2024 10:28 pmThere is on_gui_hover, but I'm not sure it will work with vanilla GUIs.