c# - Convert Ark ID to Ingame ID in Python - Stack Overflow

admin2025-04-17  2

I was analysing the Ark stats extractor and wanted to include database in my application

.cs#L581

If I'm not mistaken this function is used to convert the IDs to Ingame IDs I took "ArkId": 1294819557881357000 and wrote following python code

def convert_imported_ark_id_to_ingame_visualization(imported_ark_id: int) -> str:
    """
    Converts a 64-bit Ark ID into an in-game visualization string.
    
    :param imported_ark_id: The 64-bit Ark ID.
    :return: A string representation used in-game.
    """

    part1 = int(imported_ark_id >> 32)
    part2 = int(imported_ark_id & 0xFFFFFFFF)

    return f"{part1}{part2}"

if __name__ == "__main__":
    ingame = convert_imported_ark_id_to_ingame_visualization(1294819557881357000)
    print(f"Ingame should be 301473671331293553 but is {ingame}")

the breeder is showing me ID: 301473671331293553 my one is: 301473671331293384

I have no idea why there is a difference.

转载请注明原文地址:http://anycun.com/QandA/1744863073a88679.html