X4: Foundations

File information

Last updated

Original upload

Created by

kuertee

Uploaded by

kuertee

Virus scan

Safe to use

About this mod

-Loot targeting AI: Target asteroids or containers with loot will highlight other containers with the same loot.
-Loot targeting AI: After breaking up an asteroid, the nearest asteroid of the same mineral is targeted.
-More efficient inventory loot mining: After an inventory loot is mined, every asteroid will drop the same inventory loot.

Requirements
Permissions and credits
Changelogs
Donations
Loot mining
https://www.nexusmods.com/x4foundations/mods/511
(Two mods: Loot targeting AI mod AND More efficient inventory loot mining mod)
by kuertee

Update
v6.2.001, 10 Sep 2023:
-Tweak: Finding the next asteroid to auto-target somtimes failed.

Mod effects
-Loot targeting AI: Target asteroids or containers with loot will highlight other containers with the same loot.
-Loot targeting AI: After breaking up an asteroid, the nearest asteroid of the same mineral is targeted.
-More efficient inventory loot mining: After an inventory loot is mined, every asteroid will drop the same inventory loot.

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.

How Loot targeting AI works (i.e. Mineral Finder software and Collectible Locator software)
-Feature 1: During a player mining session, a manually targeted loot (either an inventory loot or a cargo loot) is used as a target in a newly Guidance Mission. The Guidance Mission is listed in the Guidance Missions tab. It will attach itself to a relevant and active harvest mission. When the original, attached mission completes, the Guidance Mission also completes.
-New loot of the same type will be added to the mission as new targets.
-The mission will change its targets when the player manually targets another loot of a different type.
-Simply put, the targeting AI will add HUD targets to newly dropped loot of the same type during a player mining session.

-Feature 2: After the destruction of a targeted mineable asteroid, the nearest mineable asteroid with the same loot is auto-targeted.
-Simply put, after completely mining one asteroid, the targeting AI will set as a target the nearest mineable asteroid with the same loot as the last mineable asteroid targeted.

How More efficient inventory loot mining works
-During a player mining session, inventory loot that drops from asteroids are recorded.
-The amount of inventory loot from asteroids that natively drop the recorded inventory loot is doubled.
-On their destruction, asteroids that DIDN'T drop the recorded inventory loot WILL drop those missing inventory loot.
-Simply put, all asteroids, including empty asteroids, will drop inventory loot that was previously dropped by other asteroids during a player mining session.

The mining session
-A mining session starts when an asteroid is hit.
-A mining session ends 5 minutes after the last asteroid was hit.

Examples
-Spacefly eggs drop from an asteroid.
-Every asteroid during this mining session will drop spacefly eggs.
-Manually targeting a spacefly egg loot on the HUD or the map will create a mission that targets newly dropped spacefly eggs.

Extension options support
This is an optional feature that is available when SirNukes Mod Support APIs mod (https://www.nexusmods.com/x4foundations/mods/503) is installed.

When installed, these mod options can be customised:
-Enable/disable Loot targeting AI
-The maximum number of targets for the Loot targeting AI
-Enable/disable More efficient inventory loot mining
-Native inventory loot drop multiplier: Multiplier for inventory loot from asteroids that drop them. More efficient inventory loot mining is required. Defaults: 2.
-Missing loot drop multiplier: Multiplier for inventory loot from asteroids that don't drop them. More efficient inventory loot mining is required. Defaults: 1.

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

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
v6.0.002, 13 Apr 2023:
-Tweak: Version number update for consistency with my other mods. No internal changes since the last version.

v6.0.0004, 18 Feb 2023:
-Tweak: Your previous active mission will always be re-activated after you complete every looting/mining session. This tweak, for e.g., will now reactivate your previous mission after collecting all the loot the mod targeted.
-Note: This version should work with 6.x and 5.x of the base game.

v5.0.0013, 30 Mar 2022:
-Bug-fix: The mining session was ending early, prevening the More Efficient Inventory Loot feature to work.

v5.0.001, 18 Mar 2022:
-Tweak: The Loot Mining mission will not activate unless you have an asteroid targeted. This will prevent that mission from distracting you when your ship accidentally breaks apart an asteroid - e.g. while in shooting at enemies in combat around asteroid fields.

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.
-Bug-fix: mission description.
-Bug-fix: next loot container bug.
-Tweak: reactivate previous mission when mod is done.
-Tweak: mining laser turrets do not start the mining sessions.
-Tweak: stop mining session on dock.
-Bug-fix: destroy created objects left alone.

v1.2.2, 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.

v1.2.1, 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.
-Tweak: Better mission and objective descriptions to follow my other helper mods of Ship scanner, Signal leak hunter - increasing range, Station scanner, and Waypoint fields for deployments.
-Bug fix: Does not activate the attached mission unless the mod's mission is active.

v1.2.0, 1 Dec 2020:
-New feature: Loot Mining missions attach to active harvest missions. Attached Loot Mining missions complete when their original missions complete. Toggle between the two with the "Show original mission" and "Show Loot Mining mission" buttons.
-Tweak: Better mission notifications.

v1.1.2, 6 Jun 2020:
-New feature: Loot targeting AI: After the destruction of a targeted mineable asteroid, the nearest mineable asteroid with the same loot is auto-targeted.
-Tweak: The maximum number of targets for the Loot targeting AI is set to 25.
-Bug-fix: Updating the targeted collectible asteroids on their collection.
-Tweak: get_safe_pos tweaks for the created extra loot.
-Tweak: Ensure Init cue is in waiting state.

v1.1.1, 03 Jun 2020:
-Bug-fix: adding targeted loot to Loot Targeting AI sometimes fails.
-Tweak: cleaned-up cue instantiations.

v1.1.0, 01 Jun 2020:
-The Loot targeting AI targets all loot within 10km of the player when first activated.
-The type of loot, the number of collectibles targeted, and the amount in the ship or your inventory are displayed in the mission console.

v1.0.0, 30 May 2020: Initial release