"find_object_component class module" question

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

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

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

"find_object_component class module" question

Post by kuertee »

Does "find_object_component" for the "class.module" find ALL buildable components attached to the station - including those destroyed and those queued for new builds?

I.e. this code:

Code: Select all

<find_object_component name="$Modules" object="$Station" class="class.module" multiple="true" />
Mysterial
Posts: 663
Joined: Wed, 6. Nov 02, 20:31
x4

Re: "find_object_component class module" question

Post by Mysterial »

The default for the top-level filter is checkoperational="true" which means it will not return wrecked or constructing items.

No matter what, elements of the construction sequence that have not ever been built and are not in progress will not be found. The module object isn't created in constructing state until it is the next item to build.

If you want to get the list of module macros that will eventually exist, you need to iterate the station's plannedconstruction.sequence
kuertee
EGOSOFT
EGOSOFT
Posts: 818
Joined: Sun, 14. Dec 03, 13:05
x4

Re: "find_object_component class module" question

Post by kuertee »

Excellent! Thank you.

Return to “X4: Foundations - Scripts and Modding”