{"id":22055385,"url":"https://github.com/sogladev/xcom2-custom-names","last_synced_at":"2025-03-23T16:14:44.218Z","repository":{"id":222968517,"uuid":"758870653","full_name":"sogladev/xcom2-custom-names","owner":"sogladev","description":"script that overwrites lastname bytestrings of your soldiers in a given pool","archived":false,"fork":false,"pushed_at":"2024-11-01T18:47:44.000Z","size":848,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-28T22:20:20.211Z","etag":null,"topics":["xcom2","xcom2-mod"],"latest_commit_sha":null,"homepage":"https://sogladev.github.io/xcom2-custom-names/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sogladev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-17T10:22:39.000Z","updated_at":"2024-11-01T18:47:48.000Z","dependencies_parsed_at":"2024-05-09T16:12:39.416Z","dependency_job_id":null,"html_url":"https://github.com/sogladev/xcom2-custom-names","commit_stats":null,"previous_names":["ella36/xcom2-custom-names","jellemeeus/xcom2-custom-names","sogladev/xcom2-custom-names"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogladev%2Fxcom2-custom-names","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogladev%2Fxcom2-custom-names/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogladev%2Fxcom2-custom-names/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogladev%2Fxcom2-custom-names/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sogladev","download_url":"https://codeload.github.com/sogladev/xcom2-custom-names/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245128130,"owners_count":20565206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["xcom2","xcom2-mod"],"created_at":"2024-11-30T16:06:57.361Z","updated_at":"2025-03-23T16:14:44.194Z","avatar_url":"https://github.com/sogladev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XCOM 2 Custom soldier names\n\nThis project aims to simplify the process of creating custom soldier pools by generating them programmatically instead of manually renaming each one.\n\nWhile you can still create soldier pools by hand, it can be time-consuming and tedious, especially when making changes. To address this issue, I developed a tool that quickly generates hundreds of soldier names of your choosing\n\nSince the soldier pools are stored in binary (.bin) formats, there's no real easy way to edit en masse. This script will do a bytestring replacement of firstname + lastname fields of a premade* soldier pool.\n\nCurrently I have made 2 pools:\n\n* (Option 1) Use 1 origin character with a set appearance and clone it a bunch of times. Then rename all the clones with custom names. Make your own template or use premade Toms.bin\n\n* (Option 2) Using the Devs.bin pool. They have personalities/custom appearance made by the devs. The program can rename their last names so there's some custom appearance data compared to using Tom clones\n\nOfcourse you can also make your own pool (see details below), but this requires some effort\n\nResult when importing some names from names.txt:\n![Ingame result](img/screenshot_pool.png)\n\n## Requirements\n\nPython3.9+, no third party libs\n\nbot.py (not needed) requires pyautogui used to rename the ~140 dev soldiers to create a pool\nnotebook.ipynb (not needed) requires jupyter\n\n## Usage\n\nDecide on using Tom clones with similar appearance or Dev with more appearance variety. Alternatively you can create your own template, this requires some work (see below)\n\nInput names in names.txt (one name per line). The game limits first names to 11 characters and last names to 15 characters. The program will Error and show you which names are invalid and require renaming.\n\nTip: use google sheets formula `=LEN($B2)\u003c=15` returns FALSE is name length is invalid\n\nNames that have special characters(ó, ò, ê, ñ, ù, ç, ¿, ß, ...) may show up incorrectly.\n\nFirst and lastnames are seperated by default with `@:@`. Omitting a delimiter will default to Lastname with firstname as a `.`. You can specify your delimiter with the `--delimiter` option\n```\nname in names.txt -\u003e ingame\nAlice -\u003e '. Alice'\nFirstname@:@Lastname  -\u003e 'Firstname Lastname'\nSome@Thing -\u003e '. Some@Thing'\nJohn@:@ -\u003e 'John .'\n```\n\nExample of running the script for Toms\n```\npython3 modify_lastname.py --input data/Toms.bin --names names.txt --output Toms.bin\n```\n\nThe game loads/exports pools (.bin) here:\n`My Documents/My Games/XCOM2 War of the Chosen/XComGame/CharacterPool/Importable/`\nOpening/closing the menu is sufficient for the .bin to show\n```\nImportable/\n├── Developers.bin\n├── Devs.bin\n└── Toms.bin\n```\n\n## TODO\nThere's minimal customization options. I won't add more as it requires setting up a pool of soldiers with a specific name (see Pool creation below). The devs provide a pool which is available but the script will go sequentially and the appearance is never truly random. Extra .bin could be useful to make this process more random\n\n## (optional) Pool creation if creating custom clone \n\nCreate a character in the game. I require it to be named as follows:\n\nfirstname lastname `. tomaxlengthname`\n\nas the name is tied to the bytestring replacement\n\n\n️Name your custom pool exactly 4 characters long. Or it will change byte offsets.\n\nIf your pool like this ingame, the script can replace the names\n![Ingame result](img/screenshot_clones.png)\n\n## How? What bytestring do, shown for lastname overwriting \n\nImHex screenshot\n1, 2 numbers correlate with name length\nselected is the string itself\n\n![Im Hex screenshot](img/ImHex_screenshot.png)\n\nmodity bytestring [0x103,0x11D] of tomaxlengthname (Tom) to desired custom name and change the 2 numbers.\n\n### Examples of names with their bytestring\n\ntomaxlengthname (15) - Tom template\n```\n14 00 00 00 00 00 00 00 10 00 00 00 74 6F 6D 61 78 6C 65 6E 67 74 68 6E 61 6D 65\n```\n\ncustomname (10)\n```\n0F 00 00 00 00 00 00 00 0B 00 00 00 63 75 73 74 6F 6D 6E 61 6D 65\n\n```\n\ngirty (5)\n```\n0A 00 00 00 00 00 00 00 06 00 00 00 67 69 72 74 79\n```\n\n. (1)\n```\n06 00 00 00 00 00 00 00 02 00 00 00 2E\n```\n\n## Pseudo-random custom named soldiers\n\nRenaming uses the same trick as above. I must first nename the last name to \"tomaxlengthname\" and then loop through and replace some bytes.\n\nThere are 143 custom characters added by the Devs. I looped through every single one and renamed their first, last and nickname. A bot (included in the dir) did most of the work. It's not perfect but it does the job.\n\npythongui is a requirement if you want to run it\n\n## Resources:\n\nUE modding resources\nhttps://github.com/Buckminsterfullerene02/UE-Modding-Tools\n\nImHex - Written by WerWolv\n\n    A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.\n\nCutter - Written by Rizin\n\n    Free and open source RE platform\n    Decompiler, graph view, debugger, linear disassmbler, emulator, python scripting engine, plugins, binary patching, etc.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsogladev%2Fxcom2-custom-names","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsogladev%2Fxcom2-custom-names","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsogladev%2Fxcom2-custom-names/lists"}