Jump to content

Recommended Posts

Posted (edited)

I'm trying to translate Kingdom Two Crowns, but with the 2.1.4 update, the game switched from Mono to IL2CPP.
I've tried dumping the DLLs using Il2CppDumper and several other tools, but none of them worked.
Does anyone know how I can translate this game?

Unity Version: 2022.3.51f1

Il2CppDumper Error:

image.thumb.png.bdd25843426602c02a18a43d4a677f3c.png

Edited by Indra881
Posted (edited)

Somehow the indices of some property getters and setters are not correctly extracted from the metadata.

I don't have time to figure out the reason but searching through the next 100 entries to find the correct getter seems to work.

Here is the code snippet.

if (propertyDef.get < 0 && propertyDef.set < 0)
{
  for (int j = 0; j <= 100; ++j)
  {
    if (methodDefinitionDic.ContainsKey(typeDef.methodStart + j) &&
        methodDefinitionDic[typeDef.methodStart + j].Name == "get_" + propertyName)
    {
      propertyDef.get = j;
      break;
    }
  }
}

DummyDll.zip

Edited by haibaer
Posted
1 hour ago, haibaer said:

Somehow the indices of some property getters and setters are not correctly extracted from the metadata.

I don't have time to figure out the reason but searching through the next 100 entries to find the correct getter seems to work.

Here is the code snippet.

if (propertyDef.get < 0 && propertyDef.set < 0)
{
  for (int j = 0; j <= 100; ++j)
  {
    if (methodDefinitionDic.ContainsKey(typeDef.methodStart + j) &&
        methodDefinitionDic[typeDef.methodStart + j].Name == "get_" + propertyName)
    {
      propertyDef.get = j;
      break;
    }
  }
}

DummyDll.zip 7.55 MB · 1 download

Thank you, with this i managed the dump the dll's but UABEA still can't read the language files. "Asset failed to deserialize."
I thought dumping the DLLs would resolve this, but it didn't work.

  • Solution
Posted
4 hours ago, Indra881 said:

///Thank you, with this i managed the dump the dll's but UABEA still can't read the language files. "Asset failed to deserialize."
I thought dumping the DLLs would resolve this, but it didn't work.

Follow these steps:

1. rename the Dummydll folder to "Managed"

2. put it in the "KingdomTwoCrowns_Data" folder

3. open UABEA and disable the Cpp2il

Posted
39 minutes ago, haibaer said:

Follow these steps:

1. rename the Dummydll folder to "Managed"

2. put it in the "KingdomTwoCrowns_Data" folder

3. open UABEA and disable the Cpp2il

Thank you so much, bro. I forgot to disable Cpp2il.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...