0 of 0

File information

Last updated

Original upload

Created by

Trajan von Olb

Uploaded by

TrajanVonOlb

Virus scan

Safe to use

Tags for this mod

About this mod

Improves Egosoft's targeting and adds many new ways to find and unlock targets using additional hotkeys. The selection of targets "in line of sight" has also been significantly improved, so that even distant targets can be selected precisely without a mouse.

Requirements
Permissions and credits
Changelogs
MORE HOTKEYS: ADVANCED TARGETING
------------------------------------------------------------------------------------

by Trajan von Olb
 
 
ATTENTION!

Only works with SirNukes "Mod support apis" (or Steam) incl. Pipe-Server! To assign the keys, a game state MUST beactive (new or loaded) - but the settings apply to all game states afterwards. PLEASE THEN DELETE THE EGOSOFT KEY ASSIGNMENTS AND REPLACE THEM WITH THOSE OF THE MOD! (Unfortunately, I did not succeed in replacing the Egosoft routines, but if you can, help is welcome).

UPDATE: Unfortunately, the SirNukes hotkey engine no longer works. However, the basic functionality of the hotkeys is still guaranteed, you just can no longer set them in the menu!
There is therefore a workaround below.

 
MORE HOTKEYS: ADVANCED TARGETING improves Egosoft's target switching and adds many new ways to find and select targets using additional hotkeys, such as incoming missiles or owned ships. Line-of-sight target selection has also been improved, allowing ships, surface elements, factories and gates to be brought into focus much more precisely. Large, visible targets (gates, factories) can now be selected from a long distance without using the mouse, but remain unknown to the player if the distance is too great for detection. Overall, the range is now based on the radar, apart from named large targets.

Basically, the mechanics of how targets are switched through have been changed. "Next target" and "Previous target" now always follow the rules of the previously activated target (exception: line of sight, mouse selection of a target or if no target was activated before). After selecting enemies, these buttons will continue to switch through enemies, after selecting own ships, only own ships, etc. This is valid as long as one of these targets is in focus and is interrupted if a) a target is selected with the mouse, b) a target is switched on via "in the line of sight", c) the target has been lost in some way, e.g. it has been destroyed or has disappeared from the sector or d) the target has been deselected with "no target". In these cases and at the start of the game, targeting goes into rule-free mode: If no target is selected, the closest target to the player ship (ship, station, gate, enemy, asteroid, treasure chest) is selected. If a target is already in focus, the target that is further away or closer is switched on.

The surface elements have a special status. These modes are activated either by the corresponding keys or when a surface element is selected by "in the line of sight" or with the mouse. If the surface element is destroyed, the surface mode is NOT deactivated, whereby e.g. "next target" selects the next surface element again. The mode is only interrupted by switching on a target that is NOT a surface element or by actively deselecting the target with the corresponding key or the mouse (click into the void).

For the special modes of the surface elements (engines, weapon towers and shield generators), a fall-back system applies after the destruction of the target, i.e. as long as you switch on an element of the same type with the mouse or "in the line of sight", the mode remains. If an element of a different type is switched on or if no corresponding element is left, all surface elements are switched through again from then on; if this is not possible, the target switching changes back to the rule-free mode. The aim of this mechanism is to logically support the preparation for boarding while maintaining full control.

It all sounds more complicated than it is - just try it out! All functions were created according to criteria of usability and logic and should be very easy to use.


ADDED HOTKEYS:

LINE OF SIGHT
- selects a target directly under the target cross in the centre of the screen. In doing so, the target acquisition first searches precisely in the centre. If no target is found, the search angle is increasingly widened in several steps up to 25 degrees. This means that the central targets are always reliably selected, but you still have the effect as with the Egosoft search that targets in front of the ship in the vicinity can also be found well. Even distant targets are selected if they are large and visible: Gates and factories always, Capital ships at double radar visibility. Surface elements are found in this way from 8km (if you want to search for surface elements further away, you can use the corresponding keys that refer to the current target). If a surface element is switched on in this way, the target detection changes to the mode "surface elements".

SELECT NEXT TARGET - switches to the next target in order of distance, following the rules of the previously active mode. If no mode was active, the next target within range is switched on or the next target after the respective switched on target.

SELECT PREVIOUS TARGET - like "next target".

SELECT NO TARGET - deletes the current destination from the target detection and resets the current mode to "no filter".

ENEMIES - switches on the nearest enemy and changes to "enemies" mode.

MISSILES - unlocks the nearest missile targeting the player and switches to "Missiles" mode.

ENEMIES XS-M - unlocks the nearest XS, S and M sized enemy and switches to the corresponding mode.

ENEMIES L-XL - unlocks the nearest enemy of size L and XL and switches to the corresponding mode.

OWN SHIPS - Captures nearest owned ship and enters corresponding mode.

OWN SHIPS FOR LANDING - targets nearest owned ship that can be landed on with the player ship. This makes it possible to quickly retreat to the nearest capital ship with a fighter despite a confusing overview situation (possibly linking the command to obtaining a landing permission in the future to show the green dots). Also change to the appropriate mode.

STATIONS - detects nearest station and switches to the appropriate mode.

GATES - senses nearest highway, accelerator or nearest jump gate and enters the appropriate mode.

COLLECTABLES - detects nearest collectable. This includes asteroids with "contents", e.g. space fly eggs and switches to the appropriate mode.

