Hey everyone,
I want to analyze my savefiles and wonder what the difference between both tags is. Any idea?
Take care
Alex
Difference between <ship> and <component class="ship">
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 2
- Joined: Wed, 17. Feb 21, 14:59
Re: Difference between <ship> and <component class="ship">
Welcome Varghammer
A ship can be a component of an object, like a station. For example:
in which case it is "tagged" as a component. I hope that answers your question.
Cheers Euclid
A ship can be a component of an object, like a station. For example:
Code: Select all
<find_object_component name="$DockedShips" object="$Station" class="class.ship" docked="true" checkoperational="true" multiple="true" />
Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
-
- Posts: 2
- Joined: Wed, 17. Feb 21, 14:59
Re: Difference between <ship> and <component class="ship">
Hey, thank you for your answer! Given the structure and the numbers below, this would mean that there are nearly ten as much docked ships compared to free floating ones (935 vs. 8837)? Are OOS ships also saved as component? Kind of hard to get through the structure of the XML due to their size...
Code: Select all
<ship> (starting on line ~1800)
</ship>
... (935 ocurrences)
<ship>
</ship> (the last on line 254,434)
...
<connection connection="ships"> (starting at 269,669)
<component class="ship_s" ...>
</component>
... (8837 ocurrences)
...
Re: Difference between <ship> and <component class="ship">
It's possible that more are docked than flying. And, no, OOS ships are not component of a system. You can check that by coding a short script that finds all ships docked and not docked using
with docked set to false to get all flying ships. Also note that drones, boarding pods etc. are considered as ships. Setting unit to false excludes those in the search.
Cheers Euclid
Code: Select all
<find_ship name="$dockedships" space="player.galaxy" docked="true" unit="false" multiple="true"/>
Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786