Open sigangzzang opened 3 years ago
The ldstr file is extracted from the mod's code - every item in this file is presented in the source code. It's impossible to explain each item inside since every mod author may code differently. If you need help with a specific mod, please add more details.
If you would like to go into a bit tech-related, the following part is here.
The content of ldstr file is a dictionary of Method Signature
and the text inside that method
. Method Signature
is something looks like ReturnTypeNamespace.ReturnType Namespace.Class::Method(Arguments)
For example, System.Void CalamityMod1.CalamityMod2::Load()
ReturnTypeNamespace.ReturnType
: System.Void
Namespace
: CalamityMod1
Class
: CalamityMod2
Method
: Load
Arguments
: emptyHere are some common patterns:
Namespace and Class | Method | Arguments | Description |
---|---|---|---|
(any) | ModifyInterfaceLayers | (any) | Custom UI. If you change the text here, you'll 99% lose a UI. It vanishes. DO NOT TOUCH. |
Mod Name | Load | () |
Initialization. Probably the hotkey setting is here. |
xxxx/<>c | () |
Custom recipe group (for example, any wood ) |
|
xxxx/<>c | (Terraria.World.Generation.GenPass) |
Custom map element. If you change the text here, you'll 99% lose some mod-unique environment or items. DO NOT TOUCH. | |
xxxx/<>c | (Terraria.World.Generation.GenerationProgress) |
Custom map generation text, used to be displayed during world generation. | |
xxxGlobalNPC | GetChat |
(Terraria.NPC,System.String&) |
Update the chat of a NPC vanilla or in other mod. |
GetChat |
() |
Chat of NPC | |
TownNPCName |
() |
Possible names of NPC | |
AI |
() |
AI | |
SetChatButtons |
(System.String&,System.String&) |
Special text when you chat to certain NPC. | |
NPCLoot |
() |
Loot. | |
xxxGlobalItem | ModifyTooltips | (Terraria.Item,xxxxxx) |
Update the tooltip of items vanilla or in other mod. |
ModifyTooltips |
Update tooltip. | ||
UpdateArmorSet |
(Terraria.Player) |
Set bonus | |
SetDefaults |
() |
Initialization of items/NPC/projectiles. | |
MouseOver or MouseOverFar |
Mouse over. |
[i:xxx]
is the code when you send an item in chat. It was usually split into [i:
and ]
.
Thanks for the quick reply. I will follow the attached explanation.
As an example, can i find the config contents of the calamity mod in the ldstr file? (calamity mod config writen is 'lables', i don't find. sry)
Thanks for the quick reply. I will follow the attached explanation.
As an example, can i find the config contents of the calamity mod in the ldstr file? (calamity mod config writen is 'lables', i don't find. sry)
Could you take a screenshot of what you want to change?
And there is a small bug in the translated mod. In the case of a mod that loads and uses a mod that has been translated, problems such as a game freeze or deletion of a recipe occur.
This can be solved by manually adding the mod loading mod you are using to the localizer temporarily.
Where can I quickly contact to questions or send screenshots? Is there a Discord to Children's Team?
Q1. How to translate calamity mod config options?
Here's what I said 'label'
Q2. Problem with mods loading translated mods
Case 1
magic storage mod is translated.
RecipeBrowserToMagicStorage mod make some freeze game
(Manually adding the RecipeBrowserToMagicStorage mod has fixes it.)
Case 2
Calamity mod is translated.
FargowiltasSoulsDLC mod Recipe is broken.
Even if there is no material, it is just made it.
(Manually adding the FargowiltasSoulsDLC mod has fixes it.)
What I want to say is you have to manually export that mods in which the problem occurs and then add it.
example
Q1: The ModConfig part is not supported yet - and yes, it's not in the ldstr file. Probably update after tML 1.4 release.
Q2: You may upload the log file (%UserProfile%\Documents\My Games\Terraria\ModLoader\Logs
) to help diagnose the problem if you don't mind.
I've heard about some similar problem (freezing) about using translated Thorium and FargowiltasSouls together. Since ldstr is changing the code of the mod, some cross-mod content is broken since it still uses the original mod instead of the translated version. (e.g., the recipe requires "Mod A Item B", but Mod A no longer exist - there is translated Mod A)
Possible solutions:
(GameDirectory)/Localizer/Config.json
, change the "ImportLdstr": true,
to "ImportLdstr": false,
or
(GameDirectory)/Localizer/Config.json
, change the "LdstrImporter": "Cecil",
Cecil
into Harmony
or MonoMod
.
Those are different technics to import the ldstr update, but they work differently. They do not replace the whole mod with a new version, but only change the necessary parts. They have better compatibility but less effective. For example, some special strings will remain original even if translated (the original version loaded before translation load).Or, you can wait till tML 1.4 and see if someone will update it, add fixes and new features
Ah! I will understand and wait.
I was curious as some mods even now can translate option config with localizer.
Thank you so much for answering :)
It's okay to upload the log file, but it won't work as the game isn't crashing.
You can test it by following case 1 or 2 attached above. Hope this will be solved by waiting for a new version of tml and localizer, sir.
And if you okay, can you tell me more about change ldstr importer? The difference between each method and if the person who translates it changes and applies it, the person who downloads it also changes?
Sorry, what did you mean by exploit
?
Localizer is a local mod that does not synchronize with the server - which means you can enable/disable it no matter if the server installs/enable it.
Sorry, what did you mean by
exploit
? Localizer is a local mod that does not synchronize with the server - which means you can enable/disable it no matter if the server installs/enable it.
i know :), Since it is in local mod, it is very advantageous to be able to translate regardless of the server, so I too use a localizer.
Sorry, what did you mean by
exploit
? Localizer is a local mod that does not synchronize with the server - which means you can enable/disable it no matter if the server installs/enable it.i know :), Since it is in local mod, it is very advantageous to be able to translate regardless of the server, so I too use a localizer.
* It means making an item right on the altar as soon as some people start the game. * As you said, it's in local mod, so I can't cope with this. * In the case of Case 2 mentioned above, can always create items at will by temporarily disabling the translation of the DLC mod. (by individual) * talking about when playing multiplaying.
I see - that's kinda serious. I'll try to reproduce and find some way to fix it.
Okay. All of my questions have been resolved, Should I close this issue? or just leave it? I'll just leave it if you can close it later
The sgkoishi-patch-1
branch should hopefully fix the broken recipe problem. It's not a good or smart solution but probably just works :)
using very usefully localizer mod. thx to childeren team. but github wiki page has no explanation in English, so couldn't understand for half ldstr file, and couldn't find the translation of labels in mods any json files.