{"id":22900337,"url":"https://github.com/vectorial1024/v1024_civilian_fleets","last_synced_at":"2025-08-12T04:30:43.441Z","repository":{"id":38452487,"uuid":"201013952","full_name":"Vectorial1024/v1024_civilian_fleets","owner":"Vectorial1024","description":"Create civilian fleets to help manage your traders and miners.","archived":false,"fork":false,"pushed_at":"2024-06-23T08:56:17.000Z","size":1449,"stargazers_count":18,"open_issues_count":7,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-24T08:48:17.265Z","etag":null,"topics":["mod","x4foundations"],"latest_commit_sha":null,"homepage":"https://www.nexusmods.com/x4foundations/mods/335","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vectorial1024.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-08-07T09:06:17.000Z","updated_at":"2024-06-23T08:56:20.000Z","dependencies_parsed_at":"2023-02-08T05:15:58.651Z","dependency_job_id":"e32f0ab4-e876-43df-a76a-5d98d22b6d12","html_url":"https://github.com/Vectorial1024/v1024_civilian_fleets","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vectorial1024%2Fv1024_civilian_fleets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vectorial1024%2Fv1024_civilian_fleets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vectorial1024%2Fv1024_civilian_fleets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vectorial1024%2Fv1024_civilian_fleets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vectorial1024","download_url":"https://codeload.github.com/Vectorial1024/v1024_civilian_fleets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229633773,"owners_count":18101909,"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":["mod","x4foundations"],"created_at":"2024-12-14T01:19:07.514Z","updated_at":"2024-12-14T01:19:08.131Z","avatar_url":"https://github.com/Vectorial1024.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Civilian Fleets: Mimicry Extension\nCreate civilian fleets to help manage your traders and miners.\n\n![Assigning ships to form civilian fleets in v2.6](https://i.imgur.com/Avpw0Rk.png)\n\n\u003e Civilian Fleets: that's how simple it is! (the above screenshot was taken in X4 Foundations v2.6 with this mod active)\n\n- The successor of Mining Trading Fleets\n  - Their Nexus page: https://www.nexusmods.com/x4foundations/mods/191\n  - Their EgoSoft page: https://forum.egosoft.com/viewtopic.php?f=181\u0026t=410087\n- Our GitHub repository: https://github.com/Vectorial1024/v1024_civilian_fleets\n- Our Nexus page: https://www.nexusmods.com/x4foundations/mods/335\n- Our EgoSoft Forums page: https://forum.egosoft.com/viewtopic.php?f=181\u0026t=418144\n- Our Steam Workshop page: https://steamcommunity.com/sharedfiles/filedetails/?id=2092839403\n\nNOTE: this mod is now archived; see `CLOSING.md` in the repo for more details, such as:\n- why archive?\n- what to do to transition to vanilla Mimic fleets?\n\n## Credits to the Community\nWithout the help from the community, this mod will not be available in other languages.\n- French translation // Traduction en français par les membres de la communauté\n  - GitHub user abouquet\n  - EgoSoft Forums user o-papaya-o\n- German translation // Deutsche Übersetzung von Community-Mitgliedern\n  - GitHub user LeLeon\n- Japanese translation // コミュニティメンバーによる日本語翻訳\n  - GitHub user proudust\n- Chinese translation // 自帶中文翻譯\n  - Self-translated\n\n\n## Quick Start Guide\nYou should check the Nexus page for more details, but, if you want to form/join a civilian fleet:\n\n1. Set and confirm the default behavior of the fleet leader; the default behavior of the fleet leader will be applied to other members of the civilian fleet\n2. Select and assign your other ships as \"Mimic\" role (refer to the attached pic above)\n3. Setup complete\n4. Forget about the fleet\n5. ???\n6. Profit.\n\n## Requirements\n- ~~Right Click API~~\n  - No longer required! All things now rely on SirNukes Mod Supprot APIs, which is described below:\n- SirNukes Mod Support APIs\n  - Required: allows you to configure some parts of this mod\n  - ~~Required: also allows adding the right-click menus~~ No longer used for this purpose since everything is now based on the Mimic assignment\n  - Their Steam Workshop page: https://steamcommunity.com/sharedfiles/filedetails/?id=2042901274\n\n## Built-In Cross-Mod Compatibility\nThis mod also supports the following civilian default behaviors from other mods as part of the built-in features:\n\n- TaterTrade (maintained by DeadAirRT)\n  - Their GitHub repository: https://github.com/DeadAirRT/TaterTrader\n  - Their Steam Workshop page: https://steamcommunity.com/workshop/filedetails/?id=2082610969\n- Mules and Warehouses Extended\n  - Their GitHub repository: https://github.com/Misunderstood-Wookiee/Mules-and-Warehouses-Extended\n  - Further instructions available at their GitHub readme\n- Sanity: Sector Miner\n  - Their GitHub repository: https://github.com/DeuxAlpha/sanity_sector-automine\n  - Their Steam Workshop page: https://steamcommunity.com/sharedfiles/filedetails/?id=2098605344\n  - Their EgoSoft Forums page: https://forum.egosoft.com/viewtopic.php?t=427342\n- Factory Transporter\n  - Their Steam Workshop page: https://steamcommunity.com/sharedfiles/filedetails/?id=2321672179\n\nFor mod makers, other mods can be made compatible to Civilian Fleets; more information below.\n\n## Ensuring Compatibility with Civilian Fleets\nDue to the way Civilian Fleets work, it cannot automatically detect other aiscript files that should also be used.\n\nTo make Civilian Fleets use your custom aiscript, do the following:\n\n### 0. Prepare some other things\nCivilian Fleets will need the following, so prepare them first:\n\n- Fleet names to be displayed in the GUI (users can choose to not get auto-generate fleet names)\n  - You can check other guides on how to create translation strings; or you can just hard-code a (English) name, it will also work\n\n### 1. Tell us the fleet name of your custom aiscript\nCreate a Mission Director file in `/md`, then do the following:\n\n1. Listen to the \"CivilianFleets_SettingUp\" cue\n2. Add your \"aiscript ID\"-\"fleet name\" pair to the Civilian Fleets global variable\n\nFor example:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\" ?\u003e\n\u003cmdscript name=\"External_CivilianFleetCompat\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"md.xsd\"\u003e\n  \u003ccues\u003e\n    \u003c!-- Example cue using the existing Sanity Miners compatibility code --\u003e\n    \u003ccue name=\"RegisterFleetNames\" instantiate=\"true\"\u003e\n      \u003cconditions\u003e\n        \u003cevent_cue_signalled cue=\"md.V1024_CivilianFleets.CivilianFleets_SettingUp\" /\u003e\n      \u003c/conditions\u003e\n      \u003c!-- Delay a bit to let the original cue complete its actions --\u003e\n      \u003cdelay exact=\"1s\" /\u003e\n      \u003cactions\u003e\n        \u003c!-- [$aiscriptId, $fleetNameString] --\u003e\n        \u003cappend_to_list name=\"global.$civFleet_CmdTagPairs\" exact=\"['Sanity_SectorAutoMine', {221024, 2001}]\" /\u003e\n      \u003c/actions\u003e\n    \u003c/cue\u003e\n  \u003c/cues\u003e\n\u003c/mdscript\u003e\n```\n\n### 2. Tell us how to copy the details of your custom aiscript\nSometimes, some parameters of your aiscript become meaningless when ships start working uner a fleet. This means that you must tell us how fleet members should receive the aiscript parameters.\n\nCreate the Mission Director patch-file `/extensions/v1024_civilian_fleets/md/civilianfleets_signals.xml`, then do the following:\n\n1. Check whether your aiscript is a mining aiscript; this will affect the patch location \n2. Append your condition check to the correct if-then-else block that checks for aiscript IDs\n3. Add your create-command-for-subordinate inside the conditional block\n\nFor example, if you are adding a is-mining aiscript:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\" ?\u003e\n\u003cdiff\u003es\n  \u003cadd sel=\"/mdscript/cues/cue[@name='Signal_SyncOrders_MimicryExtension']/actions/do_if[@value='($fromShip.primarypurpose == purpose.mine) and ($toShip.primarypurpose == purpose.mine)']/do_else[1]\" pos=\"before\" comment=\"For is-mining aiscript\"\u003e\n    \u003cdo_elseif value=\"$fromShip_DefaultOrder.id == 'YourOrderID'\"\u003e\n      \u003ccreate_order object=\"$toShip\" id=\"'YourOrderID'\" default=\"true\"\u003e\n        \u003cparam name=\"exampleparam\" value=\"$fromShip_DefaultOrder.$exampleparam\" /\u003e\n      \u003c/create_order\u003e\n    \u003c/do_elseif\u003e\n  \u003c/add\u003e\n\u003c/diff\u003e\n```\n\nFor example, if you are adding a non-mining aiscript:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\" ?\u003e\n\u003cdiff\u003e\n  \u003cadd sel=\"/mdscript/cues/cue[@name='Signal_SyncOrders_MimicryExtension']/actions/do_else[1]\" pos=\"before\" comment=\"For non-mining aiscript\"\u003e\n    \u003cdo_elseif value=\"$fromShip_DefaultOrder.id == 'YourOrderID'\"\u003e\n      \u003ccreate_order object=\"$toShip\" id=\"'YourOrderID'\" default=\"true\"\u003e\n        \u003cparam name=\"exampleparam\" value=\"$fromShip_DefaultOrder.$exampleparam\" /\u003e\n      \u003c/create_order\u003e\n    \u003c/do_elseif\u003e\n  \u003c/add\u003e\n\u003c/diff\u003e\n```\n\n### Patch finished!\nWe should test that the patch works.\n\nYou can launch the game and assign ships to others using the `Mimic` menu, and you should see that your new fleet subordinates are not using the `Mimic` command, but your actual custom aiscript command instead.\n\nIf that is the case, then congratulations! You have successfully made your custom aiscript compatible with Civilian Fleets. Your mod users will now also enjoy the benefits of the Civilian Fleets mod, e.g. persistent fleet orders.\n\n## Other Stuff\nThis serves as an important reminder to never skip steps, respect legacy methods, and never make breaking updates without auto-fixes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvectorial1024%2Fv1024_civilian_fleets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvectorial1024%2Fv1024_civilian_fleets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvectorial1024%2Fv1024_civilian_fleets/lists"}