X4: Foundations
0 of 0

File information

Last updated

Original upload

Created by

kuertee

Uploaded by

kuertee

Virus scan

Safe to use

About this mod

-When using the spaceship scanner, modules that need the spacesuit scanner are targeted.
-When using the spacesuit scanner, the closest module with an incomplete scan is targeted. Follow this trail of targets to scan the station.

Requirements
Permissions and credits
Changelogs
Donations
Station scanner
https://www.nexusmods.com/x4foundations/mods/496
(previously named Report scan requirement)
by kuertee

Update
v6.0.002, 13 Apr 2023:
-Tweak: Version number update for consistency with my other mods. No internal changes since the last version.

Mod effects
-When using the spaceship scanner, modules that need the spacesuit scanner are targeted.
-When using the spacesuit scanner, the closest module with an incomplete scan is targeted. Follow this trail of targets to scan the station.

Requirements
-SirNukes Mod Support APIs mod (https://www.nexusmods.com/x4foundations/mods/503) - for Lua Loader and Simple Menu Options
-Kuertee's UI Extensions mod (https://www.nexusmods.com/x4foundations/mods/552) - Modded Lua files with callbacks to allow more than one mod to change the same UI element. Specifically for this mod, UI Extensions allows for actual missions to be listed in the Guidance Missions tab. Enables the Set Active and Set Inactive buttons in the Guidance Missions tab. Without this mod, you won't be able to switch between the missions listed in the Guidance tab because those buttons are disabled in the base game.

Recommended companion mods
Here are all my quality-of-life mods. All these mods' missions are listed in the Guidance Missions tab. Use my mod, UI extensions (https://www.nexusmods.com/x4foundations/mods/552), to enable the Set Active and Set Inactive buttons in Guidance Missions. Otherwise, you won't be able to switch between them manually.
-Loot mining (https://www.nexusmods.com/x4foundations/mods/511): During a player mining session, manually targeting loot activates the targeting AI to target all others of the same loot. After the destruction of a targeted mineable asteroid, the nearest mineable asteroid with the same loot is auto-targeted.
-Ship scanner (https://www.nexusmods.com/x4foundations/mods/591): The Ship Scanner is a targeting AI that continually targets unscanned ships after the completion of a ship scan until all ships in your vicinity are scanned.
-Signal leak hunter - increasing range (https://www.nexusmods.com/x4foundations/mods/498): Scans for and targets signal leaks and/or repair panels within an ever-increasing range.
-Station scanner (https://www.nexusmods.com/x4foundations/mods/496): When using the spaceship scanner, modules that need the spacesuit scanner are targeted. When using the spacesuit scanner, the closest module with an incomplete scan is targeted. Follow this trail of targets to scan the station.
-Surface element targeting (https://www.nexusmods.com/x4foundations/mods/710): Auto-targets the next surface element after destruction of the last. Find All surface elements of the same type.
-Waypoint field for deployments (https://www.nexusmods.com/x4foundations/mods/585): Creates waypoints that you and your wingmen can follow to deployment equipment and weapons.

3rd-party mod compatibility
===========================
Use this code to disable the mod's mission from become active when enabling scan mode:
<cue name="DisableStationScanMissionAutoActivate">
<conditions>
<event_cue_signalled cue="md.Setup.GameStart" />
<event_game_loaded />
</conditions>
<cues>
<cue name="DisableCrime_interval" instantiate="true" checkinterval="5s">
<actions>
<do_if value="@md.kuertee_station_scanner.DisableMissionAutoActivate.exists">
<run_actions ref="md.kuertee_station_scanner.DisableMissionAutoActivate" />
<reset_cue cue="parent" /><!-- readies DisableCrime for the next event_game_loaded and cleans this interval altogether -->
</do_if>
<cancel_cue cue="this" /><!-- cleans this interval instance -->
</actions>
</cue>
</cues>
</cue>

Use this code to re-enable the mod's mission become active when enabling scan mode:
<run_actions ref="md.kuertee_station_scanner.EnableMissionAutoActivate" />

How the mod works
-Activates when the scanner is activated.
-A Guidance Mission is created for the scan and will be listed in the Guidance Missions tab. It will attach itself to a relevant and active scan mission. When the original, attached mission completes, the Guidance Mission also completes.
-The mission also completes when 100% of the station is scanned.
-The mission is aborted when you fly away from the station.
-The scan level requirement of a scanned module is reported with a notification: 'Scan level: X, Requires: Y.'
-Modules that need deeper scans are targeted.
-When using the spacesuit scanner, the next nearest module that needs to be scanned is also targetted at every successful scan.
-Modules that have not been scanned are highlighted bright-red.
-'Signal leak hunter - increasing range' (my other mod) is automatically activated when the mission completes or is aborted.

How to scan a station and signal leaks to completion
(https://www.nexusmods.com/x4foundations/articles/46)
A workflow to scanning stations using two mods:
Signal Leak Hunter - increasing range: https://www.nexusmods.com/x4foundations/mods/498
Station Scanner: https://www.nexusmods.com/x4foundations/mods/496

-Activate the ship scanner. With the Signal Leak Hunter mission active, fly around the station, hunting for signal leaks, and scanning undiscovered modules.
-Leave signal leaks that are unreachable by ship for now. Stay in the ship and continue hunting for signal leaks and scanning undiscovered modules.
-You can switch between the Signal Leak Hunter mission and the Station Scanner mission to see targeted signal leaks and to see targeted modules anytime. For this workflow, switch to the Signal Leak Hunter mission before you continue hunting for signal leaks and scanning undiscovered modules.
-When all possible signal leaks are detected and scanned, and all undiscovered modules scanned, exit the ship and spacewalk.
-Activate the spacesuit scanner. Spacewalk and scan the remaining signal leaks that were unreachable by ship.
-When absolutely all signal leaks are detected and scanned, the Station Scanner mission will automatically activate, showing all modules that it detected to need the spacesuit scanner.
-Spacewalk to these modules to scan them. As you complete each scan, the Station Scanner will detect and target the nearest module with an incomplete scan. Follow this trail of targets until the Station Scanner stops detecting incomplete modules.
-At this time, the station scan level is at 100% and all its signal leaks have been detected.

A recap from the X4 manual
(https://www.egosoft.com:8444/confluence/display/X4WIKI/Ships+And+The+Playership#ShipsAndThePlayership-ShipModes)
-'Getting really close to a station module passively obtain information about it.'
-'The amount of information gained being proportional to the type of scanner equipped (Basic Scanner < Police Scanner < Spacesuit Scanner < upgraded Spacesuit Scanner).'

What those two points mean
Flying by a module scans it. Note that undiscovered modules are highlighted when the scanner is active.

There are several scan levels and some modules require a specific scan level:
Basic ship scanner = scan level 0
Police ship scanner = scan level 1
Spacesuit scanner = scan level 2
Upgraded spacesuit scanner = scan level 3

Unfortunately, the highlights of undiscovered modules are removed even when they are ONLY partially scanned - regardless of whether they require the spacesuit scanner. This makes it difficult to identify modules that need the spacesuit scanner.

Install
-Unzip to 'X4 Foundations/extensions/kuertee_station_scanner/'.
-Make sure the sub-folders and files are in 'X4 Foundations/extensions/kuertee_station_scanner/' and not in 'X4 Foundations/extensions/kuertee_station_scanner/kuertee_station_scanner/'.

Uninstall
-Delete the mod folder.

Troubleshooting
===============
(1) Do not change the file structure of the mod. If you do, you'll need to troubleshoot problems you encounter yourself.
(2) Allow the game to log events to a text file by adding "-debug all -logfile debug.log" to its launch parameters.
(3) Enable the mod-specific Debug Log in the mod's Extension Options.
(4) Play for long enough for the mod to log its events.
(5) Send me (at [email protected]) the log found in My Documents\Egosoft\X4\(your player-specific number)\debug.log.

Credits
Kuertee.
Chinese localisation by Tiomer.

History
v4.1.0, 06 Nov 2021:
-Tweak: Mission notifications from this mod is displayed in the left-side console window only if you have this mission active.

v2.0.2, 11 Jul 2021:
-Bug-fix: The mission wasn't auto-activating, a bug added in the last version.

v2.0.1, 03 Jul 2021:
-Compatibility: 3rd-party mods can disable this mod's mission automatically become active when enabling scan mode. See the "3rd-party mod compatibility" section below.

v2.0.0, 11 Mar 2021:
-New feature: updated for v4.0.0 beta 11 of the base game.
-Tweaks: Cleaned-up unnecessary localisation files. Rewrote content.xml manifest file.

v1.2.7, 17 Dec 2020:
-Bug-fix: Guidance Mission bugs: "Set to active" and "Set to inactive" buttons are now available. The required UI Extensions file, kuertee_menu_map.lua, wasn't getting loaded. It worked in my environment because I have other mods that loaded that file.
-Bug-fix: Attaching X4 scan missions to the Scan Station mission still failed - sometimes.

v1.2.6, 14 Dec 2020:
-Bug-fix: Attaching X4 scan missions sometimes failed.

v1.2.5, 8 Dec 2020:
-New feature: The mod's mission is now listed in the Guidance Missions tab, keeping your Plot Missions free of the helper missions created by my various mods. I recommend the use of my Ui Extensions mod (https://www.nexusmods.com/x4foundations/mods/552). Without this mod, you won't be able to switch between the missions listed in the Guidance tab.
-New feature: The Guidance Mission is listed in the Guidance Missions tab. It will attach itself to a relevant and active scan mission. When the original, attached mission completes, the Guidance Mission also completes.
-Tweak: Better mission and objective descriptions to follow my other helper mods of Loot mining, Ship scanner, Signal leak hunter - increasing range, and Waypoint fields for deployments.

How to update from previous versions
Do a clean-save of the previous version before installing this.

To perform a clean-save:
1. Delete the previous version from the file system.
2. Load a game. Save the game. This is the clean-save file. It doesn't contain data from the previous version.
3. Install the new version.
4. Load and play from the clean-save file.

v1.2.4, 2 Nov 2020:
-Tweak: Better user experience with the mission not activating if you have an active target (i.e. not the mission target, but the white soft target).

v1.2.3, 28 Aug 2020:
-Bug-fix: In previous versions, the mission sometimes terminates prematurely - even if you have more components to scan.
-Cleaner integration with the Mission Briefing screen. It was a bit clunky in previous versions.

Update from the previous version
Do a clean-save of the previous version before installing this.
How to do a clean-save:
1. Delete the previous version from the file system.
2. Load a game.
3. Save the game. This is the clean-save. Load this after installing the new version.

v1.2.2, 23 Jul 2020:
-Tweak: The scanning mission is not automatically activated if another scan objective is active.

v1.2.1, 6 Jun 2020:
-Bug-fix: The mission was being created and immediately removed when the scanner is activated and no station is nearby.
-Tweak: Ensure Init cue is in waiting state.
-Tweak: Cleaned-up cue instantiations.

v1.2.0, 23 May 2020:
-Bug-fix: In the previous version, a scan mission is created after a conversation.
-Tweak: When spacewalking, only the closest module with an incomplete scan is targeted. This is more clearly a "trail of targets" compared to the previous version when modules detected by the ship scanner are also targeted.
-Tweak: In some instances, getting a station to be scanned at 100% could be impossible. In these instances, the mission ends when no further incomplete modules are detected. In the previous version, the mission ends only when the station is scanned at 100%.

v1.1.0, 15 May 2020:
-A mission journal is created for the scan.
-The mission completes when 100% of the station is scanned.
-The mission is aborted when you fly away from the station.
-Modules that need deeper scans are targeted.
-When using the spacesuit scanner, the next nearest module that needs to be scanned is also targetted at every successful scan.
-Signal leak hunter - increasing range (my other mod) is automatically activated when the mission completes or is aborted.

v1.0.0, 12 May 2020: first release.