ASTEROIDS - detects nearest asteroids and switches to the corresponding mode. This function is intended for manual mining.

SURFACE ELEMENTS - captures the nearest surface element of the current target. If no current target is selected, the next surface element of the closest object is selected. Switches to "Surface Elements" mode.

SURFACE ELEMENTS: ENGINES - same as surface elements, but only engines are detected. Switches to "Surface Elements" mode with "Engines" filter.

SURFACE ELEMENTS: TURRETS - same as surface elements, but only turrets are detected. Switches to "Surface Elements" mode with "Turrets" filter.

SURFACE ELEMENTS: SHIELD GENERATORS - like surface elements, but only shield generators are detected. Switches to "Surface Elements" mode with "Shield Generators" filter.


COMPATIBILITY

The MOD is savegame compatible. It should work with all other mods as long as they do not bring their own targeting.


REQUIRED OTHER MODS

SirNukes Mod Support APIs (or on steam).
SirNukes Python pipe server (exe version recommended)


HIGHLY RECOMMENDED MODS / SETTINGS

Stations, Ships and Effects Draw Distances (for more visibility, especially of stations!).
Basically, setting the maximum visibility is recommended!


MORE HOTKEYS series

The "MORE HOTKEYS" series adds many more hotkeys to the game. The aim is that HOTAS and joystick players will need to use the mouse less often, making the experience of being in space feel more direct. Some Parts add extra equipment, giving the game new features.
PARTS:
MORE HOTKEYS: ADVANCED TARGETING (released).
MORE HOTKEYS: MAP AND MENUS (in progress)
MORE HOTKEYS: WING MANAGEMENT (presumably obsolete due to the MOD Wing Hotkeys)
MORE HOTKEYS: FAVORITES (in planning)
MORE HOTKEYS: EQUIPMENT AND MISC (in progress, will be expanded in the long term, suggestions are welcome at ...)


INSTALLATION / SETUP

1. download SirNukes Python-Pipe-Server, unpack it into a directory of your choice and always start it before starting the game (according to SirNukes, the tool only collects keystrokes when X4 is currently in focus, i.e. you are playing)
2. download the mod file and copy the folder "tvo_more_hotkeys_adv_targeting" into the directory "extensions" in the Egosoft folder, normally under C:\Program Files (x86)\Steam\steamapps\common\X4 Foundations\extensions, for presupposed as well as recommended MODS proceed in the same way!
3. start the pipe server
4. start game
5. load savegame / start new game (otherwise you can't set up keys for mods)
6. delete all key assignments for targeting from Egosoft
7. assign keys (at the very bottom of the menu), watch out for duplications - with mods there is no query as to which keys have already been used.
8. have fun ?

WORKARROUND for the Hotkey API (SirNukes)!

unfortunately the hotkey function is switched off from version 1.89 of SirNukes Mod-Api. However, there is a workaround that I have found.
Admittedly, this is not very user-friendly, but it reliably restores the hotkey functionality (status: game version 7.10, MOD-API 1.90).
You have to:

1. deactivate the Steam mod download in the game
2. back up the complete MOD folder!
3. Empty the mod folder completely and only leave the following mods in it:
- DLC
- All mods that access the hotkey api and define hotkeys
- SirNukes Mod Support Apis in version 1.88 (!)
- Kuertee's UI Extensions and HUD in a version that is compatible with 6.2 (I use a version from February 2024; if necessary, ask Kuertee, maybe he offers it for DL)
4. downgrade the game to 6.20 (select BETA in the game settings on Steam, then you can set the downgrade there)
5. start the game, switch on extensions in the menu if necessary
6. Start a new savegame
7. set the keys for the hotkey mods IN THE GAME (there is no other way), save for safety (don't know if this is necessary), exit the game
8. upgrade the game to 7.10 (in Steam in the settings, see above)
9. empty the MOD folder and restore the one saved under 2), leave the DLCs alone, make sure that SirNukes Mod Support Apis version 1.90 is installed
10. start the game, enjoy the hotkeys :-)

For your information: It is quite possible that the hotkey settings are still completely ok and you don't have to do anything at all, just install 1.90 Mod Apis and access the hotkeys. But then you can't change anything!

It looks like the data is in the documents --> Egosoft --> X4 --> strange number --> uidata.xml ! However, it is very cryptic there, it does not seem to be an ASCII code, but a corresponds to ‘1’ etc... But if you want, you can experiment with it and then write in the discussion what you have found out.


UNINSTALLATION

1. delete the folder "tvo_more_hotkeys_adv_targeting" in the extensions folder in the game directory.
2. restore key assignment for targeting from Egosoft.


MANY THANKS TO:

- SirNukes for the hotkey support, without which this mod would have been pointless
- Forleyor for basics and the LUA code
- Kuertee, without whose patient answers to my endless beginner questions I would be much, much dumber!
- Egosoft for the intrinsically wonderful game, but still in need of improvement, the great music of all parts and the fantastic graphics!


HISTORY:

1.0, 2021-05-31
- Initial Release

1.1, 2021-06-03
- Error corrected: Enemies were all found when the enemy button was pressed,
but afterwards only ships were switched through, no laser turrets etc.
- Change: Enemies are now only found up to radar range, if they are
capitalships or already known, they can be found up to double radar range.
- Small text errors corrected