Question about shipgroups and weighting

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

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

Post Reply
user1679
Posts: 803
Joined: Fri, 20. Jul 18, 23:20

Question about shipgroups and weighting

Post by user1679 » Sun, 3. Mar 24, 03:28

From the base game shipgroups.xml:
<group name="arg_fighter_s">
<select macro="ship_arg_s_heavyfighter_02_a_macro" weight="100"/>
<select macro="ship_arg_s_fighter_01_a_macro" weight="400"/>
<select macro="ship_arg_s_fighter_01_b_macro" weight="50"/>
<select macro="ship_arg_s_fighter_02_a_macro" weight="250"/>
<select macro="ship_arg_s_fighter_02_b_macro" weight="50"/>
<select macro="ship_arg_s_fighter_04_a_macro" weight="150"/>
</group>
Does higher weight mean a greater chance the ship will be picked when that type is needed? What is the upper limit? I downloaded a ship mod that only allows the player to build them. I wanted to add them as a possibility for NPCs to build but I don't want them to be more common than the default ships.

What if I have my own group with only one ship in it?
<group name="my_fighter_s">
<select macro="ship_my_fighter_s_macro" weight="1000"/>
</group>
Since the ships.xml has proper category [military, fighter], the single "my_fighter_s" should be chosen but does 1000 mean it will always be chosen over all other ships in that category?

Thanks.

Post Reply

Return to “X4: Foundations - Scripts and Modding”