FramFramson Posted December 20, 2023 Share Posted December 20, 2023 I have some weapons whose names do show up properly but which have no description and I would like to add one. Looked at the tutorials but they aren't explicitly specific on this particular point. The header for these is: Key,File,Type,UsedInMainMenu,NoTranslate,english,Context / Alternate Text,german,latam,(all the other languages, etc. etc...) The corresponding line I have below is pewpew,items,gun,,Pew Pew Gun,Pew Pew Gun,,,,,,,,,,,,,, From what I can tell, the displayed name in game corresponds to 'NoTranslate' and 'english', so in this example the gun would be listed in game as 'Pew Pew Gun' (tested, & working fine). I tried adding the description text after the following comma, where it would align with "Context / Alternate Text" but that overwrites the menu item name for some reason??? I tried adding "Desc," to the header, as I've seen in some mod localizations, but this didn't work either. Where exactly does the description text fit? Link to comment Share on other sites More sharing options...
BFT2020 Posted December 20, 2023 Share Posted December 20, 2023 7 hours ago, FramFramson said: pewpew,items,gun,,Pew Pew Gun,Pew Pew Gun,,,,,,,,,,,,,, The amount of commas seems off From one of my mods: BFTCraftingShotgunT1-1,progression,Attribute,,,Tier 1: Shotgun Shells,,,,,,,,,,,,, Note that I have 3 commas between Attribute and the English description 1 Link to comment Share on other sites More sharing options...
FramFramson Posted December 21, 2023 Author Share Posted December 21, 2023 (edited) 11 hours ago, BFT2020 said: The amount of commas seems off From one of my mods: BFTCraftingShotgunT1-1,progression,Attribute,,,Tier 1: Shotgun Shells,,,,,,,,,,,,, Note that I have 3 commas between Attribute and the English description Does your header key match the one I'm using? Because I've seen different mods with slightly different Localization key headers. Edited December 21, 2023 by FramFramson (see edit history) Link to comment Share on other sites More sharing options...
BFT2020 Posted December 21, 2023 Share Posted December 21, 2023 12 hours ago, FramFramson said: Does your header key match the one I'm using? Because I've seen different mods with slightly different Localization key headers. My header key matches the one in A21 and works in the game 1 Link to comment Share on other sites More sharing options...
khzmusik Posted December 21, 2023 Share Posted December 21, 2023 (edited) On 12/20/2023 at 1:22 AM, FramFramson said: I have some weapons whose names do show up properly but which have no description and I would like to add one. Looked at the tutorials but they aren't explicitly specific on this particular point. The header for these is: Key,File,Type,UsedInMainMenu,NoTranslate,english,Context / Alternate Text,german,latam,(all the other languages, etc. etc...) The corresponding line I have below is pewpew,items,gun,,Pew Pew Gun,Pew Pew Gun,,,,,,,,,,,,,, From what I can tell, the displayed name in game corresponds to 'NoTranslate' and 'english', so in this example the gun would be listed in game as 'Pew Pew Gun' (tested, & working fine). I tried adding the description text after the following comma, where it would align with "Context / Alternate Text" but that overwrites the menu item name for some reason??? I tried adding "Desc," to the header, as I've seen in some mod localizations, but this didn't work either. Where exactly does the description text fit? Descriptions need an entirely different line of CSV in the Localizations.txt file. This is because descriptions also need to be localized, they're not just in English. If this is an item, then adding "Desc" after the item name will usually work. For example, if your item name is "pewpew" then the Key value would be "pewpewDesc": pewpewDesc,items,gun,,,Pew Pew Guns go Pew Pew!,,,,,,,,,,,,,, If that doesn't work, then you should add a "DescriptionKey" property to the item: <property name="DescriptionKey" value="pewpewDesc"/> Also: "NoTranslate" is a flag that tells 7D2D that it should not translate this key at all. It is not displayed to the user. In vanilla, it's used for proper nouns, like POI names. In Localization.txt, "X" represents "true" and an empty value represents "false." (I'm not sure what other values mean - A21 added "?" as a value, but there are also translations for those keys, so who knows what that value means.) Edited December 21, 2023 by khzmusik (see edit history) 2 Link to comment Share on other sites More sharing options...
FramFramson Posted December 22, 2023 Author Share Posted December 22, 2023 9 hours ago, khzmusik said: Descriptions need an entirely different line of CSV in the Localizations.txt file. This is because descriptions also need to be localized, they're not just in English. If this is an item, then adding "Desc" after the item name will usually work. For example, if your item name is "pewpew" then the Key value would be "pewpewDesc": pewpewDesc,items,gun,,,Pew Pew Guns go Pew Pew!,,,,,,,,,,,,,, If that doesn't work, then you should add a "DescriptionKey" property to the item: <property name="DescriptionKey" value="pewpewDesc"/> Also: "NoTranslate" is a flag that tells 7D2D that it should not translate this key at all. It is not displayed to the user. In vanilla, it's used for proper nouns, like POI names. In Localization.txt, "X" represents "true" and an empty value represents "false." (I'm not sure what other values mean - A21 added "?" as a value, but there are also translations for those keys, so who knows what that value means.) Ah. I was just using existing localization files from popular and stable weapons mod as a reference. Looking at a few more turned up use of the itemnameDesc tag, so that seems correct! They all seem to retain NoTranslate in the key. Would best practice be to remove that from the header or to use an 'X' in the corresponding spot? (since I don't have alternate language names for the material). Link to comment Share on other sites More sharing options...
khzmusik Posted December 22, 2023 Share Posted December 22, 2023 1 hour ago, FramFramson said: Ah. I was just using existing localization files from popular and stable weapons mod as a reference. Looking at a few more turned up use of the itemnameDesc tag, so that seems correct! They all seem to retain NoTranslate in the key. Would best practice be to remove that from the header or to use an 'X' in the corresponding spot? (since I don't have alternate language names for the material). Most people find it to be best practice to use the same headers as vanilla. But technically, you can remove the headers you don't need (except for Key, and maybe File and Type, plus of course the language you're supporting). Just make sure the number of separators (i.e. commas) match. Personally I use Google Sheets since it has built-in translation services, so I actually provide all the supported languages. YMMV. 1 Link to comment Share on other sites More sharing options...
FramFramson Posted December 22, 2023 Author Share Posted December 22, 2023 2 hours ago, khzmusik said: Most people find it to be best practice to use the same headers as vanilla. But technically, you can remove the headers you don't need (except for Key, and maybe File and Type, plus of course the language you're supporting). Just make sure the number of separators (i.e. commas) match. Personally I use Google Sheets since it has built-in translation services, so I actually provide all the supported languages. YMMV. In this case I don't really need multilingual support, because it's just a personal edit of an existing mod. Though of course that can always change! But it's good to know for proper mod publishing. Thanks! Link to comment Share on other sites More sharing options...
BFT2020 Posted December 23, 2023 Share Posted December 23, 2023 On 12/20/2023 at 1:22 AM, FramFramson said: I have some weapons whose names do show up properly but which have no description and I would like to add one. Looked at the tutorials but they aren't explicitly specific on this particular point. Sorry about that! I read this, but my brain went a completely different direction. I was stuck on item names when you clearly were wanting descriptions. I am going to blame it on the Covid I was dealing with, not old age 😉 It looks like khzmusik was able to answer your question properly. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now