Find mission objects directly with Find_Object - how?

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
Trajan von Olb
Posts: 544
Joined: Wed, 4. Feb 04, 21:39
x3tc

Find mission objects directly with Find_Object - how?

Post by Trajan von Olb » Sat, 1. Oct 22, 22:13

Hi,

with my More Hotkeys - Advanced Targeting I have redefined targeting, and it actually works great (who wants to use SirNuke's Python tool).

But now I noticed that sometimes mission targets are "empty space" or ships cannot be switched on as mission targets (because they are too far away). I don't even want to talk about mines that are not recognised. Finally, I also find a hotkey good: "next mission target".

But how do I find these things? I work with "Find_Object" etc., is there perhaps some entry with "match" that I can use? How do the quest objects define themselves and how do I find them?

Thanks for answers. I would really like to extend the goal finding, I'm annoyed myself that I now have to take the mouse in my hand again every time for a mission, and that's exactly what I wanted to avoid :-)

Greetings

Trajan von Olb

Translated with www.DeepL.com/Translator (free version)
Mein Traum vom Glück ist der Traum von einer anderen Menschheit. (S. Lem)

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: Find mission objects directly with Find_Object - how?

Post by kuertee » Sun, 9. Oct 22, 03:50

Unfortunately, I don't think that's easy to do.

Mission targets (object or point in space) are saved in each mission.
To access them, you need to have the mission script reference.
And I don't think there's a register of all active missions that is accessible via the MD.
And when you do have that mission's script, you need to know which variable to access. They can be built differently.

But you can access the current active mission's autopilot target in the MD with: "player.activemissionwaypoint".
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

Trajan von Olb
Posts: 544
Joined: Wed, 4. Feb 04, 21:39
x3tc

Re: Find mission objects directly with Find_Object - how?

Post by Trajan von Olb » Sun, 9. Oct 22, 21:15

Thank you very much! That should already help!

Can this variable theoretically also contain several waypoints (as with mines or laser towers), i.e. as an arrey? And - please excuse my lack of expertise - how do I tell e.g. "find object" to search EVERYWHERE, i.e. without any class at all? Alternatively, what "class" does "empty space" have?

Thanks as always for answers :-) You are great!

Greetings

Trajan von Olb

Translated with www.DeepL.com/Translator (free version)
Mein Traum vom Glück ist der Traum von einer anderen Menschheit. (S. Lem)

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: Find mission objects directly with Find_Object - how?

Post by kuertee » Mon, 10. Oct 22, 02:17

Unfortunately, no.
player.activemissionwaypoint is only the autopilot's next waypoint to its destination.
when a mission is active, and the mission script has set an object or position in space as a mission target or destination, then player.activemissionwaypoint guides the autopilot to that object or position.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

Post Reply

Return to “X4: Foundations - Scripts and Modding”